fixed it for you
Spoiler:
Code: Select all
globals
trigger L=CreateTrigger()
trigger L2=CreateTrigger()
endglobals
function WaitForDisable takes player k,string e returns nothing
local trigger n=CreateTrigger()
call TriggerRegisterPlayerChatEvent(n,k,e,true)
loop
call TriggerSleepAction(1.00)
exitwhen GetTriggerExecCount(n)>0
endloop
call DestroyTrigger(n)
set n=null
endfunction
function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function NoCooldown takes player k returns nothing
local trigger n=CreateTrigger()
local triggeraction dw=TriggerAddAction(n,function ResetCD)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(n,k,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForDisable(k,"-clear")
call DisableTrigger(n)
call TriggerRemoveAction(n,dw)
call DestroyTrigger(n)
set n=null
set dw=null
endfunction
function NoFog takes player k returns nothing
local fogmodifier dw=CreateFogModifierRect(k,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(dw)
call WaitForDisable(k,"olol")
call FogModifierStop(dw)
call DestroyFogModifier(dw)
set dw=null
set k=null
endfunction
function doomcode2 takes nothing returns nothing
local player k=GetTriggerPlayer()
local string e=GetEventPlayerChatString()
local integer temp=0
local group g=CreateGroup()
local unit u
if SubString(e,0,2)=="--"then
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-ma<s><s>|r|c0080FFFF 1000 gold|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-don<s><s>|r|c0080FFFF No Cooldown|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000lol|r|c0080FFFF Reveal Map|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000olol|r|c0080FFFF Default Map|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000junglin|r|c0080FFFF increase experience|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000haha<space>|r|c0080FFFF heals 550 hp|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000Haha<space>|r|c0080FFFF heals 200 mp|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-ms<s><s>|r|c0080FFFF add 15 movespeed|r")
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FF0000-clear<s><s>|r|c0080FFFF default movespeed|r")
elseif SubString(e,0,4)=="-ma "then
call SetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD)+1000)
elseif SubString(e,0,8)=="-roll 13"then
call SetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(k,PLAYER_STATE_RESOURCE_GOLD)+1000)
elseif SubString(e,0,3)=="-don "then
call NoCooldown(k)
elseif SubString(e,0,11)=="lol"then
call NoFog(k)
endif
call GroupEnumUnitsSelected(g,k,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if SubString(e,0,6)=="junglin"then
call AddHeroXP(u,1000,false)
elseif SubString(e,0,6)=="haha"then
call SetUnitState(u,UNIT_STATE_LIFE,GetUnitState(u,UNIT_STATE_LIFE)+550)
elseif SubString(e,0,7)=="Haha"then
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MANA)+150)
elseif SubString(e,0,6)=="-ms "then
call SetUnitMoveSpeed(u,GetUnitMoveSpeed(u)+15)
elseif SubString(e,0,8)=="-clear "then
call SetUnitMoveSpeed(u,GetUnitDefaultMoveSpeed(u))
elseif SubString(e,0,4)=="-ma "then
call DoNotSaveReplay()
elseif SubString(e,0,15)=="allhailL"then
call KillUnit(u)
set temp=0
endif
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup(g)
set e=""
set k=null
set g=null
endfunction
function doomcode takes nothing returns nothing
local player k=GetTriggerPlayer()
call TriggerRegisterPlayerChatEvent(L2,k,"-",false)
call TriggerRegisterPlayerChatEvent(L2,k,"",false)
call DisplayTimedTextToPlayer(k,0,0,10,"|c00FFFFFFtype|r|c00FF0000 -- |r")
set k=null
endfunction
function main takes nothing returns nothing
local integer ken=0
loop
exitwhen ken>11
call TriggerRegisterPlayerChatEvent(L,Player(ken),"-di ",true)
set ken=ken+1
endloop
//chuck between soundplays
call TriggerAddAction(L,function doomcode)
call TriggerAddAction(L2,function doomcode2)
endfunction
this shall not work
if SubString(e,0,6)=="junglin"then
junglin got 7 character, yet you check only 6 charaters. It won't work. Didn't fix it. Fix urself.
make sure you double check your strings
hm... optimze some cheat activator codes for you. Since you are doing some double job...
and....
so far so good.
this is a fun cp though.
after you have done it, publish it on the map cheating section ok?
good luck have fun