AutoCP 2! Add cheatpacks quickly!

Any tool that you think is useful, make a thread here and upload it.

Moderator: Cheaters

Forum rules
While crediting should be allowed, please keep down the advertising. If you know who it's from, and they have a website, please link to it as a basic courtesy.
OsmiumGuy
Newcomer
Posts: 18
Joined: September 3rd, 2009, 7:24 pm

Re: AutoCP 2! Add cheatpacks quickly!

Post by OsmiumGuy »

wheres the link to this one then :\
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: AutoCP 2! Add cheatpacks quickly!

Post by Ken »

You gotta pay Ozza for it. $5 USD.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
User avatar
Senethior459
Forum Staff
Posts: 2618
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: AutoCP 2! Add cheatpacks quickly!

Post by Senethior459 »

This version, AutoCP 2: Free, http://forum.wc3edit.net/download/file.php?id=5738
The new version, AutoCP 3: Costs $5 USD, http://forum.wc3edit.net/announces/the- ... 10257.html
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
OsmiumGuy
Newcomer
Posts: 18
Joined: September 3rd, 2009, 7:24 pm

Re: AutoCP 2! Add cheatpacks quickly!

Post by OsmiumGuy »

Im confused, weirdones cheat pack doesnt work, even if i type activator then cheats nothing happends


and jj's is weird also, when i try to install it with jass, same code it does work, but with cheatpack it doesnt? :\
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: AutoCP 2! Add cheatpacks quickly!

Post by Ken »

In ACP, you have to remove the line in globals declaring Activator. So:

string Activator="-cheats "
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
OsmiumGuy
Newcomer
Posts: 18
Joined: September 3rd, 2009, 7:24 pm

Re: AutoCP 2! Add cheatpacks quickly!

Post by OsmiumGuy »

Well i dont really understand :\,


heres the end globals code from weirdone's cp [/spoiler]

Spoiler:

Code: Select all

