- Joined
- Nov 9, 2006
- Messages
- 2,561
Hello, i'm currently working on a map called Warcraft Royale and i've got some problems with desyncs at the start of my game. I assume it has something to do with initial triggers causing some errors. So if anyone could look quickly over my triggers i would appreciate it. Typically players desync when there are 6 or more players = 1 desync, the more players the more desync.
Init, creates error on screen when casting on impossible positions
Init, creates error on screen when casting on impossible positions
-
//TESH.scrollpos=0
-
//TESH.alwaysfold=0
-
function Sim_Error takes player ForPlayer, string msg returns nothing
-

local sound error = CreateSoundFromLabel("InterfaceError",false,false,false,10,10)
-

if (GetLocalPlayer() == ForPlayer) then
-


if (msg!="") and (msg!=null) then
-



call ClearTextMessages()
-



call DisplayTimedTextToPlayer(ForPlayer, 0.52, -1.00, 2.00, "|cffffcc00"+msg+"|r" )
-
-


endif
-


call StartSound( error )
-
-

endif
-

call KillSoundWhenDone( error)
-

set error=null
-
-
endfunction
-
Variables 1 Random
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- Random Hero --------
-


Set RandomHeroType[1] = Paladin
-


Set RandomHeroType[2] = Archmage
-


Set RandomHeroType[3] = Mountain King
-


Set RandomHeroType[4] = Blood Mage
-


Set RandomHeroType[5] = Blademaster
-


Set RandomHeroType[6] = Far Seer
-


Set RandomHeroType[7] = Tauren Chieftain
-


Set RandomHeroType[8] = Shadow Hunter
-


Set RandomHeroType[9] = Death Knight
-


Set RandomHeroType[10] = Lich
-


Set RandomHeroType[11] = Dreadlord
-


Set RandomHeroType[12] = Crypt Lord
-


Set RandomHeroType[13] = Keeper of the Grove
-


Set RandomHeroType[14] = Priestess of the Moon
-


Set RandomHeroType[15] = Demon Hunter
-


Set RandomHeroType[16] = Warden
-


Set RandomHeroType[17] = Alchemist
-


Set RandomHeroType[18] = Naga Sea Witch
-


Set RandomHeroType[19] = Tinker
-


Set RandomHeroType[20] = Beastmaster
-


Set RandomHeroType[21] = Dark Ranger
-


Set RandomHeroType[22] = Firelord
-


Set RandomHeroType[23] = Pandaren Brewmaster
-


Set RandomHeroType[24] = Pit Lord
-


Set RandomHeroType[25] = Ranger
-


Set RandomHeroType[26] = Ancient of Winter
-


Set RandomHeroType[27] = Ogre Battlemage
-


-------- Random Human --------
-


Set RandomHeroHuman[1] = Paladin
-


Set RandomHeroHuman[2] = Archmage
-


Set RandomHeroHuman[3] = Mountain King
-


Set RandomHeroHuman[4] = Blood Mage
-


Set RandomHeroHuman[5] = Ranger
-


-------- Random Orc --------
-


Set RandomHeroOrc[1] = Blademaster
-


Set RandomHeroOrc[2] = Far Seer
-


Set RandomHeroOrc[3] = Tauren Chieftain
-


Set RandomHeroOrc[4] = Shadow Hunter
-


Set RandomHeroOrc[5] = Ogre Battlemage
-


-------- Random Undead --------
-


Set RandomHeroUndead[1] = Death Knight
-


Set RandomHeroUndead[2] = Lich
-


Set RandomHeroUndead[3] = Dreadlord
-


Set RandomHeroUndead[4] = Crypt Lord
-


-------- Random Night Elf --------
-


Set RandomHeroNightElf[1] = Keeper of the Grove
-


Set RandomHeroNightElf[2] = Priestess of the Moon
-


Set RandomHeroNightElf[3] = Demon Hunter
-


Set RandomHeroNightElf[4] = Warden
-


Set RandomHeroNightElf[5] = Ancient of Winter
-


-------- Random Neutral --------
-


Set RandomHeroNeutral[1] = Alchemist
-


