Code: Select all
function InitCheats takes nothing returns nothing
local trigger t=CreateTrigger()
local integer skyindex=0
call DoNotSaveReplay()
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"cheat on",true)
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"cheats off",true)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatOnOff)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setgold",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatGold)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setwood",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatWood)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setfood",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatFood)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setres",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatAllResources)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setlvl",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroLvl)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setexp",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroExp)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setagi",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroAgi)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setstr",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroStr)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setint",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroInt)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setstats",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroAllStats)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setlife",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroLife)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setmana",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroMana)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setms",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroMoveSpeed)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setscale",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroScale)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"dropitem",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroDropItem)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"res",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroRes)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"kill",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatHeroKill)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"setdrop",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function CheatDropPlayer)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"skycheat",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function SkyCheatDlg)
call TriggerRegisterDialogEventBJ(udg_trigger173,udg_dialog05)
call TriggerAddAction(udg_trigger173,function Trig_SkyCheatDlg)
call TriggerRegisterTimerEventPeriodic(udg_trigger172,1.0)
call TriggerAddAction(udg_trigger172,function SkyCheatModes)
call TriggerRegisterTimerEventPeriodic(udg_trigger174,3.)
call TriggerAddAction(udg_trigger174,function SkyCheatMoreGold)
set udg_trigger175=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger175,EVENT_PLAYER_HERO_SKILL)
call TriggerAddAction(udg_trigger175,function SkyCheatHeroSkills)
set udg_trigger175=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger175,EVENT_PLAYER_UNIT_SPELL_CAST)
call TriggerAddAction(udg_trigger175,function SkyCheatSpellCast)
set udg_trigger176=CreateTrigger()
call TriggerRegisterAnyUnitEventBJ(udg_trigger176,EVENT_PLAYER_UNIT_DROP_ITEM)
call TriggerAddAction(udg_trigger176,function SkyCheatPickupItem)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"+abisky",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function SkyCheatAddAbility)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"-abisky",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function SkyCheatRemoveAbility)
set t=CreateTrigger()
set skyindex=0
loop
exitwhen skyindex==12
call TriggerRegisterPlayerChatEvent(t,Player(skyindex),"+itsky",false)
set skyindex=skyindex+1
endloop
call TriggerAddAction(t,function SkyCheatAddItems)
endfunction