- Joined
- Jun 10, 2007
- Messages
- 780
My problem is that this trigger works, but sometimes a hero won't be randomed for a player. I think it's because when a hero is randomed I delete the unit from the variable so it's not picked twice but it doesn't write a new unit to it. Then when a player gets the same integer randomed they get no hero. Can anybody help identify my problem?
-
Gamemode Arem
-
Events
-
Player - Player 2 (Blue) types a chat message containing -arem as An exact match
-
Player - Player 2 (Blue) types a chat message containing -emar as An exact match
-
Player - Player 2 (Blue) types a chat message containing -allrandomeasymode as An exact match
-
-
Conditions
-
Gamemode[1] Equal to 0
-
-
Actions
-
Trigger - Turn off Repick <gen>
-
Trigger - Turn off Repick Timeout <gen>
-
Unit - Pause Night Tavern 0002 <gen>
-
Unit - Pause Day Tavern 0003 <gen>
-
Set GamemodeString[1] = All Random Easy Mode
-
Set EM_ON = 1
-
Quest - Change the title of (Last created quest) to All Random Easy Mod...
-
Quest - Change the description of (Last created quest) to All random is a mod...
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
Leaderboard - Create a leaderboard for (Player group((Player((Integer A))))) titled All Random 0/0
-
Leaderboard - Add Player 1 (Red) to (Last created leaderboard) with label |CFFFF0303The SENTI... and value 0
-
Leaderboard - Add Player 2 (Blue) to (Last created leaderboard) with label (Name of Player 2 (Blue)) and value 0
-
Leaderboard - Add Player 3 (Teal) to (Last created leaderboard) with label (Name of Player 3 (Teal)) and value 0
-
Leaderboard - Add Player 4 (Purple) to (Last created leaderboard) with label (Name of Player 4 (Purple)) and value 0
-
Leaderboard - Add Player 5 (Yellow) to (Last created leaderboard) with label (Name of Player 5 (Yellow)) and value 0
-
Leaderboard - Add Player 6 (Orange) to (Last created leaderboard) with label (Name of Player 6 (Orange)) and value 0
-
Leaderboard - Add Player 7 (Green) to (Last created leaderboard) with label |CFF20C000The SCOUR... and value 0
-
Leaderboard - Add Player 8 (Pink) to (Last created leaderboard) with label (Name of Player 8 (Pink)) and value 0
-
Leaderboard - Add Player 9 (Gray) to (Last created leaderboard) with label (Name of Player 9 (Gray)) and value 0
-
Leaderboard - Add Player 10 (Light Blue) to (Last created leaderboard) with label (Name of Player 10 (Light Blue)) and value 0
-
Leaderboard - Add Player 11 (Dark Green) to (Last created leaderboard) with label (Name of Player 11 (Dark Green)) and value 0
-
Leaderboard - Add Player 12 (Brown) to (Last created leaderboard) with label (Name of Player 12 (Brown)) and value 0
-
-
-
Leaderboard - Show (Last created leaderboard)
-
Trigger - Turn on Give gold <gen>
-
Set Gamemode[1] = 1
-
Cinematic - Clear the screen of text messages for (All players)
-
Game - Display to (All players) for 5.00 seconds the text: All Random Easy Mod...
-
Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Hero - Make (Picked player) Heroes gain 150.00% experience from future kills)
-
Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Player - Set (Picked player) handicap to 100.00%)
-
Player Group - Pick every player in (All players matching (((Matching player) slot status) Equal to Is playing)) and do (Player - Set (Picked player) handicap to 100.00%)
-
Player Group - Pick every player in (All players controlled by a User player) and do (Player - Set (Picked player) Current gold to 1600)
-
Wait 0.02 seconds
-
For each (Integer B) from 1 to 20, do (Unit Group - Add all units of (Units of type RandomHeroes[(Integer A)]) to AllRandomHeroGroup[1])
-
For each (Integer A) from 2 to 6, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Set PlayerRandom[(Player number of (Player((Integer A))))] = True) else do (Do nothing))
-
For each (Integer A) from 8 to 12, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Set PlayerRandom[(Player number of (Player((Integer A))))] = True) else do (Do nothing))
-
For each (Integer A) from 2 to 6, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Set LeakLocation[7346] = (Center of Sentinal Base <gen>)
-
Set RandomHeroesINTEGER[(Player number of (Player((Integer A))))] = (Random integer number between 1 and 20)
-
Unit - Create 1 RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer A))))]] for (Player((Integer A))) at LeakLocation[7346] facing Default building facing (270.0) degrees
-
Set RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer A))))]] = No unit-type
-
Unit Group - Remove all units of (Units of type RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer A))))]]) from AllRandomHeroGroup[1]
-
Set RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer A))))]] = (Unit-type of (Random unit from AllRandomHeroGroup[1]))
-
Custom script: call RemoveLocation (udg_LeakLocation[7346])
-
Wait 0.02 seconds
-
-
Else - Actions
-
-
-
-
For each (Integer B) from 8 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Then - Actions
-
Set LeakLocation[7347] = (Center of Scourge Base <gen>)
-
Set RandomHeroesINTEGER[(Player number of (Player((Integer B))))] = (Random integer number between 1 and 20)
-
Unit - Create 1 RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer B))))]] for (Player((Integer B))) at LeakLocation[7347] facing Default building facing (270.0) degrees
-
Set RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer B))))]] = No unit-type
-
If (RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer B))))]] Equal to No unit-type) then do (Do nothing) else do (Do nothing)
-
Unit Group - Remove all units of (Units of type RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer B))))]]) from AllRandomHeroGroup[1]
-
Set RandomHeroes[RandomHeroesINTEGER[(Player number of (Player((Integer B))))]] = (Unit-type of (Random unit from AllRandomHeroGroup[1]))
-
Custom script: call RemoveLocation (udg_LeakLocation[7347])
-
Wait 0.02 seconds
-
-
Else - Actions
-
-
-
-
-
-
AREM HERO POOL
-
Events
-
Time - Elapsed game time is 0.01 seconds
-
-
Conditions
-
Actions
-
Set RandomHeroes[1] = Attribute Mage
-
Unit Group - Add (Random unit from (Units of type Attribute Mage)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[2] = Battleship
-
Unit Group - Add (Random unit from (Units of type Battleship)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[3] = Demon Witch
-
Unit Group - Add (Random unit from (Units of type Demon Witch)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[4] = Eastern Warlock
-
Unit Group - Add (Random unit from (Units of type Eastern Warlock)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[5] = Goblin
-
Unit Group - Add (Random unit from (Units of type Goblin)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[6] = Juggernaut
-
Unit Group - Add (Random unit from (Units of type Juggernaut)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[7] = Lightning Incarnate
-
Unit Group - Add (Random unit from (Units of type Lightning Incarnate)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[8] = Lightning Revenant
-
Unit Group - Add (Random unit from (Units of type Lightning Revenant)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[9] = Magnataur
-
Unit Group - Add (Random unit from (Units of type Magnataur)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[10] = Mutant
-
Unit Group - Add (Random unit from (Units of type Mutant)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[11] = Nerubian Arachnid
-
Unit Group - Add (Random unit from (Units of type Nerubian Arachnid)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[12] = Northern Warlock
-
Unit Group - Add (Random unit from (Units of type Northern Warlock)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[13] = Obsidian Destroyer
-
Unit Group - Add (Random unit from (Units of type Obsidian Destroyer)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[14] = Ogre Mage
-
Unit Group - Add (Random unit from (Units of type Ogre Mage)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[15] = Royal Guard
-
Unit Group - Add (Random unit from (Units of type Royal Guard)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[16] = Siren of the Depths
-
Unit Group - Add (Random unit from (Units of type Siren of the Depths)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[17] = Sniper
-
Unit Group - Add (Random unit from (Units of type Sniper)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[18] = Stone Giant
-
Unit Group - Add (Random unit from (Units of type Stone Giant)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[19] = Weaponcrafter
-
Unit Group - Add (Random unit from (Units of type Weaponcrafter)) to AllRandomHeroGroup[1]
-
Set RandomHeroes[20] = Witch Doctor
-
Unit Group - Add (Random unit from (Units of type Witch Doctor)) to AllRandomHeroGroup[1]
-
Wait 0.01 seconds
-
For each (Integer A) from 1 to 20, do (Unit Group - Add all units of (Units of type RandomHeroes[(Integer A)]) to AllRandomHeroGroup[1])
-
For each (Integer A) from 1 to 20, do (Unit Group - Add (Random unit from (Units of type RandomHeroes[(Integer A)])) to AllRandomHeroGroup[1])
-
For each (Integer A) from 8 to 12, do (Actions)
-
Loop - Actions
-
Set RandomHeroesINTEGER[(Player number of (Player((Integer A))))] = (Random integer number between 1 and 20)
-
-
-
For each (Integer A) from 2 to 6, do (Actions)
-
Loop - Actions
-
Set RandomHeroesINTEGER[(Player number of (Player((Integer A))))] = (Random integer number between 1 and 20)
-
-
-
-