Set RandomHeroNeutral[2] = Naga Sea Witch
-


Set RandomHeroNeutral[3] = Tinker
-


Set RandomHeroNeutral[4] = Beastmaster
-


Set RandomHeroNeutral[5] = Dark Ranger
-


Set RandomHeroNeutral[6] = Firelord
-


Set RandomHeroNeutral[7] = Pandaren Brewmaster
-


Set RandomHeroNeutral[8] = Pit Lord
-


-------- Random Strength --------
-


Set RandomHeroStrength[1] = Paladin
-


Set RandomHeroStrength[2] = Mountain King
-


Set RandomHeroStrength[3] = Tauren Chieftain
-


Set RandomHeroStrength[4] = Death Knight
-


Set RandomHeroStrength[5] = Dreadlord
-


Set RandomHeroStrength[6] = Crypt Lord
-


Set RandomHeroStrength[7] = Alchemist
-


Set RandomHeroStrength[8] = Beastmaster
-


Set RandomHeroStrength[9] = Pandaren Brewmaster
-


Set RandomHeroStrength[10] = Pit Lord
-


Set RandomHeroStrength[11] = Ancient of Winter
-


-------- Random Agility --------
-


Set RandomHeroAgility[1] = Blademaster
-


Set RandomHeroAgility[2] = Shadow Hunter
-


Set RandomHeroAgility[3] = Priestess of the Moon
-


Set RandomHeroAgility[4] = Demon Hunter
-


Set RandomHeroAgility[5] = Warden
-


Set RandomHeroAgility[6] = Dark Ranger
-


Set RandomHeroAgility[7] = Firelord
-


Set RandomHeroAgility[8] = Ranger
-


-------- Random Intelligence --------
-


Set RandomHeroIntelligence[1] = Archmage
-


Set RandomHeroIntelligence[2] = Blood Mage
-


Set RandomHeroIntelligence[3] = Far Seer
-


Set RandomHeroIntelligence[4] = Lich
-


Set RandomHeroIntelligence[5] = Keeper of the Grove
-


Set RandomHeroIntelligence[6] = Naga Sea Witch
-


Set RandomHeroIntelligence[7] = Tinker
-


Set RandomHeroIntelligence[8] = Ogre Battlemage
-


-------- Random Melee --------
-


Set RandomHeroMelee[1] = Paladin
-


Set RandomHeroMelee[2] = Mountain King
-


Set RandomHeroMelee[3] = Blademaster
-


Set RandomHeroMelee[4] = Tauren Chieftain
-


Set RandomHeroMelee[5] = Death Knight
-


Set RandomHeroMelee[6] = Dreadlord
-


Set RandomHeroMelee[7] = Crypt Lord
-


Set RandomHeroMelee[8] = Demon Hunter
-


Set RandomHeroMelee[9] = Warden
-


Set RandomHeroMelee[10] = Alchemist
-


Set RandomHeroMelee[11] = Tinker
-


Set RandomHeroMelee[12] = Beastmaster
-


Set RandomHeroMelee[13] = Pandaren Brewmaster
-


Set RandomHeroMelee[14] = Pit Lord
-


Set RandomHeroMelee[15] = Ancient of Winter
-


-------- Random Ranged --------
-


Set RandomHeroRanged[1] = Archmage
-


Set RandomHeroRanged[2] = Blood Mage
-


Set RandomHeroRanged[3] = Far Seer
-


Set RandomHeroRanged[4] = Shadow Hunter
-


Set RandomHeroRanged[5] = Lich
-


Set RandomHeroRanged[6] = Keeper of the Grove
-


Set RandomHeroRanged[7] = Priestess of the Moon
-


Set RandomHeroRanged[8] = Naga Sea Witch
-


Set RandomHeroRanged[9] = Dark Ranger
-


Set RandomHeroRanged[10] = Firelord
-


Set RandomHeroRanged[11] = Ranger
-


Set RandomHeroRanged[12] = Ogre Battlemage
-
-
-
Variables 2 Color
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- Color String --------
-


Set Playercolorsstring[0] = |cffffcc00
-


Set Playercolorsstring[1] = |c00ff0303
-


Set Playercolorsstring[2] = |c000042ff
-


Set Playercolorsstring[3] = |c001ce6b9
-


Set Playercolorsstring[4] = |c00540081
-


Set Playercolorsstring[5] = |c00fffc01
-


Set Playercolorsstring[6] = |c00feba0e
-


Set Playercolorsstring[7] = |c0020c000
-


Set Playercolorsstring[8] = |c00e55bb0
-


Set Playercolorsstring[9] = |cFF808080
-


Set Playercolorsstring[10] = |cFF8080FF
-


Set Playercolorsstring[11] = |cFF008080
-


Set Playercolorsstring[12] = |cFF804000
-


Set Playercolorsstring[13] = |cFF8B0000
-


Set Playercolorsstring[14] = |cFF4169E1
-


Set Playercolorsstring[15] = |cFF40E0D0
-


Set Playercolorsstring[16] = |cFF800080
-


Set Playercolorsstring[17] = |cFFF08080
-


Set Playercolorsstring[18] = |c004E2A04
-


Set Playercolorsstring[19] = |cFF9ACD32
-


Set Playercolorsstring[20] = |cFFDDA0DD
-


Set Playercolorsstring[21] = |cFF000000
-


Set Playercolorsstring[22] = |cFFFFFFFF
-


Set Playercolorsstring[22] = |cFFFFFFFF
-


Set Playercolorsstring[23] = |cFF7FFFD4
-


Set Playercolorsstring[24] = |cFFDEB887
-


-------- Color --------
-


Set PlayerColor[0] = Black
-


Set PlayerColor[1] = Red
-


Set PlayerColor[2] = Blue
-


Set PlayerColor[3] = Teal
-


Set PlayerColor[4] = Purple
-


Set PlayerColor[5] = Yellow
-


Set PlayerColor[6] = Orange
-


Set PlayerColor[7] = Green
-


Set PlayerColor[8] = Pink
-


Set PlayerColor[9] = Gray
-


Set PlayerColor[10] = Light Blue
-


Set PlayerColor[11] = Dark Green
-


Set PlayerColor[12] = Brown
-


Set PlayerColor[13] = Maroon
-


Set PlayerColor[14] = Navy
-


Set PlayerColor[15] = Turquoise
-


Set PlayerColor[16] = Violet
-


Set PlayerColor[17] = Wheat
-


Set PlayerColor[18] = Peach
-


Set PlayerColor[19] = Mint
-


Set PlayerColor[20] = Lavender
-


Set PlayerColor[21] = Coal
-


Set PlayerColor[22] = Snow
-


Set PlayerColor[23] = Emerald
-


Set PlayerColor[24] = Peanut
-


-------- Color String --------
-


Set ColorString[0] = Black
-


Set ColorString[1] = Red
-


Set ColorString[2] = Blue
-


Set ColorString[3] = Teal
-


Set ColorString[4] = Purple
-


Set ColorString[5] = Yellow
-


Set ColorString[6] = Orange
-


Set ColorString[7] = Green
-


Set ColorString[8] = Pink
-


Set ColorString[9] = Grat
-


Set ColorString[10] = Light Blue
-


Set ColorString[11] = Dark Green
-


Set ColorString[12] = Brown
-


Set ColorString[13] = Maroon
-


Set ColorString[14] = Navy
-


Set ColorString[15] = Turquoise
-


Set ColorString[16] = Violet
-


Set ColorString[17] = Wheat
-


Set ColorString[18] = Peach
-


Set ColorString[19] = Mint
-


Set ColorString[20] = Lavender
-


Set ColorString[21] = Coal
-


Set ColorString[22] = Snow
-


Set ColorString[23] = Emerald
-


Set ColorString[24] = Peanut
-
-
-
Variables 3 Circle
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- Circle Variables --------
-


Set CircleRadius = 25000.00
-


Set CircleTimerColdown = 420.00
-


Set CircleMovementSpeedReduction = 10.00
-


Set CircleTimerColdownReduction = 60.00
-


Set CircleStaticDmg = 0.00
-