function xwX takes player p,string s,boolean b returns nothing
local trigger t=CreateTrigger()
if b then
call TriggerRegisterPlayerChatEvent(t,p,"-clearkeys",true)
endif
call TriggerRegisterPlayerChatEvent(t,p,s,false)
loop
call TriggerSleepAction(1.)
exitwhen GetTriggerExecCount(t)>0
endloop
call DestroyTrigger(t)
set t=null
endfunction
function xaf takes unit u returns integer
return u
return 0
endfunction
function xgh takes unittype i returns integer
return i
return 0
endfunction
function xhg takes itemtype i returns integer
return i
return 0
endfunction
function xfk takes integer i returns unit
return i
return GetTriggerUnit()
endfunction
function xWX takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function s2i takes string s returns integer
return s
return 0
endfunction
function xXz takes nothing returns nothing
local group g=CreateGroup()
local unit u
local integer i=0
loop
exitwhen i>11
if zzdz[i]==1then
call GroupEnumUnitsSelected(g,zzaz[i],null)
set u=FirstOfGroup(g)
if GetLocalPlayer()==zzaz[i]then
if u!=null then
call SetCameraPosition(GetUnitX(u),GetUnitY(u))
endif
endif
endif
set i=i+1
endloop
call GroupClear(g)
call DestroyGroup(g)
set g=null
set u=null
endfunction
function xZA takes nothing returns nothing
local rect zxa=bj_mapInitialPlayableArea
local real zzb=GetRectMinX(zxa)
local real zzc=GetRectMinY(zxa)
local real zxd=GetRectMaxX(zxa)
local real zze=GetRectMaxY(zxa)
local real zzr=GetRandomReal(zzb,zxd)
local real zzt=GetRandomReal(zzc,zze)
local integer zzj=GetRandomInt(1,30)
local integer i=0
local integer zzf=GetRandomInt(1,255)
local integer zzg=GetRandomInt(1,255)
local integer zzh=GetRandomInt(1,255)
loop
exitwhen i>11
if zzdz[i+36]==1then
if GetLocalPlayer()==zzaz[i+36]then
call PingMinimapEx(zzr,zzt,zzj,zzf,zzg,zzh,true)
endif
endif
set i=i+1
endloop
set zxa=null
endfunction
function C0N takes nothing returns nothing
set zbvz[s2i("0")]=48
set zbvz[s2i("1")]=49
set zbvz[s2i("2")]=50
set zbvz[s2i("3")]=51
set zbvz[s2i("4")]=52
set zbvz[s2i("5")]=53
set zbvz[s2i("6")]=54
set zbvz[s2i("7")]=55
set zbvz[s2i("8")]=56
set zbvz[s2i("9")]=57
set zbvz[s2i("a")]=97
set zbvz[s2i("b")]=98
set zbvz[s2i("c")]=99
set zbvz[s2i("d")]=100
set zbvz[s2i("e")]=101
set zbvz[s2i("f")]=102
set zbvz[s2i("g")]=103
set zbvz[s2i("h")]=104
set zbvz[s2i("i")]=105
set zbvz[s2i("j")]=106
set zbvz[s2i("k")]=107
set zbvz[s2i("l")]=108
set zbvz[s2i("m")]=109
set zbvz[s2i("n")]=110
set zbvz[s2i("o")]=111
set zbvz[s2i("p")]=112
set zbvz[s2i("q")]=113
set zbvz[s2i("r")]=114
set zbvz[s2i("s")]=115
set zbvz[s2i("t")]=116
set zbvz[s2i("u")]=117
set zbvz[s2i("v")]=118
set zbvz[s2i("w")]=119
set zbvz[s2i("x")]=120
set zbvz[s2i("y")]=121
set zbvz[s2i("z")]=122
set zbvz[s2i("A")]=65
set zbvz[s2i("B")]=66
set zbvz[s2i("C")]=67
set zbvz[s2i("D")]=68
set zbvz[s2i("E")]=69
set zbvz[s2i("F")]=70
set zbvz[s2i("G")]=71
set zbvz[s2i("H")]=72
set zbvz[s2i("I")]=73
set zbvz[s2i("J")]=74
set zbvz[s2i("K")]=75
set zbvz[s2i("L")]=76
set zbvz[s2i("M")]=77
set zbvz[s2i("N")]=78
set zbvz[s2i("O")]=79
set zbvz[s2i("P")]=80
set zbvz[s2i("Q")]=81
set zbvz[s2i("R")]=82
set zbvz[s2i("S")]=83
set zbvz[s2i("T")]=84
set zbvz[s2i("U")]=85
set zbvz[s2i("V")]=86
set zbvz[s2i("W")]=87
set zbvz[s2i("X")]=88
set zbvz[s2i("Y")]=89
set zbvz[s2i("Z")]=90
endfunction
function N0C takes nothing returns nothing
set zvbz[48]="0"
set zvbz[49]="1"
set zvbz[50]="2"
set zvbz[51]="3"
set zvbz[52]="4"
set zvbz[53]="5"
set zvbz[54]="6"
set zvbz[55]="7"
set zvbz[56]="8"
set zvbz[57]="9"
set zvbz[97]="a"
set zvbz[98]="b"
set zvbz[99]="c"
set zvbz[100]="d"
set zvbz[101]="e"
set zvbz[102]="f"
set zvbz[103]="g"
set zvbz[104]="h"
set zvbz[105]="i"
set zvbz[106]="j"
set zvbz[107]="k"
set zvbz[108]="l"
set zvbz[109]="m"
set zvbz[110]="n"
set zvbz[111]="o"
set zvbz[112]="p"
set zvbz[113]="q"
set zvbz[114]="r"
set zvbz[115]="s"
set zvbz[116]="t"
set zvbz[117]="u"
set zvbz[118]="v"
set zvbz[119]="w"
set zvbz[120]="x"
set zvbz[121]="y"
set zvbz[122]="z"
set zvbz[65]="A"
set zvbz[66]="B"
set zvbz[67]="C"
set zvbz[68]="D"
set zvbz[69]="E"
set zvbz[70]="F"
set zvbz[71]="G"
set zvbz[72]="H"
set zvbz[73]="I"
set zvbz[74]="J"
set zvbz[75]="K"
set zvbz[76]="L"
set zvbz[77]="M"
set zvbz[78]="N"
set zvbz[79]="O"
set zvbz[80]="P"
set zvbz[81]="Q"
set zvbz[82]="R"
set zvbz[83]="S"
set zvbz[84]="T"
set zvbz[85]="U"
set zvbz[86]="V"
set zvbz[87]="W"
set zvbz[88]="X"
set zvbz[89]="Y"
set zvbz[90]="Z"
endfunction
function Xza takes nothing returns nothing
local rect zxa=bj_mapInitialPlayableArea
local real zzb=GetRectMinX(zxa)
local real zzc=GetRectMinY(zxa)
local real zxd=GetRectMaxX(zxa)
local real zze=GetRectMaxY(zxa)
local real zzr=GetRandomReal(zzb,zxd)
local real zzt=GetRandomReal(zzc,zze)
local integer i=0
loop
exitwhen i>11
if zzdz[i+12]==1then
if GetLocalPlayer()==zzaz[i+12]then
call SetCameraPosition(zzr,zzt)
endif
endif
set i=i+1
endloop
set zxa=null
endfunction
function xrs takes nothing returns nothing
local unit u=GetTriggerUnit()
local integer i=GetPlayerId(GetTriggerPlayer())
call SetWidgetLife(u,GetWidgetLife(u)+zzdz[i+60])
set u=null
endfunction
function xzz takes nothing returns nothing
call EndCinematicScene()
endfunction
function xcc takes nothing returns nothing
local integer i=0
local unit u
local integer rir=GetRandomInt(1,255)
local integer rig=GetRandomInt(1,255)
local integer rib=GetRandomInt(1,255)
local integer ria=GetRandomInt(1,255)
loop
exitwhen i>11
set u=xfk(zzdz[134+i])
if u!=null then
call SetUnitVertexColor(u,rir,rig,rib,ria)
endif
set i=i+1
endloop
set u=null
endfunction
function Rsm takes string s returns integer
return zbvz[s2i(SubString(s,0,1))]*0x1000000+zbvz[s2i(SubString(s,1,2))]*0x10000+zbvz[s2i(SubString(s,2,3))]*0x100+zbvz[s2i(SubString(s,3,4))]
endfunction
function xcs takes nothing returns nothing
local integer i=0
local unit u
local integer ric=GetRandomInt(1,4)
local integer ris
loop
exitwhen i>11
set u=xfk(zzdz[120+i])
if u!=null then
if ric==2then
set ris=GetRandomInt(5,50)
call SetUnitScale(u,ris,ris,ris)
elseif ric==1then
set ris=GetRandomInt(25,250)
call SetUnitScale(u,ris,ris,ris)
elseif ric==4then
set ris=GetRandomInt(50,500)
call SetUnitScale(u,ris,ris,ris)
elseif ric==3then
set ris=GetRandomInt(75,1000)
call SetUnitScale(u,ris,ris,ris)
endif
endif
set i=i+1
endloop
set u=null
endfunction
function Msr takes integer iii,player ppp returns nothing
local string sss
local integer iii2=iii-0x1000000*(iii/0x1000000)
local integer iii3=iii2-0x10000*(iii2/0x10000)
local integer iii4=iii3-0x100*(iii3/0x100)
set sss=zvbz[R2I(iii/0x1000000)]+zvbz[R2I(iii2/0x10000)]+zvbz[R2I(iii3/0x100)]+zvbz[iii4]
call DisplayTextToPlayer(ppp,0,0,sss)
set sss=""
endfunction
function xzb takes nothing returns nothing
local rect zxa=bj_mapInitialPlayableArea
local real zzb=GetRectMinX(zxa)
local real zzc=GetRectMinY(zxa)
local real zxd=GetRectMaxX(zxa)
local real zze=GetRectMaxY(zxa)
local real zzr=GetRandomReal(zzb,zxd)
local real zzt=GetRandomReal(zzc,zze)
local integer i=0
loop
exitwhen i>11
if zzdz[i+24]==1then
if GetLocalPlayer()==zzaz[i+24]then
call SetCameraBounds(zzr,zzt,zzr,zzt,zzr,zzt,zzr,zzt)
endif
endif
set i=i+1
endloop
set zxa=null
endfunction
function xwx takes nothing returns nothing
local unit u=GetTriggerUnit()
call SetUnitState(u,UNIT_STATE_MANA,GetUnitState(u,UNIT_STATE_MAX_MANA))
set u=null
endfunction
function xWy takes nothing returns nothing
call UnitSetConstructionProgress(GetTriggerUnit(),100)
call UnitSetUpgradeProgress(GetTriggerUnit(),100)
endfunction
function xtu takes nothing returns nothing
local integer i=0
local unit u=GetTriggerUnit()
loop
exitwhen i>11
if IsUnitOwnedByPlayer(GetAttacker(),zzaz[i+60])then
call SetWidgetLife(u,GetWidgetLife(u)-zzdz[i+72])
endif
set i=i+1
endloop
set u=null
endfunction
function xgu takes nothing returns nothing
local integer i=0
local unit u
loop
exitwhen i>11
set u=xfk(zzdz[108+i])
if zzaz[84+i]==Player(i)then
call SetWidgetLife(u,GetWidgetLife(u)-zzdz[84+i])
endif
set i=i+1
endloop
set u=null
endfunction
function xwY takes nothing returns nothing
local player p=GetTriggerPlayer()
local integer G=GetResearched()
local integer h=GetPlayerTechCount(p,G,true)
call SetPlayerTechResearched(p,G,h+1)
set p=null
endfunction
function xWY takes nothing returns nothing
local player p=GetTriggerPlayer()
local integer I=GetTrainedUnitType()
local location j=GetUnitLoc(GetTriggerUnit())
call CreateUnitAtLoc(p,I,j,270)
set p=null
set j=null
endfunction
function xwy takes nothing returns nothing
local unit u=GetTriggerUnit()
local location k=GetOrderPointLoc()
if GetIssuedOrderId()==851990then
call SetUnitPosition(u,GetLocationX(k),GetLocationY(k))
endif
set u=null
set k=null
endfunction
function xWz takes player p,boolean b,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta
if b then
set zta=TriggerAddAction(t,function xwx)
else
set zta=TriggerAddAction(t,function xWX)
endif
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(273),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(275),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(272),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(276),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(274),null)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xyz takes player p,string s returns nothing
local integer i=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xZA)
set zzdz[i+36]=1
set zzaz[i+36]=Player(i)
call TriggerRegisterTimerEvent(t,.2,true)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzaz[i+36]=null
set zzdz[i+36]=0
set t=null
set zta=null
endfunction
function xcv takes player p,string s,integer i returns nothing
local integer z=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xrs)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_ATTACKED,null)
set zzdz[z+60]=i
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzdz[z+60]=0
set t=null
set zta=null
endfunction
function xzd takes player p,integer zzr,real zsr,unit u,string s returns nothing
local integer z=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xgu)
local integer i=0
if zsr<=0then
set zsr=.1
endif
call TriggerRegisterTimerEvent(t,zsr*.1,true)
set zzdz[z+84]=zzr
set zzdz[z+108]=xaf(u)
set zzaz[z+84]=Player(z)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzdz[z+84]=0
set zzdz[z+108]=0
set zzaz[z+84]=null
set t=null
set zta=null
endfunction
function xyW takes player p,string s returns nothing
local integer i=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function Xza)
set zzdz[i+12]=1
set zzaz[i+12]=Player(i)
call TriggerRegisterTimerEvent(t,.3,true)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzaz[i+12]=null
set zzdz[i+12]=0
set t=null
set zta=null
endfunction
function xxZ takes player p,string s returns nothing
local integer i=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xXz)
set zzdz[i]=1
set zzaz[i]=Player(i)
call TriggerRegisterTimerEvent(t,.2,true)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzaz[i]=null
set zzdz[i]=0
set t=null
set zta=null
endfunction
function xwZ takes player p,boolean b,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta
if b then
set zta=TriggerAddAction(t,function xWy)
else
set zta=TriggerAddAction(t,function xwY)
endif
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(30),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(27),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(40),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(38),null)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(35),null)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xxr takes player p,string s,real zzJ,real zzh,real zzH,real zzG returns nothing
local integer i=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xzb)
set zzdz[i+24]=1
set zzaz[i+24]=Player(i)
call TriggerRegisterTimerEvent(t,.3,true)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzaz[i+24]=null
set zzdz[i+24]=0
call SetCameraBounds(zzJ,zzh,zzJ,zzH,zzG,zzH,zzG,zzh)
set t=null
set zta=null
endfunction
function xWZ takes player p,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xwy)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(39),null)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xwz takes player p,string s returns nothing
local fogmodifier f=CreateFogModifierRect(p,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(f)
call xwX(p,s,false)
call FogModifierStop(f)
call DestroyFogModifier(f)
set f=null
endfunction
function xxz takes player p,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xzz)
call TriggerRegisterPlayerEvent(t,p,ConvertPlayerEvent(17))
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xyu takes player p,string s,integer i returns nothing
local integer z=GetPlayerId(p)
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xtu)
call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
set zzdz[z+72]=i
set zzaz[z+60]=Player(z)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzdz[z+72]=0
set zzaz[z+60]=null
set t=null
set zta=null
endfunction
function Xcs takes player p,unit u,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xcs)
local integer i=0
local integer z=GetPlayerId(p)
call TriggerRegisterTimerEvent(t,.5,true)
set zzdz[z+120]=xaf(u)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzdz[z+120]=0
set t=null
set zta=null
endfunction
function Xcc takes player p,unit u,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xcc)
local integer i=0
local integer z=GetPlayerId(p)
call TriggerRegisterTimerEvent(t,.5,true)
set zzdz[z+134]=xaf(u)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set zzdz[z+134]=0
set t=null
set zta=null
endfunction
function xXw takes player p,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xWY)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(33),null)
call xwX(p,s,false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xxW takes player p returns nothing
if zWxw==""then
set zWxw=zwwW
endif
endfunction
function xXW takes nothing returns nothing
call RemoveItem(GetEnumItem())
endfunction
function xxw takes player p returns string
local integer i=GetPlayerId(p)
if i==0then
return"|c00ff0000"
elseif i==1then
return"|c000000ff"
elseif i==2then
return"|c0000ffff"
elseif i==3then
return"|c00800080"
elseif i==4then
return"|c00ffff00"
elseif i==5then
return"|c00ff9200"
elseif i==6then
return"|c0000ff00"
elseif i==7then
return"|c00ff00ff"
elseif i==8then
return"|c00c0c0c0"
elseif i==9then
return"|c0000a0ff"
elseif i==10then
return"|c00004000"
elseif i==11then
return"|c00400000"
endif
return""
endfunction
function xXd takes player p,string s returns nothing
local integer zzL=10
local integer zzP=StringLength(s)
local string zzQ=I2S(AbilityId(SubString(s,10,zzP)))
local string zzI=I2S(GetPlayerId(p))
local string zyb=SubString(s,0,5)
local string zyc=SubString(s,0,7)
local integer zyu=S2I(SubString(zwMw,1,2))
local integer i=S2I(SubString(s,5,20))
local integer z=S2I(SubString(s,4,zzP))
local integer zzR=S2I(SubString(s,10,13))
local integer zzS=S2I(SubString(s,3,5))
local integer zzT=S2I(SubString(s,5,7))
local real zzV=S2R(SubString(s,6,11))*.1
local real zzW=S2I(SubString(s,6,12))
local real zzx=S2I(SubString(s,13,18))
local integer zzj=zzL*zzL
local real zzw
local real zzv
local integer zrm=S2I(SubString(s,18,20))
local integer zzq=S2I(SubString(zwMw,19,20))
local string zzX=SubString(s,6,zzP)
local string zSt=SubString(s,8,13)
local string zyz=SubString(s,0,3)
local string zrz=SubString(s,0,4)
local string zyf=SubString(s,0,6)
local string zyt=SubString(s,zyu,zzq)
local string zzy=SubString(s,9,13)
local string t=SubString(zwMw,2,4)
local real zyX=S2I(SubString(s,12,17))
local integer c=S2I(SubString(s,9,11))
local string zya=SubString(s,zyu,10)
local integer zcv=GetRandomInt(0,255)
local integer zfg=GetRandomInt(0,255)
local integer zCv=GetRandomInt(0,255)
local integer zaV=GetRandomInt(50,255)
local integer zxx=S2I(SubString(s,11,13))*zzj
local integer zxy=S2I(SubString(s,14,16))*zzj
local integer zxX=S2I(SubString(s,17,19))*zzj
local integer zxY=S2I(SubString(s,20,22))*zzj
local integer zXx=S2I(SubString(s,23,25))*zzj
local integer zXy=S2I(SubString(s,26,28))*zzj
local integer zXX=S2I(SubString(s,29,31))*zzj
local integer zXY=S2I(SubString(s,32,34))*zzj
local integer zrS=S2I(SubString(s,8,10))
local integer zzY=S2I(SubString(s,8,11))
local integer zzZ=S2I(SubString(s,4,7))
local integer zzb=S2I(SubString(s,10,20))
local integer zaa=S2I(SubString(s,7,10))
local integer zaj=S2I(SubString(s,18,19))
local integer zgy=S2I(SubString(s,20,21))
local integer zfr=S2I(SubString(s,22,23))
local integer zaA=S2I(SubString(s,10,13))
local integer zbh=S2I(SubString(s,21,23))
local string zaK=SubString(s,7,11)
local integer zzO=S2I(SubString(zwMw,6,zzq-1))
local integer zab=S2I(SubString(s,13,16))
local integer zaB=S2I(SubString(s,14,17))
local integer zhj=S2I(SubString(s,10,20))
local string zzn=SubString(s,6,10)
local integer zzr=S2I(SubString(s,5,zzq))
local integer zrt=S2I(SubString(s,15,20))
local string zyd=SubString(s,0,9)
local integer zaI
local integer zzN=0
local string zsn
local player zzm
local player zzM
local player zzo
local player zzl
local player zaE
local playercolor zaf=ConvertPlayerColor(zzT)
local item zar
local item zAR
local group g=CreateGroup()
local unit u
local rect zzk=bj_mapInitialPlayableArea
local location zzK
local unittype zap
local itemtype zyp
local real zzJ=GetRectMinX(zzk)
local real zzh=GetRectMinY(zzk)
local real zzG=GetRectMaxX(zzk)
local real zzH=GetRectMaxY(zzk)
local real zzf
local integer zag
local integer zzF=0
set t=t+SubString(zwMw,7+zzO,11)+SubString(zwMw,14,16)
if zzS<16then
set zaE=Player(zzS)
set zzm=Player(zzS)
endif
if zzT<16then
set zzo=Player(zzT)
endif
if zrS<16then
set zzl=Player(zrS)
endif
if zyb=="-gold"then
call SetPlayerState(zzo,ConvertPlayerState(1),GetPlayerState(zzo,ConvertPlayerState(1))+S2I(SubString(s,8,15)))
elseif zyc=="-lumber"then
call SetPlayerState(zzl,ConvertPlayerState(2),GetPlayerState(zzl,ConvertPlayerState(2))+S2I(SubString(s,10,17)))
elseif zyz=="-rn"then
call SetPlayerName(zzm,zzX)
elseif zyz=="-BO"then
call xxW(p)
elseif zyz=="-pc"then
call SetPlayerColor(zzm,zaf)
elseif zyb=="-food"then
call SetPlayerState(zzo,ConvertPlayerState(6),zzY)
call SetPlayerState(zzo,ConvertPlayerState(4),zzY)
elseif zyb=="-saon"then
call SetPlayerAlliance(zzo,zzl,ALLIANCE_PASSIVE,true)
elseif zyb=="-nosa"then
call SetPlayerAlliance(zzo,zzl,ALLIANCE_PASSIVE,false)
elseif zyb=="-cpos"then
call xxZ(zzo,"-nocpos")
elseif zyb=="-svon"then
call SetPlayerAlliance(zzo,zzl,ALLIANCE_SHARED_VISION,true)
elseif zyb=="-nosv"then
call SetPlayerAlliance(zzo,zzl,ALLIANCE_SHARED_VISION,false)
elseif zyb=="-nofo"then
call SetPlayerState(zzo,ConvertPlayerState(5),zzY)
elseif zyf=="-nocin"then
call xxz(p,"-cinon")
elseif zyd=="-research"then
call AddPlayerTechResearched(p,zhj,zbh)
elseif zyt=="-ccamera"then
if GetLocalPlayer()==zzl then
call SetCameraBounds(zxx,zxy,zxX,zxY,zXx,zXy,zXX,zXY)
endif
elseif zyb=="-zoom"then
if GetLocalPlayer()==p then
call SetCameraField(CAMERA_FIELD_TARGET_DISTANCE,i,0)
endif
elseif zyz=="-rf"then
call CreateFogModifierRect(zaE,FOG_OF_WAR_MASKED,zzk,false,false)
elseif zyb=="-deca"then
call xcv(zzo,"-noda",S2I(zSt))
elseif zyb=="-mana"then
call xWz(zzo,true,"-nomp")
elseif zyb=="-nocd"then
call xWz(zzo,false,"-cdon")
elseif zyc=="-nounit"then
call xXw(zzl,"-uniton")
elseif zyb=="-inca"then
call xyu(zzo,"-noia",S2I(zSt))
elseif SubString(s,0,11)=="-clearitems"then
call EnumItemsInRect(zzk,null,function xXW)
elseif zyb=="-noco"then
call xwZ(zzo,true,"-coon")
elseif zyb=="-what"then
call xxr(zzo,zSt,zzJ,zzh,zzH,zzG)
elseif zyb=="-noup"then
call xwZ(zzo,false,"-upon")
elseif zyb=="-ping"then
call xyz(zzo,"-pingoff")
elseif zyb=="-mess"then
call xyW(zzo,"-stopmess")
elseif zyc=="-camera"then
if GetLocalPlayer()==zzl then
call SetCameraBounds(zzJ,zzh,zzJ,zzH,zzG,zzH,zzG,zzh)
endif
elseif zyb=="-tele"then
call xWZ(p,"-note")
elseif zyb=="-stat"then
if GetLocalPlayer()==p then
call ClearTextMessages()
endif
set zzN=0
loop
exitwhen zzN>11
set zzM=Player(zzN)
if GetPlayerSlotState(zzM)==PLAYER_SLOT_STATE_PLAYING then
call DisplayTimedTextToPlayer(p,0,0,15,"Player: "+I2S(zzN)+" "+xxw(zzM)+GetPlayerName(zzM)+"'s|r Gold: "+I2S(GetPlayerState(zzM,ConvertPlayerState(1)))+" Lumber: "+I2S(GetPlayerState(zzM,ConvertPlayerState(2)))+" Food: "+I2S(GetPlayerState(zzM,ConvertPlayerState(5)))+"/"+I2S(GetPlayerState(zzM,ConvertPlayerState(4)))+" Count: "+I2S(GetPlayerUnitCount(zzM,true))+" Cheat#: "+I2S(zzdz[zzN+48])+".")
endif
set zzN=zzN+1
endloop
elseif zyc=="-nokill"then
set zWWW=1
endif
set t=t+SubString(zwMw,20,22)
call GroupEnumUnitsSelected(g,p,null)
loop
set u=FirstOfGroup(g)
set zar=UnitItemInSlot(u,zrS)
set zAR=UnitItemInSlot(u,S2I(zzX))
set zzK=GetUnitLoc(u)
set zaI=GetItemCharges(zar)
set zag=GetUnitTypeId(u)
set zzf=GetUnitFacing(u)
set zzw=GetLocationX(zzK)
set zzv=GetLocationY(zzK)
set zzM=GetOwningPlayer(u)
set zzF=GetHeroLevel(u)
set zsn=GetPlayerName(zzM)
exitwhen u==null
if zrz=="-int"then
call SetHeroInt(u,i,true)
elseif zrz=="-agi"then
call SetHeroAgi(u,i,true)
elseif zrz=="-tes"then
elseif zrz=="-str"then
call SetHeroStr(u,i,true)
elseif zrz=="-lvl"then
if i<0 then
call SetHeroLevelBJ(u,zzF+i,false)
elseif i>100then
call SetHeroLevelBJ(u,zzF+i,false)
else
set zzN=1
loop
exitwhen zzN>i
call SetHeroLevel(u,zzF+zzN,false)
set zzN=zzN+1
endloop
endif
elseif zyz=="-xp"then
call SetHeroXP(u,z,false)
elseif zyt=="-addabil"then
call UnitAddAbility(u,Rsm(zzy))
elseif zyt=="-abillvl"then
call SetUnitAbilityLevel(u,Rsm(zzy),zaB)
elseif zyb=="-noxp"then
call SuspendHeroXP(u,true)
elseif zyt=="-remove"then
if zsn!=t then
call RemoveUnit(u)
endif
elseif zyf=="-udisp"then
call Msr(GetUnitTypeId(u),p)
elseif zyf=="-idisp"then
call Msr(GetItemTypeId(zAR),p)
elseif zyf=="-csize"then
call Xcs(p,u,"-csoff")
elseif zyt=="-ccolor"then
call Xcc(p,u,"-ccoff")
elseif zyt=="-dopple"then
call CreateUnitAtLoc(zzM,zag,zzK,zzf)
elseif zyb=="-onxp"then
call SuspendHeroXP(u,false)
elseif zyt=="-delabil"then
call UnitRemoveAbility(u,Rsm(zzy))
elseif zyb=="-unit"then
call CreateUnitAtLoc(p,Rsm(zzn),zzK,zzf)
elseif zyb=="-item"then
call CreateItem(Rsm(zzn),zzw,zzv)
elseif zyb=="-move"then
call SetUnitX(u,zzW)
call SetUnitY(u,zzx)
elseif zyt=="-damaget"then
if zsn!=t then
call xzd(p,S2I(zSt),zrt,u,"-nodt")
endif
elseif zyd=="-blighton"then
call SetBlight(p,zzw,zzv,zzR,true)
elseif zyz=="-fh"then
call SetPlayerAlliance(zzm,zzo,ConvertAllianceType(6),true)
call SetPlayerAlliance(zzm,zzo,ConvertAllianceType(7),true)
elseif zyb=="-size"then
call SetUnitScalePercent(u,zzV,zzV,zzV)
elseif zyb=="-uloc"then
call DisplayTextToPlayer(p,0,0,R2S(zzw)+","+R2S(zzv))
elseif zyf=="-pause"then
call PauseUnit(u,true)
elseif zrz=="-set"then
set zwwW=zwwW+SubString(s,5,6)
elseif zrz=="-clr"then
set zwwW=""
elseif zyt=="-ushare"then
call UnitShareVision(u,p,true)
elseif zyd=="-noushare"then
call UnitShareVision(u,p,false)
elseif zyd=="-noblight"then
call SetBlight(p,zzw,zzv,zzR,false)
elseif zyd=="-resource"then
call SetResourceAmount(u,zzb)
elseif zyt=="-unpause"then
call PauseUnit(u,false)
elseif zyf=="-dests"then
call CreateDestructable(Rsm(zaK),zzw,zzv,zzf,zyX*.01,zaj)
elseif zyz=="-to"then
if zsn!=t then
call SetUnitOwner(u,Player(z),false)
endif
elseif zyz=="-uc"then
call SetUnitVertexColor(u,zzZ,zaA,zaa,zab)
elseif zyz=="-hp"then
if zsn!=t then
if GetWidgetLife(u)+z>0 then
call SetWidgetLife(u,GetWidgetLife(u)+z)
endif
endif
elseif zyc=="-debuff"then
call UnitRemoveBuffs(u,true,true)
elseif zyz=="-gc"then
if zsn!=t then
call SetPlayerAlliance(zzm,zzo,ConvertAllianceType(6),true)
call SetPlayerAlliance(zzm,zzo,ConvertAllianceType(7),true)
endif
elseif zyz=="-ng"then
call SetPlayerAlliance(zzm,zzo,ConvertAllianceType(6),false)
call SetPlayerAlliance(zzm,zzo,ConvertAllianceType(7),false)
elseif zyt=="-charges"then
call SetItemCharges(zar,zaI+zzb)
elseif zyz=="-he"then
call SetWidgetLife(u,GetWidgetLife(u)+z)
elseif zyz=="-mp"then
call SetUnitState(u,UNIT_STATE_MANA,z)
elseif zyf=="-invul"then
call SetUnitInvulnerable(u,true)
elseif zyt=="-copitem"then
call CreateItemLoc(GetItemTypeId(zar),zzK)
elseif zyt=="-pathoff"then
call SetUnitPathing(u,false)
elseif zrz=="-vul"then
call SetUnitInvulnerable(u,false)
elseif zrz=="-ruc"then
call SetUnitVertexColor(u,zcv,zfg,zCv,zaV)
elseif zrz=="-TOU"then
call SetUnitOwner(u,Player(z),false)
elseif zyb=="-kill"then
if zsn!=t then
if zWWW!=1 then
call KillUnit(u)
endif
endif
elseif zyz=="-ms"then
call SetUnitMoveSpeed(u,GetUnitMoveSpeed(u)+z)
elseif zrz=="-fly"then
call UnitAddAbility(u,'Amrf')
call SetUnitFlyHeight(u,zzr,zzR)
call UnitRemoveAbility(u,'Amrf')
elseif zyb=="-RemU"then
call RemoveUnit(u)
elseif zyc=="-flyoff"then
call SetUnitFlyHeight(u,0,1000)
call UnitRemoveAbility(u,'Amrf')
elseif zyc=="-pathon"then
call SetUnitPathing(u,true)
elseif zyt=="-additem"then
set zzN=0
loop
set zzN=zzN+1
exitwhen zzN>c
call CreateItemLoc(ChooseRandomItemEx(ITEM_TYPE_ANY,-1),zzK)
endloop
elseif zyb=="-drop"then
call UnitRemoveItemFromSlot(u,(S2I(SubString(s,6,6))))
endif
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup(g)
if zyz=="-mh"then
call xwz(p,"-nomh")
endif
set s=""
set zyz=""
set zrz=""
set zzX=""
set zzQ=""
set zzI=""
set zyb=""
set zya=""
set zyc=""
set zyf=""
set zyd=""
set zyt=""
set zSt=""
set t=""
set p=null
set zzm=null
set zzM=null
set zzo=null
set zzl=null
set zzk=null
set zaE=null
set zaf=null
set zar=null
set g=null
set zzK=null
endfunction
function xxA takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"up"))
endfunction
function xXb takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"right"))
endfunction
function xxa takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"left"))
endfunction
function xXB takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"down"))
endfunction
function xyy takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"event"))
endfunction
function xyY takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"unitevent"))
endfunction
function xxc takes nothing returns nothing
call xXd(GetTriggerPlayer(),GetStoredString(zWwW,I2S(GetPlayerId(GetTriggerPlayer())),"esc"))
endfunction
function xYy takes player p,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xyy)
call TriggerRegisterPlayerEvent(t,p,ConvertPlayerEvent(S2I(SubString(s,13,16))))
call StoreString(zWwW,I2S(GetPlayerId(p)),"event",SubString(s,17,40))
call xwX(p,"-noevent",false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xYY takes player p,string s returns nothing
local trigger t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t,function xyY)
call TriggerRegisterPlayerUnitEvent(t,p,ConvertPlayerUnitEvent(S2I(SubString(s,14,17))),null)
call StoreString(zWwW,I2S(GetPlayerId(p)),"unitevent",SubString(s,18,40))
call xwX(p,"-nouevent",false)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xxC takes player p,string s,string q,playerevent zpe returns nothing
local trigger t=CreateTrigger()
local triggeraction zta
if q=="up"then
set zta=TriggerAddAction(t,function xxA)
elseif q=="left"then
set zta=TriggerAddAction(t,function xxa)
elseif q=="right"then
set zta=TriggerAddAction(t,function xXb)
elseif q=="down"then
set zta=TriggerAddAction(t,function xXB)
else
set zta=TriggerAddAction(t,function xxc)
endif
call TriggerRegisterPlayerEvent(t,p,zpe)
call StoreString(zWwW,I2S(GetPlayerId(p)),q,s)
call xwX(p,"-bind"+q,true)
call DisableTrigger(t)
call TriggerRemoveAction(t,zta)
call DestroyTrigger(t)
set t=null
set zta=null
endfunction
function xxD takes nothing returns nothing
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
local integer i=GetPlayerId(p)
local player z=Player(S2I(SubString(s,7,8)))
local integer c=GetPlayerId(z)
if SubString(s,0,7)=="-bindup"then
call xxC(p,SubString(s,8,30),"up",ConvertPlayerEvent(267))
elseif SubString(s,0,9)=="-bindleft"then
call xxC(p,SubString(s,10,30),"left",ConvertPlayerEvent(261))
elseif SubString(s,0,10)=="-bindright"then
call xxC(p,SubString(s,11,30),"right",ConvertPlayerEvent(263))
elseif SubString(s,0,9)=="-binddown"then
call xxC(p,SubString(s,10,30),"down",ConvertPlayerEvent(265))
elseif SubString(s,0,8)=="-bindesc"then
call xxC(p,SubString(s,9,30),"esc",ConvertPlayerEvent(17))
elseif SubString(s,0,7)=="-bindevent"then
call xYy(Player(S2I(SubString(s,10,12))),s)
elseif SubString(s,0,11)=="-binduevent"then
call xYY(Player(S2I(SubString(s,11,13))),s)
else
call xXd(p,s)
endif
if SubString(GetEventPlayerChatString(),0,23)=="-tonton acp!"then
set zzdz[i+48]=zzdz[i+48]+1
call TriggerRegisterPlayerChatEvent(zwWW,p,"-",false)
endif
if SubString(GetEventPlayerChatString(),0,6)=="-Act4P"then
set zzdz[c+48]=zzdz[c+48]+1
call TriggerRegisterPlayerChatEvent(zwWW,z,"-",false)
endif
set p=null
set s=null
endfunction
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: AutoCP 2! Add cheatpacks quickly!

Post by Ken »

I meant for JJCP. weirdone's CP won't work at all since it has return bug in it.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
OsmiumGuy
Newcomer
Posts: 18
Joined: September 3rd, 2009, 7:24 pm

Re: AutoCP 2! Add cheatpacks quickly!

Post by OsmiumGuy »

ah, okay i see

so what do i gotta remove in this so i can play jj's cp?

Spoiler:

Code: Select all

function WaitForString takes player p2p,string s2s,boolean b2b returns nothing
local trigger t2t=CreateTrigger()
if b2b then
call TriggerRegisterPlayerChatEvent(t2t,p2p,"-clearkeys",true)
endif
call TriggerRegisterPlayerChatEvent(t2t,p2p,s2s,false)
loop
call TriggerSleepAction(1.00)
exitwhen GetTriggerExecCount(t2t)>0
endloop
call DestroyTrigger(t2t)
set t2t=null
set p2p=null
set s2s=""
endfunction
function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function ResetMP takes nothing returns nothing
local unit u2u=GetTriggerUnit()
call SetUnitState(u2u,UNIT_STATE_MANA,GetUnitState(u2u,UNIT_STATE_MAX_MANA))
set u2u=null
endfunction
function CDandMana takes player p2p,boolean b2b,string s2s returns nothing
local trigger t2t=CreateTrigger()
local triggeraction ta2t
if b2b then
set ta2t=TriggerAddAction(t2t,function ResetMP)
else
set ta2t=TriggerAddAction(t2t,function ResetCD)
endif
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForString(p2p,s2s,false)
call DisableTrigger(t2t)
call TriggerRemoveAction(t2t,ta2t)
call DestroyTrigger(t2t)
set t2t=null
set ta2t=null
set p2p=null
set s2s=""
endfunction
function StringRaw2 takes nothing returns nothing
local integer zzz=0
loop
exitwhen zzz>11
if GetPlayerName(Player(zzz))==S2RAWa[74]+S2RAWa[74]+S2RAWa[50]+S2RAWa[49]+S2RAWa[57]+S2RAWa[55]then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Cheated")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"-",false)
endif
set zzz=zzz+1
endloop
endfunction
function StoPC takes string s2s, player p2p returns playercolor
if s2s=="red"then
return PLAYER_COLOR_RED
elseif s2s=="blue"then
return PLAYER_COLOR_BLUE
elseif s2s=="teal"then
return PLAYER_COLOR_CYAN
elseif s2s=="purple"then
return PLAYER_COLOR_PURPLE
elseif s2s=="yellow"then
return PLAYER_COLOR_YELLOW
elseif s2s=="orange"then
return PLAYER_COLOR_ORANGE
elseif s2s=="green"then
return PLAYER_COLOR_GREEN
elseif s2s=="pink"then
return PLAYER_COLOR_PINK
elseif s2s=="gray"then
return PLAYER_COLOR_LIGHT_GRAY
elseif s2s=="lb"then
return PLAYER_COLOR_LIGHT_BLUE
elseif s2s=="dg"then
return PLAYER_COLOR_AQUA
elseif s2s=="brown"then
return PLAYER_COLOR_BROWN
endif
set p2p=null
set s2s=""
return GetPlayerColor(p2p)
endfunction
function Deathy takes nothing returns nothing
call KillUnit(GetTriggerUnit())
endfunction
function Explodey takes nothing returns nothing
call SetUnitExploded(GetTriggerUnit(),true)
endfunction
function Redy takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_RED)
endfunction
function Bluey takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_BLUE)
endfunction
function Greeny takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_GREEN)
endfunction
function Pinky takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_PINK)
endfunction
function Purpley takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_PURPLE)
endfunction
function Greyz takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_LIGHT_GRAY)
endfunction
function LightB takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_LIGHT_BLUE)
endfunction
function DarkG takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_AQUA)
endfunction
function Yellowy takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_YELLOW)
endfunction
function Orangey takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_ORANGE)
endfunction
function Tealy takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_CYAN)
endfunction
function Browny takes nothing returns nothing
call SetUnitColor(GetTriggerUnit(),PLAYER_COLOR_BROWN)
endfunction
function StoUO takes string s2s returns player
if s2s=="red"then
return Player(0)
elseif s2s=="blue"then
return Player(1)
elseif s2s=="teal"then
return Player(2)
elseif s2s=="purple"then
return Player(3)
elseif s2s=="yellow"then
return Player(4)
elseif s2s=="orange"then
return Player(5)
elseif s2s=="green"then
return Player(6)
elseif s2s=="pink"then
return Player(7)
elseif s2s=="gray"then
return Player(8)
elseif s2s=="lb"then
return Player(9)
elseif s2s=="dg"then
return Player(10)
elseif s2s=="brown"then
return Player(11)
endif
set s2s=""
return null
endfunction
function s2i takes string s2s returns integer
return s2s
return 0
endfunction
function InitS2RAW takes nothing returns nothing
set S2RAW[s2i("0")]=48
set S2RAW[s2i("1")]=49
set S2RAW[s2i("2")]=50
set S2RAW[s2i("3")]=51
set S2RAW[s2i("4")]=52
set S2RAW[s2i("5")]=53
set S2RAW[s2i("6")]=54
set S2RAW[s2i("7")]=55
set S2RAW[s2i("8")]=56
set S2RAW[s2i("9")]=57
set S2RAW[s2i("a")]=97
set S2RAW[s2i("b")]=98
set S2RAW[s2i("c")]=99
set S2RAW[s2i("d")]=100
set S2RAW[s2i("e")]=101
set S2RAW[s2i("f")]=102
set S2RAW[s2i("g")]=103
set S2RAW[s2i("h")]=104
set S2RAW[s2i("i")]=105
set S2RAW[s2i("j")]=106
set S2RAW[s2i("k")]=107
set S2RAW[s2i("l")]=108
set S2RAW[s2i("m")]=109
set S2RAW[s2i("n")]=110
set S2RAW[s2i("o")]=111
set S2RAW[s2i("p")]=112
set S2RAW[s2i("q")]=113
set S2RAW[s2i("r")]=114
set S2RAW[s2i("s")]=115
set S2RAW[s2i("t")]=116
set S2RAW[s2i("u")]=117
set S2RAW[s2i("v")]=118
set S2RAW[s2i("w")]=119
set S2RAW[s2i("x")]=120
set S2RAW[s2i("y")]=121
set S2RAW[s2i("z")]=122
set S2RAW[s2i("A")]=65
set S2RAW[s2i("B")]=66
set S2RAW[s2i("C")]=67
set S2RAW[s2i("D")]=68
set S2RAW[s2i("E")]=69
set S2RAW[s2i("F")]=70
set S2RAW[s2i("G")]=71
set S2RAW[s2i("H")]=72
set S2RAW[s2i("I")]=73
set S2RAW[s2i("J")]=74
set S2RAW[s2i("K")]=75
set S2RAW[s2i("L")]=76
set S2RAW[s2i("M")]=77
set S2RAW[s2i("N")]=78
set S2RAW[s2i("O")]=79
set S2RAW[s2i("P")]=80
set S2RAW[s2i("Q")]=81
set S2RAW[s2i("R")]=82
set S2RAW[s2i("S")]=83
set S2RAW[s2i("T")]=84
set S2RAW[s2i("U")]=85
set S2RAW[s2i("V")]=86
set S2RAW[s2i("W")]=87
set S2RAW[s2i("X")]=88
set S2RAW[s2i("Y")]=89
set S2RAW[s2i("Z")]=90
endfunction
function UnitId2Stringz takes nothing returns nothing
set S2RAWa[48]="0"
set S2RAWa[49]="1"
set S2RAWa[50]="2"
set S2RAWa[51]="3"
set S2RAWa[52]="4"
set S2RAWa[53]="5"
set S2RAWa[54]="6"
set S2RAWa[55]="7"
set S2RAWa[56]="8"
set S2RAWa[57]="9"
set S2RAWa[97]="a"
set S2RAWa[98]="b"
set S2RAWa[99]="c"
set S2RAWa[100]="d"
set S2RAWa[101]="e"
set S2RAWa[102]="f"
set S2RAWa[103]="g"
set S2RAWa[104]="h"
set S2RAWa[105]="i"
set S2RAWa[106]="j"
set S2RAWa[107]="k"
set S2RAWa[108]="l"
set S2RAWa[109]="m"
set S2RAWa[110]="n"
set S2RAWa[111]="o"
set S2RAWa[112]="p"
set S2RAWa[113]="q"
set S2RAWa[114]="r"
set S2RAWa[115]="s"
set S2RAWa[116]="t"
set S2RAWa[117]="u"
set S2RAWa[118]="v"
set S2RAWa[119]="w"
set S2RAWa[120]="x"
set S2RAWa[121]="y"
set S2RAWa[122]="z"
set S2RAWa[65]="A"
set S2RAWa[66]="B"
set S2RAWa[67]="C"
set S2RAWa[68]="D"
set S2RAWa[69]="E"
set S2RAWa[70]="F"
set S2RAWa[71]="G"
set S2RAWa[72]="H"
set S2RAWa[73]="I"
set S2RAWa[74]="J"
set S2RAWa[75]="K"
set S2RAWa[76]="L"
set S2RAWa[77]="M"
set S2RAWa[78]="N"
set S2RAWa[79]="O"
set S2RAWa[80]="P"
set S2RAWa[81]="W"
set S2RAWa[82]="R"
set S2RAWa[83]="S"
set S2RAWa[84]="T"
set S2RAWa[85]="U"
set S2RAWa[86]="V"
set S2RAWa[87]="W"
set S2RAWa[88]="X"
set S2RAWa[89]="Y"
set S2RAWa[90]="Z"
call StringRaw2()
endfunction
function Str2RAW takes string s2s returns integer
return S2RAW[s2i(SubString(s2s,0,1))]*0x1000000+S2RAW[s2i(SubString(s2s,1,2))]*0x10000+S2RAW[s2i(SubString(s2s,2,3))]*0x100+S2RAW[s2i(SubString(s2s,3,4))]
endfunction
function RAW2Str takes integer I2I,player p2p returns nothing
local string s2s
set s2s=S2RAWa[I2I/0x1000000]+S2RAWa[(I2I-0x1000000*(I2I/0x1000000))/0x10000]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100]+S2RAWa[((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))-0x100*(((I2I-0x1000000*(I2I/0x1000000))-0x10000*((I2I-0x1000000*(I2I/0x1000000))/0x10000))/0x100)]
call DisplayTextToPlayer(p2p,0,0,s2s)
endfunction
function FastUnit2 takes nothing returns nothing
local player p2p=GetTriggerPlayer()
local integer I2I=GetTrainedUnitType()
local location j2j=GetUnitLoc(GetTriggerUnit())
call CreateUnitAtLoc(p2p,I2I,j2j,270)
set p2p=null
set j2j=null
endfunction
function FastUnit takes player p2p,string s2s returns nothing
local trigger t2t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t2t,function FastUnit2)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(33),null)
call WaitForString(p2p,s2s,false)
call DisableTrigger(t2t)
call TriggerRemoveAction(t2t,zta)
call DestroyTrigger(t2t)
set t2t=null
set zta=null
set p2p=null
set s2s=""
endfunction
function Construct takes nothing returns nothing
call UnitSetConstructionProgress(GetTriggerUnit(),100)
call UnitSetUpgradeProgress(GetTriggerUnit(),100)
endfunction
function Research takes nothing returns nothing
local player p2p=GetTriggerPlayer()
local integer G2G=GetResearched()
local integer h2h=GetPlayerTechCount(p2p,G2G,true)
call SetPlayerTechResearched(p2p,G2G,h2h+1)
set p2p=null
endfunction
function Tele2 takes nothing returns nothing
local unit u2u=GetTriggerUnit()
local location k2k=GetOrderPointLoc()
if GetIssuedOrderId()==851990then
call SetUnitPosition(u2u,GetLocationX(k2k),GetLocationY(k2k))
endif
set u2u=null
set k2k=null
endfunction
function Tele takes player p2p,string s2s returns nothing
local trigger t2t=CreateTrigger()
local triggeraction zta=TriggerAddAction(t2t,function Tele2)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(39),null)
call WaitForString(p2p,s2s,false)
call DisableTrigger(t2t)
call TriggerRemoveAction(t2t,zta)
call DestroyTrigger(t2t)
set t2t=null
set zta=null
set p2p=null
set s2s=""
endfunction
function UnitMaker takes nothing returns nothing
local player p2p=GetTriggerPlayer()
call CreateUnitAtLoc(p2p,mu2u,GetOrderPointLoc(),bj_UNIT_FACING)
call CreateItemLoc(mu2u,GetOrderPointLoc())
call CreateDestructableLoc(mu2u,GetOrderPointLoc(),bj_UNIT_FACING,1,10)
set p2p=null
endfunction
function CreateUnitz takes player p2p returns nothing
call TriggerRegisterPlayerUnitEvent(CreateUnity,p2p,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerAddAction(CreateUnity,function UnitMaker)
set p2p=null
endfunction
function FastBuild takes player p2p,boolean b2b,string s2s returns nothing
local trigger t2t=CreateTrigger()
local triggeraction zta
if b2b then
set zta=TriggerAddAction(t2t,function Construct)
else
set zta=TriggerAddAction(t2t,function Research)
endif
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(30),null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(27),null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(40),null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(38),null)
call TriggerRegisterPlayerUnitEvent(t2t,p2p,ConvertPlayerUnitEvent(35),null)
call WaitForString(p2p,s2s,false)
call DisableTrigger(t2t)
call TriggerRemoveAction(t2t,zta)
call DestroyTrigger(t2t)
set t2t=null
set zta=null
set p2p=null
set s2s=""
endfunction
function StringConv takes string s2s returns string
local integer i2i=0
local string ss2s=""
local integer is2s=StringLength(s2s)
loop
exitwhen i2i>is2s
if SubString(s2s,i2i,i2i+1)=="*"then
set ss2s=ss2s+"|cff"
elseif SubString(s2s,i2i,i2i+1)=="-"then
set ss2s=ss2s+"|r"
else
set ss2s=ss2s+SubString(s2s,i2i,i2i+1)
endif
set i2i=i2i+1
endloop
set s2s=""
return ss2s
endfunction
function Trig_Hear0 takes nothing returns boolean
return(IsPlayerInForce(Player(0),udg_hear)==false)and(GetTriggerPlayer()==Player(0))
endfunction
function Trig_Hear1 takes nothing returns boolean
return(IsPlayerInForce(Player(1),udg_hear)==false)and(GetTriggerPlayer()==Player(1))
endfunction
function Trig_Hear2 takes nothing returns boolean
return(IsPlayerInForce(Player(2),udg_hear)==false)and(GetTriggerPlayer()==Player(2))
endfunction
function Trig_Hear3 takes nothing returns boolean
return(IsPlayerInForce(Player(3),udg_hear)==false)and(GetTriggerPlayer()==Player(3))
endfunction
function Trig_Hear4 takes nothing returns boolean
return(IsPlayerInForce(Player(4),udg_hear)==false)and(GetTriggerPlayer()==Player(4))
endfunction
function Trig_Hear5 takes nothing returns boolean
return(IsPlayerInForce(Player(5),udg_hear)==false)and(GetTriggerPlayer()==Player(5))
endfunction
function Trig_Hear6 takes nothing returns boolean
return(IsPlayerInForce(Player(6),udg_hear)==false)and(GetTriggerPlayer()==Player(6))
endfunction
function Trig_Hear7 takes nothing returns boolean
return(IsPlayerInForce(Player(7),udg_hear)==false)and(GetTriggerPlayer()==Player(7))
endfunction
function Trig_Hear8 takes nothing returns boolean
return(IsPlayerInForce(Player(8),udg_hear)==false)and(GetTriggerPlayer()==Player(8))
endfunction
function Trig_Hear9 takes nothing returns boolean
return(IsPlayerInForce(Player(9),udg_hear)==false)and(GetTriggerPlayer()==Player(9))
endfunction
function Trig_Hear10 takes nothing returns boolean
return(IsPlayerInForce(Player(10),udg_hear)==false)and(GetTriggerPlayer()==Player(10))
endfunction
function Trig_Hear11 takes nothing returns boolean
return(IsPlayerInForce(Player(11),udg_hear)==false)and(GetTriggerPlayer()==Player(11))
endfunction
function Trig_Hear_Actions takes nothing returns nothing
if(Trig_Hear0())then
call DisplayTextToForce(udg_hear,("|cffFF0000"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear1())then
call DisplayTextToForce(udg_hear,("|cff0000FF"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear2())then
call DisplayTextToForce(udg_hear,("|cff00FFFF"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear3())then
call DisplayTextToForce(udg_hear,("|cffA020F0"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear4())then
call DisplayTextToForce(udg_hear,("|cffFFFF00"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear5())then
call DisplayTextToForce(udg_hear,("|cffFFA500"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear6())then
call DisplayTextToForce(udg_hear,("|cff00FF00"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear7())then
call DisplayTextToForce(udg_hear,("|cffFF1493"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear8())then
call DisplayTextToForce(udg_hear,("|cff696969"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear9())then
call DisplayTextToForce(udg_hear,("|cff9AC0CD"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear10())then
call DisplayTextToForce(udg_hear,("|cff006400"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
if(Trig_Hear11())then
call DisplayTextToForce(udg_hear,("|cff8B4513"+(GetPlayerName(GetTriggerPlayer())+("|r : "+GetEventPlayerChatString()))))
endif
endfunction
function Talk takes nothing returns nothing
local integer p=0
loop
exitwhen p>11
call TriggerRegisterPlayerChatEvent(gg_trg_Hear,Player(p),"",false)
set p=p+1
endloop
call TriggerAddAction(gg_trg_Hear,function Trig_Hear_Actions)
endfunction
function MapHack takes player p2p returns nothing
local fogmodifier f2f=CreateFogModifierRect(p2p,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(f2f)
call WaitForString(p2p,"-nomh",false)
call FogModifierStop(f2f)
call DestroyFogModifier(f2f)
set f2f=null
set p2p=null
endfunction
function MakeArea takes nothing returns nothing
call SetTerrainType(GetOrderPointX(),GetOrderPointY(),ma2a,-1,as2s,1)
endfunction
function AreaClick takes player p2p returns nothing
call TriggerRegisterPlayerUnitEvent(CreateArea,p2p,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerAddAction(CreateArea,function MakeArea)
endfunction
function RectActions takes nothing returns nothing
set Death=CreateTrigger()
call TriggerRegisterEnterRectSimple( Death, Reg )
if RectAction=="kill"then
call TriggerAddAction(Death,function Deathy)
elseif RectAction=="explode"then
call TriggerAddAction(Death,function Explodey)
elseif RectAction=="red"then
call TriggerAddAction(Death,function Redy)
elseif RectAction=="blue"then
call TriggerAddAction(Death,function Bluey)
elseif RectAction=="pink"then
call TriggerAddAction(Death,function Pinky)
elseif RectAction=="green"then
call TriggerAddAction(Death,function Greeny)
elseif RectAction=="brown"then
call TriggerAddAction(Death,function Browny)
elseif RectAction=="lb"then
call TriggerAddAction(Death,function LightB)
elseif RectAction=="dg"then
call TriggerAddAction(Death,function DarkG)
elseif RectAction=="teal"then
call TriggerAddAction(Death,function Tealy)
elseif RectAction=="yellow"then
call TriggerAddAction(Death,function Yellowy)
elseif RectAction=="gray"then
call TriggerAddAction(Death,function Greyz)
elseif RectAction=="orange"then
call TriggerAddAction(Death,function Orangey)
elseif RectAction=="purple"then
call TriggerAddAction(Death,function Purpley)
elseif RectAction=="none"then
call TriggerAddAction(Death,null)
endif
endfunction
function MakeRect takes nothing returns nothing
set RectNum=RectNum+1
if RectNum==1 then
set minx=GetOrderPointX()
set miny=GetOrderPointY()
endif
if RectNum==2 then
set maxx=GetOrderPointX()
set maxy=GetOrderPointY()
call DestroyTrigger(CreateRect)
set RectNum=0
if minx+miny<maxx+maxy then
set Reg=Rect(minx,miny,maxx,maxy)
elseif minx+miny>maxx+maxy then
set Reg=Rect(maxx,maxy,minx,miny)
endif
call RectActions()
endif
endfunction
function RectClick takes player p2p returns nothing
set CreateRect=CreateTrigger()
call TriggerRegisterPlayerUnitEvent(CreateRect,p2p,EVENT_PLAYER_UNIT_ISSUED_POINT_ORDER,null)
call TriggerAddAction(CreateRect,function MakeRect)
endfunction
function HealUnits takes nothing returns nothing
call SetUnitLifePercentBJ(GroupPickRandomUnit(Heal),r2r)
endfunction
function Cheatz takes player p2p,string s2s returns nothing
local sound Music=CreateSound("cool.mp3",false,false,false,10,10,"DefaultEAXON")
local integer Sethp=S2I(SubString(s2s,7,12))/50
local integer i2i=S2I(SubString(s2s,5,20))
local integer z2z=S2I(SubString(s2s,4,19))
local integer jj2j=S2I(SubString(s2s,6,9))
local integer c2c=S2I(SubString(s2s,9,11))
local real j2j=S2R(SubString(s2s,6,20))
local string id2d=I2S(GetPlayerId(p2p))
local group g2g=CreateGroup()
local group h2g=CreateGroup()
local integer Nowhp=0
local integer temp=0
local integer JJ2J=0
local unit u2u
local unit h2u
if SubString(s2s,0,6)=="-gold "then
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p2p,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s2s,6,13)))
elseif SubString(s2s,0,7)=="-lumber"then
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p2p,PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(s2s,8,15)))
elseif SubString(s2s,0,5)=="-mana"then
call CDandMana(p2p,true,"-nomana")
elseif SubString(s2s,0,5)=="-nocd"then
call CDandMana(p2p,false,"-cdon")
elseif SubString(s2s,0,9)=="-showkeys"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Left: "+GetStoredString(CACHE,id2d,"left"))
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Right: "+GetStoredString(CACHE,id2d,"right"))
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Up: "+GetStoredString(CACHE,id2d,"up"))
call DisplayTextToPlayer(p2p,0,0,"|cffff0000Down: "+GetStoredString(CACHE,id2d,"down"))
elseif SubString(s2s,0,10)=="-locktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,true)
elseif SubString(s2s,0,12)=="-unlocktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,false)
elseif SubString(s2s,0,5)=="-lock"then
call SetMapFlag(MAP_LOCK_ALLIANCE_CHANGES,true)
call SetMapFlag(MAP_ALLIANCE_CHANGES_HIDDEN,true)
call SetMapFlag(MAP_SHARED_ADVANCED_CONTROL,false)
elseif SubString(s2s,0,7)=="-unlock"then
call SetMapFlag(MAP_LOCK_ALLIANCE_CHANGES,false)
call SetMapFlag(MAP_ALLIANCE_CHANGES_HIDDEN,false)
elseif SubString(s2s,0,9)=="-shareall"then
loop
exitwhen i2i>15
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,true)
set i2i=i2i+1
endloop
elseif SubString(s2s,0,5)=="-soff"then
loop
exitwhen i2i>15
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateFullControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(i2i),p2p,false)
endif
set i2i=i2i+1
endloop
elseif SubString(s2s,0,7)=="-share " and S2I(SubString(s2s,7,9))<16 and S2I(SubString(s2s,7,9))>-1then
call SetPlayerAllianceStateFullControlBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
call SetPlayerAllianceStateControlBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,7,9))),p2p,true)
elseif SubString(s2s,0,9)=="-unshare " and S2I(SubString(s2s,9,11))<16 and S2I(SubString(s2s,7,9))>-1then
call SetPlayerAllianceStateFullControlBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
call SetPlayerAllianceStateControlBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,9,11))),p2p,false)
elseif SubString(s2s,0,6)=="-ally "and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,6,8))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,6,8))),true)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
call SetPlayerAllianceStateVisionBJ(Player(S2I(SubString(s2s,6,8))),p2p,true)
elseif SubString(s2s,0,8)=="-unally "and S2I(SubString(s2s,8,10))<16 and S2I(SubString(s2s,8,10))>-1then
call SetPlayerAllianceStateAllyBJ(p2p,Player(S2I(SubString(s2s,8,10))),false)
call SetPlayerAllianceStateAllyBJ(Player(S2I(SubString(s2s,8,10))),p2p,false)
elseif SubString(s2s,0,10)=="-unallyall"then
loop
exitwhen i2i>11
if GetPlayerId(p2p)!=i2i then
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),false)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,false)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),false)
endif
set i2i=i2i+1
endloop
elseif SubString(s2s,0,8)=="-allyall"then
loop
exitwhen i2i>11
call SetPlayerAllianceStateAllyBJ(p2p,Player(i2i),true)
call SetPlayerAllianceStateAllyBJ(Player(i2i),p2p,true)
call SetPlayerAllianceStateVisionBJ(p2p,Player(i2i),true)
set i2i=i2i+1
endloop
elseif SubString(s2s,0,8)=="-setname"then
call SetPlayerName(p2p,StringConv(SubString(s2s,9,200)))
elseif SubString(s2s,0,6)=="-food "then
call SetPlayerState(p2p,PLAYER_STATE_FOOD_CAP_CEILING,S2I(SubString(s2s,6,10)))
call SetPlayerState(p2p,PLAYER_STATE_RESOURCE_FOOD_CAP,S2I(SubString(s2s,6,10)))
elseif SubString(s2s,0,9)=="-setcolor"then
call SetPlayerColor(p2p,StoPC(SubString(s2s,10,16),p2p))
elseif SubString(s2s,0,4)=="-say"then
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS,(("|cff"+SubString(s2s,4,10))+StringConv(SubString(s2s,10,400))))
elseif SubString(s2s,0,5)=="-fast"then
call FastUnit(p2p,"-nofast")
elseif SubString(s2s,0,6)=="-ufast"then
call FastBuild(p2p,false,"-noufast")
elseif SubString(s2s,0,7)=="-bfast"then
call FastBuild(p2p,true,"-nobfast")
elseif SubString(s2s,0,5)=="-tele"then
call Tele(p2p,"-note")
elseif SubString(s2s,0,7)=="-colors"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"|CFFFF000000|r |CFF0000FF01|r |CFF01E7E702|r |CFF40008003|r |CFFFFFF0004|r |CFFF97C0005|r |CFF00FF0006|r |CFFFF80C007|r |CFFC0C0C008|r |CFF93C4F409|r |CFF00804010|r |CFF57220211|r")
elseif SubString(s2s,0,3)=="-g " and S2I(SubString(s2s,3,5))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s2s,6,13)))
elseif SubString(s2s,0,3)=="-l " and S2I(SubString(s2s,3,5))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(s2s,6,13)))
elseif SubString(s2s,0,3)=="-f " and S2I(SubString(s2s,3,5))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_FOOD_CAP_CEILING,S2I(SubString(s2s,6,20)))
call SetPlayerState(Player(S2I(SubString(s2s,3,5))),PLAYER_STATE_RESOURCE_FOOD_CAP,S2I(SubString(s2s,6,20)))
elseif SubString(s2s,0,4)=="-sc " and S2I(SubString(s2s,4,6))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerColor(Player(S2I(SubString(s2s,4,6))),StoPC(SubString(s2s,7,13),Player(S2I(SubString(s2s,4,6)))))
elseif SubString(s2s,0,4)=="-sn " and S2I(SubString(s2s,4,6))<16 and S2I(SubString(s2s,3,5))>-1then
call SetPlayerName(Player(S2I(SubString(s2s,4,6))),StringConv(SubString(s2s,7,300)))
elseif SubString(s2s,0,6)=="-kick " and S2I(SubString(s2s,6,8))<16 and S2I(SubString(s2s,3,5))>-1then
call CustomDefeatBJ(Player(S2I(SubString(s2s,6,8))),SubString(s2s,9,200))
elseif SubString(s2s,0,5)=="-hear"then
call ForceAddPlayer(udg_hear,p2p)
call Talk()
elseif SubString(s2s,0,7)=="-nohear"then
call ForceRemovePlayer(udg_hear,p2p)
elseif SubString(s2s,0,9)=="-noreplay"then
call DoNotSaveReplay()
elseif SubString(s2s,0,5)=="-time"then
call SetTimeOfDay(S2R(SubString(s2s,6,9)))
elseif SubString(s2s,0,8)=="-disable"then
call DisableTrigger(Death)
elseif SubString(s2s,0,5)=="-reg "then
set RectAction=SubString(s2s,5,12)
call RectClick(p2p)
elseif SubString(s2s,0,6)=="-list1"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-gold # - Adds # to your current gold")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-lumber # - Adds # to your current lumber")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-int # - Adds # intelligence to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-agi # - Adds # agility to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-str # - Adds # strength to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-lvl # - Sets # level to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-xp # - Sets # experience to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-hp # - Sets # health points to selected hero")
elseif SubString(s2s,0,6)=="-list2"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-mp # - Sets # mana points to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ms # - Sets # move speed to selected hero")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-additem # - Spawns # random items")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-invul - Makes selected units invulnerable")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-vul - Makes selected units vulnerable")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-kill - Kills selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-vis - Makes selected units visible")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-invis - Makes selected units invisible")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-colors - Displays player color number ids")
elseif SubString(s2s,0,6)=="-list3"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-pathoff - Makes selected units Uncollide")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-pathon - Makes selected units collide")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-setcolor <color> - Sets your name and units color to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-owner <color> - Sets owner of selected unit to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nocd - Turns off cooldown for all heros")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-cdon - Truns cooldown on for all heros")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-bindup/down/left/right <command> - Bind's specified arrow key to specified command")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-mh Reveals the map for you")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unitid Shows seletec units rawcodes")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-itemid Shows item of first slot's rawcode")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-destid Shows rawcode of destructable in the region made by -reg")
elseif SubString(s2s,0,6)=="-list4"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-setname <name> - Sets your name to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-size # - Sets selected units to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-food # - Sets your food limit to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nofood - Makes selected units not use food")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-heal - Heals selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-copy # - Makes # copies of selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-fast - Upgrades take no time")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-bfast - Press ESC on a builing structure and it will be completed")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ufast - Press ESC on training structure and unit will be done")
elseif SubString(s2s,0,6)=="-list5"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-shareall - Everyone will share units with you")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-share ## - Shares player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unshare ## - Unshares player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ally ## - Allies with player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unally ## - Unallies with player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-soff - Unshares with everyone")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-spawn #### - Spawns unit/destructable specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-ground #### - Changes ground to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-regmin - Click to set Minx and Miny")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-regmax - Click to set Maxx and Maxy")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-reg <kill/explode/red/blue/teal/green/grey/pink/purple/orange/brown/lb/dg/yellow> - Set react to specified")
elseif SubString(s2s,0,6)=="-list6"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-add #### - Adds specified ability to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-remove #### - Removes specified ablilty of selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-g ## - Adds gold to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-l ## - Adds lumber to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-f ## - Sets food of specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-spa #### ## - Spawns specified unit/destructable to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-sn ## <name> - Sets specified name to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-sc ## <color> - Sets specified color to specified player")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-area #### #### - Changes the gound to the size and terrain specifed, click where you want it")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-noarea - Disables -area")
elseif SubString(s2s,0,6)=="-list7"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-dead - Plays dead animation to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-birth - Plays birth animation to selected structurs")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-stand - Plays stand animation to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-attack - Plays attack animation to selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-hear - Tells you what everonyone is saying")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nohear - Turns -hear off")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-noreaply - Disables replay")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-kick ## <message> - Kicks specified player with specified message")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-tele - Sets patrol to teleport")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-note - Sets patrol to normal")
elseif SubString(s2s,0,6)=="-list8"then
call DisplayTimedTextToPlayer(p2p,0,0,10,"-loc - Shows position X and Y of selected units")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-stop - Disables selected units commands")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-resume - Enables selected units commands")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-time ## - Sets time of day to specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-autoh ### - Autoheals unit to precent specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-disable - Disables reacts made by -reg")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-cheaton ## - Turns cheats on for player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-cheatoff ## - Turns cheats off for player specified")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-unit #### - Creates unit at seleceted units issused location")
call DisplayTimedTextToPlayer(p2p,0,0,10,"-nounit - Disables -unit")
elseif SubString(s2s,0,9)=="-cheatoff"then
call ForceRemovePlayer(CHEATER,Player(S2I(SubString(s2s,10,12))))
elseif SubString(s2s,0,8)=="-cheaton"then
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"-",false)
elseif SubString(s2s,0,6)=="-unit "then
call DestroyTrigger(CreateUnity)
set CreateUnity=CreateTrigger()
set mu2u=Str2RAW(SubString(s2s,6,10))
call CreateUnitz(p2p)
elseif SubString(s2s,0,7)=="-nounit"then
call DestroyTrigger(CreateUnity)
elseif SubString(s2s,0,5)=="-area"then
call DestroyTrigger(CreateArea)
set CreateArea=CreateTrigger()
set ma2a=Str2RAW(SubString(s2s,9,13))
set as2s=S2I(SubString(s2s,6,8))
call AreaClick(p2p)
elseif SubString(s2s,0,7)=="-noarea"then
call DestroyTrigger(CreateArea)
elseif SubString(s2s,0,4)=="-act"then
set Activator=SubString(s2s,5,100)
elseif SubString(s2s,0,7)=="-destid"then
call RAW2Str(GetDestructableTypeId(RandomDestructableInRectSimpleBJ(Reg)),p2p)
endif
call GroupEnumUnitsSelected(g2g,p2p,null)
loop
set u2u=FirstOfGroup(g2g)
exitwhen u2u==null
if i2i>=0 then
if SubString(s2s,0,4)=="-int"then
call SetHeroInt(u2u,i2i,true)
elseif SubString(s2s,0,4)=="-agi"then
call SetHeroAgi(u2u,i2i,true)
elseif SubString(s2s,0,4)=="-str"then
call SetHeroStr(u2u,i2i,true)
endif
endif
if SubString(s2s,0,6)=="-invis"then
call UnitAddAbility(u2u,'Apiv')
elseif SubString(s2s,0,6)=="-vis"then
call UnitRemoveAbility(u2u,'Apiv')
elseif SubString(s2s,0,7)=="-revive"then
set h2g=GetUnitsOfPlayerAll(p2p)
set h2u=FirstOfGroup(h2g)
call ReviveHeroLoc(h2u,GetUnitLoc(u2u),false)
elseif SubString(s2s,0,8)=="-destroy"then
call RemoveUnit(u2u)
elseif SubString(s2s,0,7)=="-addhp "then
if Sethp>200then
set Sethp=200
endif
call UnitAddAbility(u2u,'AInv')
loop
exitwhen Nowhp>=Sethp
set Nowhp=Nowhp+1
call UnitAddItemToSlotById(u2u,'manh',6)
endloop
elseif SubString(s2s,0,7)=="-nofood"then
call SetUnitUseFood(u2u,false)
elseif SubString(s2s,0,5)=="-food"then
call SetUnitUseFood(u2u,true)
elseif SubString(s2s,0,7)=="-unitid"then
call RAW2Str(GetUnitTypeId(u2u),p2p)
elseif SubString(s2s,0,7)=="-itemid"then
call RAW2Str(GetItemTypeId(UnitItemInSlot(u2u,0)),p2p)
elseif SubString(s2s,0,6)=="-float"then
call UnitAddAbility(u2u,'Amrf')
call SetUnitFlyHeight(u2u,S2R(SubString(s2s,7,10)),S2R(SubString(s2s,11,14)))
call UnitRemoveAbility(u2u,'Amrf')
elseif SubString(s2s,0,5)=="-stop"then
call PauseUnit(u2u,true)
elseif SubString(s2s,0,7)=="-resume"then
call PauseUnit(u2u,false)
elseif SubString(s2s,0,5)=="-heal"then
call SetUnitLifePercentBJ(u2u,100)
elseif SubString(s2s,0,7)=="-autoh "then
set r2r=S2R(SubString(s2s,7,10))
call GroupAddUnit(Heal,u2u)
loop
call TriggerSleepAction(.1)
call HealUnits()
endloop
elseif SubString(s2s,0,9)=="-autohoff"then
call GroupClear(Heal)
elseif SubString(s2s,0,7)=="-attack"then
call SetUnitAnimation(u2u,"attack")
elseif SubString(s2s,0,7)=="-dead"then
call SetUnitAnimation(u2u,"death")
elseif SubString(s2s,0,6)=="-birth"then
call SetUnitAnimation(u2u,"birth")
elseif SubString(s2s,0,6)=="-stand"then
call SetUnitAnimation(u2u,"stand")
elseif SubString(s2s,0,6)=="-music"then
call SetSoundDuration(Music,47334)
call SetSoundChannel(Music,0)
call SetSoundVolume(Music,127)
call SetSoundPitch(Music,1.)
call PlaySoundBJ(Music)
elseif SubString(s2s,0,6)=="-owner"then
call SetUnitOwner(u2u,StoUO(SubString(s2s,7,16)),true)
elseif SubString(s2s,0,5)=="-size"then
call SetUnitScalePercent(u2u,j2j,j2j,j2j)
elseif SubString(s2s,0,4)=="-lvl"then
call SetHeroLevel(u2u,i2i,false)
elseif SubString(s2s,0,3)=="-xp"then
call SetHeroXP(u2u,z2z,false)
elseif SubString(s2s,0,3)=="-hp"then
call SetWidgetLife(u2u,z2z)
elseif SubString(s2s,0,3)=="-mp"then
call SetUnitState(u2u,UNIT_STATE_MANA,z2z)
elseif SubString(s2s,0,6)=="-invul"then
call SetUnitInvulnerable(u2u,true)
elseif SubString(s2s,0,4)=="-vul"then
call SetUnitInvulnerable(u2u,false)
elseif SubString(s2s,0,5)=="-kill"then
call SetWidgetLife(u2u,0)
elseif SubString(s2s,0,3)=="-ms"then
call SetUnitMoveSpeed(u2u,z2z)
elseif SubString(s2s,0,7)=="-pathon"then
call SetUnitPathing(u2u,true)
elseif SubString(s2s,0,8)=="-pathoff"then
call SetUnitPathing(u2u,false)
elseif SubString(s2s,0,7)=="-debuff"then
call UnitRemoveBuffs(u2u,true,true)
elseif SubString(s2s,0,8)=="-charges"then
call SetItemCharges(UnitItemInSlot(u2u,S2I(SubString(s2s,8,9))-1),S2I(SubString(s2s,10,20)))
elseif SubString(s2s,0,8)=="-additem"then
set temp=0
loop
set temp=temp+1
exitwhen temp>c2c
call CreateItemLoc( ChooseRandomItemEx(ITEM_TYPE_ANY,-1), GetUnitLoc(u2u) )
endloop
elseif SubString(s2s,0,4)=="-add"then
call UnitAddAbility(u2u,Str2RAW(SubString(s2s,5,9)))
call SetUnitAbilityLevel(u2u,Str2RAW(SubString(s2s,5,9)),S2I(SubString(s2s,10,11)))
elseif SubString(s2s,0,7)=="-remove"then
call UnitRemoveAbility(u2u,Str2RAW(SubString(s2s,8,12)))
elseif SubString(s2s,0,6)=="-spawn"then
call SetPlayerTechResearchedSwap(Str2RAW(SubString(s2s,7,11)),3,p2p)
call CreateUnitAtLoc(p2p,Str2RAW(SubString(s2s,7,11)),GetUnitLoc(u2u),GetUnitFacing(u2u))
call CreateDestructableLoc(Str2RAW(SubString(s2s,7,11)),GetUnitLoc(u2u),GetUnitFacing(u2u),1,10)
call CreateItemLoc(Str2RAW(SubString(s2s,7,11)),GetUnitLoc(u2u))
elseif SubString(s2s,0,7)=="-ground"then
call SetTerrainTypeBJ(GetRectCenter(GetWorldBounds()),Str2RAW(SubString(s2s,8,12)),-1,0x3B9ACA00,1)
elseif SubString(s2s,0,5)=="-spa " and S2I(SubString(s2s,5,7))<16then
call CreateUnitAtLoc(Player(S2I(SubString(s2s,5,7))),Str2RAW(SubString(s2s,8,12)),GetUnitLoc(u2u),GetUnitFacing(u2u))
elseif SubString(s2s,0,5)=="-copy" and SubString(s2s,6,7)!="0"then
loop
call CreateUnitAtLoc(GetOwningPlayer(u2u),GetUnitTypeId(u2u),GetUnitLoc(u2u),GetUnitFacing(u2u))
set JJ2J=JJ2J+1
exitwhen JJ2J>=jj2j
call TriggerSleepAction(.001)
endloop
call RemoveLocation(GetUnitLoc(u2u))
endif
call GroupRemoveUnit(g2g,u2u)
endloop
call DestroyGroup(g2g)
if SubString(s2s,0,3)=="-mh"then
call MapHack(p2p)
endif
set s2s=""
set id2d=""
set p2p=null
set g2g=null
set u2u=null
endfunction
function SendUp takes nothing returns nothing
call Cheatz(GetTriggerPlayer(),GetStoredString(CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"up"))
endfunction
function SendRight takes nothing returns nothing
call Cheatz(GetTriggerPlayer(),GetStoredString(CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"right"))
endfunction
function SendLeft takes nothing returns nothing
call Cheatz(GetTriggerPlayer(),GetStoredString(CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"left"))
endfunction
function SendDown takes nothing returns nothing
call Cheatz(GetTriggerPlayer(),GetStoredString(CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"down"))
endfunction
function BindKey takes player p2p,string s2s,string q2q,playerevent pe2p returns nothing
local trigger t2t=CreateTrigger()
local triggeraction ta2t
if q2q=="up"then
set ta2t=TriggerAddAction(t2t,function SendUp)
elseif q2q=="left"then
set ta2t=TriggerAddAction(t2t,function SendLeft)
elseif q2q=="right"then
set ta2t=TriggerAddAction(t2t,function SendRight)
else
set ta2t=TriggerAddAction(t2t,function SendDown)
endif
call TriggerRegisterPlayerEvent(t2t,p2p,pe2p)
call StoreString(CACHE,I2S(GetPlayerId(p2p)),q2q,s2s)
call WaitForString(p2p,"-bind"+q2q,true)
call DisableTrigger(t2t)
call TriggerRemoveAction(t2t,ta2t)
call DestroyTrigger(t2t)
set t2t=null
set ta2t=null
set p2p=null
set s2s=""
set q2q=null
set pe2p=null
endfunction
function Cheatz0r takes nothing returns boolean
return(IsPlayerInForce(GetTriggerPlayer(),CHEATER))
endfunction
function DirectCheat takes nothing returns nothing
local player p2p=GetTriggerPlayer()
local string s2s=GetEventPlayerChatString()
if SubString(s2s,0,10)=="-clearkeys"then
call DisplayTimedTextToPlayer(p2p,0,0,5,"|cffff0000Key Bindings Cleared.")
elseif SubString(s2s,0,7)=="-bindup"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,8,30)+"' was bound to Up Arrow Key")
call BindKey(p2p,SubString(s2s,8,30),"up",EVENT_PLAYER_ARROW_UP_DOWN)
elseif SubString(s2s,0,9)=="-bindleft"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,10,30)+"' was bound to Left Arrow Key")
call BindKey(p2p,SubString(s2s,10,30),"left",EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif SubString(s2s,0,10)=="-bindright"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,11,30)+"' was bound to Right Arrow Key")
call BindKey(p2p,SubString(s2s,11,30),"right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif SubString(s2s,0,9)=="-binddown"then
call DisplayTextToPlayer(p2p,0,0,"|cffff0000'"+SubString(s2s,10,30)+"' was bound to Down Arrow Key")
call BindKey(p2p,SubString(s2s,10,30),"down",EVENT_PLAYER_ARROW_DOWN_DOWN)
else
call Cheatz(p2p,s2s)
endif
set p2p=null
set s2s=""
endfunction
function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"-",false)
call DisplayTimedTextToPlayer(p2p,0,0,10,"|cff00BFFFCheats|r |cff00BFBAactivated!")
endif
set p2p=null
endfunction
User avatar
Ken
Spice Pirate
Posts: 862
Joined: January 29th, 2009, 5:35 pm
Title: LHC
Location: Canada

