- Joined
- Dec 16, 2007
- Messages
- 252
Okay, on my map you buy items with abilities, so when you cast an ability, you get the item. Now, you can get items by either cast thoose abilities or pick them from ground and here's a trigger to check if he already got a weapon, if he has, he will get gold back.
Now the problem is, that I can't check if it's from ground. If he picked the item from the ground, he shouldn't get gold back. And I have no idea how to check this, I was thinking of custom value, but I realized I used it for something else. And since I use abilities, I can't check if it's from shop.
Sorry for my english, I know it annoys you, but I hope you get what I mean.
-
Weapon
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-class of (Item being manipulated)) Equal to Permanent
-
Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-class of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-class of (Item being manipulated))
- (Item carried by (Hero manipulating item) in slot (Integer A)) Not equal to (Item being manipulated)
-
Then - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cffffcc00You canno...
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to Machine Hook
-
Then - Actions
- Player - Add 400 to (Owner of (Triggering unit)) Current gold
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to Shothook
-
Then - Actions
- Player - Add 600 to (Owner of (Triggering unit)) Current gold
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to Snipehook
-
Then - Actions
- Player - Add 1000 to (Owner of (Triggering unit)) Current gold
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Item-type of (Item being manipulated)) Equal to Toxicthrower
-
Then - Actions
- Player - Add 400 to (Owner of (Triggering unit)) Current gold
- Else - Actions
-
If - Conditions
- Hero - Drop (Item being manipulated) from (Triggering unit)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer A) from 1 to 6, do (Actions)
-
Events
Now the problem is, that I can't check if it's from ground. If he picked the item from the ground, he shouldn't get gold back. And I have no idea how to check this, I was thinking of custom value, but I realized I used it for something else. And since I use abilities, I can't check if it's from shop.
Sorry for my english, I know it annoys you, but I hope you get what I mean.