Set CircleStaticShrink = 25.00
-


Set CircleTimerMin = 60.00
-


Set CircleMaxReduction = 0
-


Set CircleMaxShrinkPercentage = 25
-


Set CircleIsShrinking = False
-


Set CircleNewPoint = (Center of (Playable map area))
-


Set CircleOldPoint = (Center of (Playable map area))
-


Set CircleCurrentRadius = CircleRadius
-


-------- Hint String --------
-


Set HintString[1] = Buy units from shops as first priority, so that killing creeps becomes easier. Use "|cffffcc00-ping unit shop|r" to find nearby shops.
-


Set HintString[2] = Your units will survive longer if you let the damage they take spread across evenly.
-


Set HintString[3] = If you click [|cffffcc00A|r]ttack with a unit on another friendly unit, creeps will change aggro to that target instead.
-


Set HintString[4] = If you're struggling with a type of resource drop, you can trade one type for another at the market place.
-


Set HintString[5] = As a temporary solution to food shortage, you can buy the "|cffffcc00tiny farm item|r" from item shops. The circle will destroy buildings though.
-


Set HintString[6] = With gold abundance and food shortage, your gold is better spent empowering your hero.
-


Set HintString[7] = Invest in spying units to find out who the enemy heroes are, what items they carry and what units they have.
-


Set HintString[8] = You can use large units and items such as "tiny farm or tower item" to lock in or zone out players.
-


Set HintString[9] = Dead players have full vision of the map. As a dead player don't give away positions. Show some courtesy!
-


Set HintString[10] = You should always bring some form of healing with you.
-
-
-
Variables 4 Drop Table
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


-------- T1 = 3 Powerups --------
-


Set ItemTypePowerupTier1[1] = Tome of Strength +1
-


Set ItemTypePowerupTier1[2] = Tome of Agility +1
-


Set ItemTypePowerupTier1[3] = Tome of Intelligence +1
-


-------- T2 = 3 Powerups --------
-


Set ItemTypePowerupTier2[1] = Tome of Strength +2
-


Set ItemTypePowerupTier2[2] = Tome of Agility +2
-


Set ItemTypePowerupTier2[3] = Tome of Intelligence +2
-


-------- T3 = 3 Powerups --------
-


Set ItemTypePowerupTier3[1] = Tome of Strength +3
-


Set ItemTypePowerupTier3[2] = Tome of Agility +3
-


Set ItemTypePowerupTier3[3] = Tome of Intelligence +3
-


-------- T1 = 2 Resources --------
-


Set ItemTypeResourceBundleTier1[1] = Small Gold Stack
-


Set ItemTypeResourceBundleTier1[2] = Small Lumber Bundle
-


Set ItemTypeResourceBundleTier1[3] = Small Food Stack
-


-------- T2 = 2 Resources --------
-


Set ItemTypeResourceBundleTier2[1] = Medium Gold Stack
-


Set ItemTypeResourceBundleTier2[2] = Medium Lumber Bundle
-


Set ItemTypeResourceBundleTier2[3] = Medium Food Stack
-


-------- T3 = 2 Resources --------
-


Set ItemTypeResourceBundleTier3[1] = Large Gold Stack
-


Set ItemTypeResourceBundleTier3[2] = Large Lumber Bundle
-


Set ItemTypeResourceBundleTier3[3] = Large Food Stack
-


-------- T1 = 10 Items --------
-


Set ItemTypePermanentitemTier1[1] = Cloak of Shadows
-


Set ItemTypePermanentitemTier1[2] = Gauntlets of Ogre Strength +3
-


Set ItemTypePermanentitemTier1[3] = Slippers of Agility +3
-


Set ItemTypePermanentitemTier1[4] = Mantle of Intelligence +3
-


Set ItemTypePermanentitemTier1[5] = Boots of Speed
-


Set ItemTypePermanentitemTier1[6] = Circlet of Nobility
-


Set ItemTypePermanentitemTier1[7] = Circlet of Nobility
-


Set ItemTypePermanentitemTier1[8] = Claws of Attack +6
-


