- Joined
- Mar 15, 2012
- Messages
- 2,877
Could anyone help me find the problem and solution to it?
It is an item recipe system however our resource database was no help because its 3 or more items required for one recipe and one of the recipes of 3 of the same item-type and since there is basically none of said type of recipe system... yeah in a problem. Though there might be a VJASS one, I never decided to check because well I need a GUI solution.
[trigger=]
Events
Map initialization
Conditions
Actions
-------- --------
Set item1[1] = Claws of Attack +3
Set item2[1] = Claws of Attack +3
Set recipe[1] = Claws of Attack +3
Set output[1] = |cff8E388E[1337]|r |cffFF0000Blitzkrieg Blade|r
Set itemamountreq[1] = 3
-------- --------
Set item1[2] = Claws of Attack +3
Set item2[2] = Claws of Attack +3
Set recipe[2] = Mooncrystal
Set output[2] = Crown of Kings +5
Set itemamountreq[2] = 3
-------- --------
Set recipes_ammount = 2
[/trigger]
[trigger=]
Events
Unit - A unit Acquires an item
Conditions
Actions
Trigger - Turn off (This trigger)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set itemslot[(Integer A)] = No item
For each (Integer ItemRun) from 1 to recipes_ammount, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to recipe[ItemRun]
Then - 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 carried by (Triggering unit) in slot (Integer A)) Not equal to itemslot[(Integer A)]
Or - Any (Conditions) are true
Conditions
((Triggering unit) has an item of type item1[ItemRun]) Equal to True
((Triggering unit) has an item of type item2[ItemRun]) Equal to True
((Triggering unit) has an item of type recipe[ItemRun]) Equal to True
Then - Actions
Set itemslot[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer A) Equal to 3
Then - Actions
Hero - Create output[ItemRun] and give it to (Triggering unit)
Game - Display to (All players) the text: (String((Integer A)))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type item1[ItemRun]))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type item2[ItemRun]))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type recipe[ItemRun]))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type output[ItemRun]))
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 carried by (Triggering unit) in slot (Integer A)) Equal to itemslot[(Integer A)]
Then - Actions
Item - Remove itemslot[(Integer A)]
Set itemslot[(Integer A)] = No item
Else - Actions
Else - Actions
Else - Actions
Else - Actions
Trigger - Turn on (This trigger)
[/trigger]
It is an item recipe system however our resource database was no help because its 3 or more items required for one recipe and one of the recipes of 3 of the same item-type and since there is basically none of said type of recipe system... yeah in a problem. Though there might be a VJASS one, I never decided to check because well I need a GUI solution.
[trigger=]
Events
Map initialization
Conditions
Actions
-------- --------
Set item1[1] = Claws of Attack +3
Set item2[1] = Claws of Attack +3
Set recipe[1] = Claws of Attack +3
Set output[1] = |cff8E388E[1337]|r |cffFF0000Blitzkrieg Blade|r
Set itemamountreq[1] = 3
-------- --------
Set item1[2] = Claws of Attack +3
Set item2[2] = Claws of Attack +3
Set recipe[2] = Mooncrystal
Set output[2] = Crown of Kings +5
Set itemamountreq[2] = 3
-------- --------
Set recipes_ammount = 2
[/trigger]
[trigger=]
Events
Unit - A unit Acquires an item
Conditions
Actions
Trigger - Turn off (This trigger)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Set itemslot[(Integer A)] = No item
For each (Integer ItemRun) from 1 to recipes_ammount, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Item-type of (Item being manipulated)) Equal to recipe[ItemRun]
Then - 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 carried by (Triggering unit) in slot (Integer A)) Not equal to itemslot[(Integer A)]
Or - Any (Conditions) are true
Conditions
((Triggering unit) has an item of type item1[ItemRun]) Equal to True
((Triggering unit) has an item of type item2[ItemRun]) Equal to True
((Triggering unit) has an item of type recipe[ItemRun]) Equal to True
Then - Actions
Set itemslot[(Integer A)] = (Item carried by (Triggering unit) in slot (Integer A))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Integer A) Equal to 3
Then - Actions
Hero - Create output[ItemRun] and give it to (Triggering unit)
Game - Display to (All players) the text: (String((Integer A)))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type item1[ItemRun]))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type item2[ItemRun]))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type recipe[ItemRun]))
Game - Display to (All players) the text: (Name of (Item carried by (Triggering unit) of type output[ItemRun]))
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 carried by (Triggering unit) in slot (Integer A)) Equal to itemslot[(Integer A)]
Then - Actions
Item - Remove itemslot[(Integer A)]
Set itemslot[(Integer A)] = No item
Else - Actions
Else - Actions
Else - Actions
Else - Actions
Trigger - Turn on (This trigger)
[/trigger]
Last edited: