Quick Question

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

User avatar
EmPIr312
Newcomer
Posts: 17
Joined: October 16th, 2007, 9:25 pm
Title: Learning New Stuff
Location: Your Couch

Quick Question

Post by EmPIr312 »

How to add urn like vampirism fire so It gives vampire 30 gold every 25 seconds?
Image
GeorgeMots
Crusader
Posts: 4236
Joined: January 27th, 2007, 4:46 pm
Location: Greece, Veria

Re: Quick Question

Post by GeorgeMots »

Here is the trigger for dota which is similar to what youre lookin for
Spoiler:
function OOII01O takes nothing returns nothing
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+8)
endfunction
function OO0O11O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,7,true)
call TriggerAddAction(t,function OOII01O)
set I1I=true
set IO1IOO=t
call SetPlayerTechResearched(III0[0],1378889780,1)
call SetPlayerTechResearched(II10[0],1378889780,1)
call SetPlayerHandicapXP(III0[1],1.5)
call SetPlayerHandicapXP(III0[2],1.5)
call SetPlayerHandicapXP(III0[3],1.5)
call SetPlayerHandicapXP(III0[4],1.5)
call SetPlayerHandicapXP(III0[5],1.5)
call SetPlayerHandicapXP(II10[1],1.5)
call SetPlayerHandicapXP(II10[2],1.5)
call SetPlayerHandicapXP(II10[3],1.5)
call SetPlayerHandicapXP(II10[4],1.5)
call SetPlayerHandicapXP(II10[5],1.5)
endfunction
http://slowbro.org/
`·.,¸,.·*¯`·.,¸,.·*¯[;::;(。◕‿‿­­​­­­­­◕。)
Image
Image
Image
Spoiler:
(03:36:55) xkiska: im too much of a dumbass to understand this
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Quick Question

Post by Bartimaeus »

Georgemots wrote:Here is the trigger for dota which is similar to what youre lookin for
Spoiler:
function OOII01O takes nothing returns nothing
call SetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(III0[5],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[1],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[2],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[3],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[4],PLAYER_STATE_RESOURCE_GOLD)+8)
call SetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(II10[5],PLAYER_STATE_RESOURCE_GOLD)+8)
endfunction
function OO0O11O takes nothing returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterTimerEvent(t,7,true)
call TriggerAddAction(t,function OOII01O)
set I1I=true
set IO1IOO=t
call SetPlayerTechResearched(III0[0],1378889780,1)
call SetPlayerTechResearched(II10[0],1378889780,1)
call SetPlayerHandicapXP(III0[1],1.5)
call SetPlayerHandicapXP(III0[2],1.5)
call SetPlayerHandicapXP(III0[3],1.5)
call SetPlayerHandicapXP(III0[4],1.5)
call SetPlayerHandicapXP(III0[5],1.5)
call SetPlayerHandicapXP(II10[1],1.5)
call SetPlayerHandicapXP(II10[2],1.5)
call SetPlayerHandicapXP(II10[3],1.5)
call SetPlayerHandicapXP(II10[4],1.5)
call SetPlayerHandicapXP(II10[5],1.5)
endfunction
Didyae not see this is in the GUI section?
And I'll answer this in a minute.

(Edit)
item4gold (Title of Trigger)
Events
Unit - A unit owned by Player 12 (Brown) Acquires an item
Conditions
((Triggering unit) has an item of type Tome of Experience) Equal to True (Tome of Experience = (Whatever item you want it)
((Triggering unit) is A Hero) Equal to True
Actions
Countdown Timer - Start Timer as a Repeating timer that will expire in 25.00 seconds (Timer = Variable, create a timer variable (new empty (Default), and use that for "Timer")
Trigger - Turn off (This trigger)

timerexpires (Title of Trigger)
Events
Time - Timer expires (Timer = Variable you created from before)
Conditions
Actions
Player - Add 30 to Player 12 (Brown) Current gold

vampiredropsitem (Title of Trigger)
Events
Unit - A unit owned by Player 12 (Brown) Loses an item
Conditions
((Triggering unit) is A Hero) Equal to True
(Item-type of (Last dropped item)) Equal to Tome of Experience (Tome of Experience = (Whatever item you want))
Actions
Countdown Timer - Pause Timer (Timer = Variable you created from before)
Trigger - Turn on item4gold <gen>

This should be rather fool-proof. I think.
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: Quick Question

Post by Black-Hole »

Skillet uses a much simpler trigger lol...

In 4.02b he said he just made a trigger like this
Events: Unit buys item
Condition: Item Equal to (your item)
Actions: Enable Trigger

Events: Every 30 sec
Conditions: Unit has (your item) in Invintory
Actions: Add 25 gold to owner of (unit (with item)

You can change the trigger to only work with certain units or player colors. If you just put the second trigger in it will work for every player and every unit that buys one and has an inintory.

You can also make a trigger to only allow one to be bought

Events: A unit aquires an (your item)
Conditions: (triggering unit) equal to (has (your item (in invintory)
Actions: Remove bought item from the game
Add (Gold) to (owner of(triggering units)) current gold.
User avatar
Bartimaeus
Tyrannical Drama Queen
Posts: 4430
Joined: November 19th, 2007, 5:05 am
Been thanked: 2 times

Re: Quick Question

Post by Bartimaeus »

Black-Hole wrote:Skillet uses a much simpler trigger lol...

In 4.02b he said he just made a trigger like this
Events: Unit buys item
Condition: Item Equal to (your item)
Actions: Enable Trigger

Events: Every 30 sec
Conditions: Unit has (your item) in Invintory
Actions: Add 25 gold to owner of (unit (with item)

You can change the trigger to only work with certain units or player colors. If you just put the second trigger in it will work for every player and every unit that buys one and has an inintory.

You can also make a trigger to only allow one to be bought

Events: A unit aquires an (your item)
Conditions: (triggering unit) equal to (has (your item (in invintory)
Actions: Remove bought item from the game
Add (Gold) to (owner of(triggering units)) current gold.
I was trying to make it absolutely fool-proof, but yes, that would also work.