Set ItemTypePermanentitemTier1[9] = Ring of Protection +2
-


Set ItemTypePermanentitemTier1[10] = Staff of Teleportation
-


-------- T2 = 15 Items --------
-


Set ItemTypePermanentitemTier2[1] = Claws of Attack +9
-


Set ItemTypePermanentitemTier2[2] = Pendant of Energy
-


Set ItemTypePermanentitemTier2[3] = Periapt of Vitality
-


Set ItemTypePermanentitemTier2[4] = Ring of Protection +3
-


Set ItemTypePermanentitemTier2[5] = Ring of Regeneration
-


Set ItemTypePermanentitemTier2[6] = Talisman of Evasion
-


Set ItemTypePermanentitemTier2[7] = Alleria's Flute of Accuracy
-


Set ItemTypePermanentitemTier2[8] = Belt of Giant Strength +6
-


Set ItemTypePermanentitemTier2[9] = Boots of Quel'Thalas +6
-


Set ItemTypePermanentitemTier2[10] = Diamond of Summoning
-


Set ItemTypePermanentitemTier2[11] = Legion Doom-Horn
-


Set ItemTypePermanentitemTier2[12] = Robe of the Magi +6
-


Set ItemTypePermanentitemTier2[13] = Runed Bracers
-


Set ItemTypePermanentitemTier2[14] = Scourge Bone Chimes
-


Set ItemTypePermanentitemTier2[14] = Sobi Mask
-


Set ItemTypePermanentitemTier2[15] = The Lion Horn of Stormwind
-


-------- T3 = 15 Items --------
-


Set ItemTypePermanentitemTier3[1] = Ancient Janggo of Endurance
-


Set ItemTypePermanentitemTier3[2] = Claws of Attack +12
-


Set ItemTypePermanentitemTier3[3] = Cloak of Flames
-


Set ItemTypePermanentitemTier3[4] = Crystal Ball
-


Set ItemTypePermanentitemTier3[5] = Helm of Valor
-


Set ItemTypePermanentitemTier3[6] = Hood of Cunning
-


Set ItemTypePermanentitemTier3[7] = Khadgar's Pipe of Insight
-


Set ItemTypePermanentitemTier3[8] = Medallion of Courage
-


Set ItemTypePermanentitemTier3[9] = Warsong Battle Drums
-


Set ItemTypePermanentitemTier3[10] = Amulet of Spell Shield
-


Set ItemTypePermanentitemTier3[11] = Khadgar's Gem of Health
-


Set ItemTypePermanentitemTier3[12] = Orb of Darkness
-


Set ItemTypePermanentitemTier3[13] = Pendant of Mana
-


Set ItemTypePermanentitemTier3[14] = Ring of Protection +4
-


Set ItemTypePermanentitemTier3[15] = Staff of Silence
-


-------- T4/Artifact = 7 Items --------
-


Set ItemTypeArtifact[1] = Claws of Attack +15
-


Set ItemTypeArtifact[2] = Crown of Kings +5
-


Set ItemTypeArtifact[3] = Kelen's Dagger of Escape
-


Set ItemTypeArtifact[4] = Mask of Death
-


Set ItemTypeArtifact[5] = Orb of Frost
-


Set ItemTypeArtifact[6] = Ring of Protection +5
-


Set ItemTypeArtifact[7] = Tome of Power
-
-
-
Settings
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Game - Set Lock resource trading to Off
-


For each (Integer A) from 1 to 24, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






((Player((Integer A))) slot status) Equal to Is playing
-
-





Then - Actions
-






Player - Turn Gives bounty On for (Player((Integer A)))
-






Player - Set (Player((Integer A))) Food max to 100
-






Player - Set (Player((Integer A))) Food cap to 12
-






Player Group - Add (Player((Integer A))) to PingGroup
-






Player Group - Add (Player((Integer A))) to HintGroup
-






Player Group - Add (Player((Integer A))) to IncomeGroup
-






Player - For (Player((Integer A))), turn Alliance (non-aggression) On toward Neutral Passive
-






Player - For (Player((Integer A))), turn Friendly spell targeting On toward Neutral Passive
-






