sentrywiz
S
sentrywiz
Ello fellow wc3 mappers. I am facing a major problem, as when I was creating the triggers I thought they would work however they don't sadly.
The idea of this trigger is when an item Refiner is used, to pick a random item from inventory that is not already refined, and with a chance on luck - to refine it. Otherwise if another chance, to return full gold cost. And bottom line if both chances fail, to display a FAIL message.
Before I copy paste it, let me just explain few variables:
* - Hero_Ref = Hero Manipulating Item
* - Item_Norm[1-11] = Bunch of item types (items) already predefined
* - Item_NormRef[1-11] = Bunch of item types (items) already predefined [these are the Refined version of the Normal items]
The part of the trigger that isn't working is the second For cycle, it is supposed to see for example that if an:
item_norm[5] is carried, remove it and create an item_normref[5]. But it doesn't. All works but the creation trigger.
Here is the code for this chaotic misdeed:

The idea of this trigger is when an item Refiner is used, to pick a random item from inventory that is not already refined, and with a chance on luck - to refine it. Otherwise if another chance, to return full gold cost. And bottom line if both chances fail, to display a FAIL message.
Before I copy paste it, let me just explain few variables:
* - Hero_Ref = Hero Manipulating Item
* - Item_Norm[1-11] = Bunch of item types (items) already predefined
* - Item_NormRef[1-11] = Bunch of item types (items) already predefined [these are the Refined version of the Normal items]
The part of the trigger that isn't working is the second For cycle, it is supposed to see for example that if an:
item_norm[5] is carried, remove it and create an item_normref[5]. But it doesn't. All works but the creation trigger.
Here is the code for this chaotic misdeed:
-
Normal Refining
-
Events
-
Unit - A unit Uses an item
-
-
Conditions
-
(Item-type of (Item being manipulated)) Equal to |c00DA0025Refiner|r
-
-
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 (Hero manipulating item) in slot (Integer A)) Not equal to No item
-
-
Then - Actions
-
For each (Integer B) from 1 to 11, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Item carried by Hero_Ref in slot (Integer A)) Equal to (Item carried by Hero_Ref of type Item_Norm[(Integer B)])
-
(Item carried by Hero_Ref in slot (Integer A)) Not equal to (Item carried by Hero_Ref of type |c00DA0025Refiner|r)
-
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 100) Less than or equal to 50
-
-
Then - Actions
-
Game - Display to (All players) for 7.00 seconds the text: (A lucky bastard refined |c00DA0025 + ((Name of (Item carried by (Hero manipulating item) in slot (Integer A))) + |r !!!))
-
Item - Remove (Item carried by (Hero manipulating item) in slot (Integer A))
-
Hero - Create Item_NormRef[(Integer B)] and give it to Hero_Ref
-
Skip remaining actions
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Random integer number between 1 and 100) Less than or equal to 8
-
-
Then - Actions
-
Game - Display to (Player group((Owner of Hero_Ref))) for 7.00 seconds the text: Fail! But you got y...
-
Player - Add 600 to (Owner of Hero_Ref) Current gold
-
Skip remaining actions
-
-
Else - Actions
-
Game - Display to (All players) for 7.00 seconds the text: Lol somebody wasted...
-
Skip remaining actions
-
-
-
-
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
-
-
-
-
Last edited by a moderator: