Can object editor or some import cause desync?
I Have:
Handle Vars
CS System
TT, PUI, ABC, ABCT and Data System
on my map can someone cause desync at game start?
Here is my last version:
http://www.epicwar.com/maps/79469/
this don't desync every time, is random desync.
here is the triggers run at game start
Triggers
JASS:
scope Init
globals
string array Name
unit array stock
integer array HeroType
constant integer LastHero = 72
integer array GodType
constant integer LastGod = 17
private constant string LogTitle = "Change Log Test"
private constant string LogTxt = "I(youkaiz) trying to fix some bugs and optimize the map and this need a lots of map testes because this a will make some test versions to find the best way to game, here is some changes:|nSTR change from 10 to 20 HP.|nInt change from 10 to 20 mana|nFix some bugs|nStats balance|nAdd comand -share/-unshare|nFix Hero change Bugs|nBandits and Gnolls with lass HP"
private constant string FAQ = "FF(Free for All) is beta mode, it don't is complete"
private constant string title1 = "Special Thanks"
private constant string credit1 = "scaler, DemioES, Robertp3001, Onesixeight, geforce, Nizidramaniiyt, DemioES, rickmaruig, HeliaXDemoN, HerO|r.TechieS, Cha Vue, wastabee and Sorin Petrov."
private constant string title2 = "Systens and Spells"
private constant string credit2 = "Hanky, PurplePoot, Daxtreme, Rising_Dusk, HINDYhat, TROLLVOTTEL, waaaks!, Tinki3, KilledKEnny, Andrewgosu, Überplayer, kenny!, kentchow75, Darkt3mpl3r and cr4xzZz."
private constant string title3 = "Icons and Models"
private constant string credit3 = "Kitabatake, Mc !, Daelin, JetFangInferno, sc_freek, WILL THE ALMIGHTY, Callahan, N00byStance and Blizzard Entreteriment"
private constant string s1 = "|c00808080Life|r # Change Start Lifes(Default 50)"
private constant string s2 = "|c00ff0000AP|r All Pick"
private constant string s3 = "|c00ff0000SH|r Same Heros"
private constant string s4 = "|c00ff0000AR|r All Random"
private constant string s5 = "|c0000ff00FF|r Free For All"
private constant string s6 = "|c0000ff00FL|r Flag Mode"
private constant string s7 = "|c00ffff00DO|r Duel Off"
private constant string s8 = "|c00800000DA|r Enable Fog"
private constant string s9 = "|c000000ffEV|r Events On"
private constant string sa = "|c00800080WTF|r No Cooldown"
endglobals
private function Actions takes nothing returns nothing
local integer i = 0
set Name [0 ] = ( "|CFFFF0000" + ( GetPlayerName (Player (0 )) + "|R" ) )
set Name [1 ] = ( "|CFF0000FF" + ( GetPlayerName (Player (1 )) + "|R" ) )
set Name [2 ] = ( "|CFF18E7BD" + ( GetPlayerName (Player (2 )) + "|R" ) )
set Name [3 ] = ( "|CFF520084" + ( GetPlayerName (Player (3 )) + "|R" ) )
set Name [4 ] = ( "|CFFFFFF00" + ( GetPlayerName (Player (4 )) + "|R" ) )
set Name [5 ] = ( "|CFFFF8A08" + ( GetPlayerName (Player (5 )) + "|R" ) )
set Name [6 ] = ( "|CFF18BE00" + ( GetPlayerName (Player (6 )) + "|R" ) )
set Name [7 ] = ( "|CFFE759AD" + ( GetPlayerName (Player (7 )) + "|R" ) )
set Name [8 ] = ( "|CFF949694" + ( GetPlayerName (Player (8 )) + "|R" ) )
set Name [9 ] = ( "|CFF7BBEF7" + ( GetPlayerName (Player (9 )) + "|R" ) )
set Name [10 ] = ( "|CFF086142" + ( GetPlayerName (Player (10 )) + "|R" ) )
set Name [11 ] = ( "|CFF4A2800" + ( GetPlayerName (Player (11 )) + "|R" ) )
set stock [0 ] = gg_unit_h01B_0510
set stock [1 ] = gg_unit_h01B_0509
set stock [2 ] = gg_unit_h01B_0508
set stock [3 ] = gg_unit_h01B_0507
set stock [4 ] = gg_unit_h01B_0506
set stock [5 ] = gg_unit_h01B_0505
set stock [6 ] = gg_unit_h01B_0516
set stock [7 ] = gg_unit_h01B_0515
set stock [8 ] = gg_unit_h01B_0514
set stock [9 ] = gg_unit_h01B_0513
set stock [10 ] = gg_unit_h01B_0512
set stock [11 ] = gg_unit_h01B_0511
set HeroType [0 ] = 'E007'
set HeroType [1 ] = 'EC70'
set HeroType [2 ] = 'EC72'
set HeroType [3 ] = 'EC69'
set HeroType [4 ] = 'EC71'
set HeroType [5 ] = 'EC73'
set HeroType [6 ] = 'EC75'
set HeroType [7 ] = 'EC78'
set HeroType [8 ] = 'EC74'
set HeroType [9 ] = 'EC76'
set HeroType [10 ] = 'EC77'
set HeroType [11 ] = 'EC79'
set HeroType [12 ] = 'EC78'
set HeroType [13 ] = 'EC83'
set HeroType [14 ] = 'EC81'
set HeroType [15 ] = 'EC80'
set HeroType [16 ] = 'EC82'
set HeroType [17 ] = 'HC24'
set HeroType [18 ] = 'HC27'
set HeroType [19 ] = 'H01D'
set HeroType [20 ] = 'HC25'
set HeroType [21 ] = 'HC28'
set HeroType [22 ] = 'HC30'
set HeroType [23 ] = 'HC31'
set HeroType [24 ] = 'HC32'
set HeroType [25 ] = 'HC29'
set HeroType [26 ] = 'HC97'
set HeroType [27 ] = 'HC35'
set HeroType [28 ] = 'H01C'
set HeroType [29 ] = 'HC37'
set HeroType [30 ] = 'HC36'
set HeroType [31 ] = 'HC38'
set HeroType [32 ] = 'OC54'
set HeroType [33 ] = 'OC58'
set HeroType [34 ] = 'O001'
set HeroType [35 ] = 'OC55'
set HeroType [36 ] = 'OC56'
set HeroType [37 ] = 'OC57'
set HeroType [38 ] = 'OC59'
set HeroType [39 ] = 'OC63'
set HeroType [40 ] = 'OC62'
set HeroType [41 ] = 'OC60'
set HeroType [42 ] = 'OC61'
set HeroType [43 ] = 'OC67'
set HeroType [44 ] = 'OC68'
set HeroType [45 ] = 'OC66'
set HeroType [46 ] = 'OC65'
set HeroType [47 ] = 'OC64'
set HeroType [48 ] = 'UC40'
set HeroType [49 ] = 'UC39'
set HeroType [50 ] = 'UC43'
set HeroType [51 ] = 'UC41'
set HeroType [52 ] = 'UC42'
set HeroType [53 ] = 'UC45'
set HeroType [54 ] = 'UC48'
set HeroType [55 ] = 'UC44'
set HeroType [56 ] = 'UC46'
set HeroType [57 ] = 'UC47'
set HeroType [58 ] = 'UC49'
set HeroType [59 ] = 'UC50'
set HeroType [60 ] = 'UC53'
set HeroType [61 ] = 'UC51'
set HeroType [62 ] = 'UC52'
set HeroType [63 ] = 'N03D'
set HeroType [64 ] = 'O002'
set HeroType [65 ] = 'H002'
set HeroType [66 ] = 'O003'
set HeroType [67 ] = 'H004'
set HeroType [68 ] = 'O005'
set HeroType [69 ] = 'H010'
set HeroType [70 ] = 'H011'
set HeroType [71 ] = 'H018'
set HeroType [72 ] = 'HC26'
set GodType [0 ] = 'H00S'
set GodType [1 ] = 'H00R'
set GodType [2 ] = 'U00B'
set GodType [3 ] = 'UC34'
set GodType [4 ] = 'H000'
set GodType [5 ] = 'UC99'
set GodType [6 ] = 'H00I'
set GodType [7 ] = 'UC84'
set GodType [8 ] = 'H00T'
set GodType [9 ] = 'UC95'
set GodType [10 ] = 'UC98'
set GodType [11 ] = 'HC19'
set GodType [12 ] = 'H00P'
set GodType [13 ] = 'N000'
set GodType [14 ] = 'U000'
set GodType [15 ] = 'H00W'
set GodType [16 ] = 'HC33'
set GodType [17 ] = 'H00Q'
loop
set Random [i ] = false
set HasPower [i ] = false
set kills [i ] = 0
set deaths [i ] = 0
set killscont [i ] = 0
set playerline [i ] = 0
set hero [i ] = null
set mode [i ] = 0
set i = i +1
exitwhen i >11
endloop
set i = 0
loop
call SetPlayerState (Player (i ),PLAYER_STATE_RESOURCE_GOLD ,5000 )
set i = i +1
exitwhen i >11
endloop
call FogEnable (false )
call FogMaskEnable (false )
call PlayMusic (gg_snd_StartTheme )
call SetUnitAnimation ( gg_unit_n03N_0258 , "stand flesh first" )
call SetPlayerHandicapXP ( Player (PLAYER_NEUTRAL_AGGRESSIVE ), 0.00 )
call SetDestructableInvulnerable ( gg_dest_ATg1_0389 , true )
call SetDestructableInvulnerable ( gg_dest_ATg1_0390 , true )
call SetDestructableInvulnerable ( gg_dest_ATg1_0391 , true )
call SetDestructableInvulnerable ( gg_dest_ATg1_0392 , true )
call SetDestructableInvulnerable ( gg_dest_ATg1_0017 , true )
call SetDestructableInvulnerable ( gg_dest_LTe1_0000 , true )
call SetDestructableInvulnerable ( gg_dest_LTe1_0001 , true )
call SetDestructableInvulnerable ( gg_dest_LTe1_0010 , true )
call SetDestructableInvulnerable ( gg_dest_LTe1_0011 , true )
call SetDestructableInvulnerable ( gg_dest_LTe1_0012 , true )
call SetDestructableInvulnerable ( gg_dest_LTe1_0013 , true )
call SetDestructableInvulnerable ( gg_dest_ATg1_0261 , true )
call SetUnitColor ( gg_unit_EC00_0225 , PLAYER_COLOR_RED )
call SetUnitColor ( gg_unit_EC04_0231 , PLAYER_COLOR_RED )
call SetUnitColor ( gg_unit_HC12_0220 , PLAYER_COLOR_RED )
call SetUnitColor ( gg_unit_HC08_0098 , PLAYER_COLOR_RED )
call SetUnitColor ( gg_unit_EC04_0003 , PLAYER_COLOR_GREEN )
call SetUnitColor ( gg_unit_EC00_0008 , PLAYER_COLOR_GREEN )
call SetUnitColor ( gg_unit_HC12_0011 , PLAYER_COLOR_GREEN )
call SetUnitColor ( gg_unit_HC08_0012 , PLAYER_COLOR_GREEN )
call SetUnitColor ( gg_unit_HC08_0014 , ConvertPlayerColor (12 ) )
call SetUnitColor ( gg_unit_HC12_0009 , ConvertPlayerColor (12 ) )
call SetUnitColor ( gg_unit_EC04_0005 , ConvertPlayerColor (12 ) )
call SetUnitColor ( gg_unit_EC00_0006 , ConvertPlayerColor (12 ) )
call SetUnitColor ( gg_unit_EC04_0004 , PLAYER_COLOR_BLUE )
call SetUnitColor ( gg_unit_EC00_0007 , PLAYER_COLOR_BLUE )
call SetUnitColor ( gg_unit_HC08_0013 , PLAYER_COLOR_BLUE )
call SetUnitColor ( gg_unit_HC12_0010 , PLAYER_COLOR_BLUE )
call SetUnitInvulnerable (gg_unit_UC95_0190 ,true )
call SetUnitInvulnerable (gg_unit_H00I_0192 ,true )
call SetUnitInvulnerable (gg_unit_UC18_0193 ,true )
call CreateQuestBJ ( bj_QUESTTYPE_REQ_DISCOVERED , LogTitle , LogTxt , "ReplaceableTextures\\CommandButtons\\BTNSoul.blp" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"You can see all changes at:" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"|c00ff9900http://youkaiz.blogspot.com/|r" )
call CreateQuestBJ ( bj_QUESTTYPE_REQ_DISCOVERED , "Start Game Options" ,"Player Red can chose game mode at 20 starting game seconds" ,"ReplaceableTextures\\CommandButtons\\BTNStormEarth&Fire.blp" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s1 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s2 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s3 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s4 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s5 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s6 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s7 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s8 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,s9 )
call CreateQuestItemBJ (bj_lastCreatedQuest ,sa )
call CreateQuestBJ ( bj_QUESTTYPE_REQ_DISCOVERED , "F.A.Q." ,FAQ , "ReplaceableTextures\\CommandButtons\\BTNControlMagic.blp" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"To Open gates go nearby of it." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"You can buy more itens crossing the portal" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"in front of your team respawn." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"To buy lasts itens defeat Quimera and Cerberus" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"and go in circles of power." )
call CreateQuestBJ ( bj_QUESTTYPE_REQ_DISCOVERED , "Kick Players" , "TRIGSTR_2231" , "ReplaceableTextures\\CommandButtons\\BTNBoots.blp" )
call CreateQuestBJ ( bj_QUESTTYPE_OPT_DISCOVERED ,title1 ,credit1 ,"ReplaceableTextures\\CommandButtons\\BTNHeroMountainKing.blp" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"Midway: Programming." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"[IG]Arthas: Design." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"youkaiz: Loadscreen. XD" )
call CreateQuestBJ ( bj_QUESTTYPE_OPT_DISCOVERED ,title2 ,credit2 ,"ReplaceableTextures\\CommandButtons\\BTNPP_Heart_Steal.blp" )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"Vexorian: Jass New Gen and Wc3mapoptimizer." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"KaTTaNa: local handle vars." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"Nantuko Husk: Tooltip Creator." )
call CreateQuestItemBJ (bj_lastCreatedQuest ,"Midway: Creeps Respawn." )
call CreateQuestBJ ( bj_QUESTTYPE_OPT_DISCOVERED ,title3 ,credit3 ,"ReplaceableTextures\\CommandButtons\\BTNAbsorbMagic.blp" )
call SetNHRT ()
endfunction
public function InitTrig takes nothing returns nothing
set gg_trg_Init = CreateTrigger ()
call TriggerAddAction ( gg_trg_Init , function Actions )
endfunction
endscope
JASS:
scope Start
globals
force team1
force team2
endglobals
private function Actions takes nothing returns nothing
local integer i = 0
local timer t = CreateTimer ()
local timerdialog td = CreateTimerDialog (t )
call TimerStart (t ,20.0 ,false ,null )
call TimerDialogSetTitle (td ,"Start in:" )
call TimerDialogDisplay (td ,true )
call TriggerSleepAction (19.0 )
call DestroyTimer (t )
call DestroyTimerDialog (td )
set t = null
set td = null
call InitComandos ()
call RegPLeave ()
set team1 = CreateForce ()
set team2 = CreateForce ()
set i = 0
loop
if GetPlayerSlotState (Player (i )) == PLAYER_SLOT_STATE_PLAYING and i <=5 then
call ForceAddPlayer ( team1 ,Player (i ))
elseif GetPlayerSlotState (Player (i )) == PLAYER_SLOT_STATE_PLAYING and i >=6 then
call ForceAddPlayer ( team2 ,Player (i ))
else
call RemoveUnit (stock [i ])
endif
set i = i +1
exitwhen i >11
endloop
call ClearTextMessages ()
call TriggerSleepAction (11.0 )
call ModifyGateBJ ( bj_GATEOPERATION_OPEN , gg_dest_ATg1_0261 )
call TriggerSleepAction (60.0 )
call InitGates ()
endfunction
private function CincoMin takes nothing returns nothing
local integer i = 0
call StartSound (gg_snd_SatanSpaw )
call SetUnitInvulnerable (gg_unit_UC18_0193 ,false )
call SetUnitOwner (gg_unit_UC18_0193 , Player (PLAYER_NEUTRAL_AGGRESSIVE ), false )
call SetUnitPosition (gg_unit_UC18_0193 ,GetRectCenterX (gg_rct_Arena ),GetRectCenterY (gg_rct_Arena ))
call PingMinimap (GetRectCenterX (gg_rct_Arena ),GetRectCenterY (gg_rct_Arena ),3. )
call RemoveUnit ( gg_unit_h00Y_0173 )
call RemoveUnit ( gg_unit_h00Y_0284 )
call RemoveUnit ( gg_unit_h00Y_0283 )
call ModifyGateBJ ( bj_GATEOPERATION_CLOSE , gg_dest_ATg1_0261 )
loop
if GetUnitTypeId (hero [i ]) == dummy then
call CustomVictoryBJ (Player (i ),false ,false )
endif
set i = i +1
exitwhen i >11
endloop
call RemoveUnit ( gg_unit_n021_0030 )
call RemoveUnit ( gg_unit_n022_0031 )
call RemoveUnit ( gg_unit_n02W_0032 )
call RemoveUnit ( gg_unit_n02X_0033 )
call RemoveUnit ( gg_unit_n03Q_0036 )
call RemoveUnit ( gg_unit_n03O_0037 )
endfunction
globals
rect array spaw
integer array crspt
endglobals
private function ACS takes nothing returns nothing
local integer i = 1
local real x
local real y
loop
set x = GetRandomReal (GetRectMinX (spaw [i ]), GetRectMaxX (spaw [i ]))
set y = GetRandomReal (GetRectMinY (spaw [i ]), GetRectMaxY (spaw [i ]))
call CreateUnit (Player (PLAYER_NEUTRAL_AGGRESSIVE ),crspt [i ], x , y , GetRandomReal (0 , 360 ) )
set i = i +1
exitwhen i > 8
endloop
set i = GetRandomInt (1 ,8 )
set x = GetRandomReal (GetRectMinX (spaw [9 ]), GetRectMaxX (spaw [9 ]))
set y = GetRandomReal (GetRectMinY (spaw [9 ]), GetRectMaxY (spaw [9 ]))
call CreateUnit (Player (PLAYER_NEUTRAL_AGGRESSIVE ),crspt [i ], x , y , GetRandomReal (0 , 360 ) )
set i = GetRandomInt (1 ,8 )
set x = GetRandomReal (GetRectMinX (spaw [10 ]), GetRectMaxX (spaw [10 ]))
set y = GetRandomReal (GetRectMinY (spaw [10 ]), GetRectMaxY (spaw [10 ]))
call CreateUnit (Player (PLAYER_NEUTRAL_AGGRESSIVE ),crspt [i ], x , y , GetRandomReal (0 , 360 ) )
endfunction
function StartACS takes nothing returns nothing
local timer t = CreateTimer ()
local real r =180. /I2R (CountPlayersInForceBJ (team1 )+CountPlayersInForceBJ (team2 ))
call TimerStart (t ,r , true , function ACS )
endfunction
private function SetAC takes nothing returns nothing
local real w8 = 300
call StartACS ()
set spaw [1 ] = gg_rct_C0
set spaw [2 ] = gg_rct_C1
set spaw [3 ] = gg_rct_C2
set spaw [4 ] = gg_rct_C3
set spaw [5 ] = gg_rct_C4
set spaw [6 ] = gg_rct_C5
set spaw [7 ] = gg_rct_C6
set spaw [8 ] = gg_rct_C7
set spaw [9 ] = gg_rct_C9
set spaw [10 ] = gg_rct_C8
set crspt [1 ] = 'n007'
set crspt [2 ] = 'n012'
set crspt [3 ] = 'n00P'
set crspt [4 ] = 'n00Z'
set crspt [5 ] = 'n018'
set crspt [6 ] = 'n00D'
set crspt [7 ] = 'n005'
set crspt [8 ] = 'n00K'
call TriggerSleepAction ( w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 , "Creeps Level 2" )
set crspt [1 ] = 'n009'
set crspt [2 ] = 'n013'
set crspt [3 ] = 'n00Q'
set crspt [4 ] = 'n00W'
set crspt [5 ] = 'n019'
set crspt [6 ] = 'n00E'
set crspt [7 ] = 'n004'
set crspt [8 ] = 'n00L'
call TriggerSleepAction ( w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 ,"Creeps Level 3" )
set crspt [1 ] = 'n008'
set crspt [2 ] = 'n010'
set crspt [3 ] = 'n00R'
set crspt [4 ] = 'n00X'
set crspt [5 ] = 'n01A'
set crspt [6 ] = 'n00F'
set crspt [7 ] = 'n003'
set crspt [8 ] = 'n00M'
call TriggerSleepAction ( w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 ,"Creeps Level 4" )
set crspt [1 ] = 'n00C'
set crspt [2 ] = 'n014'
set crspt [3 ] = 'n00S'
set crspt [4 ] = 'n00V'
set crspt [5 ] = 'n01B'
set crspt [6 ] = 'n00G'
set crspt [7 ] = 'n006'
set crspt [8 ] = 'n00N'
call TriggerSleepAction (w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 ,"Creeps Level 5" )
set crspt [1 ] = 'n00B'
set crspt [2 ] = 'n015'
set crspt [3 ] = 'n00T'
set crspt [4 ] = 'n00Y'
set crspt [5 ] = 'n01C'
set crspt [6 ] = 'n00H'
set crspt [7 ] = 'n002'
set crspt [8 ] = 'n00O'
call TriggerSleepAction (w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 , "Creeps Level 6" )
set crspt [1 ] = 'n00A'
set crspt [2 ] = 'n02R'
set crspt [3 ] = 'n00U'
set crspt [4 ] = 'n02O'
set crspt [5 ] = 'n02T'
set crspt [6 ] = 'n00I'
set crspt [7 ] = 'n02C'
set crspt [8 ] = 'n02J'
call TriggerSleepAction ( w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 , "Creeps Level 7" )
set crspt [1 ] = 'n01Y'
set crspt [2 ] = 'n016'
set crspt [3 ] = 'n02M'
set crspt [4 ] = 'n02N'
set crspt [5 ] = 'n02U'
set crspt [6 ] = 'n02G'
set crspt [7 ] = 'n02B'
set crspt [8 ] = 'n02I'
call TriggerSleepAction ( w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 ,"Creeps Level 8" )
set crspt [1 ] = 'n02A'
set crspt [2 ] = 'n02S'
set crspt [3 ] = 'n02L'
set crspt [4 ] = 'n02P'
set crspt [5 ] = 'n02V'
set crspt [6 ] = 'n02E'
set crspt [7 ] = 'n001'
set crspt [8 ] = 'n00J'
call TriggerSleepAction ( w8 )
call DisplayTextToPlayer (GetLocalPlayer (), 0 , 0 ,"Creeps Level 9" )
set crspt [1 ] = 'n029'
set crspt [2 ] = 'n02Q'
set crspt [3 ] = 'n02K'
set crspt [4 ] = 'n011'
set crspt [5 ] = 'n017'
set crspt [6 ] = 'n02F'
set crspt [7 ] = 'n02D'
set crspt [8 ] = 'n02H'
endfunction
public function InitTrig takes nothing returns nothing
local trigger t = CreateTrigger ()
call TriggerRegisterTimerEvent (t ,0.00 , false )
call TriggerAddAction (t , function Actions )
set t = CreateTrigger ()
call TriggerRegisterTimerEvent (t ,20.00 , false )
call TriggerAddAction (t , function SetAC )
set t = CreateTrigger ()
call TriggerRegisterTimerEvent (t ,300.00 , false )
call TriggerAddAction (t , function CincoMin )
set t = null
endfunction
endscope
JASS:
library NHRT
globals
private integer BG
private real array X
private real array Y
private real array A
private unit NH0
private unit NH1
private unit NH2
private unit NH3
private unit NH4
private unit NH5
private unit NH6
private unit NH7
private unit NH8
private unit NH9
private unit NH10
private unit NH11
private unit NH12
private unit NH13
private unit NH14
private unit NH15
private unit NH16
private unit NH17
private unit NH18
endglobals
//! textmacro NHT1 takes num
private function Cond$num$ takes nothing returns boolean
return GetOwningPlayer (GetTriggerUnit ()) != Player (PLAYER_NEUTRAL_AGGRESSIVE ) and IsUnitType (NH$num$ ,UNIT_TYPE_DEAD ) == true
endfunction
private function NHT$num$ takes nothing returns nothing
call SetUnitPosition ( GetTriggerUnit (), GetRectCenterX (gg_rct_B$num$ ),GetRectCenterY (gg_rct_B$num$ ) )
if IsUnitType (GetTriggerUnit (), UNIT_TYPE_HERO ) then
call PanCameraToTimedForPlayer ( GetOwningPlayer (GetTriggerUnit ()),GetRectCenterX (gg_rct_B$num$ ),GetRectCenterY (gg_rct_B$num$ ), 0 )
endif
endfunction
private function InitT$num$ takes nothing returns nothing
local trigger t = CreateTrigger ()
local region reg = CreateRegion ()
call RegionAddRect (reg ,gg_rct_A$num$ )
call TriggerRegisterEnterRegion ( t ,reg ,null )
call TriggerAddCondition ( t , Condition ( function Cond$num$ ) )
call TriggerAddAction (t , function NHT$num$ )
set t = null
set reg = null
endfunction
//! endtextmacro
private function NHTJudas takes nothing returns nothing
if GetRandomInt (1 ,2 ) == 1 then
call SetUnitPosition ( GetTriggerUnit (), GetRectCenterX (gg_rct_SS ),GetRectCenterY (gg_rct_SS ) )
if IsUnitType (GetTriggerUnit (), UNIT_TYPE_HERO ) then
call PanCameraToTimedForPlayer ( GetOwningPlayer (GetTriggerUnit ()),GetRectCenterX (gg_rct_SS ),GetRectCenterY (gg_rct_SS ), 0 )
endif
else
call SetUnitPosition ( GetTriggerUnit (), GetRandomX (gg_rct_SC ),GetRandomY (gg_rct_SC ) )
if IsUnitType (GetTriggerUnit (), UNIT_TYPE_HERO ) then
call PanCameraToTimedForPlayer ( GetOwningPlayer (GetTriggerUnit ()),GetRandomX (gg_rct_SC ),GetRandomY (gg_rct_SC ), 0 )
endif
endif
endfunction
//! textmacro NHT2 takes num
private function Cond$num$ takes nothing returns boolean
return GetOwningPlayer (GetTriggerUnit ()) != Player (PLAYER_NEUTRAL_AGGRESSIVE ) and IsUnitType (NH$num$ ,UNIT_TYPE_DEAD ) == true
endfunction
private function InitT$num$ takes nothing returns nothing
local trigger t = CreateTrigger ()
local region reg = CreateRegion ()
call RegionAddRect (reg ,gg_rct_A$num$ )
call TriggerRegisterEnterRegion ( t ,reg ,null )
call TriggerAddCondition ( t , Condition ( function Cond$num$ ) )
call TriggerAddAction (t , function NHTJudas )
set t = null
set reg = null
endfunction
//! endtextmacro
private function NHTCerberus takes nothing returns nothing
call SetUnitPosition ( GetTriggerUnit (), GetRectCenterX (gg_rct_SS ),GetRectCenterY (gg_rct_SS ) )
if IsUnitType (GetTriggerUnit (), UNIT_TYPE_HERO ) then
call PanCameraToTimedForPlayer ( GetOwningPlayer (GetTriggerUnit ()),GetRectCenterX (gg_rct_SS ),GetRectCenterY (gg_rct_SS ), 0 )
endif
endfunction
//! textmacro NHT3 takes num
private function Cond$num$ takes nothing returns boolean
return GetOwningPlayer (GetTriggerUnit ()) != Player (PLAYER_NEUTRAL_AGGRESSIVE ) and IsUnitType (NH$num$ ,UNIT_TYPE_DEAD ) == true
endfunction
private function InitT$num$ takes nothing returns nothing
local trigger t = CreateTrigger ()
local region reg = CreateRegion ()
call RegionAddRect (reg ,gg_rct_A$num$ )
call TriggerRegisterEnterRegion ( t ,reg ,null )
call TriggerAddCondition ( t , Condition ( function Cond$num$ ) )
call TriggerAddAction (t , function NHTCerberus )
set t = null
set reg = null
endfunction
//! endtextmacro
//! runtextmacro NHT1("0")
//! runtextmacro NHT1("1")
//! runtextmacro NHT1("2")
//! runtextmacro NHT1("3")
//! runtextmacro NHT1("4")
//! runtextmacro NHT1("5")
//! runtextmacro NHT1("6")
//! runtextmacro NHT1("7")
//! runtextmacro NHT2("8")
//! runtextmacro NHT2("9")
//! runtextmacro NHT2("10")
//! runtextmacro NHT2("11")
//! runtextmacro NHT3("12")
//! runtextmacro NHT3("13")
//! runtextmacro NHT3("14")
//! runtextmacro NHT3("15")
private function IsPlaying takes nothing returns boolean
return GetPlayerSlotState (GetFilterPlayer ()) == PLAYER_SLOT_STATE_PLAYING
endfunction
private function BossGold takes nothing returns nothing
call SetPlayerState (GetEnumPlayer (),PLAYER_STATE_RESOURCE_GOLD ,GetPlayerState (GetEnumPlayer (),PLAYER_STATE_RESOURCE_GOLD )+BG )
endfunction
//! textmacro NH takes num
private function Action$num$ takes nothing returns nothing
local integer lvl = GetHeroLevel (NH$num$ )
local force f = CreateForce ()
set BG = lvl *500
call ForceEnumAllies (f ,GetOwningPlayer (GetKillingUnit ()), Condition (function IsPlaying ))
call GoldTextF (NH$num$ ,BG ,f )
call ForForce (f ,function BossGold )
call TriggerSleepAction (20.00 )
call ReviveHero (NH$num$ ,X [$num$ ],Y [$num$ ], true )
call SetUnitFacingTimed ( NH$num$ , A [$num$ ], 0 )
call SetHeroStr (NH$num$ ,((5 *lvl )+(GetHeroStr (NH$num$ ,false ))),true )
call SetHeroAgi (NH$num$ ,((lvl /2 )+(GetHeroAgi (NH$num$ ,false ))),true )
call SetHeroLevel (NH$num$ , (lvl +2 ), true )
call DestroyForce (f )
set f = null
endfunction
private function InitNH$num$ takes nothing returns nothing
local trigger t = CreateTrigger ()
call TriggerRegisterUnitEvent (t ,NH$num$ , EVENT_UNIT_DEATH )
call TriggerAddAction (t , function Action$num$ )
set t = null
endfunction
//! endtextmacro
//! runtextmacro NH("0")
//! runtextmacro NH("1")
//! runtextmacro NH("2")
//! runtextmacro NH("3")
//! runtextmacro NH("4")
//! runtextmacro NH("5")
//! runtextmacro NH("6")
//! runtextmacro NH("7")
//! runtextmacro NH("8")
//! runtextmacro NH("9")
//! runtextmacro NH("10")
//! runtextmacro NH("11")
//! runtextmacro NH("12")
//! runtextmacro NH("13")
//! runtextmacro NH("14")
//! runtextmacro NH("15")
//! runtextmacro NH("16")
//! runtextmacro NH("17")
//! runtextmacro NH("18")
function SetNHRT takes nothing returns nothing
set NH0 = gg_unit_HC08_0012
set NH1 = gg_unit_HC08_0013
set NH2 = gg_unit_HC08_0014
set NH3 = gg_unit_HC08_0098
set NH4 = gg_unit_EC04_0003
set NH5 = gg_unit_EC04_0004
set NH6 = gg_unit_EC04_0005
set NH7 = gg_unit_EC04_0231
set NH8 = gg_unit_HC12_0011
set NH9 = gg_unit_HC12_0010
set NH10 = gg_unit_HC12_0009
set NH11 = gg_unit_HC12_0220
set NH12 = gg_unit_EC00_0008
set NH13 = gg_unit_EC00_0007
set NH14 = gg_unit_EC00_0006
set NH15 = gg_unit_EC00_0225
set NH16 = gg_unit_NC16_0106
set NH17 = gg_unit_NC17_0107
set NH18 = gg_unit_UC18_0193
set X [0 ] = GetUnitX (NH0 )
set X [1 ] = GetUnitX (NH1 )
set X [2 ] = GetUnitX (NH2 )
set X [3 ] = GetUnitX (NH3 )
set X [4 ] = GetUnitX (NH4 )
set X [5 ] = GetUnitX (NH5 )
set X [6 ] = GetUnitX (NH6 )
set X [7 ] = GetUnitX (NH7 )
set X [8 ] = GetUnitX (NH8 )
set X [9 ] = GetUnitX (NH9 )
set X [10 ] = GetUnitX (NH10 )
set X [11 ] = GetUnitX (NH11 )
set X [12 ] = GetUnitX (NH12 )
set X [13 ] = GetUnitX (NH13 )
set X [14 ] = GetUnitX (NH14 )
set X [15 ] = GetUnitX (NH15 )
set X [16 ] = GetUnitX (NH16 )
set X [17 ] = GetUnitX (NH17 )
set X [18 ] = GetRectCenterX (gg_rct_Arena )
set Y [0 ] = GetUnitY (NH0 )
set Y [1 ] = GetUnitY (NH1 )
set Y [2 ] = GetUnitY (NH2 )
set Y [3 ] = GetUnitY (NH3 )
set Y [4 ] = GetUnitY (NH4 )
set Y [5 ] = GetUnitY (NH5 )
set Y [6 ] = GetUnitY (NH6 )
set Y [7 ] = GetUnitY (NH7 )
set Y [8 ] = GetUnitY (NH8 )
set Y [9 ] = GetUnitY (NH9 )
set Y [10 ] = GetUnitY (NH10 )
set Y [11 ] = GetUnitY (NH11 )
set Y [12 ] = GetUnitY (NH12 )
set Y [13 ] = GetUnitY (NH13 )
set Y [14 ] = GetUnitY (NH14 )
set Y [15 ] = GetUnitY (NH15 )
set Y [16 ] = GetUnitY (NH16 )
set Y [17 ] = GetUnitY (NH17 )
set Y [18 ] = GetRectCenterY (gg_rct_Arena )
set A [0 ] = GetUnitFacing (NH0 )
set A [1 ] = GetUnitFacing (NH1 )
set A [2 ] = GetUnitFacing (NH2 )
set A [3 ] = GetUnitFacing (NH3 )
set A [4 ] = GetUnitFacing (NH4 )
set A [5 ] = GetUnitFacing (NH5 )
set A [6 ] = GetUnitFacing (NH6 )
set A [7 ] = GetUnitFacing (NH7 )
set A [8 ] = GetUnitFacing (NH8 )
set A [9 ] = GetUnitFacing (NH9 )
set A [10 ] = GetUnitFacing (NH10 )
set A [11 ] = GetUnitFacing (NH11 )
set A [12 ] = GetUnitFacing (NH12 )
set A [13 ] = GetUnitFacing (NH13 )
set A [14 ] = GetUnitFacing (NH14 )
set A [15 ] = GetUnitFacing (NH15 )
set A [16 ] = GetUnitFacing (NH16 )
set A [17 ] = GetUnitFacing (NH17 )
set A [18 ] = 270.
call InitT0 ()
call InitT1 ()
call InitT2 ()
call InitT3 ()
call InitT4 ()
call InitT5 ()
call InitT6 ()
call InitT7 ()
call InitT8 ()
call InitT9 ()
call InitT10 ()
call InitT11 ()
call InitT12 ()
call InitT13 ()
call InitT14 ()
call InitT15 ()
call InitNH0 ()
call InitNH1 ()
call InitNH2 ()
call InitNH3 ()
call InitNH4 ()
call InitNH5 ()
call InitNH6 ()
call InitNH7 ()
call InitNH8 ()
call InitNH9 ()
call InitNH10 ()
call InitNH11 ()
call InitNH12 ()
call InitNH13 ()
call InitNH14 ()
call InitNH15 ()
call InitNH16 ()
call InitNH17 ()
call InitNH18 ()
endfunction
endlibrary
JASS:
library GameEnd uses MyLib
globals
boolean end = false
private constant string fala0 = "|c00808080Losers!!!|n|n|n|r|c00333333The judgement is:|r |c00ff0000TO HELL!!!|r!"
private constant string fala1 = "|c0000ff00Congratulations! You Win!|r|n|c0000ff00|rThanks for playing.|n|n|nPress |c00800080ESC|r to exit!"
endglobals
function Fireworks2 takes nothing returns nothing
local real x = GetRandomReal (GetRectMinX (gg_rct_Winners ), GetRectMaxX (gg_rct_Winners ))
local real y = GetRandomReal (GetRectMinY (gg_rct_Winners ), GetRectMaxY (gg_rct_Winners ))
call DestroyEffect (AddSpecialEffect ("\\Fireworkswhite.mdx" ,x ,y ))
set x = GetRandomReal (GetRectMinX (gg_rct_Winners ), GetRectMaxX (gg_rct_Winners ))
set y = GetRandomReal (GetRectMinY (gg_rct_Winners ), GetRectMaxY (gg_rct_Winners ))
call DestroyEffect (AddSpecialEffect ("\\Fireworksred.mdx" ,x ,y ))
set x = GetRandomReal (GetRectMinX (gg_rct_Winners ), GetRectMaxX (gg_rct_Winners ))
set y = GetRandomReal (GetRectMinY (gg_rct_Winners ), GetRectMaxY (gg_rct_Winners ))
call DestroyEffect (AddSpecialEffect ("\\Fireworksblue.mdx" ,x ,y ))
endfunction
function Exit takes nothing returns nothing
call CustomVictoryBJ ( GetTriggerPlayer (), false , true )
endfunction
function Fireworks takes nothing returns nothing
local trigger t = CreateTrigger ()
local integer i = 0
loop
call TriggerRegisterPlayerEvent (t , Player (i ), EVENT_PLAYER_END_CINEMATIC )
set i = i +1
exitwhen i >11
endloop
call TriggerAddAction (t , function Exit )
set t = CreateTrigger ()
call TriggerRegisterTimerEvent (t ,0.25 ,true )
call TriggerAddAction (t , function Fireworks2 )
set t = null
endfunction
private function KillHero takes integer j returns nothing
local integer i = 0
if j == 1 then
loop
call SetUnitAnimation (hero [i ],"death" )
set i = i +1
exitwhen i >5
endloop
else
set i = 6
loop
call SetUnitAnimation (hero [i ],"death" )
set i = i +1
exitwhen i >11
endloop
endif
endfunction
function GameEnd takes integer w returns nothing
local integer i = 0
local unit u
set end = true
call Fireworks ()
call StopMusic (true )
call FogEnable (false )
call FogMaskEnable (false )
call ReviveHero (gg_unit_UC18_0193 ,GetRectCenterX (gg_rct_Miguel ),GetRectCenterY (gg_rct_Miguel ),false )
call SetUnitPosition (gg_unit_UC18_0193 ,GetRectCenterX (gg_rct_Miguel ),GetRectCenterY (gg_rct_Miguel ) )
call SetUnitFacing (gg_unit_UC18_0193 ,180. )
call PauseAllUnitsBJ (true )
call ShowInterfaceForceOff (bj_FORCE_ALL_PLAYERS ,2. )
if w == 2 then
loop
call SetUnitPosition (hero [i ],GetRandomX (gg_rct_Winners ),GetRandomY (gg_rct_Winners ))
call SetUnitFacing (hero [i ],270. )
set i = i +1
exitwhen i >5
endloop
loop
call SetUnitPosition (hero [i ],GetRandomX (gg_rct_Losers ),GetRandomY (gg_rct_Losers ))
call SetUnitFacing (hero [i ],270. )
set i = i +1
exitwhen i >5
endloop
else
loop
call SetUnitPosition (hero [i ],GetRandomX (gg_rct_Losers ),GetRandomY (gg_rct_Losers ))
call SetUnitFacing (hero [i ],270. )
set i = i +1
exitwhen i >5
endloop
loop
call SetUnitPosition (hero [i ],GetRandomX (gg_rct_Winners ),GetRandomY (gg_rct_Winners ))
call SetUnitFacing (hero [i ],270. )
set i = i +1
exitwhen i >5
endloop
endif
call PanCameraToTimed (GetRectCenterX (gg_rct_Losers ),GetRectCenterY (gg_rct_Losers ),0 )
call TriggerSleepAction (2.00 )
call SetCameraRotateMode (GetRectCenterX (gg_rct_Losers ),GetRectCenterY (gg_rct_Losers ), bj_DEGTORAD * 360. ,10. )
call StartCinematic (bj_FORCE_ALL_PLAYERS ,gg_unit_UC18_0193 ,"Archangel Miguel" ,null ,fala0 ,bj_TIMETYPE_SET ,10.00 ,true )
call KillHero (w )
call TriggerSleepAction (2.00 )
call SetUnitFacing (gg_unit_UC18_0193 ,0. )
call SetUnitAnimation (gg_unit_UC18_0193 ,"Stand Channel" )
call PanCameraToTimed (GetRectCenterX (gg_rct_Winners ),GetRectCenterY (gg_rct_Winners ),0 )
call TriggerSleepAction (2.00 )
set u = CreateUnit (Player (15 ),'ewsp' ,0 ,0 ,bj_UNIT_FACING )
call UnitApplyTimedLife (u ,'BTLF' ,60. )
call SetCameraRotateMode (GetRectCenterX (gg_rct_Winners ),GetRectCenterY (gg_rct_Winners ), bj_DEGTORAD * 1800. ,60. )
call StartCinematic (bj_FORCE_ALL_PLAYERS ,u ,"Youkaiz: The Creator" ,null ,fala1 ,bj_TIMETYPE_SET ,10.00 ,true )
set u = null
set i = 0
loop
if GetPlayerSlotState (Player (i )) == PLAYER_SLOT_STATE_PLAYING then
call CustomVictoryBJ ( Player (i ), false , true )
endif
set i = i +1
exitwhen i >11
endloop
endfunction
function DellUnits takes nothing returns nothing
call RemoveUnit ( GetEnumUnit ())
endfunction
function PlayerQuit takes integer p returns nothing
local integer i = 0
local group g = CreateGroup ()
call GroupEnumUnitsOfPlayer (g , Player (p ), null )
call ForGroup (g , function DellUnits )
call DisplayTextToPlayer (GetLocalPlayer (),0 ,0 ,(Name [p ] + " has left the game" ))
if IsPlayerInForce (Player (p ),team1 ) then
call ForceRemovePlayer (team1 ,Player (p ))
if CountPlayersInForceBJ (team1 ) == 0 then
call GameEnd (1 )
endif
elseif IsPlayerInForce (Player (p ),team2 ) then
call ForceRemovePlayer (team2 ,Player (p ))
if CountPlayersInForceBJ (team2 ) == 0 then
call GameEnd (2 )
endif
endif
call SetMbItemValue (tabela ,0 ,playerline [p ],Name [p ] + "|r/Quit" )
call DestroyGroup (g )
set g = null
endfunction
function PlayerLeaveA takes nothing returns nothing
call PlayerQuit (GetPlayerId (GetTriggerPlayer ()))
endfunction
function RegPLeave takes nothing returns nothing
local integer i = 0
local trigger t = CreateTrigger ()
loop
call TriggerRegisterPlayerEvent (t ,Player (i ), EVENT_PLAYER_LEAVE )
set i = i +1
exitwhen i >11
endloop
call TriggerAddAction (t , function PlayerLeaveA )
endfunction
endlibrary