Player - For Neutral Passive, turn Alliance (non-aggression) On toward (Player((Integer A)))
-






Player - For Neutral Passive, turn Friendly spell targeting On toward (Player((Integer A)))
-
-





Else - Actions
-






Do nothing
-
-
-
-
-
-
-
Quest
-

Events
-


Map initialization
-
-

Conditions
-

Actions
-


Quest - Create a Optional quest titled Info with the description This map was made b..., using icon path ReplaceableTextures\CommandButtons\BTNSentryWard.blp
-


Quest - Enable (Last created quest)
-


Quest - Create a Optional quest titled Commands with the description Player Commands: -..., using icon path ReplaceableTextures\CommandButtons\BTNFaerieFire.blp
-


Quest - Enable (Last created quest)
-


Quest - Create a Optional quest titled Credits with the description Protector of the Pi..., using icon path ReplaceableTextures\CommandButtons\BTNPeasant.blp
-


Quest - Enable (Last created quest)
-


Quest - Create a Required quest titled Goal with the description Be the last hero st..., using icon path ReplaceableTextures\CommandButtons\BTNBattleStations.blp
-


Quest - Enable (Last created quest)
-


Quest - Create a Required quest titled Item Drops with the description When killing neutra..., using icon path ReplaceableTextures\CommandButtons\BTNINV_Misc_Coin_02.blp
-


Quest - Enable (Last created quest)
-


Quest - Create a Required quest titled The Circle with the description The circle is a bar..., using icon path ReplaceableTextures\CommandButtons\BTNAbility_Tracking.blp
-


Quest - Enable (Last created quest)
-


Quest - Create a Required quest titled Balance Changes with the description This is the list of..., using icon path ReplaceableTextures\CommandButtons\BTNClayFigurine.blp
-


Quest - Enable (Last created quest)
-
-
-
Start and Soul Spawn
-

Events
-


Time - Elapsed game time is 0.00 seconds
-
-

Conditions
-

Actions
-


Game - Display to (All players) the text: |cffffcc00Map by:|r...
-


Cinematic - Fade out over 0.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-


-------- Wait --------
-


Wait 10.00 game-time seconds
-


Cinematic - Fade in over 1.00 seconds using texture Black Mask and color (100.00%, 100.00%, 100.00%) with 0.00% transparency
-


-------- Create Circle --------
-


Set TempPoint1 = (Center of (Playable map area))
-


Unit - Create 1 Eye of the Circle for Neutral Passive at TempPoint1 facing 0.00 degrees
-


Set CircleUnit = (Last created unit)
-


-------- Enable Triggers --------
-


Trigger - Turn off Squad Command <gen>
-


Trigger - Turn on Income <gen>
-


Trigger - Turn on Damage Tick Loop <gen>
-


Trigger - Run Create Timer <gen> (checking conditions)
-


-------- Create Souls --------
-


For each (Integer A) from 1 to 24, do (Actions)
-



Loop - Actions
-




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





If - Conditions
-






((Player((Integer A))) slot status) Equal to Is playing
-
-





Then - Actions
-






Set TempPoint1 = (Random point in Spawn <gen>)
-






Player Group - Add (Player((Integer A))) to PlayersRemaining
-






Unit - Create 1 Soul of a Hero for (Player((Integer A))) at TempPoint1 facing 0.00 degrees
-






Set PlayerUnit[(Player number of (Player((Integer A))))] = (Last created unit)
-






Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
-






Special Effect - Destroy (Last created special effect)
-






Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
-






Selection - Select (Last created unit) for (Player((Integer A)))
-






Camera - Pan camera for (Player((Integer A))) to TempPoint1 over 0.00 seconds
-






Unit - Add Hero Race List to (Triggering unit)
-






Unit - Add Hero Traits List to (Triggering unit)
-






Unit - Add Hero Attribute List to (Triggering unit)
-






Custom script: call RemoveLocation(udg_TempPoint1)
-
-





Else - Actions
-






Do nothing
-
-
-
-
-


-------- Create Multiboard --------
-


Trigger - Run Create Multiboard <gen> (checking conditions)
-
-