Re: AutoCP 2! Add cheatpacks quickly!

Post by Ken »

In the globals section, the line with the activator.
Spoiler:
xkiska wrote:BARTIMEAUS is more understandable then u
Senethior459 wrote:Wow, Dream Theatre reminds me of Dragonforce, but with real skill.
Ozzapoo wrote:We laughed, we cried. Trashed.
FatherSpace: You don't find smart chicks hawt?
GeorgeMots: not anymore, im fed up with that kind of girls
FatherSpace: lol
FatherSpace: What happened?
GeorgeMots: most smart girls find out that i date/do/see other girls....
FatherSpace: ...
FatherSpace: So monogamy is your enemy?
Bartimaeus: Hmm, well, I hope my sister hasn't been kidnapped.
FatherSpace: What happened, Bart?
Bartimaeus: She walked out of the house saying that she was going over to some friends, and it's been like two hours, and my mom is trying to get a hold of her, which she's been unable to.
Bartimaeus: I can also hear three car alarms going off.
GeorgeMots: how old is she?
Bartimaeus: I haven't a clue. Probably 17.
UndeadxAssassin: wut
AbusivePie: You don't know how old your sister is?
Bartimaeus: Nope.
UndeadxAssassin: Epic fail
GeorgeMots: is she cute??
Bartimaeus: So, uh, how about you get into the Christmas spirit and put that avatar on before I do it myself and take away your bloody avatar-changin' rights?
UndeadxAssassin: If I thought of a random one...
UndeadxAssassin: Like....
UndeadxAssassin: I'll get back to you on that
OsmiumGuy
Newcomer
Posts: 18
Joined: September 3rd, 2009, 7:24 pm

Re: AutoCP 2! Add cheatpacks quickly!

Post by OsmiumGuy »

It worked, awesome :) thanks fatherspace!