Name | Type | is_array | initial_value |
Buttons | Yes | ||
Heroes | unitcode | Yes | |
KickPlayers | Yes | ||
Playertoget | Yes |
function Trig_Message1_Actions takes nothing returns nothing
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_090" )
call TriggerSleepAction( 30.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_134" )
call TriggerSleepAction( 60.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_372" )
call TriggerSleepAction( 30.00 )
call DisplayTimedTextToForce( GetPlayersAll(), 30, "TRIGSTR_465" )
endfunction
//===========================================================================
function InitTrig_Message1 takes nothing returns nothing
set gg_trg_Message1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Message1, 1.00 )
call TriggerAddAction( gg_trg_Message1, function Trig_Message1_Actions )
endfunction
function Trig_hide_Actions takes nothing returns nothing
call ShowUnitHide( gg_unit_owyv_0041 )
call ShowUnitHide( gg_unit_oshm_0045 )
endfunction
//===========================================================================
function InitTrig_hide takes nothing returns nothing
set gg_trg_hide = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_hide, 1.00 )
call TriggerAddAction( gg_trg_hide, function Trig_hide_Actions )
endfunction
function Trig_PassOrc_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetAttacker(), "move", GetRectCenter(gg_rct_TakeaRide) )
call TriggerSleepAction( 0.10 )
call PauseUnitBJ( false, GetAttacker() )
call DialogClearBJ( udg_Pass )
call DialogSetMessageBJ( udg_Pass, "TRIGSTR_176" )
call DialogAddButtonBJ( udg_Pass, "TRIGSTR_177" )
set udg_PassButton1 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_Pass, "TRIGSTR_178" )
set udg_PassButton2 = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_Pass, GetOwningPlayer(GetAttacker()) )
endfunction
//===========================================================================
function InitTrig_PassOrc takes nothing returns nothing
set gg_trg_PassOrc = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_PassOrc, gg_unit_odoc_0034, EVENT_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_PassOrc, function Trig_PassOrc_Actions )
endfunction
function Trig_PassY_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_PassButton1 ) ) then
return false
endif
return true
endfunction
function Trig_PassY_Func001C takes nothing returns boolean
return true
endfunction
function Trig_PassY_Actions takes nothing returns nothing
if ( Trig_PassY_Func001C() ) then
call DialogClearBJ( udg_WheretoGo )
call DialogSetMessageBJ( udg_WheretoGo, "TRIGSTR_201" )
call DialogAddButtonBJ( udg_WheretoGo, "TRIGSTR_202" )
set udg_Goto1 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_WheretoGo, "TRIGSTR_204" )
set udg_Goto2 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_WheretoGo, "TRIGSTR_205" )
set udg_Goto3 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_WheretoGo, "TRIGSTR_206" )
set udg_Goto4 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_WheretoGo, "TRIGSTR_207" )
set udg_Goto5 = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_WheretoGo, GetTriggerPlayer() )
call DialogDisplayBJ( true, udg_WheretoGo, GetEnumPlayer() )
else
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "TRIGSTR_200" )
endif
endfunction
//===========================================================================
function InitTrig_PassY takes nothing returns nothing
set gg_trg_PassY = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_PassY, udg_Pass )
call TriggerAddCondition( gg_trg_PassY, Condition( function Trig_PassY_Conditions ) )
call TriggerAddAction( gg_trg_PassY, function Trig_PassY_Actions )
endfunction
function Trig_PassN_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_PassButton2 ) ) then
return false
endif
return true
endfunction
function Trig_PassN_Actions takes nothing returns nothing
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "TRIGSTR_194" )
endfunction
//===========================================================================
function InitTrig_PassN takes nothing returns nothing
set gg_trg_PassN = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_PassN, udg_Pass )
call TriggerAddCondition( gg_trg_PassN, Condition( function Trig_PassN_Conditions ) )
call TriggerAddAction( gg_trg_PassN, function Trig_PassN_Actions )
endfunction
function Trig_Fly1_Actions takes nothing returns nothing
call IssueTargetOrderBJ( gg_unit_orai_0039, "ensnare", gg_unit_ownr_0040 )
call TriggerSleepAction( 1.00 )
call ShowUnitHide( GetEnteringUnit() )
call ShowUnitHide( gg_unit_ownr_0040 )
call ShowUnitShow( gg_unit_owyv_0041 )
call TriggerSleepAction( 1.00 )
call SetCameraTargetControllerNoZForPlayer( GetOwningPlayer(GetEnteringUnit()), gg_unit_owyv_0041, 0, 0, false )
endfunction
//===========================================================================
function InitTrig_Fly1 takes nothing returns nothing
set gg_trg_Fly1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Fly1, gg_rct_FlyawayORC )
call TriggerAddAction( gg_trg_Fly1, function Trig_Fly1_Actions )
endfunction
function Trig_C1_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto1 ) ) then
return false
endif
return true
endfunction
function Trig_C1_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_PassFly1 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_PassFly1 )
endfunction
//===========================================================================
function InitTrig_C1 takes nothing returns nothing
set gg_trg_C1 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_C1, udg_WheretoGo )
call TriggerAddCondition( gg_trg_C1, Condition( function Trig_C1_Conditions ) )
call TriggerAddAction( gg_trg_C1, function Trig_C1_Actions )
endfunction
function Trig_C2_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto2 ) ) then
return false
endif
return true
endfunction
function Trig_C2_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_PassFly2 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_PassFly2 )
endfunction
//===========================================================================
function InitTrig_C2 takes nothing returns nothing
set gg_trg_C2 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_C2, udg_WheretoGo )
call TriggerAddCondition( gg_trg_C2, Condition( function Trig_C2_Conditions ) )
call TriggerAddAction( gg_trg_C2, function Trig_C2_Actions )
endfunction
function Trig_C3_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto3 ) ) then
return false
endif
return true
endfunction
function Trig_C3_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_PassFly3 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_PassFly3 )
endfunction
//===========================================================================
function InitTrig_C3 takes nothing returns nothing
set gg_trg_C3 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_C3, udg_WheretoGo )
call TriggerAddCondition( gg_trg_C3, Condition( function Trig_C3_Conditions ) )
call TriggerAddAction( gg_trg_C3, function Trig_C3_Actions )
endfunction
function Trig_C4_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto4 ) ) then
return false
endif
return true
endfunction
function Trig_C4_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_PassFly4 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_PassFly4 )
endfunction
//===========================================================================
function InitTrig_C4 takes nothing returns nothing
set gg_trg_C4 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_C4, udg_WheretoGo )
call TriggerAddCondition( gg_trg_C4, Condition( function Trig_C4_Conditions ) )
call TriggerAddAction( gg_trg_C4, function Trig_C4_Actions )
endfunction
function Trig_C5_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto5 ) ) then
return false
endif
return true
endfunction
function Trig_C5_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_PassFly5 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_PassFly5 )
endfunction
//===========================================================================
function InitTrig_C5 takes nothing returns nothing
set gg_trg_C5 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_C5, udg_WheretoGo )
call TriggerAddCondition( gg_trg_C5, Condition( function Trig_C5_Conditions ) )
call TriggerAddAction( gg_trg_C5, function Trig_C5_Actions )
endfunction
function Trig_C6_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto6 ) ) then
return false
endif
return true
endfunction
function Trig_C6_Actions takes nothing returns nothing
call EnableTrigger( gg_trg_PassFly6 )
call TriggerSleepAction( 1.00 )
call DisableTrigger( gg_trg_PassFly6 )
endfunction
//===========================================================================
function InitTrig_C6 takes nothing returns nothing
set gg_trg_C6 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_C6, udg_WheretoGo )
call TriggerAddCondition( gg_trg_C6, Condition( function Trig_C6_Conditions ) )
call TriggerAddAction( gg_trg_C6, function Trig_C6_Actions )
endfunction
function Trig_PassFly1_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0041, "move", GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_PassFly1 takes nothing returns nothing
set gg_trg_PassFly1 = CreateTrigger( )
call DisableTrigger( gg_trg_PassFly1 )
call TriggerRegisterTimerEventSingle( gg_trg_PassFly1, 1.00 )
call TriggerAddAction( gg_trg_PassFly1, function Trig_PassFly1_Actions )
endfunction
function Trig_PassFly2_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto2 ) ) then
return false
endif
return true
endfunction
function Trig_PassFly2_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0041, "move", GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_PassFly2 takes nothing returns nothing
set gg_trg_PassFly2 = CreateTrigger( )
call DisableTrigger( gg_trg_PassFly2 )
call TriggerRegisterTimerEventSingle( gg_trg_PassFly2, 1.00 )
call TriggerAddCondition( gg_trg_PassFly2, Condition( function Trig_PassFly2_Conditions ) )
call TriggerAddAction( gg_trg_PassFly2, function Trig_PassFly2_Actions )
endfunction
function Trig_PassFly3_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto3 ) ) then
return false
endif
return true
endfunction
function Trig_PassFly3_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0041, "move", GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_PassFly3 takes nothing returns nothing
set gg_trg_PassFly3 = CreateTrigger( )
call DisableTrigger( gg_trg_PassFly3 )
call TriggerRegisterTimerEventSingle( gg_trg_PassFly3, 1.00 )
call TriggerAddCondition( gg_trg_PassFly3, Condition( function Trig_PassFly3_Conditions ) )
call TriggerAddAction( gg_trg_PassFly3, function Trig_PassFly3_Actions )
endfunction
function Trig_PassFly4_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto4 ) ) then
return false
endif
return true
endfunction
function Trig_PassFly4_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0041, "move", GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_PassFly4 takes nothing returns nothing
set gg_trg_PassFly4 = CreateTrigger( )
call DisableTrigger( gg_trg_PassFly4 )
call TriggerRegisterTimerEventSingle( gg_trg_PassFly4, 1.00 )
call TriggerAddCondition( gg_trg_PassFly4, Condition( function Trig_PassFly4_Conditions ) )
call TriggerAddAction( gg_trg_PassFly4, function Trig_PassFly4_Actions )
endfunction
function Trig_PassFly5_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto5 ) ) then
return false
endif
return true
endfunction
function Trig_PassFly5_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0041, "move", GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_PassFly5 takes nothing returns nothing
set gg_trg_PassFly5 = CreateTrigger( )
call DisableTrigger( gg_trg_PassFly5 )
call TriggerRegisterTimerEventSingle( gg_trg_PassFly5, 1.00 )
call TriggerAddCondition( gg_trg_PassFly5, Condition( function Trig_PassFly5_Conditions ) )
call TriggerAddAction( gg_trg_PassFly5, function Trig_PassFly5_Actions )
endfunction
function Trig_PassFly6_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Goto6 ) ) then
return false
endif
return true
endfunction
function Trig_PassFly6_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0041, "move", GetRectCenter(GetPlayableMapRect()) )
endfunction
//===========================================================================
function InitTrig_PassFly6 takes nothing returns nothing
set gg_trg_PassFly6 = CreateTrigger( )
call DisableTrigger( gg_trg_PassFly6 )
call TriggerRegisterTimerEventSingle( gg_trg_PassFly6, 1.00 )
call TriggerAddCondition( gg_trg_PassFly6, Condition( function Trig_PassFly6_Conditions ) )
call TriggerAddAction( gg_trg_PassFly6, function Trig_PassFly6_Actions )
endfunction
function Trig_Orc_City_Actions takes nothing returns nothing
call SetUnitAnimation( gg_unit_opeo_0016, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0014, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0015, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0017, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0018, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0019, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0020, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0021, "stand work" )
call SetUnitAnimation( gg_unit_opeo_0022, "stand work" )
endfunction
//===========================================================================
function InitTrig_Orc_City takes nothing returns nothing
set gg_trg_Orc_City = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Orc_City, 1.00 )
call TriggerAddAction( gg_trg_Orc_City, function Trig_Orc_City_Actions )
endfunction
function Trig_Pass1_Actions takes nothing returns nothing
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_odoc_0034, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
call AddSpecialEffectTargetUnitBJ( "overhead", gg_unit_ogru_0025, "Abilities\\Spells\\Other\\TalkToMe\\TalkToMe.mdl" )
endfunction
//===========================================================================
function InitTrig_Pass1 takes nothing returns nothing
set gg_trg_Pass1 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Pass1, 1.00 )
call TriggerAddAction( gg_trg_Pass1, function Trig_Pass1_Actions )
endfunction
function Trig_secondtoruttW_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( gg_unit_owyv_0043, "move", GetRectCenter(gg_rct_WindRiderRutt6) )
call IssuePointOrderLocBJ( gg_unit_owyv_0042, "move", GetRectCenter(gg_rct_WindRiderRutt2) )
call IssuePointOrderLocBJ( gg_unit_owyv_0044, "move", GetRectCenter(gg_rct_WindRiderRutt4) )
endfunction
//===========================================================================
function InitTrig_secondtoruttW takes nothing returns nothing
set gg_trg_secondtoruttW = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_secondtoruttW, 2.00 )
call TriggerAddAction( gg_trg_secondtoruttW, function Trig_secondtoruttW_Actions )
endfunction
function Trig_Rutt1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'owyv' ) ) then
return false
endif
return true
endfunction
function Trig_Rutt1_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_WindRiderRutt2) )
endfunction
//===========================================================================
function InitTrig_Rutt1 takes nothing returns nothing
set gg_trg_Rutt1 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Rutt1, gg_rct_WindRiderRutt1 )
call TriggerAddCondition( gg_trg_Rutt1, Condition( function Trig_Rutt1_Conditions ) )
call TriggerAddAction( gg_trg_Rutt1, function Trig_Rutt1_Actions )
endfunction
function Trig_Rutt2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'owyv' ) ) then
return false
endif
return true
endfunction
function Trig_Rutt2_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_WindRiderRutt3) )
endfunction
//===========================================================================
function InitTrig_Rutt2 takes nothing returns nothing
set gg_trg_Rutt2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Rutt2, gg_rct_WindRiderRutt2 )
call TriggerAddCondition( gg_trg_Rutt2, Condition( function Trig_Rutt2_Conditions ) )
call TriggerAddAction( gg_trg_Rutt2, function Trig_Rutt2_Actions )
endfunction
function Trig_Rutt3_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'owyv' ) ) then
return false
endif
return true
endfunction
function Trig_Rutt3_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_WindRiderRutt4) )
endfunction
//===========================================================================
function InitTrig_Rutt3 takes nothing returns nothing
set gg_trg_Rutt3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Rutt3, gg_rct_WindRiderRutt3 )
call TriggerAddCondition( gg_trg_Rutt3, Condition( function Trig_Rutt3_Conditions ) )
call TriggerAddAction( gg_trg_Rutt3, function Trig_Rutt3_Actions )
endfunction
function Trig_Rutt4_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'owyv' ) ) then
return false
endif
return true
endfunction
function Trig_Rutt4_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_WindRiderRutt5) )
endfunction
//===========================================================================
function InitTrig_Rutt4 takes nothing returns nothing
set gg_trg_Rutt4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Rutt4, gg_rct_WindRiderRutt4 )
call TriggerAddCondition( gg_trg_Rutt4, Condition( function Trig_Rutt4_Conditions ) )
call TriggerAddAction( gg_trg_Rutt4, function Trig_Rutt4_Actions )
endfunction
function Trig_Rutt5_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'owyv' ) ) then
return false
endif
return true
endfunction
function Trig_Rutt5_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_WindRiderRutt6) )
endfunction
//===========================================================================
function InitTrig_Rutt5 takes nothing returns nothing
set gg_trg_Rutt5 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Rutt5, gg_rct_WindRiderRutt5 )
call TriggerAddCondition( gg_trg_Rutt5, Condition( function Trig_Rutt5_Conditions ) )
call TriggerAddAction( gg_trg_Rutt5, function Trig_Rutt5_Actions )
endfunction
function Trig_Rutt6_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetEnteringUnit()) == 'owyv' ) ) then
return false
endif
return true
endfunction
function Trig_Rutt6_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetEnteringUnit(), "move", GetRectCenter(gg_rct_WindRiderRutt1) )
endfunction
//===========================================================================
function InitTrig_Rutt6 takes nothing returns nothing
set gg_trg_Rutt6 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Rutt6, gg_rct_WindRiderRutt6 )
call TriggerAddCondition( gg_trg_Rutt6, Condition( function Trig_Rutt6_Conditions ) )
call TriggerAddAction( gg_trg_Rutt6, function Trig_Rutt6_Actions )
endfunction
function Trig_AdminsFix_Actions takes nothing returns nothing
call AddHeroXPSwapped( 2000, GetTriggerUnit(), true )
endfunction
//===========================================================================
function InitTrig_AdminsFix takes nothing returns nothing
set gg_trg_AdminsFix = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_AdminsFix, Player(0), "1 . .", true )
call TriggerAddAction( gg_trg_AdminsFix, function Trig_AdminsFix_Actions )
endfunction
// Trigger: SaveCode
//
// Installation:
// - Copy the trigger to your map (yes.. thats all)
// Usage:
// type: -store
// to store your hero
// type: -restore <code>
// to restore your hero
//===========================================================================
function H2I takes handle h returns integer
return h
return 0
endfunction
function I2U takes integer i returns unit
return i
return null
endfunction
function I2T takes integer i returns trigger
return i
return null
endfunction
function NumAndNum takes integer i1,integer i2 returns string
local integer num = i1*6+i2+1
if ((i1 == 5) and (i2 == 6)) then
set num = 2
endif
return SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",num,num)
endfunction
function Num2Numbers takes string s returns integer
local integer i = 1
loop
exitwhen i > 36
if (s==SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",i,i)) then
return i-1
endif
set i = i + 1
endloop
return 0
endfunction
function Num2S takes integer i returns string
if (i > 57) then
return SubStringBJ("ABCDEFGHIJKLMNOPQRSTUVWXYZ", i-64, i-64)
endif
return I2S(i-48)
endfunction
function S2Num takes string s returns integer
local integer i = 1
loop
exitwhen i > 36
if (s==SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",i,i)) then
if (i < 11) then
return i + 47
else
return i + 54
endif
endif
set i = i + 1
endloop
return 0
endfunction
function IncDecNum takes string num, string incdec returns string
if (incdec == "+") then
if (num == "0") or (num == "1") or (num == "2") or (num == "3") or (num == "4") or (num == "5") or (num == "6") or (num == "7") or (num == "8") or (num == "9") then
if (num=="9") then
return "A"
else
return I2S(S2I(num) + 1)
endif
else
if (num=="Z") then
return "0"
else
return Num2S(S2Num(num)+1)
endif
endif
else
if (num == "0") or (num == "1") or (num == "2") or (num == "3") or (num == "4") or (num == "5") or (num == "6") or (num == "7") or (num == "8") or (num == "9") then
if (num=="0") then
return "Z"
else
return I2S(S2I(num) - 1)
endif
else
if (num=="A") then
return "9"
else
return Num2S(S2Num(num)-1)
endif
endif
endif
return ""
endfunction
function BigNum2S takes integer i returns string
local integer array n
set n[1] = R2I(i / 1296)
set n[2] = R2I((i-n[1]*1296) / 36)
set n[3] = (i-n[1]*1296)-(n[2]*36)
return IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n[2]+1,n[2]+1),"-")+IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n[1]+1,n[1]+1),"+")+IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",n[3]+1,n[3]+1),"-")
endfunction
function S2BigNum takes string s returns integer
local integer array n
set n[1] = Num2Numbers(IncDecNum(SubStringBJ(s,2,2),"-"))
set n[2] = Num2Numbers(IncDecNum(SubStringBJ(s,1,1),"+"))
set n[3] = Num2Numbers(IncDecNum(SubStringBJ(s,3,3),"+"))
return n[1] * 1296 + n[2] * 36 + n[3]
endfunction
function GetSaveCodeGameCache takes nothing returns gamecache
return gg_trg_SaveCode
return null
endfunction
function SaveCodeGameCache2Trigger takes gamecache g returns trigger
return g
return null
endfunction
function MatchTable takes string ID,string sID,string storetype returns nothing
//All Abilities: 763 normal + 360 custom
local gamecache g = GetSaveCodeGameCache()
local integer i
if (storetype == "Spells") then
set i = 1+GetStoredInteger(g,"i1","i1")
call StoreString(g,"SsID2ID",sID,ID)
call StoreString(g,"SID2sID",ID,sID)
call StoreString(g,"SNum2ID",I2S(i),ID)
call StoreString(g,"SNum2sID",I2S(i),sID)
call StoreInteger(g,"i1","i1",i)
elseif (storetype == "Heros") then
set i = 1+GetStoredInteger(g,"i2","i2")
call StoreString(g,"HsID2ID",sID,ID)
call StoreString(g,"HID2sID",ID,sID)
call StoreString(g,"HNum2ID",I2S(i),ID)
call StoreString(g,"HNum2sID",I2S(i),sID)
call StoreInteger(g,"i2","i2",i)
elseif (storetype == "Items") then
set i = 1+GetStoredInteger(g,"i3","i3")
call StoreString(g,"IsID2ID",sID,ID)
call StoreString(g,"IID2sID",ID,sID)
call StoreString(g,"INum2ID",I2S(i),ID)
call StoreString(g,"INum2sID",I2S(i),sID)
call StoreInteger(g,"i3","i3",i)
endif
endfunction
function MatchHeroes takes integer num returns nothing
local integer i = 0
local integer array x
local integer counter = 0
local gamecache g = GetSaveCodeGameCache()
set x[1] = 48 // 0
set x[2] = 48 // 0
set x[3] = GetStoredInteger(g,"x3","x3")
set x[4] = GetStoredInteger(g,"x4","x4")
loop
exitwhen i > 200
set counter = counter + 1
if (((counter < 11) or ((counter > 17) and (counter < 44))) and (UnitId2String(num+256*x[2]+x[1]) != null) and ( IsUnitIdType(num+256*x[2]+x[1], UNIT_TYPE_HERO) == true ) ) then
call MatchTable(I2S(num+256*x[2]+x[1]), Num2S(x[4]) + Num2S(x[3]), "Heros")
set x[3] = x[3] + 1
if (x[3] == 58) then
set x[3] = 65
elseif (x[3] == 91) then
set x[3] = 48
set x[4] = x[4] + 1
if (x[4] == 58) then
set x[4] = 65
elseif (x[4] == 91) then
set x[4] = 48
endif
endif
elseif (counter > 43) then
set counter = 0
set x[1] = 47
set x[2] = x[2] + 1
endif
set x[1] = x[1] + 1
set i = i + 1
endloop
call StoreInteger(g,"x3","x3",x[3])
call StoreInteger(g,"x4","x4",x[4])
endfunction
function SaveCode_InitItems takes nothing returns nothing
local integer i = 0
local integer array x
local integer counter = 0
local gamecache g = GetSaveCodeGameCache()
call MatchTable(I2S('ckng'), "01", "Items")
call MatchTable(I2S('modt'), "02", "Items")
call MatchTable(I2S('tkno'), "03", "Items")
call MatchTable(I2S('ratf'), "04", "Items")
call MatchTable(I2S('rde4'), "05", "Items")
call MatchTable(I2S('ofro'), "06", "Items")
call MatchTable(I2S('fgdg'), "07", "Items")
call MatchTable(I2S('infs'), "08", "Items")
call MatchTable(I2S('shar'), "09", "Items")
call MatchTable(I2S('sand'), "0A", "Items")
call MatchTable(I2S('sres'), "0B", "Items")
call MatchTable(I2S('wild'), "0C", "Items")
call MatchTable(I2S('srrc'), "0D", "Items")
call MatchTable(I2S('rej6'), "0E", "Items")
call MatchTable(I2S('odef'), "0F", "Items")
call MatchTable(I2S('rde3'), "0G", "Items")
call MatchTable(I2S('pmna'), "0H", "Items")
call MatchTable(I2S('rhth'), "0I", "Items")
call MatchTable(I2S('ssil'), "0J", "Items")
call MatchTable(I2S('spsh'), "0K", "Items")
call MatchTable(I2S('desc'), "0L", "Items")
call MatchTable(I2S('ankh'), "0M", "Items")
call MatchTable(I2S('pdiv'), "0N", "Items")
call MatchTable(I2S('pres'), "0O", "Items")
call MatchTable(I2S('whwd'), "0P", "Items")
call MatchTable(I2S('rej5'), "0Q", "Items")
call MatchTable(I2S('hcun'), "0R", "Items")
call MatchTable(I2S('hval'), "0S", "Items")
call MatchTable(I2S('mcou'), "0T", "Items")
call MatchTable(I2S('belv'), "0U", "Items")
call MatchTable(I2S('bgst'), "0V", "Items")
call MatchTable(I2S('ciri'), "0W", "Items")
call MatchTable(I2S('ajen'), "0X", "Items")
call MatchTable(I2S('clfm'), "0Y", "Items")
call MatchTable(I2S('ratc'), "0Z", "Items")
call MatchTable(I2S('ward'), "10", "Items")
call MatchTable(I2S('kpin'), "11", "Items")
call MatchTable(I2S('crys'), "12", "Items")
call MatchTable(I2S('totw'), "13", "Items")
call MatchTable(I2S('fgfh'), "14", "Items")
call MatchTable(I2S('fgrd'), "15", "Items")
call MatchTable(I2S('fgrg'), "16", "Items")
call MatchTable(I2S('fgsk'), "17", "Items")
call MatchTable(I2S('wcyc'), "18", "Items")
call MatchTable(I2S('hlst'), "19", "Items")
call MatchTable(I2S('mnst'), "1A", "Items")
call MatchTable(I2S('rej4'), "1B", "Items")
call MatchTable(I2S('ram4'), "1C", "Items")
call MatchTable(I2S('lhst'), "1D", "Items")
call MatchTable(I2S('afac'), "1E", "Items")
call MatchTable(I2S('lgdh'), "1F", "Items")
call MatchTable(I2S('sbch'), "1G", "Items")
call MatchTable(I2S('brac'), "1H", "Items")
call MatchTable(I2S('rwiz'), "1I", "Items")
call MatchTable(I2S('dsum'), "1J", "Items")
call MatchTable(I2S('pghe'), "1K", "Items")
call MatchTable(I2S('pgma'), "1L", "Items")
call MatchTable(I2S('pnvu'), "1M", "Items")
call MatchTable(I2S('sror'), "1N", "Items")
call MatchTable(I2S('woms'), "1O", "Items")
call MatchTable(I2S('rej3'), "1P", "Items")
call MatchTable(I2S('ofir'), "1Q", "Items")
call MatchTable(I2S('ocor'), "1R", "Items")
call MatchTable(I2S('oli2'), "1S", "Items")
call MatchTable(I2S('oven'), "1T", "Items")
call MatchTable(I2S('ram3'), "1U", "Items")
call MatchTable(I2S('evtl'), "1V", "Items")
call MatchTable(I2S('penr'), "1W", "Items")
call MatchTable(I2S('prvt'), "1X", "Items")
call MatchTable(I2S('rat9'), "1Y", "Items")
call MatchTable(I2S('rde2'), "1Z", "Items")
call MatchTable(I2S('rlif'), "20", "Items")
call MatchTable(I2S('tret'), "21", "Items")
call MatchTable(I2S('tgrh'), "22", "Items")
call MatchTable(I2S('will'), "23", "Items")
call MatchTable(I2S('wlsd'), "24", "Items")
call MatchTable(I2S('wswd'), "25", "Items")
call MatchTable(I2S('rej2'), "26", "Items")
call MatchTable(I2S('gemt'), "27", "Items")
call MatchTable(I2S('ram2'), "28", "Items")
call MatchTable(I2S('stel'), "29", "Items")
call MatchTable(I2S('cnob'), "2A", "Items")
call MatchTable(I2S('gcel'), "2B", "Items")
call MatchTable(I2S('rat6'), "2C", "Items")
call MatchTable(I2S('rde1'), "2D", "Items")
call MatchTable(I2S('bspd'), "2E", "Items")
call MatchTable(I2S('tdx2'), "2F", "Items")
call MatchTable(I2S('texp'), "2G", "Items")
call MatchTable(I2S('tin2'), "2H", "Items")
call MatchTable(I2S('tpow'), "2I", "Items")
call MatchTable(I2S('tst2'), "2J", "Items")
call MatchTable(I2S('pnvl'), "2K", "Items")
call MatchTable(I2S('stwp'), "2L", "Items")
call MatchTable(I2S('wneg'), "2M", "Items")
call MatchTable(I2S('sneg'), "2N", "Items")
call MatchTable(I2S('wneu'), "2O", "Items")
call MatchTable(I2S('shea'), "2P", "Items")
call MatchTable(I2S('sman'), "2Q", "Items")
call MatchTable(I2S('rej1'), "2R", "Items")
call MatchTable(I2S('pspd'), "2S", "Items")
call MatchTable(I2S('dust'), "2T", "Items")
call MatchTable(I2S('ram1'), "2U", "Items")
call MatchTable(I2S('clsd'), "2V", "Items")
call MatchTable(I2S('rag1'), "2W", "Items")
call MatchTable(I2S('rin1'), "2X", "Items")
call MatchTable(I2S('rst1'), "2Y", "Items")
call MatchTable(I2S('manh'), "2Z", "Items")
call MatchTable(I2S('tdex'), "30", "Items")
call MatchTable(I2S('tint'), "31", "Items")
call MatchTable(I2S('tstr'), "32", "Items")
call MatchTable(I2S('pinv'), "33", "Items")
call MatchTable(I2S('phea'), "34", "Items")
call MatchTable(I2S('pman'), "35", "Items")
call MatchTable(I2S('spro'), "36", "Items")
call MatchTable(I2S('hslv'), "37", "Items")
call MatchTable(I2S('moon'), "38", "Items")
call MatchTable(I2S('shas'), "39", "Items")
call MatchTable(I2S('skul'), "3A", "Items")
call MatchTable(I2S('mcri'), "3B", "Items")
call MatchTable(I2S('rnec'), "3C", "Items")
call MatchTable(I2S('tsct'), "3D", "Items")
call MatchTable(I2S('azhr'), "3E", "Items")
call MatchTable(I2S('bzbe'), "3F", "Items")
call MatchTable(I2S('bzbf'), "3G", "Items")
call MatchTable(I2S('ches'), "3H", "Items")
call MatchTable(I2S('cnhn'), "3I", "Items")
call MatchTable(I2S('glsk'), "3J", "Items")
call MatchTable(I2S('gopr'), "3K", "Items")
call MatchTable(I2S('k3m1'), "3L", "Items")
call MatchTable(I2S('k3m2'), "3M", "Items")
call MatchTable(I2S('k3m3'), "3N", "Items")
call MatchTable(I2S('ktrm'), "3O", "Items")
call MatchTable(I2S('kybl'), "3P", "Items")
call MatchTable(I2S('kygh'), "3Q", "Items")
call MatchTable(I2S('kymn'), "3R", "Items")
call MatchTable(I2S('kysn'), "3S", "Items")
call MatchTable(I2S('ledg'), "3T", "Items")
call MatchTable(I2S('phlt'), "3U", "Items")
call MatchTable(I2S('sehr'), "3V", "Items")
call MatchTable(I2S('engs'), "3W", "Items")
call MatchTable(I2S('sorf'), "3X", "Items")
call MatchTable(I2S('gmfr'), "3Y", "Items")
call MatchTable(I2S('jpnt'), "3Z", "Items")
call MatchTable(I2S('shwd'), "40", "Items")
call MatchTable(I2S('skrt'), "41", "Items")
call MatchTable(I2S('thle'), "42", "Items")
call MatchTable(I2S('pomn'), "43", "Items")
call MatchTable(I2S('wshs'), "44", "Items")
call MatchTable(I2S('fgun'), "45", "Items")
call MatchTable(I2S('lure'), "46", "Items")
call MatchTable(I2S('olig'), "47", "Items")
call MatchTable(I2S('amrc'), "48", "Items")
call MatchTable(I2S('ccmd'), "49", "Items")
call MatchTable(I2S('flag'), "4A", "Items")
call MatchTable(I2S('gobm'), "4B", "Items")
call MatchTable(I2S('gsou'), "4C", "Items")
call MatchTable(I2S('nflg'), "4D", "Items")
call MatchTable(I2S('nspi'), "4E", "Items")
call MatchTable(I2S('oflg'), "4F", "Items")
call MatchTable(I2S('pams'), "4G", "Items")
call MatchTable(I2S('pgin'), "4H", "Items")
call MatchTable(I2S('rat3'), "4I", "Items")
call MatchTable(I2S('rde0'), "4J", "Items")
call MatchTable(I2S('rnsp'), "4K", "Items")
call MatchTable(I2S('soul'), "4L", "Items")
call MatchTable(I2S('tels'), "4M", "Items")
call MatchTable(I2S('tgxp'), "4N", "Items")
call MatchTable(I2S('uflg'), "4O", "Items")
call MatchTable(I2S('anfg'), "4P", "Items")
call MatchTable(I2S('brag'), "4Q", "Items")
call MatchTable(I2S('drph'), "4R", "Items")
call MatchTable(I2S('iwbr'), "4S", "Items")
call MatchTable(I2S('jdrn'), "4T", "Items")
call MatchTable(I2S('lnrn'), "4U", "Items")
call MatchTable(I2S('mlst'), "4V", "Items")
call MatchTable(I2S('oslo'), "4W", "Items")
call MatchTable(I2S('sbok'), "4X", "Items")
call MatchTable(I2S('sksh'), "4Y", "Items")
call MatchTable(I2S('sprn'), "4Z", "Items")
call MatchTable(I2S('tmmt'), "50", "Items")
call MatchTable(I2S('vddl'), "51", "Items")
call MatchTable(I2S('spre'), "52", "Items")
call MatchTable(I2S('sfog'), "53", "Items")
call MatchTable(I2S('sor1'), "54", "Items")
call MatchTable(I2S('sor2'), "55", "Items")
call MatchTable(I2S('sor3'), "56", "Items")
call MatchTable(I2S('sor4'), "57", "Items")
call MatchTable(I2S('sor5'), "58", "Items")
call MatchTable(I2S('sor6'), "59", "Items")
call MatchTable(I2S('sor7'), "5A", "Items")
call MatchTable(I2S('sor8'), "5B", "Items")
call MatchTable(I2S('sor9'), "5C", "Items")
call MatchTable(I2S('sora'), "5D", "Items")
call MatchTable(I2S('fwss'), "5E", "Items")
call MatchTable(I2S('shtm'), "5F", "Items")
call MatchTable(I2S('esaz'), "5G", "Items")
call MatchTable(I2S('btst'), "5H", "Items")
call MatchTable(I2S('gold'), "5I", "Items")
call MatchTable(I2S('lmbr'), "5J", "Items")
call MatchTable(I2S('gfor'), "5K", "Items")
call MatchTable(I2S('guvi'), "5L", "Items")
call MatchTable(I2S('rspl'), "5M", "Items")
call MatchTable(I2S('rre1'), "5N", "Items")
call MatchTable(I2S('rre2'), "5O", "Items")
call MatchTable(I2S('gomn'), "5P", "Items")
call MatchTable(I2S('rsps'), "5Q", "Items")
call MatchTable(I2S('rspd'), "5R", "Items")
call MatchTable(I2S('rman'), "5S", "Items")
call MatchTable(I2S('rma2'), "5T", "Items")
call MatchTable(I2S('rres'), "5U", "Items")
call MatchTable(I2S('rreb'), "5V", "Items")
call MatchTable(I2S('rhe1'), "5W", "Items")
call MatchTable(I2S('rhe2'), "5X", "Items")
call MatchTable(I2S('rhe3'), "5Y", "Items")
call MatchTable(I2S('rdis'), "5Z", "Items")
call MatchTable(I2S('rwat'), "60", "Items")
call MatchTable(I2S('sclp'), "61", "Items")
call MatchTable(I2S('pclr'), "62", "Items")
call MatchTable(I2S('plcl'), "63", "Items")
call MatchTable(I2S('silk'), "64", "Items")
call MatchTable(I2S('vamp'), "65", "Items")
call MatchTable(I2S('sreg'), "66", "Items")
call MatchTable(I2S('ssan'), "67", "Items")
call MatchTable(I2S('tcas'), "68", "Items")
call MatchTable(I2S('tbsm'), "69", "Items")
call MatchTable(I2S('tfar'), "6A", "Items")
call MatchTable(I2S('tlum'), "6B", "Items")
call MatchTable(I2S('tbar'), "6C", "Items")
call MatchTable(I2S('tbak'), "6D", "Items")
call MatchTable(I2S('gldo'), "6E", "Items")
call MatchTable(I2S('wtlg'), "6F", "Items")
call MatchTable(I2S('wolg'), "6G", "Items")
call MatchTable(I2S('mgtk'), "6H", "Items")
call MatchTable(I2S('stre'), "6I", "Items")
call MatchTable(I2S('horl'), "6J", "Items")
call MatchTable(I2S('hbth'), "6K", "Items")
call MatchTable(I2S('blba'), "6L", "Items")
call MatchTable(I2S('rugt'), "6M", "Items")
call MatchTable(I2S('frhg'), "6N", "Items")
call MatchTable(I2S('gvsm'), "6O", "Items")
call MatchTable(I2S('crdt'), "6P", "Items")
call MatchTable(I2S('arsc'), "6Q", "Items")
call MatchTable(I2S('scul'), "6R", "Items")
call MatchTable(I2S('tmsc'), "6S", "Items")
call MatchTable(I2S('dtsb'), "6T", "Items")
call MatchTable(I2S('grsl'), "6U", "Items")
call MatchTable(I2S('arsh'), "6V", "Items")
call MatchTable(I2S('shdt'), "6W", "Items")
call MatchTable(I2S('shhn'), "6X", "Items")
call MatchTable(I2S('shen'), "6Y", "Items")
call MatchTable(I2S('thdm'), "6Z", "Items")
call MatchTable(I2S('stpg'), "70", "Items")
call MatchTable(I2S('shrs'), "71", "Items")
call MatchTable(I2S('bfhr'), "72", "Items")
call MatchTable(I2S('cosl'), "73", "Items")
call MatchTable(I2S('shcw'), "74", "Items")
call MatchTable(I2S('srbd'), "75", "Items")
call MatchTable(I2S('frgd'), "76", "Items")
call MatchTable(I2S('envl'), "77", "Items")
call MatchTable(I2S('rump'), "78", "Items")
call MatchTable(I2S('mort'), "79", "Items")
call MatchTable(I2S('srtl'), "7A", "Items")
call MatchTable(I2S('stwa'), "7B", "Items")
call MatchTable(I2S('klmm'), "7C", "Items")
call MatchTable(I2S('rots'), "7D", "Items")
call MatchTable(I2S('axas'), "7E", "Items")
call MatchTable(I2S('mnsf'), "7F", "Items")
call MatchTable(I2S('schl'), "7G", "Items")
call MatchTable(I2S('asbl'), "7H", "Items")
call MatchTable(I2S('kgal'), "7I", "Items")
call MatchTable(I2S('dphe'), "7J", "Items")
call MatchTable(I2S('dkfw'), "7K", "Items")
call MatchTable(I2S('dthb'), "7L", "Items")
set i = 0
set x[1] = 48 // 0
set x[2] = 48 // 0
set x[3] = 56 // 8
set x[4] = 76 // L
loop
exitwhen i > 438
set counter = counter + 1
if ((counter < 11) or ((counter > 17) and (counter < 44))) then
call MatchTable(I2S(1227882496+256*x[2]+x[1]), Num2S(x[4]) + Num2S(x[3]), "Items")
set x[3] = x[3] + 1
if (x[3] == 58) then
set x[3] = 65
elseif (x[3] == 91) then
set x[3] = 48
set x[4] = x[4] + 1
if (x[4] == 58) then
set x[4] = 65
elseif (x[4] == 91) then
set x[4] = 48
endif
endif
elseif (counter > 43) then
set counter = 0
set x[1] = 47
set x[2] = x[2] + 1
endif
set x[1] = x[1] + 1
set i = i + 1
endloop
endfunction
function SaveCode_InitHeros takes nothing returns nothing
local integer i = 0
local integer array x
local integer counter = 0
local gamecache g = GetSaveCodeGameCache()
call MatchTable(I2S('Hpal'), "01","Heros")
call MatchTable(I2S('Hamg'), "02","Heros")
call MatchTable(I2S('Hmkg'), "03","Heros")
call MatchTable(I2S('Hblm'), "04","Heros")
call MatchTable(I2S('Hapm'), "05","Heros")
call MatchTable(I2S('Hant'), "06","Heros")
call MatchTable(I2S('Hgam'), "07","Heros")
call MatchTable(I2S('Hart'), "08","Heros")
call MatchTable(I2S('Harf'), "09","Heros")
call MatchTable(I2S('Hdgo'), "0A","Heros") //
call MatchTable(I2S('Hhkl'), "0B","Heros")
call MatchTable(I2S('Hjai'), "0C","Heros")
call MatchTable(I2S('Hkal'), "0D","Heros")
call MatchTable(I2S('Hlgr'), "0E","Heros")
call MatchTable(I2S('Hpb1'), "0F","Heros")
call MatchTable(I2S('Hmgd'), "0G","Heros")
call MatchTable(I2S('Hmbr'), "0H","Heros")
call MatchTable(I2S('Hpb2'), "0I","Heros")
call MatchTable(I2S('Hvwd'), "0J","Heros")
call MatchTable(I2S('Huth'), "0K","Heros") //
call MatchTable(I2S('Obla'), "0L","Heros")
call MatchTable(I2S('Ofar'), "0M","Heros")
call MatchTable(I2S('Otch'), "0N","Heros")
call MatchTable(I2S('Oshd'), "0O","Heros")
call MatchTable(I2S('Nbbc'), "0P","Heros")
call MatchTable(I2S('Ocbh'), "0Q","Heros")
call MatchTable(I2S('Ocb2'), "0R","Heros")
call MatchTable(I2S('Nsjs'), "0S","Heros")
call MatchTable(I2S('Odrt'), "0T","Heros")
call MatchTable(I2S('Ogrh'), "0U","Heros") //
call MatchTable(I2S('Opgh'), "0V","Heros")
call MatchTable(I2S('Ogld'), "0W","Heros")
call MatchTable(I2S('Orex'), "0X","Heros")
call MatchTable(I2S('Orkn'), "0Y","Heros")
call MatchTable(I2S('Osam'), "0Z","Heros")
call MatchTable(I2S('Othr'), "10","Heros")
call MatchTable(I2S('Otcc'), "11","Heros")
call MatchTable(I2S('Udea'), "12","Heros")
call MatchTable(I2S('Ulic'), "13","Heros")
call MatchTable(I2S('Udre'), "14","Heros") //
call MatchTable(I2S('Ucrl'), "15","Heros")
call MatchTable(I2S('Nman'), "16","Heros")
call MatchTable(I2S('Uwar'), "17","Heros")
call MatchTable(I2S('Npld'), "18","Heros")
call MatchTable(I2S('Nklj'), "19","Heros")
call MatchTable(I2S('Nmag'), "1A","Heros")
call MatchTable(I2S('Uanb'), "1B","Heros")
call MatchTable(I2S('Uear'), "1C","Heros")
call MatchTable(I2S('Ubal'), "1D","Heros")
call MatchTable(I2S('Uvng'), "1E","Heros") //
call MatchTable(I2S('Udth'), "1F","Heros")
call MatchTable(I2S('Uktl'), "1G","Heros")
call MatchTable(I2S('Umal'), "1H","Heros")
call MatchTable(I2S('Usyl'), "1I","Heros")
call MatchTable(I2S('Utic'), "1J","Heros")
call MatchTable(I2S('Uvar'), "1K","Heros")
call MatchTable(I2S('Nkjx'), "1L","Heros")
call MatchTable(I2S('Uclc'), "1M","Heros")
call MatchTable(I2S('Ekee'), "1N","Heros")
call MatchTable(I2S('Emoo'), "1O","Heros") //
call MatchTable(I2S('Edem'), "1P","Heros")
call MatchTable(I2S('Ewar'), "1Q","Heros")
call MatchTable(I2S('Edmm'), "1R","Heros")
call MatchTable(I2S('Ecen'), "1S","Heros")
call MatchTable(I2S('Efur'), "1T","Heros")
call MatchTable(I2S('Ekgg'), "1U","Heros")
call MatchTable(I2S('Eill'), "1V","Heros")
call MatchTable(I2S('Eevi'), "1W","Heros")
call MatchTable(I2S('Ewrd'), "1X","Heros")
call MatchTable(I2S('Emfr'), "1Y","Heros") //
call MatchTable(I2S('Emns'), "1Z","Heros")
call MatchTable(I2S('Etyr'), "20","Heros")
call MatchTable(I2S('Eidm'), "21","Heros")
call MatchTable(I2S('Eilm'), "22","Heros")
call MatchTable(I2S('Eevm'), "23","Heros")
call MatchTable(I2S('Hvsh'), "24","Heros")
call MatchTable(I2S('Nngs'), "25","Heros")
call MatchTable(I2S('Nbst'), "26","Heros")
call MatchTable(I2S('Nbrn'), "27","Heros")
call MatchTable(I2S('Npbm'), "28","Heros") // 82
call MatchTable(I2S('Nplh'), "29","Heros")
call MatchTable(I2S('Ntin'), "2A","Heros")
call StoreInteger(g,"x3","x3",66)
call StoreInteger(g,"x4","x4",50)
call MatchHeroes(1311768576) //N
call MatchHeroes(1160773632) //E
call MatchHeroes(1429209088) //U
call MatchHeroes(1328545792) //O
call MatchHeroes(1211105280) //H
endfunction
function SaveCode_InitSpells takes nothing returns nothing
local integer i = 0
local integer array x
local integer counter = 0
local gamecache g = GetSaveCodeGameCache()
call MatchTable(I2S('AHbz'), "01","Spells")
call MatchTable(I2S('AHab'), "02","Spells")
call MatchTable(I2S('AHmt'), "03","Spells")
call MatchTable(I2S('AHwe'), "04","Spells")
call MatchTable(I2S('ANst'), "05","Spells")
call MatchTable(I2S('ANsg'), "06","Spells")
call MatchTable(I2S('ANsq'), "07","Spells")
call MatchTable(I2S('ANsw'), "08","Spells")
call MatchTable(I2S('AOww'), "09","Spells")
call MatchTable(I2S('AOcr'), "0A","Spells")
call MatchTable(I2S('AOmi'), "0B","Spells")
call MatchTable(I2S('AOwk'), "0C","Spells")
call MatchTable(I2S('AHbn'), "0D","Spells")
call MatchTable(I2S('AHfs'), "0E","Spells")
call MatchTable(I2S('AHdr'), "0F","Spells")
call MatchTable(I2S('AHpx'), "0G","Spells")
call MatchTable(I2S('AUcb'), "0H","Spells")
call MatchTable(I2S('AUim'), "0I","Spells")
call MatchTable(I2S('AUls'), "0J","Spells")
call MatchTable(I2S('AUts'), "0K","Spells")
call MatchTable(I2S('ANba'), "0L","Spells")
call MatchTable(I2S('ANch'), "0M","Spells")
call MatchTable(I2S('ANdr'), "0N","Spells")
call MatchTable(I2S('ANsi'), "0O","Spells")
call MatchTable(I2S('AUan'), "0P","Spells")
call MatchTable(I2S('AUdc'), "0Q","Spells")
call MatchTable(I2S('AUdp'), "0R","Spells")
call MatchTable(I2S('AUau'), "0S","Spells")
call MatchTable(I2S('AEev'), "0T","Spells")
call MatchTable(I2S('AEim'), "0U","Spells")
call MatchTable(I2S('AEmb'), "0V","Spells")
call MatchTable(I2S('AEme'), "0W","Spells")
call MatchTable(I2S('AUsl'), "0X","Spells")
call MatchTable(I2S('AUav'), "0Y","Spells")
call MatchTable(I2S('AUcs'), "0Z","Spells")
call MatchTable(I2S('AUin'), "10","Spells")
call MatchTable(I2S('AOcl'), "11","Spells")
call MatchTable(I2S('AOeq'), "12","Spells")
call MatchTable(I2S('AOfs'), "13","Spells")
call MatchTable(I2S('AOsf'), "14","Spells")
call MatchTable(I2S('AEer'), "15","Spells")
call MatchTable(I2S('AEfn'), "16","Spells")
call MatchTable(I2S('AEah'), "17","Spells")
call MatchTable(I2S('AEtq'), "18","Spells")
call MatchTable(I2S('AUdr'), "19","Spells")
call MatchTable(I2S('AUdd'), "1A","Spells")
call MatchTable(I2S('AUfa'), "1B","Spells")
call MatchTable(I2S('AUfu'), "1C","Spells")
call MatchTable(I2S('AUfn'), "1D","Spells")
call MatchTable(I2S('AHav'), "1E","Spells")
call MatchTable(I2S('AHbh'), "1F","Spells")
call MatchTable(I2S('AHtb'), "1G","Spells")
call MatchTable(I2S('AHtc'), "1H","Spells")
call MatchTable(I2S('ANfl'), "1I","Spells")
call MatchTable(I2S('ANfa'), "1J","Spells")
call MatchTable(I2S('ANto'), "1K","Spells")
call MatchTable(I2S('ANms'), "1L","Spells")
call MatchTable(I2S('AHad'), "1M","Spells")
call MatchTable(I2S('AHds'), "1N","Spells")
call MatchTable(I2S('AHhb'), "1O","Spells")
call MatchTable(I2S('AHre'), "1P","Spells")
call MatchTable(I2S('ANbf'), "1Q","Spells")
call MatchTable(I2S('ANdb'), "1R","Spells")
call MatchTable(I2S('ANdh'), "1S","Spells")
call MatchTable(I2S('ANef'), "1T","Spells")
call MatchTable(I2S('ANdo'), "1U","Spells")
call MatchTable(I2S('ANht'), "1V","Spells")
call MatchTable(I2S('ANca'), "1W","Spells")
call MatchTable(I2S('ANrf'), "1X","Spells")
call MatchTable(I2S('AHfa'), "1Y","Spells")
call MatchTable(I2S('AEst'), "1Z","Spells")
call MatchTable(I2S('AEsf'), "20","Spells")
call MatchTable(I2S('AEar'), "21","Spells")
call MatchTable(I2S('AOae'), "22","Spells")
call MatchTable(I2S('AOre'), "23","Spells")
call MatchTable(I2S('AOsh'), "24","Spells")
call MatchTable(I2S('AOws'), "25","Spells")
call MatchTable(I2S('AOhw'), "26","Spells")
call MatchTable(I2S('AOhx'), "27","Spells")
call MatchTable(I2S('AOsw'), "28","Spells")
call MatchTable(I2S('AOvd'), "29","Spells")
call MatchTable(I2S('AEbl'), "2A","Spells")
call MatchTable(I2S('AEfk'), "2B","Spells")
call MatchTable(I2S('AEsh'), "2C","Spells")
call MatchTable(I2S('AEsv'), "2D","Spells")
call MatchTable(I2S('ANin'), "2E","Spells")
call MatchTable(I2S('SNin'), "2F","Spells")
call MatchTable(I2S('ANfb'), "2G","Spells")
call MatchTable(I2S('ANfd'), "2H","Spells")
call MatchTable(I2S('ACfd'), "2I","Spells")
call MatchTable(I2S('ACf3'), "2J","Spells")
call MatchTable(I2S('ANdp'), "2K","Spells")
call MatchTable(I2S('ANrc'), "2L","Spells")
call MatchTable(I2S('ANr3'), "2M","Spells")
call MatchTable(I2S('AEsb'), "2N","Spells")
call MatchTable(I2S('ANrn'), "2O","Spells")
call MatchTable(I2S('ANdc'), "2P","Spells")
call MatchTable(I2S('SNdc'), "2Q","Spells")
call MatchTable(I2S('ANsl'), "2R","Spells")
call MatchTable(I2S('AEIl'), "2S","Spells")
call MatchTable(I2S('AEvi'), "2T","Spells")
call MatchTable(I2S('SNeq'), "2U","Spells")
call MatchTable(I2S('SNdd'), "2V","Spells")
call MatchTable(I2S('ANmo'), "2W","Spells")
call MatchTable(I2S('AEpa'), "2X","Spells")
call MatchTable(I2S('ANwm'), "2Y","Spells")
call MatchTable(I2S('AHca'), "2Z","Spells")
call MatchTable(I2S('ANbr'), "30","Spells")
call MatchTable(I2S('Arsg'), "31","Spells")
call MatchTable(I2S('Aamk'), "32","Spells")
call MatchTable(I2S('Arsq'), "33","Spells")
call MatchTable(I2S('Arsp'), "34","Spells")
call MatchTable(I2S('ANsb'), "35","Spells")
call MatchTable(I2S('ANhw'), "36","Spells")
call MatchTable(I2S('Arsw'), "37","Spells")
call MatchTable(I2S('ANhx'), "38","Spells")
call MatchTable(I2S('AOls'), "39","Spells")
call MatchTable(I2S('ANcf'), "3A","Spells")
call MatchTable(I2S('Acdb'), "3B","Spells")
call MatchTable(I2S('Acdh'), "3C","Spells")
call MatchTable(I2S('Acef'), "3D","Spells")
call MatchTable(I2S('AOr2'), "3E","Spells")
call MatchTable(I2S('AOr3'), "3F","Spells")
call MatchTable(I2S('AOs2'), "3G","Spells")
call MatchTable(I2S('AOw2'), "3H","Spells")
call MatchTable(I2S('ANcl'), "3I","Spells")
call MatchTable(I2S('Aadm'), "3J","Spells")
call MatchTable(I2S('Andm'), "3K","Spells")
call MatchTable(I2S('ACdm'), "3L","Spells")
call MatchTable(I2S('ACd2'), "3M","Spells")
call MatchTable(I2S('Aabs'), "3N","Spells")
call MatchTable(I2S('Aaha'), "3O","Spells")
call MatchTable(I2S('ANav'), "3P","Spells")
call MatchTable(I2S('Aalr'), "3Q","Spells")
call MatchTable(I2S('Aall'), "3R","Spells")
call MatchTable(I2S('Aast'), "3S","Spells")
call MatchTable(I2S('ACad'), "3T","Spells")
call MatchTable(I2S('Aams'), "3U","Spells")
call MatchTable(I2S('ACam'), "3V","Spells")
//call MatchTable(I2S('Aatk'), "3W","Spells")
call MatchTable(I2S('ACba'), "3X","Spells")
call MatchTable(I2S('ACac'), "3Y","Spells")
call MatchTable(I2S('ACav'), "3Z","Spells")
call MatchTable(I2S('SCae'), "40","Spells")
call MatchTable(I2S('Aap1'), "41","Spells")
call MatchTable(I2S('Aap2'), "42","Spells")
call MatchTable(I2S('Aap3'), "43","Spells")
call MatchTable(I2S('Aap4'), "44","Spells")
call MatchTable(I2S('Aoar'), "45","Spells")
call MatchTable(I2S('Aabr'), "46","Spells")
call MatchTable(I2S('Aasl'), "47","Spells")
call MatchTable(I2S('ACat'), "48","Spells")
call MatchTable(I2S('Aakb'), "49","Spells")
call MatchTable(I2S('Aave'), "4A","Spells")
call MatchTable(I2S('Aawa'), "4B","Spells")
call MatchTable(I2S('Abof'), "4C","Spells")
call MatchTable(I2S('ACbn'), "4D","Spells")
call MatchTable(I2S('ACbh'), "4E","Spells")
call MatchTable(I2S('ANbh'), "4F","Spells")
call MatchTable(I2S('ANb2'), "4G","Spells")
call MatchTable(I2S('Abtl'), "4H","Spells")
call MatchTable(I2S('Sbtl'), "4I","Spells")
call MatchTable(I2S('Abrf'), "4J","Spells")
call MatchTable(I2S('Absk'), "4K","Spells")
call MatchTable(I2S('Sbsk'), "4L","Spells")
call MatchTable(I2S('ACbk'), "4M","Spells")
call MatchTable(I2S('Abds'), "4N","Spells")
call MatchTable(I2S('Abdl'), "4O","Spells")
call MatchTable(I2S('Abgs'), "4P","Spells")
call MatchTable(I2S('Abgl'), "4Q","Spells")
call MatchTable(I2S('Abgm'), "4R","Spells")
call MatchTable(I2S('ANbl'), "4S","Spells")
call MatchTable(I2S('ACbz'), "4T","Spells")
call MatchTable(I2S('Ablo'), "4U","Spells")
call MatchTable(I2S('ACbl'), "4V","Spells")
call MatchTable(I2S('ACbb'), "4W","Spells")
call MatchTable(I2S('ACbc'), "4X","Spells")
call MatchTable(I2S('ACbf'), "4Y","Spells")
call MatchTable(I2S('ANbu'), "4Z","Spells")
call MatchTable(I2S('AHbu'), "50","Spells")
call MatchTable(I2S('AObu'), "51","Spells")
call MatchTable(I2S('AEbu'), "52","Spells")
call MatchTable(I2S('AUbu'), "53","Spells")
call MatchTable(I2S('AGbu'), "54","Spells")
call MatchTable(I2S('Abur'), "55","Spells")
call MatchTable(I2S('Abu2'), "56","Spells")
call MatchTable(I2S('Abu3'), "57","Spells")
call MatchTable(I2S('Abu5'), "58","Spells")
call MatchTable(I2S('Abdt'), "59","Spells")
call MatchTable(I2S('Acan'), "5A","Spells")
call MatchTable(I2S('Acn2'), "5B","Spells")
call MatchTable(I2S('ACcn'), "5C","Spells")
call MatchTable(I2S('Abun'), "5D","Spells")
call MatchTable(I2S('Advc'), "5E","Spells")
call MatchTable(I2S('Sch2'), "5F","Spells")
call MatchTable(I2S('Sch5'), "5G","Spells")
call MatchTable(I2S('Sch4'), "5H","Spells")
call MatchTable(I2S('Sch3'), "5I","Spells")
call MatchTable(I2S('Aenc'), "5J","Spells")
call MatchTable(I2S('Achd'), "5K","Spells")
call MatchTable(I2S('ACca'), "5L","Spells")
call MatchTable(I2S('ACcv'), "5M","Spells")
call MatchTable(I2S('ACc2'), "5N","Spells")
call MatchTable(I2S('ACc3'), "5O","Spells")
call MatchTable(I2S('ACcl'), "5P","Spells")
call MatchTable(I2S('Ache'), "5Q","Spells")
call MatchTable(I2S('Sca1'), "5R","Spells")
call MatchTable(I2S('Sca2'), "5S","Spells")
call MatchTable(I2S('Sca3'), "5T","Spells")
call MatchTable(I2S('Sca4'), "5U","Spells")
call MatchTable(I2S('Sca5'), "5V","Spells")
call MatchTable(I2S('Sca6'), "5W","Spells")
call MatchTable(I2S('Achl'), "5X","Spells")
call MatchTable(I2S('ACch'), "5Y","Spells")
call MatchTable(I2S('ACce'), "5Z","Spells")
call MatchTable(I2S('Aclf'), "60","Spells")
call MatchTable(I2S('ACcw'), "61","Spells")
call MatchTable(I2S('Acmg'), "62","Spells")
call MatchTable(I2S('Acpf'), "63","Spells")
call MatchTable(I2S('Acor'), "64","Spells")
call MatchTable(I2S('Acoa'), "65","Spells")
call MatchTable(I2S('Acoh'), "66","Spells")
call MatchTable(I2S('Aco2'), "67","Spells")
call MatchTable(I2S('Aco3'), "68","Spells")
call MatchTable(I2S('ACsp'), "69","Spells")
call MatchTable(I2S('Acri'), "6A","Spells")
call MatchTable(I2S('Scri'), "6B","Spells")
call MatchTable(I2S('ACcr'), "6C","Spells")
call MatchTable(I2S('ACct'), "6D","Spells")
call MatchTable(I2S('Acrs'), "6E","Spells")
call MatchTable(I2S('ACcs'), "6F","Spells")
call MatchTable(I2S('Acyc'), "6G","Spells")
call MatchTable(I2S('Acny'), "6H","Spells")
call MatchTable(I2S('ACcy'), "6I","Spells")
call MatchTable(I2S('SCc1'), "6J","Spells")
call MatchTable(I2S('ACdc'), "6K","Spells")
call MatchTable(I2S('Adda'), "6L","Spells")
call MatchTable(I2S('Amnx'), "6M","Spells")
call MatchTable(I2S('Amnz'), "6N","Spells")
call MatchTable(I2S('Adec'), "6O","Spells")
call MatchTable(I2S('Adef'), "6P","Spells")
call MatchTable(I2S('Adt1'), "6Q","Spells")
call MatchTable(I2S('Atru'), "6R","Spells")
call MatchTable(I2S('Adtg'), "6S","Spells")
call MatchTable(I2S('ANtr'), "6T","Spells")
call MatchTable(I2S('Agyv'), "6U","Spells")
call MatchTable(I2S('Adts'), "6V","Spells")
call MatchTable(I2S('Adtn'), "6W","Spells")
call MatchTable(I2S('Adev'), "6X","Spells")
call MatchTable(I2S('ACdv'), "6Y","Spells")
call MatchTable(I2S('Advm'), "6Z","Spells")
call MatchTable(I2S('ACde'), "70","Spells")
call MatchTable(I2S('Adch'), "71","Spells")
call MatchTable(I2S('Adcn'), "72","Spells")
call MatchTable(I2S('Adis'), "73","Spells")
call MatchTable(I2S('Adsm'), "74","Spells")
call MatchTable(I2S('ACds'), "75","Spells")
call MatchTable(I2S('ACdr'), "76","Spells")
call MatchTable(I2S('Adri'), "77","Spells")
call MatchTable(I2S('Adro'), "78","Spells")
call MatchTable(I2S('Sdro'), "79","Spells")
call MatchTable(I2S('Atdp'), "7A","Spells")
call MatchTable(I2S('Aeat'), "7B","Spells")
call MatchTable(I2S('ANen'), "7C","Spells")
call MatchTable(I2S('Aens'), "7D","Spells")
call MatchTable(I2S('ACen'), "7E","Spells")
call MatchTable(I2S('Aent'), "7F","Spells")
call MatchTable(I2S('Aegm'), "7G","Spells")
call MatchTable(I2S('Aenr'), "7H","Spells")
call MatchTable(I2S('Aenw'), "7I","Spells")
call MatchTable(I2S('Aetl'), "7J","Spells")
call MatchTable(I2S('Aetf'), "7K","Spells")
call MatchTable(I2S('ACev'), "7L","Spells")
call MatchTable(I2S('ACes'), "7M","Spells")
call MatchTable(I2S('Aexh'), "7N","Spells")
call MatchTable(I2S('Afae'), "7O","Spells")
call MatchTable(I2S('Afa2'), "7P","Spells")
call MatchTable(I2S('ACff'), "7Q","Spells")
call MatchTable(I2S('Afbk'), "7R","Spells")
call MatchTable(I2S('Afbt'), "7S","Spells")
call MatchTable(I2S('Afbb'), "7T","Spells")
call MatchTable(I2S('ACsf'), "7U","Spells")
call MatchTable(I2S('ACs9'), "7V","Spells")
call MatchTable(I2S('ACs8'), "7W","Spells")
call MatchTable(I2S('ACs7'), "7X","Spells")
call MatchTable(I2S('Afod'), "7Y","Spells")
call MatchTable(I2S('Awfb'), "7Z","Spells")
call MatchTable(I2S('ACfb'), "80","Spells")
call MatchTable(I2S('Aflk'), "81","Spells")
call MatchTable(I2S('Afla'), "82","Spells")
call MatchTable(I2S('ACfs'), "83","Spells")
call MatchTable(I2S('ANfs'), "84","Spells")
call MatchTable(I2S('ACfr'), "85","Spells")
call MatchTable(I2S('ACfl'), "86","Spells")
call MatchTable(I2S('Afsh'), "87","Spells")
call MatchTable(I2S('Afrz'), "88","Spells")
call MatchTable(I2S('Afzy'), "89","Spells")
call MatchTable(I2S('ACfa'), "8A","Spells")
call MatchTable(I2S('ACf2'), "8B","Spells")
call MatchTable(I2S('ACfu'), "8C","Spells")
call MatchTable(I2S('Afra'), "8D","Spells")
call MatchTable(I2S('Afrb'), "8E","Spells")
call MatchTable(I2S('ACfn'), "8F","Spells")
call MatchTable(I2S('ACcb'), "8G","Spells")
call MatchTable(I2S('Agho'), "8H","Spells")
call MatchTable(I2S('Aeth'), "8I","Spells")
call MatchTable(I2S('Agld'), "8J","Spells")
call MatchTable(I2S('Agra'), "8K","Spells")
call MatchTable(I2S('Agyd'), "8L","Spells")
call MatchTable(I2S('Agyb'), "8M","Spells")
call MatchTable(I2S('Assk'), "8N","Spells")
call MatchTable(I2S('Ansk'), "8O","Spells")
call MatchTable(I2S('Ahar'), "8P","Spells")
call MatchTable(I2S('ANha'), "8Q","Spells")
call MatchTable(I2S('Ahrl'), "8R","Spells")
call MatchTable(I2S('Ahr3'), "8S","Spells")
call MatchTable(I2S('Ahr2'), "8T","Spells")
call MatchTable(I2S('Ahea'), "8U","Spells")
call MatchTable(I2S('Anhe'), "8V","Spells")
call MatchTable(I2S('Anh1'), "8W","Spells")
call MatchTable(I2S('Anh2'), "8X","Spells")
call MatchTable(I2S('Ahwd'), "8Y","Spells")
call MatchTable(I2S('AChw'), "8Z","Spells")
call MatchTable(I2S('AChv'), "90","Spells")
call MatchTable(I2S('Ahnl'), "91","Spells")
//call MatchTable(I2S('AHer'), "92","Spells")
call MatchTable(I2S('AChx'), "93","Spells")
call MatchTable(I2S('Acht'), "94","Spells")
call MatchTable(I2S('ACim'), "95","Spells")
call MatchTable(I2S('ACmp'), "96","Spells")
call MatchTable(I2S('Aimp'), "97","Spells")
call MatchTable(I2S('Ainf'), "98","Spells")
call MatchTable(I2S('ACif'), "99","Spells")
call MatchTable(I2S('Aivs'), "9A","Spells")
//call MatchTable(I2S('AInv'), "9B","Spells")
call MatchTable(I2S('Apak'), "9C","Spells")
call MatchTable(I2S('Aion'), "9D","Spells")
call MatchTable(I2S('Aihn'), "9E","Spells")
call MatchTable(I2S('Aien'), "9F","Spells")
call MatchTable(I2S('Aiun'), "9G","Spells")
call MatchTable(I2S('Avul'), "9H","Spells")
call MatchTable(I2S('Alit'), "9I","Spells")
call MatchTable(I2S('Alsh'), "9J","Spells")
call MatchTable(I2S('ACls'), "9K","Spells")
call MatchTable(I2S('Aliq'), "9L","Spells")
call MatchTable(I2S('Aloa'), "9M","Spells")
call MatchTable(I2S('Sloa'), "9N","Spells")
call MatchTable(I2S('Slo2'), "9O","Spells")
call MatchTable(I2S('Slo3'), "9P","Spells")
call MatchTable(I2S('Atlp'), "9Q","Spells")
call MatchTable(I2S('Aloc'), "9R","Spells")
call MatchTable(I2S('Amdf'), "9S","Spells")
call MatchTable(I2S('Amim'), "9T","Spells")
call MatchTable(I2S('ACmi'), "9U","Spells")
call MatchTable(I2S('ACm2'), "9V","Spells")
call MatchTable(I2S('ACm3'), "9W","Spells")
call MatchTable(I2S('Amls'), "9X","Spells")
call MatchTable(I2S('Ambt'), "9Y","Spells")
call MatchTable(I2S('Amb2'), "9Z","Spells")
call MatchTable(I2S('Amnb'), "A0","Spells")
call MatchTable(I2S('Ambd'), "A1","Spells")
call MatchTable(I2S('Ambb'), "A2","Spells")
call MatchTable(I2S('Amfl'), "A3","Spells")
call MatchTable(I2S('ACmf'), "A4","Spells")
call MatchTable(I2S('Amed'), "A5","Spells")
call MatchTable(I2S('Amel'), "A6","Spells")
call MatchTable(I2S('Amil'), "A7","Spells")
call MatchTable(I2S('Amic'), "A8","Spells")
call MatchTable(I2S('ANmr'), "A9","Spells")
call MatchTable(I2S('Amin'), "AA","Spells")
call MatchTable(I2S('ACmo'), "AB","Spells")
call MatchTable(I2S('Amgl'), "AC","Spells")
call MatchTable(I2S('Amgr'), "AD","Spells")
//call MatchTable(I2S('Amov'), "AE","Spells")
call MatchTable(I2S('Aneu'), "AF","Spells")
call MatchTable(I2S('Ane2'), "AG","Spells")
call MatchTable(I2S('Andt'), "AH","Spells")
call MatchTable(I2S('ANre'), "AI","Spells")
call MatchTable(I2S('ACnr'), "AJ","Spells")
call MatchTable(I2S('Ansp'), "AK","Spells")
call MatchTable(I2S('Afak'), "AL","Spells")
call MatchTable(I2S('ANak'), "AM","Spells")
call MatchTable(I2S('Afir'), "AN","Spells")
call MatchTable(I2S('Afih'), "AO","Spells")
call MatchTable(I2S('Afio'), "AP","Spells")
call MatchTable(I2S('Afin'), "AQ","Spells")
call MatchTable(I2S('Afiu'), "AR","Spells")
call MatchTable(I2S('ANpa'), "AS","Spells")
call MatchTable(I2S('ACpa'), "AT","Spells")
call MatchTable(I2S('ANpi'), "AU","Spells")
call MatchTable(I2S('Apmf'), "AV","Spells")
call MatchTable(I2S('Apig'), "AW","Spells")
call MatchTable(I2S('Apiv'), "AX","Spells")
call MatchTable(I2S('Apsh'), "AY","Spells")
call MatchTable(I2S('Aphx'), "AZ","Spells")
call MatchTable(I2S('Apxf'), "B0","Spells")
call MatchTable(I2S('Apts'), "B1","Spells")
call MatchTable(I2S('Apoi'), "B2","Spells")
call MatchTable(I2S('Aply'), "B3","Spells")
call MatchTable(I2S('ACpy'), "B4","Spells")
call MatchTable(I2S('Apos'), "B5","Spells")
call MatchTable(I2S('ACps'), "B6","Spells")
call MatchTable(I2S('Awar'), "B7","Spells")
call MatchTable(I2S('ACpv'), "B8","Spells")
call MatchTable(I2S('Apit'), "B9","Spells")
call MatchTable(I2S('Aprg'), "BA","Spells")
call MatchTable(I2S('ACpu'), "BB","Spells")
call MatchTable(I2S('ACrf'), "BC","Spells")
call MatchTable(I2S('ACrg'), "BD","Spells")
call MatchTable(I2S('Arai'), "BE","Spells")
call MatchTable(I2S('ACrd'), "BF","Spells")
call MatchTable(I2S('ARal'), "BG","Spells")
call MatchTable(I2S('Arav'), "BH","Spells")
call MatchTable(I2S('Amrf'), "BI","Spells")
call MatchTable(I2S('ACrn'), "BJ","Spells")
call MatchTable(I2S('ANr2'), "BK","Spells")
call MatchTable(I2S('Arbr'), "BL","Spells")
call MatchTable(I2S('Arej'), "BM","Spells")
call MatchTable(I2S('ACrj'), "BN","Spells")
call MatchTable(I2S('ACr2'), "BO","Spells")
call MatchTable(I2S('Aren'), "BP","Spells")
call MatchTable(I2S('Ahrp'), "BQ","Spells")
call MatchTable(I2S('Arep'), "BR","Spells")
call MatchTable(I2S('Arpb'), "BS","Spells")
call MatchTable(I2S('Arpl'), "BT","Spells")
call MatchTable(I2S('Arpm'), "BU","Spells")
call MatchTable(I2S('Arsk'), "BV","Spells")
call MatchTable(I2S('ACrk'), "BW","Spells")
call MatchTable(I2S('ACsk'), "BX","Spells")
call MatchTable(I2S('Arst'), "BY","Spells")
call MatchTable(I2S('Argd'), "BZ","Spells")
call MatchTable(I2S('Argl'), "C0","Spells")
call MatchTable(I2S('Arlm'), "C1","Spells")
call MatchTable(I2S('AHta'), "C2","Spells")
call MatchTable(I2S('Arng'), "C3","Spells")
call MatchTable(I2S('Arev'), "C4","Spells")
call MatchTable(I2S('Aroa'), "C5","Spells")
call MatchTable(I2S('Ara2'), "C6","Spells")
call MatchTable(I2S('ACr1'), "C7","Spells")
call MatchTable(I2S('ACro'), "C8","Spells")
call MatchTable(I2S('Aroc'), "C9","Spells")
call MatchTable(I2S('Aro1'), "CA","Spells")
call MatchTable(I2S('Aro2'), "CB","Spells")
call MatchTable(I2S('Asac'), "CC","Spells")
call MatchTable(I2S('Asal'), "CD","Spells")
call MatchTable(I2S('Alam'), "CE","Spells")
call MatchTable(I2S('ACsa'), "CF","Spells")
call MatchTable(I2S('Asds'), "CG","Spells")
call MatchTable(I2S('Asid'), "CH","Spells")
call MatchTable(I2S('Asud'), "CI","Spells")
call MatchTable(I2S('Aesn'), "CJ","Spells")
call MatchTable(I2S('Aesr'), "CK","Spells")
call MatchTable(I2S('Aeye'), "CL","Spells")
call MatchTable(I2S('ACtn'), "CM","Spells")
call MatchTable(I2S('Ashm'), "CN","Spells")
call MatchTable(I2S('Sshm'), "CO","Spells")
call MatchTable(I2S('Ahid'), "CP","Spells")
call MatchTable(I2S('ACss'), "CQ","Spells")
call MatchTable(I2S('ACsh'), "CR","Spells")
call MatchTable(I2S('ACst'), "CS","Spells")
call MatchTable(I2S('ANsh'), "CT","Spells")
call MatchTable(I2S('ACsi'), "CU","Spells")
call MatchTable(I2S('ACsm'), "CV","Spells")
call MatchTable(I2S('ACsl'), "CW","Spells")
call MatchTable(I2S('Asla'), "CX","Spells")
call MatchTable(I2S('Aslo'), "CY","Spells")
call MatchTable(I2S('ACsw'), "CZ","Spells")
call MatchTable(I2S('Aspo'), "D0","Spells")
call MatchTable(I2S('Asod'), "D1","Spells")
call MatchTable(I2S('Assp'), "D2","Spells")
call MatchTable(I2S('Aspd'), "D3","Spells")
call MatchTable(I2S('Aspy'), "D4","Spells")
call MatchTable(I2S('Aspt'), "D5","Spells")
call MatchTable(I2S('Asps'), "D6","Spells")
call MatchTable(I2S('Asph'), "D7","Spells")
call MatchTable(I2S('Asp1'), "D8","Spells")
call MatchTable(I2S('Asp2'), "D9","Spells")
call MatchTable(I2S('Asp3'), "DA","Spells")
call MatchTable(I2S('Asp4'), "DB","Spells")
call MatchTable(I2S('Asp5'), "DC","Spells")
call MatchTable(I2S('Asp6'), "DD","Spells")
call MatchTable(I2S('Aspa'), "DE","Spells")
call MatchTable(I2S('Aspi'), "DF","Spells")
call MatchTable(I2S('Aspl'), "DG","Spells")
call MatchTable(I2S('Astd'), "DH","Spells")
call MatchTable(I2S('Asta'), "DI","Spells")
call MatchTable(I2S('Astn'), "DJ","Spells")
call MatchTable(I2S('Asth'), "DK","Spells")
call MatchTable(I2S('Asb1'), "DL","Spells")
call MatchTable(I2S('Asb2'), "DM","Spells")
call MatchTable(I2S('Asb3'), "DN","Spells")
call MatchTable(I2S('Aslp'), "DO","Spells")
call MatchTable(I2S('ACwe'), "DP","Spells")
call MatchTable(I2S('Attu'), "DQ","Spells")
call MatchTable(I2S('Srtt'), "DR","Spells")
call MatchTable(I2S('Atau'), "DS","Spells")
call MatchTable(I2S('ANta'), "DT","Spells")
call MatchTable(I2S('ANth'), "DU","Spells")
call MatchTable(I2S('ANt2'), "DV","Spells")
call MatchTable(I2S('ACah'), "DW","Spells")
call MatchTable(I2S('ACtb'), "DX","Spells")
call MatchTable(I2S('ACtc'), "DY","Spells")
call MatchTable(I2S('ACt2'), "DZ","Spells")
call MatchTable(I2S('Atdg'), "E0","Spells")
call MatchTable(I2S('Atsp'), "E1","Spells")
call MatchTable(I2S('Atwa'), "E2","Spells")
call MatchTable(I2S('Atol'), "E3","Spells")
call MatchTable(I2S('Ault'), "E4","Spells")
call MatchTable(I2S('ACua'), "E5","Spells")
call MatchTable(I2S('Auhf'), "E6","Spells")
call MatchTable(I2S('Suhf'), "E7","Spells")
call MatchTable(I2S('ACuf'), "E8","Spells")
call MatchTable(I2S('Auco'), "E9","Spells")
call MatchTable(I2S('Auns'), "EA","Spells")
call MatchTable(I2S('SCva'), "EB","Spells")
call MatchTable(I2S('ACvp'), "EC","Spells")
call MatchTable(I2S('Avng'), "ED","Spells")
call MatchTable(I2S('Awan'), "EE","Spells")
call MatchTable(I2S('Awrs'), "EF","Spells")
call MatchTable(I2S('Awrg'), "EG","Spells")
call MatchTable(I2S('Awrh'), "EH","Spells")
call MatchTable(I2S('ANwk'), "EI","Spells")
call MatchTable(I2S('Awha'), "EJ","Spells")
call MatchTable(I2S('Awh2'), "EK","Spells")
call MatchTable(I2S('Aven'), "EL","Spells")
call MatchTable(I2S('ACvs'), "EM","Spells")
call MatchTable(I2S('Awrp'), "EN","Spells")
call MatchTable(I2S('Aweb'), "EO","Spells")
call MatchTable(I2S('ACwb'), "EP","Spells")
call MatchTable(I2S('AIa1'), "EQ","Spells")
call MatchTable(I2S('AIa3'), "ER","Spells")
call MatchTable(I2S('AIa4'), "ES","Spells")
call MatchTable(I2S('AIa6'), "ET","Spells")
call MatchTable(I2S('AIx5'), "EU","Spells")
call MatchTable(I2S('AIx1'), "EV","Spells")
call MatchTable(I2S('AIx2'), "EW","Spells")
call MatchTable(I2S('AIs1'), "EX","Spells")
call MatchTable(I2S('AIs3'), "EY","Spells")
call MatchTable(I2S('AIs4'), "EZ","Spells")
call MatchTable(I2S('AIs6'), "F0","Spells")
call MatchTable(I2S('AIi1'), "F1","Spells")
call MatchTable(I2S('AIi3'), "F2","Spells")
call MatchTable(I2S('AIi4'), "F3","Spells")
call MatchTable(I2S('AIi6'), "F4","Spells")
call MatchTable(I2S('AIxm'), "F5","Spells")
call MatchTable(I2S('AIam'), "F6","Spells")
call MatchTable(I2S('AIim'), "F7","Spells")
call MatchTable(I2S('AIsm'), "F8","Spells")
call MatchTable(I2S('AIgm'), "F9","Spells")
call MatchTable(I2S('AItm'), "FA","Spells")
call MatchTable(I2S('AInm'), "FB","Spells")
call MatchTable(I2S('AIaa'), "FC","Spells")
call MatchTable(I2S('AIat'), "FD","Spells")
call MatchTable(I2S('AIt6'), "FE","Spells")
call MatchTable(I2S('AIt9'), "FF","Spells")
call MatchTable(I2S('AItc'), "FG","Spells")
call MatchTable(I2S('AItf'), "FH","Spells")
call MatchTable(I2S('AItg'), "FI","Spells")
call MatchTable(I2S('AIth'), "FJ","Spells")
call MatchTable(I2S('AIti'), "FK","Spells")
call MatchTable(I2S('AItj'), "FL","Spells")
call MatchTable(I2S('AItk'), "FM","Spells")
call MatchTable(I2S('AItl'), "FN","Spells")
call MatchTable(I2S('AItn'), "FO","Spells")
call MatchTable(I2S('AIva'), "FP","Spells")
call MatchTable(I2S('AIbk'), "FQ","Spells")
call MatchTable(I2S('AIbl'), "FR","Spells")
call MatchTable(I2S('AIbg'), "FS","Spells")
call MatchTable(I2S('AIbt'), "FT","Spells")
call MatchTable(I2S('AIbb'), "FU","Spells")
call MatchTable(I2S('AIbf'), "FV","Spells")
call MatchTable(I2S('AIbr'), "FW","Spells")
call MatchTable(I2S('AIbs'), "FX","Spells")
call MatchTable(I2S('AIbh'), "FY","Spells")
call MatchTable(I2S('AIcy'), "FZ","Spells")
call MatchTable(I2S('AId1'), "G0","Spells")
call MatchTable(I2S('AId2'), "G1","Spells")
call MatchTable(I2S('AId3'), "G2","Spells")
call MatchTable(I2S('AId4'), "G3","Spells")
call MatchTable(I2S('AId5'), "G4","Spells")
call MatchTable(I2S('AIgf'), "G5","Spells")
call MatchTable(I2S('AIgu'), "G6","Spells")
call MatchTable(I2S('AIem'), "G7","Spells")
call MatchTable(I2S('AIe2'), "G8","Spells")
call MatchTable(I2S('AIfd'), "G9","Spells")
call MatchTable(I2S('AIff'), "GA","Spells")
call MatchTable(I2S('AIfr'), "GB","Spells")
call MatchTable(I2S('AIfu'), "GC","Spells")
call MatchTable(I2S('AIfh'), "GD","Spells")
call MatchTable(I2S('AIfs'), "GE","Spells")
call MatchTable(I2S('AIir'), "GF","Spells")
call MatchTable(I2S('AIuw'), "GG","Spells")
call MatchTable(I2S('AIfl'), "GH","Spells")
call MatchTable(I2S('AIfm'), "GI","Spells")
call MatchTable(I2S('AIfo'), "GJ","Spells")
call MatchTable(I2S('AIfn'), "GK","Spells")
call MatchTable(I2S('AIfe'), "GL","Spells")
call MatchTable(I2S('AIfx'), "GM","Spells")
call MatchTable(I2S('AIfa'), "GN","Spells")
call MatchTable(I2S('AIin'), "GO","Spells")
call MatchTable(I2S('AIlm'), "GP","Spells")
call MatchTable(I2S('AIlp'), "GQ","Spells")
call MatchTable(I2S('AIlf'), "GR","Spells")
call MatchTable(I2S('AIl1'), "GS","Spells")
call MatchTable(I2S('AIl2'), "GT","Spells")
call MatchTable(I2S('AIms'), "GU","Spells")
call MatchTable(I2S('ANbs'), "GV","Spells")
call MatchTable(I2S('AIdf'), "GW","Spells")
call MatchTable(I2S('AIcb'), "GX","Spells")
call MatchTable(I2S('AIdn'), "GY","Spells")
call MatchTable(I2S('AIfb'), "GZ","Spells")
call MatchTable(I2S('AIgd'), "H0","Spells")
call MatchTable(I2S('AIzb'), "H1","Spells")
call MatchTable(I2S('AIob'), "H2","Spells")
call MatchTable(I2S('AIll'), "H3","Spells")
call MatchTable(I2S('AIlb'), "H4","Spells")
call MatchTable(I2S('AIsb'), "H5","Spells")
call MatchTable(I2S('AIpb'), "H6","Spells")
call MatchTable(I2S('Apo2'), "H7","Spells")
call MatchTable(I2S('AInd'), "H8","Spells")
call MatchTable(I2S('Arel'), "H9","Spells")
call MatchTable(I2S('Arll'), "HA","Spells")
call MatchTable(I2S('AIsi'), "HB","Spells")
call MatchTable(I2S('AIos'), "HC","Spells")
call MatchTable(I2S('AIso'), "HD","Spells")
call MatchTable(I2S('Asou'), "HE","Spells")
call MatchTable(I2S('AIcf'), "HF","Spells")
call MatchTable(I2S('AIco'), "HG","Spells")
call MatchTable(I2S('AIdm'), "HH","Spells")
call MatchTable(I2S('AIda'), "HI","Spells")
call MatchTable(I2S('AIdb'), "HJ","Spells")
call MatchTable(I2S('AIta'), "HK","Spells")
call MatchTable(I2S('AIdi'), "HL","Spells")
call MatchTable(I2S('AIds'), "HM","Spells")
call MatchTable(I2S('APdi'), "HN","Spells")
call MatchTable(I2S('AIh1'), "HO","Spells")
call MatchTable(I2S('AIh2'), "HP","Spells")
call MatchTable(I2S('AIh3'), "HQ","Spells")
call MatchTable(I2S('AIha'), "HR","Spells")
call MatchTable(I2S('AIhb'), "HS","Spells")
call MatchTable(I2S('APh1'), "HT","Spells")
call MatchTable(I2S('APh2'), "HU","Spells")
call MatchTable(I2S('APh3'), "HV","Spells")
call MatchTable(I2S('AIhw'), "HW","Spells")
call MatchTable(I2S('AIsw'), "HX","Spells")
call MatchTable(I2S('AIil'), "HY","Spells")
call MatchTable(I2S('AIv1'), "HZ","Spells")
call MatchTable(I2S('AIv2'), "I0","Spells")
call MatchTable(I2S('AIvu'), "I1","Spells")
call MatchTable(I2S('AIvl'), "I2","Spells")
call MatchTable(I2S('AIm1'), "I3","Spells")
call MatchTable(I2S('AIm2'), "I4","Spells")
call MatchTable(I2S('AImr'), "I5","Spells")
call MatchTable(I2S('APmr'), "I6","Spells")
call MatchTable(I2S('APmg'), "I7","Spells")
call MatchTable(I2S('AIpm'), "I8","Spells")
call MatchTable(I2S('AIrt'), "I9","Spells")
call MatchTable(I2S('AIrm'), "IA","Spells")
call MatchTable(I2S('AIrn'), "IB","Spells")
call MatchTable(I2S('AIrc'), "IC","Spells")
call MatchTable(I2S('AIre'), "ID","Spells")
call MatchTable(I2S('AIra'), "IE","Spells")
call MatchTable(I2S('APra'), "IF","Spells")
call MatchTable(I2S('AIsp'), "IG","Spells")
call MatchTable(I2S('AIsa'), "IH","Spells")
call MatchTable(I2S('APsa'), "II","Spells")
call MatchTable(I2S('AItp'), "IJ","Spells")
call MatchTable(I2S('AIad'), "IK","Spells")
call MatchTable(I2S('AIcd'), "IL","Spells")
call MatchTable(I2S('AIba'), "IM","Spells")
call MatchTable(I2S('AIav'), "IN","Spells")
call MatchTable(I2S('AIar'), "IO","Spells")
call MatchTable(I2S('AIae'), "IP","Spells")
call MatchTable(I2S('AIau'), "IQ","Spells")
call MatchTable(I2S('AIuv'), "IR","Spells")
call MatchTable(I2S('AIls'), "IS","Spells")
call MatchTable(I2S('AIxs'), "IT","Spells")
call MatchTable(I2S('AIan'), "IU","Spells")
call MatchTable(I2S('AIrs'), "IV","Spells")
call MatchTable(I2S('AIrr'), "IW","Spells")
call MatchTable(I2S('AIev'), "IX","Spells")
call MatchTable(I2S('AImx'), "IY","Spells")
call MatchTable(I2S('AImh'), "IZ","Spells")
call MatchTable(I2S('AImb'), "J0","Spells")
call MatchTable(I2S('AIbm'), "J1","Spells")
call MatchTable(I2S('AIsx'), "J2","Spells")
call MatchTable(I2S('AIs2'), "J3","Spells")
call MatchTable(I2S('AIrl'), "J4","Spells")
call MatchTable(I2S('AIpr'), "J5","Spells")
call MatchTable(I2S('AIsl'), "J6","Spells")
call MatchTable(I2S('AIpl'), "J7","Spells")
call MatchTable(I2S('AIp1'), "J8","Spells")
call MatchTable(I2S('AIp2'), "J9","Spells")
call MatchTable(I2S('AIp3'), "JA","Spells")
call MatchTable(I2S('AIp4'), "JB","Spells")
call MatchTable(I2S('AIp5'), "JC","Spells")
call MatchTable(I2S('AIp6'), "JD","Spells")
call MatchTable(I2S('AIgo'), "JE","Spells")
call MatchTable(I2S('AIlu'), "JF","Spells")
call MatchTable(I2S('AIrv'), "JG","Spells")
call MatchTable(I2S('AIdc'), "JH","Spells")
call MatchTable(I2S('AIwb'), "JI","Spells")
call MatchTable(I2S('AImo'), "JJ","Spells")
call MatchTable(I2S('AIct'), "JK","Spells")
call MatchTable(I2S('AIri'), "JL","Spells")
call MatchTable(I2S('AIsr'), "JM","Spells")
call MatchTable(I2S('Ablp'), "JN","Spells")
call MatchTable(I2S('AIpv'), "JO","Spells")
call MatchTable(I2S('Aste'), "JP","Spells")
call MatchTable(I2S('Amec'), "JQ","Spells")
call MatchTable(I2S('Ashs'), "JR","Spells")
call MatchTable(I2S('ANpr'), "JS","Spells")
call MatchTable(I2S('ANsa'), "JT","Spells")
call MatchTable(I2S('ANss'), "JU","Spells")
call MatchTable(I2S('ANse'), "JV","Spells")
call MatchTable(I2S('Aret'), "JW","Spells")
call MatchTable(I2S('AImt'), "JX","Spells")
call MatchTable(I2S('Aspb'), "JY","Spells")
call MatchTable(I2S('AIrd'), "JZ","Spells")
call MatchTable(I2S('AItb'), "K0","Spells")
call MatchTable(I2S('AIdv'), "K1","Spells")
call MatchTable(I2S('AIse'), "K2","Spells")
call MatchTable(I2S('AIpg'), "K3","Spells")
call MatchTable(I2S('AIps'), "K4","Spells")
call MatchTable(I2S('AIfg'), "K5","Spells")
call MatchTable(I2S('APrl'), "K6","Spells")
call MatchTable(I2S('APrr'), "K7","Spells")
call MatchTable(I2S('AIrb'), "K8","Spells")
call MatchTable(I2S('Aspp'), "K9","Spells")
call MatchTable(I2S('AUds'), "KA","Spells")
call MatchTable(I2S('APwt'), "KB","Spells")
call MatchTable(I2S('AIuf'), "KC","Spells")
call MatchTable(I2S('AId0'), "KD","Spells")
call MatchTable(I2S('AIcm'), "KE","Spells")
call MatchTable(I2S('AImz'), "KF","Spells")
call MatchTable(I2S('AIfz'), "KG","Spells")
call MatchTable(I2S('AIdp'), "KH","Spells")
call MatchTable(I2S('AImv'), "KI","Spells")
call MatchTable(I2S('AIpx'), "KJ","Spells")
call MatchTable(I2S('AIdd'), "KK","Spells")
call MatchTable(I2S('AId7'), "KL","Spells")
call MatchTable(I2S('AId8'), "KM","Spells")
call MatchTable(I2S('AIlz'), "KN","Spells")
call MatchTable(I2S('AIhx'), "KO","Spells")
call MatchTable(I2S('AIaz'), "KP","Spells")
call MatchTable(I2S('AIrx'), "KQ","Spells")
call MatchTable(I2S('AIbx'), "KR","Spells")
call MatchTable(I2S('AItx'), "KS","Spells")
call MatchTable(I2S('AIwm'), "KT","Spells")
call MatchTable(I2S('AIsh'), "KU","Spells")
call MatchTable(I2S('AI2m'), "KV","Spells")
call MatchTable(I2S('AIgx'), "KW","Spells")
call MatchTable(I2S('AIhl'), "KX","Spells")
call MatchTable(I2S('AIsz'), "KY","Spells")
call MatchTable(I2S('AIpz'), "KZ","Spells")
call MatchTable(I2S('AIfw'), "L0","Spells")
call MatchTable(I2S('AIft'), "L1","Spells")
call MatchTable(I2S('AIlx'), "L2","Spells")
call MatchTable(I2S('AIcs'), "L3","Spells")
call MatchTable(I2S('AIcl'), "L4","Spells")
call MatchTable(I2S('AIx3'), "L5","Spells")
call MatchTable(I2S('AIx4'), "L6","Spells")
call MatchTable(I2S('AIxk'), "L7","Spells")
set i = 0
set x[1] = 48 // 0
set x[2] = 48 // 0
set x[3] = 56 // 8
set x[4] = 76 // L
loop
exitwhen i > 438
set counter = counter + 1
if ((counter < 11) or ((counter > 17) and (counter < 44))) then
call MatchTable(I2S(1093664768+256*x[2]+x[1]), Num2S(x[4]) + Num2S(x[3]), "Spells")
set x[3] = x[3] + 1
if (x[3] == 58) then
set x[3] = 65
elseif (x[3] == 91) then
set x[3] = 48
set x[4] = x[4] + 1
if (x[4] == 58) then
set x[4] = 65
elseif (x[4] == 91) then
set x[4] = 48
endif
endif
elseif (counter > 43) then
set counter = 0
set x[1] = 47
set x[2] = x[2] + 1
endif
set x[1] = x[1] + 1
set i = i + 1
endloop
endfunction
function LearnSpell takes nothing returns nothing
local gamecache g = GetSaveCodeGameCache()
local integer spell = GetStoredInteger(g,"spellid","learnspell")
local integer level = GetStoredInteger(g,"level","learnspell")
local integer i = 1
local unit u = I2U(GetStoredInteger(g,"unit","learnspell"))
loop
exitwhen i > level
call SelectHeroSkill( u, spell )
set i = i + 1
endloop
endfunction
function SetUnitHP takes unit u, integer hp returns nothing
local real handycap
local player owner = GetOwningPlayer(u)
local unit tu
set tu = CreateUnit(Player(0),GetUnitTypeId(u),0,0,0)
call ModifyHeroStat( bj_HEROSTAT_STR, tu, bj_MODIFYMETHOD_SET, 1 )
call SetPlayerHandicapBJ(Player(15),100)
call SetUnitOwner(u, Player(15),false)
set handycap = (((R2I(GetUnitStateSwap(UNIT_STATE_MAX_LIFE, tu)) - 25) + hp)*100) / (R2I(GetUnitStateSwap(UNIT_STATE_MAX_LIFE, tu)) - 25)
call SetPlayerHandicapBJ(Player(15),handycap)
call SetUnitOwner(u, owner,false)
call SetPlayerHandicapBJ(Player(15),100)
call RemoveUnit(tu)
endfunction
function Restore_Unit takes string ecodestr returns unit
local gamecache g = GetSaveCodeGameCache()
local string codestr = StringCase(ecodestr, true)
local integer utype = S2I(GetStoredString(g,"HsID2ID",IncDecNum(SubStringBJ(codestr,4,4),"+")+IncDecNum(SubStringBJ(codestr,2,2),"-")))
local integer array positions
local integer array items
local integer i = 1
local integer num
local integer spellID
local integer spellLevel
local integer offset = 6
local unit u = CreateUnit(GetTriggerPlayer(),utype,0,0,0)
local integer spells
local trigger t = I2T(GetStoredInteger(g,"trigger","learnspell"))
local integer array addons
set positions[1] = R2I((Num2Numbers(SubStringBJ(codestr,1,1))) / 6)
set positions[2] = Num2Numbers(SubStringBJ(codestr,1,1)) - positions[1] * 6
set positions[3] = R2I((Num2Numbers(SubStringBJ(codestr,3,3))) / 6)
set positions[4] = Num2Numbers(SubStringBJ(codestr,3,3)) - positions[3] * 6
set num = Num2Numbers(SubStringBJ(codestr,5,5))
if (num == 1) then
set positions[5] = 5
set positions[6] = 6
else
set positions[5] = R2I((Num2Numbers(SubStringBJ(codestr,5,5))) / 6)
set positions[6] = Num2Numbers(SubStringBJ(codestr,5,5)) - positions[5] * 6
endif
loop
exitwhen i > 6
call UnitAddItemByIdSwapped( 'sor5', u )
if (positions[i] != 0) then
set items[i] = S2I(GetStoredString(g,"IsID2ID",IncDecNum(SubStringBJ(codestr,offset+1,offset+1),"+")+IncDecNum(SubStringBJ(codestr,offset,offset),"-")))
set offset = offset + 2
endif
set i = i + 1
endloop
call SetHeroXP( u, 100*S2BigNum(SubStringBJ(codestr,offset,offset+2)), false )
set spells = S2I(SubStringBJ(codestr,offset+3,offset+3))
set i = 1
loop
set offset = offset + 4
exitwhen i > spells
set spellID = S2I(GetStoredString(g,"SsID2ID",IncDecNum(SubStringBJ(codestr,offset+2,offset+2),"+")+IncDecNum(SubStringBJ(codestr,offset,offset),"-")))
set spellLevel = 36*Num2Numbers(IncDecNum(SubStringBJ(codestr,offset+3,offset+3),"+"))+Num2Numbers(IncDecNum(SubStringBJ(codestr,offset+1,offset+1),"-"))
call StoreInteger(g,"unit","learnspell",H2I(u))
call StoreInteger(g,"level","learnspell",spellLevel)
call StoreInteger(g,"spellid","learnspell",spellID)
call TriggerExecute( t )
set i = i + 1
endloop
if (SubStringBJ(codestr,offset,offset) != "") then
set num = Num2Numbers(SubStringBJ(codestr,offset,offset))
set addons[1] = R2I(8*R2I(num/8) / 8)
set num = (num-addons[1])
set addons[2] = R2I(4*R2I(num/4) / 4)
set num = (num-addons[2])
set addons[3] = R2I(2*R2I(num/2) / 2)
set num = (num-addons[3])
set addons[4] = num
set offset = offset + 1
if (addons[1] > 0) then
set num = 36*Num2Numbers(IncDecNum(SubStringBJ(codestr,offset+1,offset+1),"+"))+Num2Numbers(IncDecNum(SubStringBJ(codestr,offset,offset),"-"))
call SetUnitHP(u,num)
set offset = offset + 2
endif
if (addons[2] > 0) then
set num = 36*Num2Numbers(IncDecNum(SubStringBJ(codestr,offset+1,offset+1),"+"))+Num2Numbers(IncDecNum(SubStringBJ(codestr,offset,offset),"-"))
call SetHeroStr(u,GetHeroStr(u,false)+num,true)
set offset = offset + 2
endif
if (addons[3] > 0) then
set num = 36*Num2Numbers(IncDecNum(SubStringBJ(codestr,offset+1,offset+1),"+"))+Num2Numbers(IncDecNum(SubStringBJ(codestr,offset,offset),"-"))
call SetHeroAgi(u,GetHeroAgi(u,false)+num,true)
set offset = offset + 2
endif
if (addons[4] > 0) then
set num = 36*Num2Numbers(IncDecNum(SubStringBJ(codestr,offset+1,offset+1),"+"))+Num2Numbers(IncDecNum(SubStringBJ(codestr,offset,offset),"-"))
call SetHeroInt(u,GetHeroInt(u,false)+num,true)
endif
endif
set i = 7
loop
set i = i - 1
exitwhen i < 1
call RemoveItem( UnitItemInSlot(u, i-1) )
if (positions[i] != 0) then
call UnitAddItemByIdSwapped( items[i], u )
endif
endloop
return u
endfunction
function Store_Unit takes unit u returns string
local gamecache g = GetSaveCodeGameCache()
local string sID = GetStoredString(g,"HID2sID",I2S(GetUnitTypeId(u)))
local integer i = 0
local string herocode = ""
local unit tu
local string array s
local integer array items
local integer array charges
local integer array positions
local integer spells = 0
local string array spell_sIDs
local integer array spell_levels
local integer array values
local integer addon = 0
loop
exitwhen i > 5
set items[i+1] = GetItemTypeId(UnitItemInSlot(u, i))
set charges[i+1] = GetItemCharges(UnitItemInSlot(u, i))
set positions[i+1] = i+1
if (items[i+1] == 0) then
set positions[i+1] = 0
else
call RemoveItem( UnitItemInSlot(u, i) )
endif
set i = i + 1
endloop
set tu = CreateUnit(Player(0),GetUnitTypeId(u),0,0,0)
call SetHeroXP( tu, GetHeroXP(u), false )
set values[2] = R2I(GetHeroStr(u,false)-GetHeroStr(tu,false))
set values[3] = R2I(GetHeroAgi(u,false)-GetHeroAgi(tu,false))
set values[4] = R2I(GetHeroInt(u,false)-GetHeroInt(tu,false))
call SetHeroStr(tu,GetHeroStr(u,false),true)
call SetHeroAgi(tu,GetHeroAgi(u,false),true)
call SetHeroInt(tu,GetHeroInt(u,false),true)
set values[1] = R2I(GetUnitStateSwap(UNIT_STATE_MAX_LIFE, u) - GetUnitStateSwap(UNIT_STATE_MAX_LIFE, tu))
if (values[4] > 0) then
set addon = addon + 1
endif
if (values[3] > 0) then
set addon = addon + 2
endif
if (values[2] > 0) then
set addon = addon + 4
endif
if (values[1] > 0) then
set addon = addon + 8
endif
set s[6] = SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",addon+1,addon+1)
if (s[6] == "0") then
set s[6] = ""
endif
call RemoveUnit(tu)
set i = 1
set s[1] = NumAndNum(positions[1],positions[2])
set s[2] = IncDecNum(SubStringBJ(sID,2,2),"+")
set s[3] = NumAndNum(positions[3],positions[4])
set s[4] = IncDecNum(SubStringBJ(sID,1,1),"-")
set s[5] = NumAndNum(positions[5],positions[6])
set herocode = s[1] + s[2] + s[3] + s[4] + s[5]
loop
exitwhen i > 6
if (positions[i] != 0) then
set sID = GetStoredString(g,"IID2sID",I2S(items[i]))
set herocode = herocode + IncDecNum(SubStringBJ(sID,2,2),"+")
set herocode = herocode + IncDecNum(SubStringBJ(sID,1,1),"-")
endif
set i = i + 1
endloop
set herocode = herocode + BigNum2S(R2I(GetHeroXP(u)/100))
set i = 0
loop
exitwhen i > (763+360)
if ( GetUnitAbilityLevelSwapped(S2I(GetStoredString(g,"SNum2ID",I2S(i))), u) > 0) then
set spells = spells + 1
set spell_sIDs[spells] = GetStoredString(g,"SNum2sID",I2S(i))
set spell_levels[spells] = GetUnitAbilityLevelSwapped(S2I(GetStoredString(g,"SNum2ID",I2S(i))), u)
endif
set i = i + 1
endloop
set herocode = herocode + I2S(spells)
set i = 1
loop
exitwhen i > spells
set positions[1] = R2I(spell_levels[i] / 36)
set positions[2] = spell_levels[i]-36*positions[1]
set herocode = herocode + IncDecNum(SubStringBJ(spell_sIDs[i],2,2),"+")
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[2]+1,positions[2]+1),"+")
set herocode = herocode + IncDecNum(SubStringBJ(spell_sIDs[i],1,1),"-")
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[1]+1,positions[1]+1),"-")
set i = i + 1
endloop
set herocode = herocode + s[6]
set positions[1] = R2I(values[1] / 36)
set positions[2] = values[1]-36*positions[1]
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[2]+1,positions[2]+1),"+")
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[1]+1,positions[1]+1),"-")
set positions[1] = R2I(values[2] / 36)
set positions[2] = values[2]-36*positions[1]
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[2]+1,positions[2]+1),"+")
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[1]+1,positions[1]+1),"-")
set positions[1] = R2I(values[3] / 36)
set positions[2] = values[3]-36*positions[1]
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[2]+1,positions[2]+1),"+")
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[1]+1,positions[1]+1),"-")
set positions[1] = R2I(values[4] / 36)
set positions[2] = values[4]-36*positions[1]
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[2]+1,positions[2]+1),"+")
set herocode = herocode + IncDecNum(SubStringBJ("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",positions[1]+1,positions[1]+1),"-")
call RemoveUnit(u)
return herocode
endfunction
function HeroGroup takes nothing returns boolean
return ( IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true )
endfunction
function ChatStoreHero takes nothing returns nothing
local string s = Store_Unit(GroupPickRandomUnit(GetUnitsOfPlayerMatching(GetTriggerPlayer(), Condition(function HeroGroup))))
call DisplayTimedTextToForce( GetForceOfPlayer(GetTriggerPlayer()), 230, s)
endfunction
function ChatRestoreHero takes nothing returns nothing
call Restore_Unit(SubStringBJ(GetEventPlayerChatString(), 10, 150))
endfunction
//===========================================================================
function InitTrig_SaveCode takes nothing returns nothing
local trigger t = CreateTrigger( )
local integer i = 0
set gg_trg_SaveCode = SaveCodeGameCache2Trigger(InitGameCache( "SaveCode.w3v" ))
call TriggerRegisterTimerEventSingle( t, 0.10 )
call TriggerAddAction( t, function SaveCode_InitSpells )
set t = CreateTrigger( )
call TriggerRegisterTimerEventSingle( t, 0.10 )
call TriggerAddAction( t, function SaveCode_InitHeros )
set t = CreateTrigger( )
call TriggerRegisterTimerEventSingle( t, 0.10 )
call TriggerAddAction( t, function SaveCode_InitItems )
set t = CreateTrigger( )
call TriggerAddAction( t, function LearnSpell )
call StoreInteger(GetSaveCodeGameCache(),"trigger","learnspell",H2I(t))
set t = CreateTrigger( )
loop
exitwhen i > 11
call TriggerRegisterPlayerChatEvent( t, Player(i), "-store", false )
set i = i + 1
endloop
call TriggerAddAction( t, function ChatStoreHero )
set i = 0
set t = CreateTrigger( )
loop
exitwhen i > 11
call TriggerRegisterPlayerChatEvent( t, Player(i), "-restore", false )
set i = i + 1
endloop
call TriggerAddAction( t, function ChatRestoreHero )
endfunction
function Trig_Load_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetEnteringUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_Load_Actions takes nothing returns nothing
call SetUnitPositionLoc( GetEnteringUnit(), GetRectCenter(gg_rct_Class_ReQ) )
endfunction
//===========================================================================
function InitTrig_Load takes nothing returns nothing
set gg_trg_Load = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_Load, gg_rct_Load )
call TriggerAddCondition( gg_trg_Load, Condition( function Trig_Load_Conditions ) )
call TriggerAddAction( gg_trg_Load, function Trig_Load_Actions )
endfunction
function Trig_Off_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_Load )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_281" )
endfunction
//===========================================================================
function InitTrig_Off takes nothing returns nothing
set gg_trg_Off = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Off, 120.00 )
call TriggerAddAction( gg_trg_Off, function Trig_Off_Actions )
endfunction
function Trig_Version_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_126", "TRIGSTR_127", "ReplaceableTextures\\CommandButtons\\BTNAmuletOftheWild.blp" )
endfunction
//===========================================================================
function InitTrig_Version takes nothing returns nothing
set gg_trg_Version = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Version, 5 )
call TriggerAddAction( gg_trg_Version, function Trig_Version_Actions )
endfunction
function Trig_Save_code_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_128", "TRIGSTR_129", "ReplaceableTextures\\CommandButtons\\BTNHeroDeathKnight.blp" )
endfunction
//===========================================================================
function InitTrig_Save_code takes nothing returns nothing
set gg_trg_Save_code = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Save_code, 5 )
call TriggerAddAction( gg_trg_Save_code, function Trig_Save_code_Actions )
endfunction
function Trig_More_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_130", "TRIGSTR_131", "ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp" )
endfunction
//===========================================================================
function InitTrig_More takes nothing returns nothing
set gg_trg_More = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_More, 5 )
call TriggerAddAction( gg_trg_More, function Trig_More_Actions )
endfunction
function Trig_Game_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_132", "TRIGSTR_133", "ReplaceableTextures\\CommandButtons\\BTNFelHound.blp" )
endfunction
//===========================================================================
function InitTrig_Game takes nothing returns nothing
set gg_trg_Game = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Game, 5 )
call TriggerAddAction( gg_trg_Game, function Trig_Game_Actions )
endfunction
function Trig_WindRider_Actions takes nothing returns nothing
call CreateQuestBJ( bj_QUESTTYPE_REQ_DISCOVERED, "TRIGSTR_374", "TRIGSTR_375", "ReplaceableTextures\\CommandButtons\\BTNWyvernRider.blp" )
endfunction
//===========================================================================
function InitTrig_WindRider takes nothing returns nothing
set gg_trg_WindRider = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_WindRider, 1.00 )
call TriggerAddAction( gg_trg_WindRider, function Trig_WindRider_Actions )
endfunction
function Trig_Saved_Actions takes nothing returns nothing
call DialogClearBJ( udg_Saved )
call DialogSetMessageBJ( udg_Saved, "TRIGSTR_161" )
call DialogAddButtonBJ( udg_Saved, "TRIGSTR_162" )
set udg_Loaded2 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_Saved, "TRIGSTR_163" )
set udg_Loaded1 = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_Saved, Player(0) )
call DialogDisplayBJ( true, udg_Saved, Player(1) )
call DialogDisplayBJ( true, udg_Saved, Player(2) )
call DialogDisplayBJ( true, udg_Saved, Player(3) )
call DialogDisplayBJ( true, udg_Saved, Player(4) )
call DialogDisplayBJ( true, udg_Saved, Player(5) )
call DialogDisplayBJ( true, udg_Saved, Player(6) )
call DialogDisplayBJ( true, udg_Saved, Player(7) )
call DialogDisplayBJ( true, udg_Saved, Player(8) )
call DialogDisplayBJ( true, udg_Saved, Player(9) )
endfunction
//===========================================================================
function InitTrig_Saved takes nothing returns nothing
set gg_trg_Saved = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Saved, 1.00 )
call TriggerAddAction( gg_trg_Saved, function Trig_Saved_Actions )
endfunction
function Trig_Saved2_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Loaded1 ) ) then
return false
endif
return true
endfunction
function Trig_Saved2_Func017A takes nothing returns nothing
call DialogDisplayBJ( true, udg_TheDialog, GetEnumPlayer() )
endfunction
function Trig_Saved2_Actions takes nothing returns nothing
// Dialog 1
call DialogClearBJ( udg_TheDialog )
call DialogSetMessageBJ( udg_TheDialog, "TRIGSTR_165" )
call DialogAddButtonBJ( udg_TheDialog, "TRIGSTR_166" )
set udg_Buttons[1] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_TheDialog, "TRIGSTR_167" )
set udg_Buttons[2] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_TheDialog, "TRIGSTR_168" )
set udg_Buttons[3] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_TheDialog, "TRIGSTR_169" )
set udg_Buttons[4] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_TheDialog, "TRIGSTR_170" )
set udg_Buttons[5] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_TheDialog, "TRIGSTR_171" )
set udg_Buttons[6] = GetLastCreatedButtonBJ()
// Dialog in Work
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Saved2_Func017A )
endfunction
//===========================================================================
function InitTrig_Saved2 takes nothing returns nothing
set gg_trg_Saved2 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Saved2, udg_Saved )
call TriggerAddCondition( gg_trg_Saved2, Condition( function Trig_Saved2_Conditions ) )
call TriggerAddAction( gg_trg_Saved2, function Trig_Saved2_Actions )
endfunction
function Trig_Saved3_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Loaded2 ) ) then
return false
endif
return true
endfunction
function Trig_Saved3_Actions takes nothing returns nothing
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "TRIGSTR_164" )
endfunction
//===========================================================================
function InitTrig_Saved3 takes nothing returns nothing
set gg_trg_Saved3 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Saved3, udg_Saved )
call TriggerAddCondition( gg_trg_Saved3, Condition( function Trig_Saved3_Conditions ) )
call TriggerAddAction( gg_trg_Saved3, function Trig_Saved3_Actions )
endfunction
function Trig_Dialog2_Actions takes nothing returns nothing
// -----Type------
set udg_Heroes[1] = 'H000'
set udg_Heroes[2] = 'H003'
set udg_Heroes[3] = 'H006'
set udg_Heroes[4] = 'H009'
set udg_Heroes[5] = 'H00C'
set udg_Heroes[6] = 'H00F'
endfunction
//===========================================================================
function InitTrig_Dialog2 takes nothing returns nothing
set gg_trg_Dialog2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Dialog2, function Trig_Dialog2_Actions )
endfunction
function Trig_Dialog3_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Buttons[GetForLoopIndexA()] ) ) then
return false
endif
return true
endfunction
function Trig_Dialog3_Func001Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Buttons[10] ) ) then
return false
endif
return true
endfunction
function Trig_Dialog3_Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Buttons[7] ) ) then
return false
endif
return true
endfunction
function Trig_Dialog3_Actions takes nothing returns nothing
if ( Trig_Dialog3_Func001C() ) then
call DialogDisplayBJ( true, udg_TheDialog2, GetTriggerPlayer() )
return
else
if ( Trig_Dialog3_Func001Func001C() ) then
call DialogDisplayBJ( true, udg_TheDialog, GetTriggerPlayer() )
return
else
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 6
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
if ( Trig_Dialog3_Func001Func001Func001Func001C() ) then
call CreateNUnitsAtLoc( 1, udg_Heroes[GetForLoopIndexA()], GetTriggerPlayer(), GetRectCenter(gg_rct_Class_ReQ), bj_UNIT_FACING )
call SelectUnitForPlayerSingle( GetLastCreatedUnit(), GetTriggerPlayer() )
call AdjustPlayerStateBJ( 1, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_LUMBER )
else
endif
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endif
endif
endfunction
//===========================================================================
function InitTrig_Dialog3 takes nothing returns nothing
set gg_trg_Dialog3 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Dialog3, udg_TheDialog )
call TriggerAddAction( gg_trg_Dialog3, function Trig_Dialog3_Actions )
endfunction
function Trig_NagaClass1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00C' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00D' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00E' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I008' ) ) then
return false
endif
return true
endfunction
function Trig_NagaClass1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_NagaClass1 takes nothing returns nothing
set gg_trg_NagaClass1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NagaClass1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NagaClass1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_NagaClass1, Condition( function Trig_NagaClass1_Conditions ) )
call TriggerAddAction( gg_trg_NagaClass1, function Trig_NagaClass1_Actions )
endfunction
function Trig_BloodElfClass1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00G' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00B' ) ) then
return false
endif
return true
endfunction
function Trig_BloodElfClass1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_BloodElfClass1 takes nothing returns nothing
set gg_trg_BloodElfClass1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodElfClass1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodElfClass1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_BloodElfClass1, Condition( function Trig_BloodElfClass1_Conditions ) )
call TriggerAddAction( gg_trg_BloodElfClass1, function Trig_BloodElfClass1_Actions )
endfunction
function Trig_BloodElfClass2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00G' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00A' ) ) then
return false
endif
return true
endfunction
function Trig_BloodElfClass2_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_BloodElfClass2 takes nothing returns nothing
set gg_trg_BloodElfClass2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodElfClass2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodElfClass2, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_BloodElfClass2, Condition( function Trig_BloodElfClass2_Conditions ) )
call TriggerAddAction( gg_trg_BloodElfClass2, function Trig_BloodElfClass2_Actions )
endfunction
function Trig_NagaClass2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00C' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00D' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00E' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
return false
endif
return true
endfunction
function Trig_NagaClass2_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_NagaClass2 takes nothing returns nothing
set gg_trg_NagaClass2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NagaClass2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NagaClass2, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_NagaClass2, Condition( function Trig_NagaClass2_Conditions ) )
call TriggerAddAction( gg_trg_NagaClass2, function Trig_NagaClass2_Actions )
endfunction
function Trig_HumanClass1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H000' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H001' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H002' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return false
endif
return true
endfunction
function Trig_HumanClass1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_HumanClass1 takes nothing returns nothing
set gg_trg_HumanClass1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HumanClass1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HumanClass1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_HumanClass1, Condition( function Trig_HumanClass1_Conditions ) )
call TriggerAddAction( gg_trg_HumanClass1, function Trig_HumanClass1_Actions )
endfunction
function Trig_HumanClass2_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H000' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H002' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_HumanClass2_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_HumanClass2 takes nothing returns nothing
set gg_trg_HumanClass2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HumanClass2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HumanClass2, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_HumanClass2, Condition( function Trig_HumanClass2_Conditions ) )
call TriggerAddAction( gg_trg_HumanClass2, function Trig_HumanClass2_Actions )
endfunction
function Trig_OrcClass1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H003' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H005' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H004' ) ) then
return false
endif
return true
endfunction
function Trig_OrcClass1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_OrcClass1 takes nothing returns nothing
set gg_trg_OrcClass1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OrcClass1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OrcClass1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_OrcClass1, Condition( function Trig_OrcClass1_Conditions ) )
call TriggerAddAction( gg_trg_OrcClass1, function Trig_OrcClass1_Actions )
endfunction
function Trig_OrcClass2_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H005' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H004' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_OrcClass2_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_OrcClass2 takes nothing returns nothing
set gg_trg_OrcClass2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OrcClass2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_OrcClass2, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_OrcClass2, Condition( function Trig_OrcClass2_Conditions ) )
call TriggerAddAction( gg_trg_OrcClass2, function Trig_OrcClass2_Actions )
endfunction
function Trig_NightElfClass1_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H008' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H006' ) ) then
return false
endif
return true
endfunction
function Trig_NightElfClass1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_NightElfClass1 takes nothing returns nothing
set gg_trg_NightElfClass1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NightElfClass1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NightElfClass1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_NightElfClass1, Condition( function Trig_NightElfClass1_Conditions ) )
call TriggerAddAction( gg_trg_NightElfClass1, function Trig_NightElfClass1_Actions )
endfunction
function Trig_NightElfClass2_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I005' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H008' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H006' ) ) then
return false
endif
return true
endfunction
function Trig_NightElfClass2_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_NightElfClass2 takes nothing returns nothing
set gg_trg_NightElfClass2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NightElfClass2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NightElfClass2, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_NightElfClass2, Condition( function Trig_NightElfClass2_Conditions ) )
call TriggerAddAction( gg_trg_NightElfClass2, function Trig_NightElfClass2_Actions )
endfunction
function Trig_UndeadClass1_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H009' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00B' ) ) then
return false
endif
return true
endfunction
function Trig_UndeadClass1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_UndeadClass1 takes nothing returns nothing
set gg_trg_UndeadClass1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UndeadClass1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UndeadClass1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_UndeadClass1, Condition( function Trig_UndeadClass1_Conditions ) )
call TriggerAddAction( gg_trg_UndeadClass1, function Trig_UndeadClass1_Actions )
endfunction
function Trig_UndeadClass2_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I006' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H009' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00B' ) ) then
return false
endif
return true
endfunction
function Trig_UndeadClass2_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetTriggerUnit() )
endfunction
//===========================================================================
function InitTrig_UndeadClass2 takes nothing returns nothing
set gg_trg_UndeadClass2 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UndeadClass2, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_UndeadClass2, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_UndeadClass2, Condition( function Trig_UndeadClass2_Conditions ) )
call TriggerAddAction( gg_trg_UndeadClass2, function Trig_UndeadClass2_Actions )
endfunction
function Trig_Warrior_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I000' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Warrior_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H001', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Warrior takes nothing returns nothing
set gg_trg_Warrior = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Warrior, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Warrior, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Warrior, Condition( function Trig_Warrior_Conditions ) )
call TriggerAddAction( gg_trg_Warrior, function Trig_Warrior_Actions )
endfunction
function Trig_Metalmaster_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I005' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H006' ) ) then
return false
endif
return true
endfunction
function Trig_Metalmaster_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H008', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Metalmaster takes nothing returns nothing
set gg_trg_Metalmaster = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Metalmaster, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Metalmaster, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Metalmaster, Condition( function Trig_Metalmaster_Conditions ) )
call TriggerAddAction( gg_trg_Metalmaster, function Trig_Metalmaster_Actions )
endfunction
function Trig_Archer_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I004' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H006' ) ) then
return false
endif
return true
endfunction
function Trig_Archer_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H007', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Archer takes nothing returns nothing
set gg_trg_Archer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Archer, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Archer, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Archer, Condition( function Trig_Archer_Conditions ) )
call TriggerAddAction( gg_trg_Archer, function Trig_Archer_Actions )
endfunction
function Trig_Zombie_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I007' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H009' ) ) then
return false
endif
return true
endfunction
function Trig_Zombie_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H00B', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Zombie takes nothing returns nothing
set gg_trg_Zombie = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Zombie, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Zombie, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Zombie, Condition( function Trig_Zombie_Conditions ) )
call TriggerAddAction( gg_trg_Zombie, function Trig_Zombie_Actions )
endfunction
function Trig_Necromancer_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I006' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H009' ) ) then
return false
endif
return true
endfunction
function Trig_Necromancer_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H00A', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Necromancer takes nothing returns nothing
set gg_trg_Necromancer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Necromancer, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Necromancer, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Necromancer, Condition( function Trig_Necromancer_Conditions ) )
call TriggerAddAction( gg_trg_Necromancer, function Trig_Necromancer_Actions )
endfunction
function Trig_Guard_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I001' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H000' ) ) then
return false
endif
return true
endfunction
function Trig_Guard_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H002', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Guard takes nothing returns nothing
set gg_trg_Guard = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Guard, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Guard, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Guard, Condition( function Trig_Guard_Conditions ) )
call TriggerAddAction( gg_trg_Guard, function Trig_Guard_Actions )
endfunction
function Trig_Hunter_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I003' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Hunter_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H004', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Hunter takes nothing returns nothing
set gg_trg_Hunter = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Hunter, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Hunter, Condition( function Trig_Hunter_Conditions ) )
call TriggerAddAction( gg_trg_Hunter, function Trig_Hunter_Actions )
endfunction
function Trig_Slicer_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00A' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00F' ) ) then
return false
endif
return true
endfunction
function Trig_Slicer_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H00H', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Slicer takes nothing returns nothing
set gg_trg_Slicer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slicer, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slicer, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Slicer, Condition( function Trig_Slicer_Conditions ) )
call TriggerAddAction( gg_trg_Slicer, function Trig_Slicer_Actions )
endfunction
function Trig_Breaker_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00B' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00F' ) ) then
return false
endif
return true
endfunction
function Trig_Breaker_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H00G', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Breaker takes nothing returns nothing
set gg_trg_Breaker = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Breaker, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Breaker, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Breaker, Condition( function Trig_Breaker_Conditions ) )
call TriggerAddAction( gg_trg_Breaker, function Trig_Breaker_Actions )
endfunction
function Trig_Slayer_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I002' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H003' ) ) then
return false
endif
return true
endfunction
function Trig_Slayer_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H005', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Slayer takes nothing returns nothing
set gg_trg_Slayer = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slayer, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Slayer, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Slayer, Condition( function Trig_Slayer_Conditions ) )
call TriggerAddAction( gg_trg_Slayer, function Trig_Slayer_Actions )
endfunction
function Trig_Siren_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I008' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00C' ) ) then
return false
endif
return true
endfunction
function Trig_Siren_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H00D', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Siren takes nothing returns nothing
set gg_trg_Siren = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Siren, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Siren, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Siren, Condition( function Trig_Siren_Conditions ) )
call TriggerAddAction( gg_trg_Siren, function Trig_Siren_Actions )
endfunction
function Trig_Waterwarrior_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I009' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00C' ) ) then
return false
endif
return true
endfunction
function Trig_Waterwarrior_Actions takes nothing returns nothing
call ReplaceUnitBJ( GetManipulatingUnit(), 'H00E', bj_UNIT_STATE_METHOD_DEFAULTS )
call TriggerSleepAction( 0.50 )
call RemoveItem( GetManipulatedItem() )
endfunction
//===========================================================================
function InitTrig_Waterwarrior takes nothing returns nothing
set gg_trg_Waterwarrior = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Waterwarrior, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Waterwarrior, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Waterwarrior, Condition( function Trig_Waterwarrior_Conditions ) )
call TriggerAddAction( gg_trg_Waterwarrior, function Trig_Waterwarrior_Actions )
endfunction
function Trig_Gold_Actions takes nothing returns nothing
call AdjustPlayerStateBJ( 800, Player(0), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(1), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(2), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(3), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(4), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(5), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(6), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(7), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(8), PLAYER_STATE_RESOURCE_GOLD )
call AdjustPlayerStateBJ( 800, Player(9), PLAYER_STATE_RESOURCE_GOLD )
endfunction
//===========================================================================
function InitTrig_Gold takes nothing returns nothing
set gg_trg_Gold = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Gold, 1.00 )
call TriggerAddAction( gg_trg_Gold, function Trig_Gold_Actions )
endfunction
function Trig_Kick_Func_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AUan' ) ) then
return false
endif
return true
endfunction
function Trig_Kick_Func_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_Kick_Func takes nothing returns nothing
set gg_trg_Kick_Func = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Kick_Func, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Kick_Func, Condition( function Trig_Kick_Func_Conditions ) )
call TriggerAddAction( gg_trg_Kick_Func, function Trig_Kick_Func_Actions )
endfunction
function Trig_MiLJan_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_135" )
call CreateNUnitsAtLoc( 1, 'H00I', GetTriggerPlayer(), GetRectCenter(gg_rct_Class_ReQ), bj_UNIT_FACING )
call TriggerSleepAction( 1.00 )
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_MiLJan takes nothing returns nothing
set gg_trg_MiLJan = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(0), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(1), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(2), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(3), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(4), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(5), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(6), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(7), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(8), "-restore miljan hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_MiLJan, Player(9), "-restore miljan hero", true )
call TriggerAddAction( gg_trg_MiLJan, function Trig_MiLJan_Actions )
endfunction
function Trig_Abe_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_136" )
call CreateNUnitsAtLoc( 1, 'H00J', GetTriggerPlayer(), GetRectCenter(gg_rct_Class_ReQ), bj_UNIT_FACING )
call TriggerSleepAction( 1.00 )
call DestroyTrigger( GetTriggeringTrigger() )
endfunction
//===========================================================================
function InitTrig_Abe takes nothing returns nothing
set gg_trg_Abe = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(0), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(1), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(2), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(3), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(4), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(5), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(6), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(7), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(8), "-restore Abe hero", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Abe, Player(9), "-restore Abe hero", true )
call TriggerAddAction( gg_trg_Abe, function Trig_Abe_Actions )
endfunction
function Trig_Dialoga1_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A000' ) ) then
return false
endif
return true
endfunction
function Trig_Dialoga1_Func026A takes nothing returns nothing
call DialogDisplayBJ( true, udg_KickDialog, GetOwningPlayer(GetSpellAbilityUnit()) )
endfunction
function Trig_Dialoga1_Actions takes nothing returns nothing
// Dialog 1
call DialogClearBJ( udg_KickDialog )
call DialogSetMessageBJ( udg_KickDialog, "TRIGSTR_137" )
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(0)) ) )
set udg_KickPlayers[1] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(1)) ) )
set udg_KickPlayers[2] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(2)) ) )
set udg_KickPlayers[3] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(3)) ) )
set udg_KickPlayers[4] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(4)) ) )
set udg_KickPlayers[5] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(5)) ) )
set udg_KickPlayers[6] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(6)) ) )
set udg_KickPlayers[7] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(7)) ) )
set udg_KickPlayers[8] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(8)) ) )
set udg_KickPlayers[9] = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_KickDialog, ( "Kick " + GetPlayerName(Player(9)) ) )
set udg_KickPlayers[10] = GetLastCreatedButtonBJ()
// Dialog in Work
call ForForce( GetPlayersByMapControl(MAP_CONTROL_USER), function Trig_Dialoga1_Func026A )
endfunction
//===========================================================================
function InitTrig_Dialoga1 takes nothing returns nothing
set gg_trg_Dialoga1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Dialoga1, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_Dialoga1, Condition( function Trig_Dialoga1_Conditions ) )
call TriggerAddAction( gg_trg_Dialoga1, function Trig_Dialoga1_Actions )
endfunction
function Trig_Dialoga2_Actions takes nothing returns nothing
// -----Player------
set udg_Playertoget[1] = Player(0)
set udg_Playertoget[2] = Player(1)
set udg_Playertoget[3] = Player(2)
set udg_Playertoget[4] = Player(3)
set udg_Playertoget[5] = Player(4)
set udg_Playertoget[6] = Player(5)
set udg_Playertoget[7] = Player(6)
set udg_Playertoget[8] = Player(7)
set udg_Playertoget[9] = Player(8)
set udg_Playertoget[10] = Player(9)
endfunction
//===========================================================================
function InitTrig_Dialoga2 takes nothing returns nothing
set gg_trg_Dialoga2 = CreateTrigger( )
call TriggerAddAction( gg_trg_Dialoga2, function Trig_Dialoga2_Actions )
endfunction
function Trig_Dialoga3_Func001Func001Func001Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_KickPlayers[GetForLoopIndexB()] ) ) then
return false
endif
return true
endfunction
function Trig_Dialoga3_Func001Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Buttons[10] ) ) then
return false
endif
return true
endfunction
function Trig_Dialoga3_Func001C takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_Buttons[7] ) ) then
return false
endif
return true
endfunction
function Trig_Dialoga3_Actions takes nothing returns nothing
if ( Trig_Dialoga3_Func001C() ) then
call DialogDisplayBJ( true, udg_TheDialog2, GetTriggerPlayer() )
return
else
if ( Trig_Dialoga3_Func001Func001C() ) then
call DialogDisplayBJ( true, udg_TheDialog, GetTriggerPlayer() )
return
else
set bj_forLoopBIndex = 1
set bj_forLoopBIndexEnd = 10
loop
exitwhen bj_forLoopBIndex > bj_forLoopBIndexEnd
if ( Trig_Dialoga3_Func001Func001Func001Func001C() ) then
call CustomDefeatBJ( udg_Playertoget[GetForLoopIndexB()], "TRIGSTR_144" )
else
endif
set bj_forLoopBIndex = bj_forLoopBIndex + 1
endloop
endif
endif
endfunction
//===========================================================================
function InitTrig_Dialoga3 takes nothing returns nothing
set gg_trg_Dialoga3 = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Dialoga3, udg_KickDialog )
call TriggerAddAction( gg_trg_Dialoga3, function Trig_Dialoga3_Actions )
endfunction
function Trig_HunterSpear1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H004' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
return true
endfunction
function Trig_HunterSpear1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_HunterSpear1 takes nothing returns nothing
set gg_trg_HunterSpear1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HunterSpear1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HunterSpear1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_HunterSpear1, Condition( function Trig_HunterSpear1_Conditions ) )
call TriggerAddAction( gg_trg_HunterSpear1, function Trig_HunterSpear1_Actions )
endfunction
function Trig_DruidStaff1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00I' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00L' ) ) then
return false
endif
return true
endfunction
function Trig_DruidStaff1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_DruidStaff1 takes nothing returns nothing
set gg_trg_DruidStaff1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DruidStaff1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DruidStaff1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_DruidStaff1, Condition( function Trig_DruidStaff1_Conditions ) )
call TriggerAddAction( gg_trg_DruidStaff1, function Trig_DruidStaff1_Actions )
endfunction
function Trig_MetalBlade1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H008' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00J' ) ) then
return false
endif
return true
endfunction
function Trig_MetalBlade1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_MetalBlade1 takes nothing returns nothing
set gg_trg_MetalBlade1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MetalBlade1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MetalBlade1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_MetalBlade1, Condition( function Trig_MetalBlade1_Conditions ) )
call TriggerAddAction( gg_trg_MetalBlade1, function Trig_MetalBlade1_Actions )
endfunction
function Trig_WarriorSword1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H001' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00F' ) ) then
return false
endif
return true
endfunction
function Trig_WarriorSword1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_WarriorSword1 takes nothing returns nothing
set gg_trg_WarriorSword1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WarriorSword1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WarriorSword1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_WarriorSword1, Condition( function Trig_WarriorSword1_Conditions ) )
call TriggerAddAction( gg_trg_WarriorSword1, function Trig_WarriorSword1_Actions )
endfunction
function Trig_BreakBlade1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00G' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00H' ) ) then
return false
endif
return true
endfunction
function Trig_BreakBlade1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_BreakBlade1 takes nothing returns nothing
set gg_trg_BreakBlade1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BreakBlade1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BreakBlade1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_BreakBlade1, Condition( function Trig_BreakBlade1_Conditions ) )
call TriggerAddAction( gg_trg_BreakBlade1, function Trig_BreakBlade1_Actions )
endfunction
function Trig_ArcherBow1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H007' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00G' ) ) then
return false
endif
return true
endfunction
function Trig_ArcherBow1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_ArcherBow1 takes nothing returns nothing
set gg_trg_ArcherBow1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ArcherBow1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ArcherBow1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ArcherBow1, Condition( function Trig_ArcherBow1_Conditions ) )
call TriggerAddAction( gg_trg_ArcherBow1, function Trig_ArcherBow1_Actions )
endfunction
function Trig_GuardGun1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H002' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00I' ) ) then
return false
endif
return true
endfunction
function Trig_GuardGun1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_GuardGun1 takes nothing returns nothing
set gg_trg_GuardGun1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GuardGun1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GuardGun1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_GuardGun1, Condition( function Trig_GuardGun1_Conditions ) )
call TriggerAddAction( gg_trg_GuardGun1, function Trig_GuardGun1_Actions )
endfunction
function Trig_SlayerAxe1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H005' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00K' ) ) then
return false
endif
return true
endfunction
function Trig_SlayerAxe1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SlayerAxe1 takes nothing returns nothing
set gg_trg_SlayerAxe1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SlayerAxe1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SlayerAxe1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_SlayerAxe1, Condition( function Trig_SlayerAxe1_Conditions ) )
call TriggerAddAction( gg_trg_SlayerAxe1, function Trig_SlayerAxe1_Actions )
endfunction
function Trig_not2_Actions takes nothing returns nothing
endfunction
//===========================================================================
function InitTrig_not2 takes nothing returns nothing
set gg_trg_not2 = CreateTrigger( )
call TriggerAddAction( gg_trg_not2, function Trig_not2_Actions )
endfunction
function Trig_HunterSpear1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H004' ) ) then
return false
endif
return true
endfunction
function Trig_HunterSpear1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A002', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_HunterSpear1a takes nothing returns nothing
set gg_trg_HunterSpear1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HunterSpear1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HunterSpear1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_HunterSpear1a, Condition( function Trig_HunterSpear1a_Conditions ) )
call TriggerAddAction( gg_trg_HunterSpear1a, function Trig_HunterSpear1a_Actions )
endfunction
function Trig_HunterSpear1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00E' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H004' ) ) then
return false
endif
return true
endfunction
function Trig_HunterSpear1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A002', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_HunterSpear1b takes nothing returns nothing
set gg_trg_HunterSpear1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HunterSpear1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_HunterSpear1b, Condition( function Trig_HunterSpear1b_Conditions ) )
call TriggerAddAction( gg_trg_HunterSpear1b, function Trig_HunterSpear1b_Actions )
endfunction
function Trig_Warrior_Sword1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Warrior_Sword1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A001', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Warrior_Sword1a takes nothing returns nothing
set gg_trg_Warrior_Sword1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Warrior_Sword1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Warrior_Sword1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_Warrior_Sword1a, Condition( function Trig_Warrior_Sword1a_Conditions ) )
call TriggerAddAction( gg_trg_Warrior_Sword1a, function Trig_Warrior_Sword1a_Actions )
endfunction
function Trig_Warrior_Sword1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00F' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H001' ) ) then
return false
endif
return true
endfunction
function Trig_Warrior_Sword1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A001', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_Warrior_Sword1b takes nothing returns nothing
set gg_trg_Warrior_Sword1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Warrior_Sword1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_Warrior_Sword1b, Condition( function Trig_Warrior_Sword1b_Conditions ) )
call TriggerAddAction( gg_trg_Warrior_Sword1b, function Trig_Warrior_Sword1b_Actions )
endfunction
function Trig_ArcherBow1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00G' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H007' ) ) then
return false
endif
return true
endfunction
function Trig_ArcherBow1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A003', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_ArcherBow1a takes nothing returns nothing
set gg_trg_ArcherBow1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ArcherBow1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ArcherBow1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ArcherBow1a, Condition( function Trig_ArcherBow1a_Conditions ) )
call TriggerAddAction( gg_trg_ArcherBow1a, function Trig_ArcherBow1a_Actions )
endfunction
function Trig_ArcherBow1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00G' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H007' ) ) then
return false
endif
return true
endfunction
function Trig_ArcherBow1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A003', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_ArcherBow1b takes nothing returns nothing
set gg_trg_ArcherBow1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ArcherBow1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_ArcherBow1b, Condition( function Trig_ArcherBow1b_Conditions ) )
call TriggerAddAction( gg_trg_ArcherBow1b, function Trig_ArcherBow1b_Actions )
endfunction
function Trig_BreakBlade1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00H' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00G' ) ) then
return false
endif
return true
endfunction
function Trig_BreakBlade1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A004', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_BreakBlade1a takes nothing returns nothing
set gg_trg_BreakBlade1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BreakBlade1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BreakBlade1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_BreakBlade1a, Condition( function Trig_BreakBlade1a_Conditions ) )
call TriggerAddAction( gg_trg_BreakBlade1a, function Trig_BreakBlade1a_Actions )
endfunction
function Trig_BreakBlade1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00H' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00G' ) ) then
return false
endif
return true
endfunction
function Trig_BreakBlade1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A004', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_BreakBlade1b takes nothing returns nothing
set gg_trg_BreakBlade1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BreakBlade1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_BreakBlade1b, Condition( function Trig_BreakBlade1b_Conditions ) )
call TriggerAddAction( gg_trg_BreakBlade1b, function Trig_BreakBlade1b_Actions )
endfunction
function Trig_GuardGun1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00I' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_GuardGun1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A005', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_GuardGun1a takes nothing returns nothing
set gg_trg_GuardGun1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GuardGun1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GuardGun1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_GuardGun1a, Condition( function Trig_GuardGun1a_Conditions ) )
call TriggerAddAction( gg_trg_GuardGun1a, function Trig_GuardGun1a_Actions )
endfunction
function Trig_GuardGun1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00I' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H002' ) ) then
return false
endif
return true
endfunction
function Trig_GuardGun1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A005', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_GuardGun1b takes nothing returns nothing
set gg_trg_GuardGun1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_GuardGun1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_GuardGun1b, Condition( function Trig_GuardGun1b_Conditions ) )
call TriggerAddAction( gg_trg_GuardGun1b, function Trig_GuardGun1b_Actions )
endfunction
function Trig_MetalBlade1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00J' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H008' ) ) then
return false
endif
return true
endfunction
function Trig_MetalBlade1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A006', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_MetalBlade1a takes nothing returns nothing
set gg_trg_MetalBlade1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MetalBlade1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MetalBlade1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_MetalBlade1a, Condition( function Trig_MetalBlade1a_Conditions ) )
call TriggerAddAction( gg_trg_MetalBlade1a, function Trig_MetalBlade1a_Actions )
endfunction
function Trig_MetalBlade1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00J' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H008' ) ) then
return false
endif
return true
endfunction
function Trig_MetalBlade1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A006', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_MetalBlade1b takes nothing returns nothing
set gg_trg_MetalBlade1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_MetalBlade1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_MetalBlade1b, Condition( function Trig_MetalBlade1b_Conditions ) )
call TriggerAddAction( gg_trg_MetalBlade1b, function Trig_MetalBlade1b_Actions )
endfunction
function Trig_SlayerAxe1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00K' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H005' ) ) then
return false
endif
return true
endfunction
function Trig_SlayerAxe1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A007', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SlayerAxe1a takes nothing returns nothing
set gg_trg_SlayerAxe1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SlayerAxe1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SlayerAxe1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_SlayerAxe1a, Condition( function Trig_SlayerAxe1a_Conditions ) )
call TriggerAddAction( gg_trg_SlayerAxe1a, function Trig_SlayerAxe1a_Actions )
endfunction
function Trig_SlayerAxe1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00K' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H005' ) ) then
return false
endif
return true
endfunction
function Trig_SlayerAxe1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A007', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SlayerAxe1b takes nothing returns nothing
set gg_trg_SlayerAxe1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SlayerAxe1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_SlayerAxe1b, Condition( function Trig_SlayerAxe1b_Conditions ) )
call TriggerAddAction( gg_trg_SlayerAxe1b, function Trig_SlayerAxe1b_Actions )
endfunction
function Trig_DruidStaff1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00L' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00I' ) ) then
return false
endif
return true
endfunction
function Trig_DruidStaff1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A008', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_DruidStaff1a takes nothing returns nothing
set gg_trg_DruidStaff1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DruidStaff1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DruidStaff1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_DruidStaff1a, Condition( function Trig_DruidStaff1a_Conditions ) )
call TriggerAddAction( gg_trg_DruidStaff1a, function Trig_DruidStaff1a_Actions )
endfunction
function Trig_DruidStaff1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00L' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00I' ) ) then
return false
endif
return true
endfunction
function Trig_DruidStaff1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A008', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_DruidStaff1b takes nothing returns nothing
set gg_trg_DruidStaff1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_DruidStaff1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_DruidStaff1b, Condition( function Trig_DruidStaff1b_Conditions ) )
call TriggerAddAction( gg_trg_DruidStaff1b, function Trig_DruidStaff1b_Actions )
endfunction
function Trig_HeroNet_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(0), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet takes nothing returns nothing
set gg_trg_HeroNet = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet, Condition( function Trig_HeroNet_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet, function Trig_HeroNet_Actions )
endfunction
function Trig_HeroNetb_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(0) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet )
endfunction
//===========================================================================
function InitTrig_HeroNetb takes nothing returns nothing
set gg_trg_HeroNetb = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb, Condition( function Trig_HeroNetb_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb, function Trig_HeroNetb_Actions )
endfunction
function Trig_HeroNetb_Copy_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(1) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy takes nothing returns nothing
set gg_trg_HeroNetb_Copy = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy, Condition( function Trig_HeroNetb_Copy_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy, function Trig_HeroNetb_Copy_Actions )
endfunction
function Trig_HeroNetb_Copy_2_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(2) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_2_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_2 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_2 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_2 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_2, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_2, Condition( function Trig_HeroNetb_Copy_2_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_2, function Trig_HeroNetb_Copy_2_Actions )
endfunction
function Trig_HeroNetb_Copy_3_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(3) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_3_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_3 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_3 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_3 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_3, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_3, Condition( function Trig_HeroNetb_Copy_3_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_3, function Trig_HeroNetb_Copy_3_Actions )
endfunction
function Trig_HeroNetb_Copy_4_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(4) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_4_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_4 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_4 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_4 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_4, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_4, Condition( function Trig_HeroNetb_Copy_4_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_4, function Trig_HeroNetb_Copy_4_Actions )
endfunction
function Trig_HeroNetb_Copy_5_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(5) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_5_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_5 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_5 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_5 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_5, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_5, Condition( function Trig_HeroNetb_Copy_5_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_5, function Trig_HeroNetb_Copy_5_Actions )
endfunction
function Trig_HeroNetb_Copy_6_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_6_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_6 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_6 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_6 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_6, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_6, Condition( function Trig_HeroNetb_Copy_6_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_6, function Trig_HeroNetb_Copy_6_Actions )
endfunction
function Trig_HeroNetb_Copy_7_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(7) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_7_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_7 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_7 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_7 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_7, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_7, Condition( function Trig_HeroNetb_Copy_7_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_7, function Trig_HeroNetb_Copy_7_Actions )
endfunction
function Trig_HeroNetb_Copy_8_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(8) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_8_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_8 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_8 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_8 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_8, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_8, Condition( function Trig_HeroNetb_Copy_8_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_8, function Trig_HeroNetb_Copy_8_Actions )
endfunction
function Trig_HeroNetb_Copy_9_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetLeavingUnit()) == Player(9) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNetb_Copy_9_Actions takes nothing returns nothing
call DestroyTrigger( gg_trg_HeroNet_Copy_9 )
endfunction
//===========================================================================
function InitTrig_HeroNetb_Copy_9 takes nothing returns nothing
set gg_trg_HeroNetb_Copy_9 = CreateTrigger( )
call TriggerRegisterLeaveRectSimple( gg_trg_HeroNetb_Copy_9, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNetb_Copy_9, Condition( function Trig_HeroNetb_Copy_9_Conditions ) )
call TriggerAddAction( gg_trg_HeroNetb_Copy_9, function Trig_HeroNetb_Copy_9_Actions )
endfunction
function Trig_HeroNet_Copy_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(1) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(1), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy takes nothing returns nothing
set gg_trg_HeroNet_Copy = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy, Condition( function Trig_HeroNet_Copy_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy, function Trig_HeroNet_Copy_Actions )
endfunction
function Trig_HeroNet_Copy_2_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(2) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_2_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(2), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_2 takes nothing returns nothing
set gg_trg_HeroNet_Copy_2 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_2, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_2, Condition( function Trig_HeroNet_Copy_2_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_2, function Trig_HeroNet_Copy_2_Actions )
endfunction
function Trig_HeroNet_Copy_3_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(3) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_3_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(3), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_3 takes nothing returns nothing
set gg_trg_HeroNet_Copy_3 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_3, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_3, Condition( function Trig_HeroNet_Copy_3_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_3, function Trig_HeroNet_Copy_3_Actions )
endfunction
function Trig_HeroNet_Copy_4_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(4) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_4_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(4), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_4 takes nothing returns nothing
set gg_trg_HeroNet_Copy_4 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_4, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_4, Condition( function Trig_HeroNet_Copy_4_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_4, function Trig_HeroNet_Copy_4_Actions )
endfunction
function Trig_HeroNet_Copy_5_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(5) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_5_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(5), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_5 takes nothing returns nothing
set gg_trg_HeroNet_Copy_5 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_5, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_5, Condition( function Trig_HeroNet_Copy_5_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_5, function Trig_HeroNet_Copy_5_Actions )
endfunction
function Trig_HeroNet_Copy_6_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(6) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_6_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(6), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_6 takes nothing returns nothing
set gg_trg_HeroNet_Copy_6 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_6, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_6, Condition( function Trig_HeroNet_Copy_6_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_6, function Trig_HeroNet_Copy_6_Actions )
endfunction
function Trig_HeroNet_Copy_7_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(7) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_7_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(7), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_7 takes nothing returns nothing
set gg_trg_HeroNet_Copy_7 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_7, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_7, Condition( function Trig_HeroNet_Copy_7_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_7, function Trig_HeroNet_Copy_7_Actions )
endfunction
function Trig_HeroNet_Copy_8_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(8) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_8_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(8), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_8 takes nothing returns nothing
set gg_trg_HeroNet_Copy_8 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_8, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_8, Condition( function Trig_HeroNet_Copy_8_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_8, function Trig_HeroNet_Copy_8_Actions )
endfunction
function Trig_HeroNet_Copy_9_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetEnteringUnit()) == Player(9) ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet_Copy_9_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(9), PLAYER_STATE_RESOURCE_FOOD_USED, 1 )
endfunction
//===========================================================================
function InitTrig_HeroNet_Copy_9 takes nothing returns nothing
set gg_trg_HeroNet_Copy_9 = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_HeroNet_Copy_9, gg_rct_Class_ReQ )
call TriggerAddCondition( gg_trg_HeroNet_Copy_9, Condition( function Trig_HeroNet_Copy_9_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet_Copy_9, function Trig_HeroNet_Copy_9_Actions )
endfunction
function Trig_HeroNet2_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_HeroNet2_Actions takes nothing returns nothing
call RemoveUnit( GetLastCreatedUnit() )
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_172" )
endfunction
//===========================================================================
function InitTrig_HeroNet2 takes nothing returns nothing
set gg_trg_HeroNet2 = CreateTrigger( )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(0), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(1), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(2), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(3), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(4), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(5), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(6), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(7), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(8), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerRegisterPlayerStateEvent( gg_trg_HeroNet2, Player(9), PLAYER_STATE_RESOURCE_FOOD_USED, GREATER_THAN_OR_EQUAL, 2.00 )
call TriggerAddCondition( gg_trg_HeroNet2, Condition( function Trig_HeroNet2_Conditions ) )
call TriggerAddAction( gg_trg_HeroNet2, function Trig_HeroNet2_Actions )
endfunction
function Trig_Grunt1_Actions takes nothing returns nothing
call IssuePointOrderLocBJ( GetAttacker(), "move", GetRectCenter(gg_rct_Grunt1) )
call TriggerSleepAction( 0.10 )
call DialogClearBJ( udg_Grunt1 )
call DialogSetMessageBJ( udg_Grunt1, "TRIGSTR_376" )
call DialogAddButtonBJ( udg_Grunt1, "TRIGSTR_377" )
set udg_GruntButton1 = GetLastCreatedButtonBJ()
call DialogAddButtonBJ( udg_Grunt1, "TRIGSTR_378" )
set udg_GruntButton2 = GetLastCreatedButtonBJ()
call DialogDisplayBJ( true, udg_Grunt1, GetOwningPlayer(GetAttacker()) )
call ResetUnitAnimation( gg_unit_ogru_0025 )
endfunction
//===========================================================================
function InitTrig_Grunt1 takes nothing returns nothing
set gg_trg_Grunt1 = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Grunt1, gg_unit_ogru_0025, EVENT_UNIT_ATTACKED )
call TriggerAddAction( gg_trg_Grunt1, function Trig_Grunt1_Actions )
endfunction
function Trig_Grunt1Y_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_GruntButton1 ) ) then
return false
endif
return true
endfunction
function Trig_Grunt1Y_Func001C takes nothing returns boolean
return true
endfunction
function Trig_Grunt1Y_Actions takes nothing returns nothing
if ( Trig_Grunt1Y_Func001C() ) then
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_UPDATED, "TRIGSTR_393" )
call CreateQuestBJ( bj_QUESTTYPE_OPT_DISCOVERED, "TRIGSTR_391", "TRIGSTR_392", "ReplaceableTextures\\CommandButtons\\BTNShaman.blp" )
call DisplayTextToPlayer( GetEnumPlayer(), 0, 0, "TRIGSTR_387" )
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "TRIGSTR_388" )
call RemoveUnit( gg_unit_oshm_0045 )
else
endif
endfunction
//===========================================================================
function InitTrig_Grunt1Y takes nothing returns nothing
set gg_trg_Grunt1Y = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Grunt1Y, udg_Grunt1 )
call TriggerAddCondition( gg_trg_Grunt1Y, Condition( function Trig_Grunt1Y_Conditions ) )
call TriggerAddAction( gg_trg_Grunt1Y, function Trig_Grunt1Y_Actions )
endfunction
function Trig_Grunt1N_Conditions takes nothing returns boolean
if ( not ( GetClickedButtonBJ() == udg_GruntButton2 ) ) then
return false
endif
return true
endfunction
function Trig_Grunt1N_Actions takes nothing returns nothing
call DisplayTextToPlayer( GetTriggerPlayer(), 0, 0, "TRIGSTR_386" )
endfunction
//===========================================================================
function InitTrig_Grunt1N takes nothing returns nothing
set gg_trg_Grunt1N = CreateTrigger( )
call TriggerRegisterDialogEventBJ( gg_trg_Grunt1N, udg_Grunt1 )
call TriggerAddCondition( gg_trg_Grunt1N, Condition( function Trig_Grunt1N_Conditions ) )
call TriggerAddAction( gg_trg_Grunt1N, function Trig_Grunt1N_Actions )
endfunction
function Trig_Grunt1F_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'oshm', Player(PLAYER_NEUTRAL_PASSIVE), GetUnitLoc(gg_unit_h00K_0046), bj_UNIT_FACING )
call DisplayTextToPlayer( GetOwningPlayer(GetKillingUnitBJ()), 0, 0, "TRIGSTR_395" )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "move", GetRectCenter(gg_rct_Grunt1) )
call UnitAddItemByIdSwapped( 'I00D', GetKillingUnitBJ() )
endfunction
//===========================================================================
function InitTrig_Grunt1F takes nothing returns nothing
set gg_trg_Grunt1F = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Grunt1F, gg_unit_h00K_0046, EVENT_UNIT_DEATH )
call TriggerAddAction( gg_trg_Grunt1F, function Trig_Grunt1F_Actions )
endfunction
function Trig_Xp50_Actions takes nothing returns nothing
call SetPlayerHandicapXPBJ( Player(0), 50.00 )
call SetPlayerHandicapXPBJ( Player(1), 50.00 )
call SetPlayerHandicapXPBJ( Player(2), 50.00 )
call SetPlayerHandicapXPBJ( Player(3), 50.00 )
call SetPlayerHandicapXPBJ( Player(4), 50.00 )
call SetPlayerHandicapXPBJ( Player(5), 50.00 )
call SetPlayerHandicapXPBJ( Player(6), 50.00 )
call SetPlayerHandicapXPBJ( Player(7), 50.00 )
call SetPlayerHandicapXPBJ( Player(8), 50.00 )
call SetPlayerHandicapXPBJ( Player(9), 50.00 )
endfunction
//===========================================================================
function InitTrig_Xp50 takes nothing returns nothing
set gg_trg_Xp50 = CreateTrigger( )
call TriggerRegisterTimerEventSingle( gg_trg_Xp50, 1.00 )
call TriggerAddAction( gg_trg_Xp50, function Trig_Xp50_Actions )
endfunction
function Trig_Death_Conditions takes nothing returns boolean
if ( not ( GetOwningPlayer(GetDyingUnit()) == Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_Death_Actions takes nothing returns nothing
call TriggerSleepAction( 60.00 )
call CreateNUnitsAtLoc( 1, GetUnitTypeId(GetDyingUnit()), Player(11), GetUnitLoc(GetDyingUnit()), bj_UNIT_FACING )
endfunction
//===========================================================================
function InitTrig_Death takes nothing returns nothing
set gg_trg_Death = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Death, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_Death, Condition( function Trig_Death_Conditions ) )
call TriggerAddAction( gg_trg_Death, function Trig_Death_Actions )
endfunction
function Trig_HeroLife_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( GetOwningPlayer(GetDyingUnit()) != Player(11) ) ) then
return false
endif
return true
endfunction
function Trig_HeroLife_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_404" )
call TriggerSleepAction( 30.00 )
call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(gg_rct_Class_ReQ), true )
endfunction
//===========================================================================
function InitTrig_HeroLife takes nothing returns nothing
set gg_trg_HeroLife = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_HeroLife, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddCondition( gg_trg_HeroLife, Condition( function Trig_HeroLife_Conditions ) )
call TriggerAddAction( gg_trg_HeroLife, function Trig_HeroLife_Actions )
endfunction
function Trig_EnterPlz_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetLastCreatedUnit()) == 'Ogld' ) ) then
return false
endif
return true
endfunction
function Trig_EnterPlz_Actions takes nothing returns nothing
call CreateNUnitsAtLoc( 1, 'Ogld', Player(10), GetUnitLoc(GetEnteringUnit()), bj_UNIT_FACING )
call TriggerSleepAction( 30.00 )
call RemoveUnit( GetLastCreatedUnit() )
endfunction
//===========================================================================
function InitTrig_EnterPlz takes nothing returns nothing
set gg_trg_EnterPlz = CreateTrigger( )
call TriggerRegisterEnterRectSimple( gg_trg_EnterPlz, gg_rct_OrcCityEnt1 )
call TriggerRegisterEnterRectSimple( gg_trg_EnterPlz, gg_rct_OrcCityEnt2 )
call TriggerAddCondition( gg_trg_EnterPlz, Condition( function Trig_EnterPlz_Conditions ) )
call TriggerAddAction( gg_trg_EnterPlz, function Trig_EnterPlz_Actions )
endfunction
function Trig_BloodAxe1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00M' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00J' ) ) then
return false
endif
return true
endfunction
function Trig_BloodAxe1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A009', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_BloodAxe1a takes nothing returns nothing
set gg_trg_BloodAxe1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodAxe1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodAxe1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_BloodAxe1a, Condition( function Trig_BloodAxe1a_Conditions ) )
call TriggerAddAction( gg_trg_BloodAxe1a, function Trig_BloodAxe1a_Actions )
endfunction
function Trig_BloodAxe1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00M' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00J' ) ) then
return false
endif
return true
endfunction
function Trig_BloodAxe1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A009', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_BloodAxe1b takes nothing returns nothing
set gg_trg_BloodAxe1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodAxe1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_BloodAxe1b, Condition( function Trig_BloodAxe1b_Conditions ) )
call TriggerAddAction( gg_trg_BloodAxe1b, function Trig_BloodAxe1b_Actions )
endfunction
function Trig_BloodAxe1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00J' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00M' ) ) then
return false
endif
return true
endfunction
function Trig_BloodAxe1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_BloodAxe1 takes nothing returns nothing
set gg_trg_BloodAxe1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodAxe1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_BloodAxe1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_BloodAxe1, Condition( function Trig_BloodAxe1_Conditions ) )
call TriggerAddAction( gg_trg_BloodAxe1, function Trig_BloodAxe1_Actions )
endfunction
function Trig_NecroStaff1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00A' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00N' ) ) then
return false
endif
return true
endfunction
function Trig_NecroStaff1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_NecroStaff1 takes nothing returns nothing
set gg_trg_NecroStaff1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NecroStaff1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NecroStaff1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_NecroStaff1, Condition( function Trig_NecroStaff1_Conditions ) )
call TriggerAddAction( gg_trg_NecroStaff1, function Trig_NecroStaff1_Actions )
endfunction
function Trig_NecroStaff1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00N' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00A' ) ) then
return false
endif
return true
endfunction
function Trig_NecroStaff1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00A', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_NecroStaff1a takes nothing returns nothing
set gg_trg_NecroStaff1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NecroStaff1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NecroStaff1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_NecroStaff1a, Condition( function Trig_NecroStaff1a_Conditions ) )
call TriggerAddAction( gg_trg_NecroStaff1a, function Trig_NecroStaff1a_Actions )
endfunction
function Trig_NecroStaff1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00N' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00A' ) ) then
return false
endif
return true
endfunction
function Trig_NecroStaff1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00A', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_NecroStaff1b takes nothing returns nothing
set gg_trg_NecroStaff1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_NecroStaff1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_NecroStaff1b, Condition( function Trig_NecroStaff1b_Conditions ) )
call TriggerAddAction( gg_trg_NecroStaff1b, function Trig_NecroStaff1b_Actions )
endfunction
function Trig_ZombieFlesh1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00B' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00O' ) ) then
return false
endif
return true
endfunction
function Trig_ZombieFlesh1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_ZombieFlesh1 takes nothing returns nothing
set gg_trg_ZombieFlesh1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ZombieFlesh1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ZombieFlesh1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ZombieFlesh1, Condition( function Trig_ZombieFlesh1_Conditions ) )
call TriggerAddAction( gg_trg_ZombieFlesh1, function Trig_ZombieFlesh1_Actions )
endfunction
function Trig_ZombieFlesh1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00O' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00B' ) ) then
return false
endif
return true
endfunction
function Trig_ZombieFlesh1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00B', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_ZombieFlesh1a takes nothing returns nothing
set gg_trg_ZombieFlesh1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ZombieFlesh1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ZombieFlesh1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_ZombieFlesh1a, Condition( function Trig_ZombieFlesh1a_Conditions ) )
call TriggerAddAction( gg_trg_ZombieFlesh1a, function Trig_ZombieFlesh1a_Actions )
endfunction
function Trig_ZombieFlesh1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00O' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00B' ) ) then
return false
endif
return true
endfunction
function Trig_ZombieFlesh1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00B', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_ZombieFlesh1b takes nothing returns nothing
set gg_trg_ZombieFlesh1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_ZombieFlesh1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_ZombieFlesh1b, Condition( function Trig_ZombieFlesh1b_Conditions ) )
call TriggerAddAction( gg_trg_ZombieFlesh1b, function Trig_ZombieFlesh1b_Actions )
endfunction
function Trig_SirenWater1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00P' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00D' ) ) then
return false
endif
return true
endfunction
function Trig_SirenWater1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00C', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SirenWater1a takes nothing returns nothing
set gg_trg_SirenWater1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SirenWater1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SirenWater1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_SirenWater1a, Condition( function Trig_SirenWater1a_Conditions ) )
call TriggerAddAction( gg_trg_SirenWater1a, function Trig_SirenWater1a_Actions )
endfunction
function Trig_SirenWater1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00C', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SirenWater1b takes nothing returns nothing
set gg_trg_SirenWater1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SirenWater1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddAction( gg_trg_SirenWater1b, function Trig_SirenWater1b_Actions )
endfunction
function Trig_WaterArmor1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00Q' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00E' ) ) then
return false
endif
return true
endfunction
function Trig_WaterArmor1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00D', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_WaterArmor1a takes nothing returns nothing
set gg_trg_WaterArmor1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WaterArmor1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WaterArmor1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_WaterArmor1a, Condition( function Trig_WaterArmor1a_Conditions ) )
call TriggerAddAction( gg_trg_WaterArmor1a, function Trig_WaterArmor1a_Actions )
endfunction
function Trig_WaterArmor1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00Q' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00E' ) ) then
return false
endif
return true
endfunction
function Trig_WaterArmor1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00D', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_WaterArmor1b takes nothing returns nothing
set gg_trg_WaterArmor1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WaterArmor1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_WaterArmor1b, Condition( function Trig_WaterArmor1b_Conditions ) )
call TriggerAddAction( gg_trg_WaterArmor1b, function Trig_WaterArmor1b_Actions )
endfunction
function Trig_SirenWater1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00D' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00P' ) ) then
return false
endif
return true
endfunction
function Trig_SirenWater1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SirenWater1 takes nothing returns nothing
set gg_trg_SirenWater1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SirenWater1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SirenWater1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_SirenWater1, Condition( function Trig_SirenWater1_Conditions ) )
call TriggerAddAction( gg_trg_SirenWater1, function Trig_SirenWater1_Actions )
endfunction
function Trig_WaterArmor1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00E' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00Q' ) ) then
return false
endif
return true
endfunction
function Trig_WaterArmor1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_WaterArmor1 takes nothing returns nothing
set gg_trg_WaterArmor1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WaterArmor1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_WaterArmor1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_WaterArmor1, Condition( function Trig_WaterArmor1_Conditions ) )
call TriggerAddAction( gg_trg_WaterArmor1, function Trig_WaterArmor1_Actions )
endfunction
function Trig_SharpKnife1_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetManipulatingUnit()) != 'H00H' ) ) then
return false
endif
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00R' ) ) then
return false
endif
return true
endfunction
function Trig_SharpKnife1_Actions takes nothing returns nothing
call UnitRemoveItemSwapped( GetManipulatedItem(), GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SharpKnife1 takes nothing returns nothing
set gg_trg_SharpKnife1 = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SharpKnife1, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SharpKnife1, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_SharpKnife1, Condition( function Trig_SharpKnife1_Conditions ) )
call TriggerAddAction( gg_trg_SharpKnife1, function Trig_SharpKnife1_Actions )
endfunction
function Trig_SharpKnife1a_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00R' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00H' ) ) then
return false
endif
return true
endfunction
function Trig_SharpKnife1a_Actions takes nothing returns nothing
call UnitAddAbilityBJ( 'A00E', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SharpKnife1a takes nothing returns nothing
set gg_trg_SharpKnife1a = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SharpKnife1a, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SharpKnife1a, EVENT_PLAYER_UNIT_USE_ITEM )
call TriggerAddCondition( gg_trg_SharpKnife1a, Condition( function Trig_SharpKnife1a_Conditions ) )
call TriggerAddAction( gg_trg_SharpKnife1a, function Trig_SharpKnife1a_Actions )
endfunction
function Trig_SharpKnife1b_Conditions takes nothing returns boolean
if ( not ( GetItemTypeId(GetManipulatedItem()) == 'I00R' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetManipulatingUnit()) == 'H00H' ) ) then
return false
endif
return true
endfunction
function Trig_SharpKnife1b_Actions takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00E', GetManipulatingUnit() )
endfunction
//===========================================================================
function InitTrig_SharpKnife1b takes nothing returns nothing
set gg_trg_SharpKnife1b = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SharpKnife1b, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddCondition( gg_trg_SharpKnife1b, Condition( function Trig_SharpKnife1b_Conditions ) )
call TriggerAddAction( gg_trg_SharpKnife1b, function Trig_SharpKnife1b_Actions )
endfunction