Could someone, if they have the time, make a trigger where a person needs more than 1 item of the same type to make an item. For example, a hero needs 2 Copper Bars and 1 Axe Handle item to make a Copper Axe. Please send me a Private Message when the person who does this favor for me. -Thank You
I learned this from a friend of mine.
This recipe involves a recipe, and two items.
You use an emerald, sword and recipe, to make a posion dagger.
There's probably a simplier way to make it, but i used a spell attached to the recipe which, when casts, "combines" the items.
It also gives a message if the user does not have the appriopriate items.
Poisoner Dagger
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Dagger
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Casting unit) has an item of type Steel Sword) Equal to True
((Casting unit) has an item of type Emerald) Equal to True
Then - Actions
Hero - Create Poisoner's Dagger and give it to (Casting unit)
Item - Remove (Item carried by (Casting unit) of type Steel Sword)
Item - Remove (Item carried by (Casting unit) of type Emerald)
Item - Remove (Item carried by (Casting unit) of type Poisoner's Dagger)
Else - Actions
Game - Display to (Player group((Owner of (Casting unit)))) the text: You do not have the...
Using the code above this post, you could add a stacking
trigger. This stacking trigger goes like this
Code:
item Stacking
Event
A unit aciqure an item
condition
(item multi something) = Gold bars
(Note you can add other stackable items here but don't forget the OR, this trigger is my universal item stacker)
Action
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 6, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer A) Not equal to (Integer B)
(Item-type of (Item carried by (Hero manipulating item) in slot (Integer A))) Equal to (Item-type of (Item carried by (Hero manipulating item) in slot (Integer B)))
Then - Action
Item - Set charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A)) to ((Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer A))) + (Charges remaining in (Item carried by (Hero manipulating item) in slot (Integer B))))
Item - Remove (Item carried by (Hero manipulating item) in slot (Integer B))
Else - Actions
Do nothing
Now with this stacking trigger with can see if they have 2 of the same item. Now add this condition to the combining code
Code:
(Charges remaining in (Item carried by (Hero) of type Item)) Equal to 2
so in result you get
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Dagger
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Casting unit) has an item of type Steel Sword) Equal to True
((Casting unit) has an item of type Emerald) Equal to True (Charges remaining in (Item carried by (Hero) of type Item)) Equal to 2
Then - Actions
Hero - Create Poisoner's Dagger and give it to (Casting unit)
Item - Remove (Item carried by (Casting unit) of type Steel Sword)
Item - Remove (Item carried by (Casting unit) of type Emerald)
Item - Remove (Item carried by (Casting unit) of type Poisoner's Dagger)
Else - Actions
Game - Display to (Player group((Owner of (Casting unit)))) the text: You do not hav...[/b]
i think you are able to remodify these trigger to your map.
in other words anyone could make that trigger. It's way too easy just do in the trigger if he has the item copper, axe handle then create item and give to unit: .... too easy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.