Heey im trying to make a chest throw down a random item from a group table i make, but i drops the same item every time??
Any suggestions on what it is?
This is the Items that should be randomly dropped
This is the trigger to drop the random item in the selected table.
-Thanks in advance!
Any suggestions on what it is?
This is the Items that should be randomly dropped
Code:
Glove Items Table
Events
Map initialization
Conditions
Actions
Set Glove_Items[0] = |cFFC000C0Nightslayer Gloves|r
Set Glove_Items[1] = |cffc000c0Acherus Knight´s Gloves|r
Set Glove_Items[2] = |cFFC000C0Lawbringer Gauntlets|r
Set Glove_Items[3] = |cFFC000C0Gauntlets of Might|r
Set Glove_Items[4] = |cFFC000C0Felheart Gloves|r
Set Glove_Items[5] = |cFFC000C0Earthfury Gauntlets|r
Set Glove_Items[6] = |cFFC000C0Cenarion Gloves|r
Set Glove_Items[7] = |cFFBB00DDGloves of Prophecy|r
Set Glove_Items[8] = |cFFBB00DDArcanist Gloves|r
Set Glove_Items[9] = |cff3464e0Adventurers Gloves|r
Set Glove_Items[10] = |cff3464e0Adventurers Gloves|r
This is the trigger to drop the random item in the selected table.
Code:
Open Chest
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacked unit)) Equal to Chest
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Attacked unit) belongs to an enemy of (Owner of (Attacking unit))) Equal to True
Then - Actions
Animation - Play (Attacked unit)'s stand - 2 animation
Unit - Change ownership of (Attacked unit) to Neutral Passive and Change color
Unit - Remove Chest Mark Showing (+1) from (Attacked unit)
Item - Create Glove_Items[(Random integer number between 0 and 10)] at ((Position of (Attacking unit)) offset by (100.00, 0.00))
Animation - Reset (Attacked unit)'s animation
Else - Actions
-Thanks in advance!