Warcraft III resources & community, 2003–2006 · archived

Gold Stealing Spell

3 posts
#1

Gold Stealing Spell

Ok I made a spell for my pirate in my map called "plunder", and what I want it to do is basicly be like a target affect where it simply targets a hero and takes away all his gold and gives it to you.

I've tried a few different things, but I can't get it to fully work.

Does anyone know how to make a spell like this?
#2
This is simple, you know! Just create trigger to

Set gold to ((current gold of (owner of (target unit of abilty being cast))) - xx) for (owner of (target unit of abilty being cast)).

..and..

Add xx to (owner of (triggering unit))
#3

something more

yeahp. just like what the upstairs has said. and if you want to add any condition such as success ratio, you can write an extra action as the follow:

-set variable Steal=random number between 1 and 2.
-if,then, else (multi function)
-if Steal is 1, then give xxx gold to owner of casting unit

-if steal is 2, then display game text to all players: steal failed

_____________________________________________________
just an example, you can make it more complecated,if you want...actually i have a steal skill like this as well in my map....lots of fun!