- Joined
- May 11, 2012
- Messages
- 2,108
This system quite fails to deliver the goal, which is give every player random hero, that is DIFFERENT from other player's hero. So 2 players don't get the same hero. Even when repicking, player can't get the same hero that another player has taken
-
Initializing Heroes
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- ====== Initializing Variables ====== --------
-


Set RandomHeroes_Max = 12
-


Set RandomMax = 12
-


Set RandomHero_Array[1] = |cff00ff00Abystic Flamelord|r (Agility)
-


Set RandomHero_Array[2] = |cff00ff00Broodmother|r (Agility)
-


Set RandomHero_Array[3] = |cffff0000Shadow|r (Strength)
-


Set RandomHero_Array[4] = |cff00ff00Demon Hunter|r (Agility)
-


Set RandomHero_Array[5] = |cff00ff00Illusionist|r (Agility)
-


Set RandomHero_Array[6] = |cff00ff00Lava Spawn|r (Agility)
-


Set RandomHero_Array[7] = |cff0000ffLightning Destroyer|r (Intelligence)
-


Set RandomHero_Array[8] = |cff00ff00Swordsman|r (Agility)
-


Set RandomHero_Array[9] = |cff0000ffNaga Siren|r (Intelligence)
-


Set RandomHero_Array[10] = |cffff0000Naga Royal Guard|r (Strength)
-


Set RandomHero_Array[11] = |cffff0000The Rapist|r (Strength)
-


Set RandomHero_Array[12] = |cffff0000The Scorpio|r (Strength)
-


For each (Integer TempInt) from 1 to RandomMax, do (Actions)
-



Loop - Actions
-




Set Random_Data[TempInt] = TempInt
-
-
-


Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
-
All Random
-

Events
-

Conditions
-


AR Equal to True
-


SH Not equal to True
-


AP Not equal to True
-
-

Actions
-


For each (Integer TempInt) from 1 to 8, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






(Player[TempInt] controller) Equal to User
-






(Player[TempInt] slot status) Equal to Is playing
-






(Number of units in (Units owned by Player[TempInt] matching (((Matching unit) is A Hero) Equal to True))) Equal to 0
-
-





Then - Actions
-






Set TempPoint = (Center of Return Area <gen>)
-






Set Random_Hero = (Random integer number between 1 and RandomMax)
-






Unit - Create 1 RandomHero_Array[Random_Data[Random_Hero]] for Player[TempInt] at TempPoint facing Default building facing degrees
-






Set PlayerHero[TempInt] = (Last created unit)
-






Game - Display to (All players) the text: (((PlayerColors[TempInt] + PlayerName_NoHero[TempInt]) + |r|c00FDD017has randomed ) + (PlayerColors[2] + (Name of PlayerHero[TempInt])))
-






Hero - Create Ankh and give it to PlayerHero[TempInt]
-






Item - Set charges remaining in (Last created item) to 5
-






Hero - Create Mana Potion and give it to PlayerHero[TempInt]
-






Item - Set charges remaining in (Last created item) to 10
-






Hero - Create Health Potion and give it to PlayerHero[TempInt]
-






Item - Set charges remaining in (Last created item) to 10
-






Selection - Select PlayerHero[TempInt] for Player[TempInt]
-






Camera - Pan camera for Player[TempInt] to TempPoint over 0.00 seconds
-






Player - Limit training of Heroes to 0 for Player[TempInt]
-






Set PlayerName[TempInt] = ((PlayerColors[TempInt] + PlayerName_NoHero[TempInt]) + ( ( + ((Name of PlayerHero[TempInt]) + (PlayerColors[TempInt] + )))))
-






Player - Set name of Player[TempInt] to PlayerName[TempInt]
-






For each (Integer TempInt2) from 1 to 8, do (Actions)
-







Loop - Actions
-








If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-









If - Conditions
-










Difficulty Equal to Hard
-
-









Then - Actions
-










Player - Add ((6000 / HumanPlayersActive) - 250) to Player[TempInt2] Current gold
-
-









Else - Actions
-










If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-











If - Conditions
-












Difficulty Equal to Extreme
-
-











Then - Actions
-












Player - Add ((4000 / HumanPlayersActive) - 250) to Player[TempInt2] Current gold
-
-











Else - Actions
-












Player - Add ((8000 / HumanPlayersActive) - 250) to Player[TempInt2] Current gold
-
-
-
-
-
-
-






Set Random_Data[Random_Hero] = RandomMax
-






Set RandomMax = (RandomMax - 1)
-






Custom script: call RemoveLocation(udg_TempPoint)
-
-





Else - Actions
-
-
-
-


Trigger - Turn off (This trigger)
-


Custom script: set udg_TempPoint = null
-


Custom script: call DestroyTrigger(GetTriggeringTrigger())
-
-
-
Repick AR
-

Events
-

Conditions
-


AR Equal to True
-


AP Not equal to True
-


SH Not equal to True
-
-

Actions
-


For each (Integer TempInt) from 1 to 8, do (Actions)
-



Loop - Actions
-




If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-





If - Conditions
-






Repick[TempInt] Equal to False
-






(Triggering player) Equal to Player[TempInt]
-
-





Then - Actions
-






Set Repick[TempInt] = True
-






Unit - Remove PlayerHero[TempInt] from the game
-






Game - Display to (All players) the text: (((PlayerColors[TempInt] + PlayerName_NoHero[TempInt]) + |r|c00FDD017has repicked ) + (PlayerColors[2] + (Name of PlayerHero[TempInt])))
-






Set TempPoint = (Center of Return Area <gen>)
-






Set Random_Hero = (Random integer number between 1 and RandomMax)
-






Unit - Create 1 RandomHero_Array[Random_Data[Random_Hero]] for Player[TempInt] at TempPoint facing Default building facing degrees
-






Set PlayerHero[TempInt] = (Last created unit)
-






Game - Display to (All players) the text: (((PlayerColors[TempInt] + PlayerName_NoHero[TempInt]) + |r|c00FDD017has repicked into ) + (PlayerColors[2] + (Name of PlayerHero[TempInt])))
-






Hero - Create Ankh and give it to PlayerHero[TempInt]
-






Item - Set charges remaining in (Last created item) to 5
-






Hero - Create Mana Potion and give it to PlayerHero[TempInt]
-






Item - Set charges remaining in (Last created item) to 10
-






Hero - Create Health Potion and give it to PlayerHero[TempInt]
-






Item - Set charges remaining in (Last created item) to 10
-






Selection - Select PlayerHero[TempInt] for Player[TempInt]
-






Camera - Pan camera for Player[TempInt] to TempPoint over 0.00 seconds
-






Player - Limit training of Heroes to 0 for Player[TempInt]
-






Set PlayerName[TempInt] = ((PlayerColors[TempInt] + PlayerName_NoHero[TempInt]) + ( ( + ((Name of PlayerHero[TempInt]) + (PlayerColors[TempInt] + )))))
-






Player - Set name of Player[TempInt] to PlayerName[TempInt]
-






Player - Add -250 to Player[TempInt] Current gold
-






Set Random_Data[Random_Hero] = RandomMax
-






Set RandomMax = (RandomMax - 1)
-






Custom script: call RemoveLocation(udg_TempPoint)
-
-





Else - Actions
-






Set TempPlayerGroup = (Player group(Player[TempInt]))
-






Game - Display to TempPlayerGroup the text: |c00FDD017You can't...
-






Custom script: call DestroyForce(udg_TempPlayerGroup)
-






Custom script: set udg_TempPlayerGroup = null
-
-
-
-
-


Custom script: set udg_TempPoint = null
-
-




