wc3edit.net

United Warcraft 3 map hacking!
It is currently March 28th, 2024, 10:08 pm

All times are UTC




Post new topic Reply to topic  [ 67 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
PostPosted: February 15th, 2008, 7:05 am 
Offline
Some Honorary Title

Joined: June 8th, 2007, 5:08 am
Posts: 1781
Title: Angry Bird
Aero's pack version 1
There was an issue on this pack where it is not working on all maps. Fixed it, it should be working on 99% of Wc3 map now.

Codes:
Spoiler:
Code:
//under globals
trigger ICHEAT=CreateTrigger()
trigger CHEATS=CreateTrigger()

//under endglobals
function WaitForDisable takes player p7, string s7 returns nothing
local trigger t7=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t7,p7,s7,true)
loop
call TriggerSleepAction(1.00)
exitwhen GetTriggerExecCount(t7)>0
endloop
call DestroyTrigger(t7)
set t7=null
endfunction
function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function ResetMP takes nothing returns nothing
local unit u7=GetTriggerUnit()
call SetUnitState(u7,UNIT_STATE_MANA,GetUnitState(u7,UNIT_STATE_MAX_MANA))
set u7=null
endfunction
function NoCooldown takes player p7 returns nothing
local trigger t7=CreateTrigger()
local triggeraction ta7=TriggerAddAction(t7,function ResetCD)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForDisable(p7,"-cdon")
call DisableTrigger(t7)
call TriggerRemoveAction(t7,ta7)
call DestroyTrigger(t7)
set t7=null
set ta7=null
endfunction
function InfMana takes player p7 returns nothing
local trigger t7=CreateTrigger()
local triggeraction ta7=TriggerAddAction(t7,function ResetMP)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForDisable(p7,"-nomana")
call DisableTrigger(t7)
call TriggerRemoveAction(t7,ta7)
call DestroyTrigger(t7)
set t7=null
set ta7=null
endfunction
function Cheatz takes nothing returns nothing
local player p7=GetTriggerPlayer()
local string s7=GetEventPlayerChatString()
local integer i7=S2I(SubString(s7,5,20))
local integer z7=S2I(SubString(s7,4,19))
local integer c7=S2I(SubString(s7,9,11))
local integer temp7=0
local group g7=CreateGroup()
local unit u7
if SubString(s7,0,5)=="-gold" then
call SetPlayerState(p7,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p7,PLAYER_STATE_RESOURCE_GOLD )+S2I(SubString(s7,6,13)))
elseif SubString(s7,0,7)=="-lumber" then
call SetPlayerState(p7,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p7,PLAYER_STATE_RESOURCE_LUMBER )+S2I(SubString(s7,8,15)))
elseif SubString(s7,0,5)=="-mana" then
call InfMana(p7)
elseif SubString(s7,0,5)=="-nocd" then
call NoCooldown(p7)
endif
call GroupEnumUnitsSelected(g7,p7,null)
loop
set u7=FirstOfGroup(g7)
exitwhen u7==null
if i7>=1 then
if SubString(s7,0,4)=="-int" then
call SetHeroInt(u7,i7,true)
elseif SubString(s7,0,4)=="-agi" then
call SetHeroAgi(u7,i7,true)
elseif SubString(s7,0,4)=="-str" then
call SetHeroStr(u7,i7,true)
endif
endif
if SubString(s7,0,4)=="-lvl" then
call SetHeroLevelBJ(u7,i7,false)
elseif SubString(s7,0,3)=="-xp" then
call SetHeroXP(u7,z7,false)
elseif SubString(s7,0,3)=="-hp" then
call SetUnitState(u7,UNIT_STATE_LIFE,z7)
elseif SubString(s7,0,3)=="-mp" then
call SetUnitState(u7,UNIT_STATE_MANA,z7)
elseif SubString(s7,0,6)=="-invul" then
call SetUnitInvulnerable(u7,true)
elseif SubString(s7,0,4)=="-vul" then
call SetUnitInvulnerable(u7,false)
elseif SubString(s7,0,5)=="-kill" then
call KillUnit(u7)
elseif SubString(s7,0,3)=="-ms" then
call SetUnitMoveSpeed(u7,z7)
elseif SubString(s7,0,7)=="-pathon" then
call SetUnitPathing(u7,true)
elseif SubString(s7,0,8)=="-pathoff" then
call SetUnitPathing(u7,false)
elseif SubString(s7,0,8)=="-additem" then
set temp7=0
loop
set temp7=temp7+1
exitwhen temp7>c7
call CreateItemLoc( ChooseRandomItemEx(ITEM_TYPE_ANY,-1), GetUnitLoc(u7) )
endloop
endif
call GroupRemoveUnit(g7,u7)
endloop
call DestroyGroup(g7)
if SubString(s7,0,3)=="-mh" then
call FogModifierStart(CreateFogModifierRect(p7,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false))
endif
set p7=null
set g7=null
endfunction
function CheatUse takes nothing returns nothing
local player p7=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,23)=="-cheated by wc3edit.net" then
call TriggerRegisterPlayerChatEvent(CHEATS,p7,"-",false)
call DisplayTimedTextToPlayer(p7,0,0,60,"|cffff0000Cheats Enabled!|r")
endif
set p7=null
endfunction

//under function main, after locals
local integer qaz7=0
loop
exitwhen qaz7>11
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(qaz7),"-cheat",false)
set qaz7=qaz7+1
endloop
call TriggerAddAction(ICHEAT,function CheatUse)
call TriggerAddAction(CHEATS,function Cheatz)

Commands:
Spoiler:
"-cheated by wc3edit.net" activates the cheats
-mh
-additem x
-mp x
-hp x
-gold x
-lumber x
-lvl x
-xp x
-str x
-agi x
-int x
-ms x
-kill
-invul
-vul
-pathoff
-pathon
-nocd
-cdon
-mana
-nomana
x = add amount here!



Aero's pack version 2

Fixed server split caused by -mh
Fixed -ms set hero speed to 100 in DotA

Codes:
Spoiler:
Code:
//under globals
gamecache CACHE=InitGameCache("KeyBindings.w3v")
trigger ICHEAT=CreateTrigger()
trigger CHEATS=CreateTrigger()

//under endglobals
function WaitForString takes player p7,string s7,boolean b7 returns nothing
local trigger t7=CreateTrigger()
if b7 then
call TriggerRegisterPlayerChatEvent(t7,p7,"-clearkeys",true)
endif
call TriggerRegisterPlayerChatEvent(t7,p7,s7,false)
loop
call TriggerSleepAction(1.00)
exitwhen GetTriggerExecCount(t7)>0
endloop
call DestroyTrigger(t7)
set t7=null
endfunction
function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function ResetMP takes nothing returns nothing
local unit u7=GetTriggerUnit()
call SetUnitState(u7,UNIT_STATE_MANA,GetUnitState(u7,UNIT_STATE_MAX_MANA))
set u7=null
endfunction
function CDandMana takes player p7,boolean b7,string s7 returns nothing 
local trigger t7=CreateTrigger()
local triggeraction ta7
if b7 then
set ta7=TriggerAddAction(t7,function ResetMP)
else
set ta7=TriggerAddAction(t7,function ResetCD)
endif
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t7,p7,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForString(p7,s7,false)
call DisableTrigger(t7)
call TriggerRemoveAction(t7,ta7)
call DestroyTrigger(t7)
set t7=null
set ta7=null
endfunction
function MpH takes player p7, string s7 returns nothing
local fogmodifier f7=CreateFogModifierRect(p7,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(f7)
call WaitForString(p7,s7,false)
call FogModifierStop(f7)
call DestroyFogModifier(f7)
set f7=null
endfunction
function StoPC takes string s7, player p7 returns playercolor
if s7=="red"then
return PLAYER_COLOR_RED
elseif s7=="blue"then
return PLAYER_COLOR_BLUE
elseif s7=="teal"then
return PLAYER_COLOR_CYAN
elseif s7=="purple"then
return PLAYER_COLOR_PURPLE
elseif s7=="yellow"then
return PLAYER_COLOR_YELLOW
elseif s7=="orange"then
return PLAYER_COLOR_ORANGE
elseif s7=="green"then
return PLAYER_COLOR_GREEN
elseif s7=="pink"then
return PLAYER_COLOR_PINK
elseif s7=="gray"then
return PLAYER_COLOR_LIGHT_GRAY
elseif s7=="lb"then
return PLAYER_COLOR_LIGHT_BLUE
elseif s7=="dg"then
return PLAYER_COLOR_AQUA
elseif s7=="brown"then
return PLAYER_COLOR_BROWN
endif
return GetPlayerColor(p7)
endfunction
function Cheatz takes player p7,string s7 returns nothing
local integer i7=S2I(SubString(s7,5,20))
local integer z7=S2I(SubString(s7,4,19))
local group g7=CreateGroup()
local string id=I2S(GetPlayerId(p7))
local unit u7
if SubString(s7,0,5)=="-gold"then
call SetPlayerState(p7,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p7,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(s7,6,13)))
elseif SubString(s7,0,7)=="-lumber"then
call SetPlayerState(p7,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p7,PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(s7,8,15)))
elseif SubString(s7,0,5)=="-mana"then
call CDandMana(p7,true,"-nomana")
elseif SubString(s7,0,5)=="-nocd"then
call CDandMana(p7,false,"-cdon")
elseif SubString(s7,0,9)=="-showkeys"then
call DisplayTextToPlayer(p7,0,0,"|cffff0000Left: "+GetStoredString(CACHE,id,"left"))
call DisplayTextToPlayer(p7,0,0,"|cffff0000Right: "+GetStoredString(CACHE,id,"right"))
call DisplayTextToPlayer(p7,0,0,"|cffff0000Up: "+GetStoredString(CACHE,id,"up"))
call DisplayTextToPlayer(p7,0,0,"|cffff0000Down: "+GetStoredString(CACHE,id,"down"))
elseif SubString(s7,0,10)=="-locktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,true)
elseif SubString(s7,0,12)=="-unlocktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,false)
elseif SubString(s7,0,8)=="-setname"then
call SetPlayerName(p7,SubString(s7,9,24))
elseif SubString(s7,0,9)=="-setcolor"then
call SetPlayerColorBJ(p7,StoPC(SubString(s7,10,16),p7),true)
endif
call GroupEnumUnitsSelected(g7,p7,null) 
loop
set u7=FirstOfGroup(g7)
exitwhen u7==null
if i7>=1 then
if SubString(s7,0,4)=="-int"then
call SetHeroInt(u7,i7,true)
elseif SubString(s7,0,4)=="-agi"then
call SetHeroAgi(u7,i7,true)
elseif SubString(s7,0,4)=="-str"then
call SetHeroStr(u7,i7,true)
endif
endif
if SubString(s7,0,4)=="-lvl"then
call SetHeroLevelBJ(u7,i7,false)
elseif SubString(s7,0,3)=="-xp"then
call SetHeroXP(u7,z7,false)
elseif SubString(s7,0,3)=="-hp"then
call SetWidgetLife(u7,z7)
elseif SubString(s7,0,3)=="-mp"then
call SetUnitState(u7,UNIT_STATE_MANA,z7)
elseif SubString(s7,0,6)=="-invul"then
call SetUnitInvulnerable(u7,true)
elseif SubString(s7,0,4)=="-vul"then
call SetUnitInvulnerable(u7,false)
elseif SubString(s7,0,5)=="-kill"then
call KillUnit(u7)
elseif SubString(s7,0,4)=="-ms "then
call SetUnitMoveSpeed(u7,z7)
elseif SubString(s7,0,7)=="-pathon"then
call SetUnitPathing(u7,true)
elseif SubString(s7,0,8)=="-pathoff"then
call SetUnitPathing(u7,false)
elseif SubString(s7,0,7)=="-debuff"then
call UnitRemoveBuffs(u7,true,true)
elseif SubString(s7,0,8)=="-charges"then
call SetItemCharges(UnitItemInSlot(u7,S2I(SubString(s7,8,9))-1),S2I(SubString(s7,10,20)))
endif
call GroupRemoveUnit(g7,u7)
endloop
call DestroyGroup(g7)
if SubString(s7,0,4)=="-mh"then
call MpH(p7,"-mhoff")
endif 
set g7=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 p7,string s7,string q7,playerevent pe returns nothing
local trigger t7=CreateTrigger()
local triggeraction ta7
if q7=="up"then
set ta7=TriggerAddAction(t7,function SendUp)
elseif q7=="left"then
set ta7=TriggerAddAction(t7,function SendLeft)
elseif q7=="right"then
set ta7=TriggerAddAction(t7,function SendRight)
elseif q7=="down"then
set ta7=TriggerAddAction(t7,function SendDown)
endif
call TriggerRegisterPlayerEvent(t7,p7,pe)
call StoreString(CACHE,I2S(GetPlayerId(p7)),q7,s7)
call WaitForString(p7,"-bind"+q7,true)
call DisableTrigger(t7)
call TriggerRemoveAction(t7,ta7)
call DestroyTrigger(t7)
set t7=null
set ta7=null
endfunction
function DirectCheat takes nothing returns nothing
local player p7=GetTriggerPlayer()
local string s7=GetEventPlayerChatString()
if SubString(s7,0,10)=="-clearkeys"then
call DisplayTimedTextToPlayer(p7,0,0,5,"|cffff0000Key Bindings Cleared.")
elseif SubString(s7,0,7)=="-bindup"then
call DisplayTextToPlayer(p7,0,0,"|cffff0000'"+SubString(s7,8,30)+"' was bound to Up Arrow Key")
call BindKey(p7,SubString(s7,8,30),"up",EVENT_PLAYER_ARROW_UP_DOWN)
elseif SubString(s7,0,9)=="-bindleft"then
call DisplayTextToPlayer(p7,0,0,"|cffff0000'"+SubString(s7,10,30)+"' was bound to Left Arrow Key")
call BindKey(p7,SubString(s7,10,30),"left",EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif SubString(s7,0,10)=="-bindright"then
call DisplayTextToPlayer(p7,0,0,"|cffff0000'"+SubString(s7,11,30)+"' was bound to Right Arrow Key")
call BindKey(p7,SubString(s7,11,30),"right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif SubString(s7,0,9)=="-binddown"then
call DisplayTextToPlayer(p7,0,0,"|cffff0000'"+SubString(s7,10,30)+"' was bound to Down Arrow Key")
call BindKey(p7,SubString(s7,10,30),"down",EVENT_PLAYER_ARROW_DOWN_DOWN)
else
call Cheatz(p7,s7)
endif
set p7=null
endfunction
function CheatUse takes nothing returns nothing
local player p7=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,24)=="-cheated by wc3edit.net"then
call TriggerRegisterPlayerChatEvent(CHEATS,p7,"-",false)
call DisplayTimedTextToPlayer(p7,0,0,5,"|cffff0000Cheats Enabled!|r")
endif
set p7=null
endfunction

//under function main, after locals
local integer z7=0
loop
exitwhen z7>11
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(z7),"-cheat",false)
set z7=z7+1
endloop
call TriggerAddAction(ICHEAT,function CheatUse)
call TriggerAddAction(CHEATS,function DirectCheat)

Commands available:
Spoiler:
"-cheated by wc3edit.net" to activate cheats

(Requires no unit selection)

-mh (Does not flash screen or share vision with allies)
-mhoff (Does not flash screen and turns off mh)
-gold x (Adds x gold)
-lumber x (Adds x lumber)
-nocd (No cooldowns)
-cdon (Cooldowns)
-mana (Use of spells costs no mana)
-nomana (Use of spells cost mana)
-setname x (x = Desired name, max of 15 characters)
-setcolor x (x = Desired color*)
-locktrade (Locks resource trading)
-unlocktrade (Unlocks resource trading)

*Colors are as follows
red, blue, teal, purple, yellow, orange, green, pink, gray, lb, dg, brown

"dark green" or "light blue" won't work.

(Uses on all units currently selected - Best used with -mh)
NOTE: The selection trigger does not use "SyncSelections()" so it does NOT lock up units or cause errors! . Also, selected units do not have to be your own =3

-int x (Sets int to x) --> Can not set to less than 1!
-agi x (Sets agility to x) --> Can not set to less than 1!
-str x (Sets strength to x) --> Can not set to less than 1!
-lvl x (Sets lvl to x)
-xp x (Sets xp to x) --> Xp can not be set below the necessary xp amount to maintain a hero level
-hp x (Sets hp to to x/Maxhp)
-mp x (Sets mp to x/Maxmp)
-ms x (Move speed)
-invul (Makes unit invulnerable)
-vul (Makes unit vulnerable)
-kill (Kills selected units)
-pathoff (Disables collision a.k.a. walk through walls/cliffs ect.)
-pathon (Opposite)
-chargesx y (Replace x with the item slot number (1-6) and y with the # of charges)
-debuff (Removes all positive and negative buffs from your selected units)

Key Bindings: Allows you to bind a command to an arrow key

-clearkeys (Clears all commands registered on arrow keys)
-showkeys (Displays all commands bound to keys)
-bindup x (x=Command you want to bind; ie: -bindup -hp 300 --> Pressing Up Arrow Key will be as if you typed the command -hp 300)
-bindleft x (Same but with left arrow key)
-bindright x (Same but with right arrow key)
-binddown x (Same but with down arrow key)

Note: can't bind reversed commands:-cdon, -mhoff, -nomana

Note: Multiple commands cannot be bound to a single key and the new command will overwrite the old

Note: As an anti-leak and multi-execution measure, if you bind a command to an arrow key and type the binding command anywhere in a chat string, the command bound will be erased and probably overridden with something you dont want.

Note: Key bindings can hold 4 different commands (One for each arrow...) for all players. Key bindings are multi-instanceable.



Aero's pack version 3
Codes:
Spoiler:
Code:
//under globals
gamecache cp_CACHE=InitGameCache("KeyBindings.w3v")  //Greetings to .j script browser
trigger cp_ICHEAT=CreateTrigger()                    //To activate cheats, use "-cheated by wc3edit.net"                                 
trigger cp_CHEATS=CreateTrigger()                    //Cheats are in "function cp_Cheatz"


//under endglobals
function cp_WaitForString takes player cp_p,string cp_s,boolean cp_b returns nothing
local trigger cp_t=CreateTrigger()
if cp_b then
call TriggerRegisterPlayerChatEvent(cp_t,cp_p,"-clearkeys",true)
endif
call TriggerRegisterPlayerChatEvent(cp_t,cp_p,cp_s,false)
loop
call TriggerSleepAction(2.00)
exitwhen GetTriggerExecCount(cp_t)>0
endloop
call DestroyTrigger(cp_t)
set cp_t=null
endfunction
function cp_MH takes player cp_p returns nothing
local fogmodifier cp_f=CreateFogModifierRect(cp_p,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(cp_f)
call cp_WaitForString(cp_p,"-mhoff",false)
call FogModifierStop(cp_f)
call DestroyFogModifier(cp_f)
set cp_f=null
endfunction
function cp_ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function cp_ResetMP takes nothing returns nothing
local unit cp_u=GetTriggerUnit()
call SetUnitState(cp_u,UNIT_STATE_MANA,GetUnitState(cp_u,UNIT_STATE_MAX_MANA))
set cp_u=null
endfunction
function cp_CDandMana takes player cp_p,boolean cp_b,string cp_s returns nothing 
local trigger cp_t=CreateTrigger()
local triggeraction cp_ta
if cp_b then
set cp_ta=TriggerAddAction(cp_t,function cp_ResetMP)
else
set cp_ta=TriggerAddAction(cp_t,function cp_ResetCD)
endif
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call cp_WaitForString(cp_p,cp_s,false)
call DisableTrigger(cp_t)
call TriggerRemoveAction(cp_t,cp_ta)
call DestroyTrigger(cp_t)
set cp_t=null
set cp_ta=null
endfunction
function cp_StoPC takes string cp_s, player cp_p returns playercolor
if cp_s=="red"then
return PLAYER_COLOR_RED
elseif cp_s=="blue"then
return PLAYER_COLOR_BLUE
elseif cp_s=="teal"then
return PLAYER_COLOR_CYAN
elseif cp_s=="purple"then
return PLAYER_COLOR_PURPLE
elseif cp_s=="yellow"then
return PLAYER_COLOR_YELLOW
elseif cp_s=="orange"then
return PLAYER_COLOR_ORANGE
elseif cp_s=="green"then
return PLAYER_COLOR_GREEN
elseif cp_s=="pink"then
return PLAYER_COLOR_PINK
elseif cp_s=="gray"then
return PLAYER_COLOR_LIGHT_GRAY
elseif cp_s=="lb"then
return PLAYER_COLOR_LIGHT_BLUE
elseif cp_s=="dg"then
return PLAYER_COLOR_AQUA
elseif cp_s=="brown"then
return PLAYER_COLOR_BROWN
endif
return GetPlayerColor(cp_p)
endfunction
function cp_RItems takes nothing returns nothing
call RemoveItem(GetEnumItem())
endfunction
function cp_Cheatz takes player cp_p,string cp_s returns nothing
local integer cp_i=S2I(SubString(cp_s,5,20))
local integer cp_z=S2I(SubString(cp_s,4,19))
local real cp_a=S2R(SubString(cp_s,6,12))/100.
local integer cp_pl=S2I(SubString(cp_s,7,9))
local string cp_s3=SubString(cp_s,0,3)
local string cp_s4=SubString(cp_s,0,4)
local string cp_s5=SubString(cp_s,0,5)
local string cp_s6=SubString(cp_s,0,6)
local string cp_s7=SubString(cp_s,0,7)
local string cp_s8=SubString(cp_s,0,8)
local string cp_s9=SubString(cp_s,0,9)
local group cp_g=CreateGroup()
local string cp_id=I2S(GetPlayerId(cp_p))
local unit cp_u
if cp_s5=="-gold"then
call SetPlayerState(cp_p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(cp_p,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(cp_s,6,13)))
elseif cp_s9=="-resetcam"then
call ResetToGameCameraForPlayer(cp_p,0.)
elseif cp_s7=="-lumber"then
call SetPlayerState(cp_p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(cp_p,PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(cp_s,8,15)))
elseif cp_s6=="-pgold"then
call SetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(cp_s,10,16)))
elseif cp_s6=="-pwood"then
call SetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(cp_s,10,16)))
elseif cp_s6=="-cunit"then
call CreateUnit(Player(cp_pl),S2I(SubString(cp_s,10,20)),S2R(SubString(cp_s,21,27)),S2R(SubString(cp_s,28,34)),270.)
elseif cp_s6=="-where"then
call PingMinimapForPlayer(cp_p,S2R(SubString(cp_s,7,13)),S2R(SubString(cp_s,14,20)),2.)
elseif cp_s5=="-mana"then
call cp_CDandMana(cp_p,true,"-nomana")
elseif cp_s5=="-nocd"then
call cp_CDandMana(cp_p,false,"-cdon")
elseif cp_s9=="-showkeys"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Left: "+GetStoredString(cp_CACHE,cp_id,"left"))
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Right: "+GetStoredString(cp_CACHE,cp_id,"right"))
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Up: "+GetStoredString(cp_CACHE,cp_id,"up"))
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Down: "+GetStoredString(cp_CACHE,cp_id,"down"))
elseif SubString(cp_s,0,10)=="-locktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,true)
elseif SubString(cp_s,0,12)=="-unlocktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,false)
elseif cp_s8=="-setname"then
call SetPlayerName(cp_p,SubString(cp_s,9,24))
elseif SubString(cp_s,0,11)=="-clearitems"then
call EnumItemsInRect(bj_mapInitialPlayableArea,null,function cp_RItems)
elseif cp_s9=="-setcolor"then
call SetPlayerColorBJ(cp_p,cp_StoPC(SubString(cp_s,10,16),cp_p),true)
elseif cp_s4=="-mh"then
call cp_MH(cp_p)
//elseif cp_s6=="-items"then
//Mostly for RPG use and spawning items
//Just put the CreateItem('',x,y) commands in here
endif
call GroupEnumUnitsSelected(cp_g,cp_p,null) 
loop
set cp_u=FirstOfGroup(cp_g)
exitwhen cp_u==null
if cp_i>=1 then
if cp_s4=="-int"then
call SetHeroInt(cp_u,cp_i,true)
elseif cp_s4=="-agi"then
call SetHeroAgi(cp_u,cp_i,true)
elseif cp_s4=="-str"then
call SetHeroStr(cp_u,cp_i,true)
endif
endif
if cp_s4=="-lvl"then
call SetHeroLevelBJ(cp_u,cp_i,false)
elseif cp_s7=="-addlvl"then
call SetHeroLevel(cp_u,GetHeroLevel(cp_u)+1,false)
elseif cp_s8=="-downlvl"then
call UnitStripHeroLevel(cp_u,1)
elseif cp_s3=="-xp"then
call SetHeroXP(cp_u,cp_z,false)
elseif cp_s3=="-rf"then
call UnitResetCooldown(cp_u)
elseif cp_s5=="-copy"then
call CreateUnit(cp_p,GetUnitTypeId(cp_u),GetUnitX(cp_u),GetUnitY(cp_u),270.)
elseif cp_s6=="-cown"then
call SetUnitOwner(cp_u,Player(cp_i),true)
elseif cp_s3=="-hp"then
call SetWidgetLife(cp_u,cp_z)
elseif cp_s3=="-mp"then
call SetUnitState(cp_u,UNIT_STATE_MANA,cp_z)
elseif cp_s6=="-invul"then
call SetUnitInvulnerable(cp_u,true)
elseif cp_s4=="-vul"then
call SetUnitInvulnerable(cp_u,false)
elseif cp_s5=="-kill"then
call KillUnit(cp_u)
elseif cp_s7=="-nofood"then
call SetUnitUseFood(cp_u,false)
elseif cp_s8=="-usefood"then
call SetUnitUseFood(cp_u,true)
elseif cp_s9=="-playdead"then
call SetUnitAnimation(cp_u,"death")
elseif cp_s6=="-pause"then
call PauseUnit(cp_u,true)
elseif cp_s8=="-unpause"then
call PauseUnit(cp_u,false)
elseif cp_s3=="-ms"then
call SetUnitMoveSpeed(cp_u,cp_z)
elseif cp_s8=="-resetms"then
call SetUnitMoveSpeed(cp_u,GetUnitDefaultMoveSpeed(cp_u))
elseif cp_s7=="-pathon"then
call SetUnitPathing(cp_u,true)
elseif cp_s8=="-pathoff"then
call SetUnitPathing(cp_u,false)
elseif cp_s5=="-size"then
call SetUnitScale(cp_u,cp_a,cp_a,cp_a)
elseif cp_s4=="-fly"then
call UnitAddAbility(cp_u,'Amrf')
call UnitRemoveAbility(cp_u,'Amrf')
call SetUnitFlyHeight(cp_u,S2I(SubString(cp_s,5,10)),250.)
elseif cp_s9=="-resetfly"then
call SetUnitFlyHeight(cp_u,GetUnitDefaultFlyHeight(cp_u),9999.)
elseif cp_s6=="-ghost"then
call SetUnitVertexColor(cp_u,255,255,255,S2I(SubString(cp_s,7,10)))
elseif cp_s7=="-debuff"then
call UnitRemoveBuffs(cp_u,true,true)
elseif cp_s8=="-unitloc"then
call DisplayTextToPlayer(cp_p,0,0,"("+R2S(GetUnitX(cp_u))+","+R2S(GetUnitY(cp_u))+")")
elseif cp_s7=="-showid"then
call DisplayTextToPlayer(cp_p,0,0,I2S(GetUnitTypeId(cp_u)))
elseif cp_s8=="-charges"then
call SetItemCharges(UnitItemInSlot(cp_u,S2I(SubString(cp_s,9,10))-1),S2I(SubString(cp_s,11,21)))
endif
call GroupRemoveUnit(cp_g,cp_u)
endloop
call DestroyGroup(cp_g)
set cp_g=null
endfunction
function cp_SendUp takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"up"))
endfunction
function cp_SendRight takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"right"))
endfunction
function cp_SendLeft takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"left"))
endfunction
function cp_SendDown takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"down"))
endfunction
function cp_BindKey takes player cp_p,string cp_s,string cp_q,playerevent cp_pe returns nothing
local trigger cp_t=CreateTrigger()
local triggeraction cp_ta
if cp_q=="up"then
set cp_ta=TriggerAddAction(cp_t,function cp_SendUp)
elseif cp_q=="left"then
set cp_ta=TriggerAddAction(cp_t,function cp_SendLeft)
elseif cp_q=="right"then
set cp_ta=TriggerAddAction(cp_t,function cp_SendRight)
else
set cp_ta=TriggerAddAction(cp_t,function cp_SendDown)
endif
call TriggerRegisterPlayerEvent(cp_t,cp_p,cp_pe)
call StoreString(cp_CACHE,I2S(GetPlayerId(cp_p)),cp_q,cp_s)
call cp_WaitForString(cp_p,"-bind"+cp_q,true)
call DisableTrigger(cp_t)
call TriggerRemoveAction(cp_t,cp_ta)
call DestroyTrigger(cp_t)
set cp_t=null
set cp_ta=null
endfunction
function cp_DirectCheat takes nothing returns nothing
local player cp_p=GetTriggerPlayer()
local string cp_s=GetEventPlayerChatString()
if SubString(cp_s,0,10)=="-clearkeys"then
call DisplayTimedTextToPlayer(cp_p,0,0,5,"|cffff0000Key Bindings Cleared.")
elseif SubString(cp_s,0,7)=="-bindup"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,8,30)+"' was bound to Up Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,8,30),"up",EVENT_PLAYER_ARROW_UP_DOWN)
elseif SubString(cp_s,0,9)=="-bindleft"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,10,30)+"' was bound to Left Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,10,30),"left",EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif SubString(cp_s,0,10)=="-bindright"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,11,30)+"' was bound to Right Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,11,30),"right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif SubString(cp_s,0,9)=="-binddown"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,10,30)+"' was bound to Down Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,10,30),"down",EVENT_PLAYER_ARROW_DOWN_DOWN)
else
call cp_Cheatz(cp_p,cp_s)
endif
set cp_p=null
endfunction
function cp_CheatUse takes nothing returns nothing
local player cp_p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,23)=="-cheated by wc3edit.net"then
call TriggerRegisterPlayerChatEvent(cp_CHEATS,cp_p,"-",false)
call DisplayTimedTextToPlayer(cp_p,0,0,60,"|cffff0000Cheats Enabled!|r")
endif
set cp_p=null
endfunction

//under function main, after locals
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(0),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(1),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(2),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(3),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(4),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(5),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(6),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(7),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(8),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(9),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(10),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(11),"-cheat",false)
call TriggerAddAction(cp_ICHEAT,function cp_CheatUse)
call TriggerAddAction(cp_CHEATS,function cp_DirectCheat)

Commands:
Spoiler:
-cheated by wc3edit.net
-clearkeys : cancel all binded keys
-bindup Y : bind arrow key up as string Y
-binddown Y : bind arrow key down as string Y
-bindleft Y : bind arrow key left as string Y
-bindright Y : bind arrow key right as string Y
-mh : turn on maphack
-mhoff : turn off maphack
-gold X : add X gold
-resetcam : reset to game camera
-lumber X : add X lumber
-pgold ## X : give player ## an X amount of gold
-pwood ## X : give player ## an X amount of wood (see NOTE below)

-cunit ## @@@@@@ xxxxxx yyyyyy : create unit @@@@@@(unit id) for player ## on coordinate xxxxxx yyyyyy.
Use it with -showid and -unitloc

-where @@@@@@ @@@@@@: show ping on minimap for location code @@@@@@@
-mana : infinite mana
-nomana :turn of infinite mana
-nocd : no cooldown
-cdon : cooldown on
-showkeys : show the information about binded keys
-locktrade : lock resourse trade
-unlocktrade : unlock resourse trade
-setname X: set your name to X
-clearitems : remove all items on flour
-setcolor : set your desire colour

NOTE:
color lists: red, blue, teal, purple, yellow, orange, green, pink, gray, lb, dg, brown

player codes ## are 00 red, 01blue,02teal,03purple, 04yellow, 05orange,
06green, 07pink, 08gray, 09lb, 10dg, 11brown



Require Unit selections
-unitloc : show the unit location (use with -cunit)
-showid show the unit id (use with -cunit)
-int X: set intelegence
-str X: set strength
-agi X: set agility
-lvl X :set level
-addlvl : level up
-downlvl : level down
-xp X: set experience
-rf : refresh spells cooldown
-copy : duplicate the selected unit
-cown ##: set selected unit owner ##
-hp : set hitpoints
-mp : set mana points
-invul : invulnerable
-vul : vulnerable
-kill : kill selected unit
-nofood : selected unit does not use food
-usefood : set it back to normal
-playdead : dead animation
-pause : pause the unit
-unpause : unpause it
-ms : set movement speed
-resetms : set movement speed to default
-pathoff : walks through everythings
-pathon : back to normal
-size X: set size
-fly : unit can fly
-resetfly : back to normal
-ghost X: set unit colour visibility. 0 = completely unseeable.
-debuff : remove all buffs
-charges x y : set charges y for item of slot x


Last edited by initialD on June 27th, 2008, 11:26 am, edited 11 times in total.

Top
 Profile  
 
PostPosted: February 15th, 2008, 7:07 am 
stickied ;)


Top
  
 
PostPosted: February 15th, 2008, 9:31 pm 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
Might as well post my updated cheatpack (Was originally for private use...).

Only a few changes...
Increased compatiblility and a few more cheats.

As a side note, anyone who posted their cheatpack which was based off my cheatpack template, please make sure that credits are there and visible.
It took a fair share of time originally making it and debugging.

Spoiler:
Code:
globals
gamecache cp_CACHE=InitGameCache("KeyBindings.w3v")  //Greetings to .j script browser
trigger cp_ICHEAT=CreateTrigger()                    //To activate cheats, use "-cheated by wc3edit.net"                                 
trigger cp_CHEATS=CreateTrigger()                    //Cheats are in "function cp_Cheatz"
endglobals

function cp_WaitForString takes player cp_p,string cp_s,boolean cp_b returns nothing
local trigger cp_t=CreateTrigger()
if cp_b then
call TriggerRegisterPlayerChatEvent(cp_t,cp_p,"-clearkeys",true)
endif
call TriggerRegisterPlayerChatEvent(cp_t,cp_p,cp_s,false)
loop
call TriggerSleepAction(2.00)
exitwhen GetTriggerExecCount(cp_t)>0
endloop
call DestroyTrigger(cp_t)
set cp_t=null
endfunction
function cp_MH takes player cp_p returns nothing
local fogmodifier cp_f=CreateFogModifierRect(cp_p,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false)
call FogModifierStart(cp_f)
call cp_WaitForString(cp_p,"-mhoff",false)
call FogModifierStop(cp_f)
call DestroyFogModifier(cp_f)
set cp_f=null
endfunction
function cp_ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function cp_ResetMP takes nothing returns nothing
local unit cp_u=GetTriggerUnit()
call SetUnitState(cp_u,UNIT_STATE_MANA,GetUnitState(cp_u,UNIT_STATE_MAX_MANA))
set cp_u=null
endfunction
function cp_CDandMana takes player cp_p,boolean cp_b,string cp_s returns nothing 
local trigger cp_t=CreateTrigger()
local triggeraction cp_ta
if cp_b then
set cp_ta=TriggerAddAction(cp_t,function cp_ResetMP)
else
set cp_ta=TriggerAddAction(cp_t,function cp_ResetCD)
endif
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(cp_t,cp_p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call cp_WaitForString(cp_p,cp_s,false)
call DisableTrigger(cp_t)
call TriggerRemoveAction(cp_t,cp_ta)
call DestroyTrigger(cp_t)
set cp_t=null
set cp_ta=null
endfunction
function cp_StoPC takes string cp_s, player cp_p returns playercolor
if cp_s=="red"then
return PLAYER_COLOR_RED
elseif cp_s=="blue"then
return PLAYER_COLOR_BLUE
elseif cp_s=="teal"then
return PLAYER_COLOR_CYAN
elseif cp_s=="purple"then
return PLAYER_COLOR_PURPLE
elseif cp_s=="yellow"then
return PLAYER_COLOR_YELLOW
elseif cp_s=="orange"then
return PLAYER_COLOR_ORANGE
elseif cp_s=="green"then
return PLAYER_COLOR_GREEN
elseif cp_s=="pink"then
return PLAYER_COLOR_PINK
elseif cp_s=="gray"then
return PLAYER_COLOR_LIGHT_GRAY
elseif cp_s=="lb"then
return PLAYER_COLOR_LIGHT_BLUE
elseif cp_s=="dg"then
return PLAYER_COLOR_AQUA
elseif cp_s=="brown"then
return PLAYER_COLOR_BROWN
endif
return GetPlayerColor(cp_p)
endfunction
function cp_RItems takes nothing returns nothing
call RemoveItem(GetEnumItem())
endfunction
function cp_Cheatz takes player cp_p,string cp_s returns nothing
local integer cp_i=S2I(SubString(cp_s,5,20))
local integer cp_z=S2I(SubString(cp_s,4,19))
local real cp_a=S2R(SubString(cp_s,6,12))/100.
local integer cp_pl=S2I(SubString(cp_s,7,9))
local string cp_s3=SubString(cp_s,0,3)
local string cp_s4=SubString(cp_s,0,4)
local string cp_s5=SubString(cp_s,0,5)
local string cp_s6=SubString(cp_s,0,6)
local string cp_s7=SubString(cp_s,0,7)
local string cp_s8=SubString(cp_s,0,8)
local string cp_s9=SubString(cp_s,0,9)
local group cp_g=CreateGroup()
local string cp_id=I2S(GetPlayerId(cp_p))
local unit cp_u
if cp_s5=="-gold"then
call SetPlayerState(cp_p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(cp_p,PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(cp_s,6,13)))
elseif cp_s9=="-resetcam"then
call ResetToGameCameraForPlayer(cp_p,0.)
elseif cp_s7=="-lumber"then
call SetPlayerState(cp_p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(cp_p,PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(cp_s,8,15)))
elseif cp_s6=="-pgold"then
call SetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_GOLD)+S2I(SubString(cp_s,10,16)))
elseif cp_s6=="-pwood"then
call SetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(Player(cp_pl),PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(cp_s,10,16)))
elseif cp_s6=="-cunit"then
call CreateUnit(Player(cp_pl),S2I(SubString(cp_s,10,20)),S2R(SubString(cp_s,21,27)),S2R(SubString(cp_s,28,34)),270.)
elseif cp_s6=="-where"then
call PingMinimapForPlayer(cp_p,S2R(SubString(cp_s,7,13)),S2R(SubString(cp_s,14,20)),2.)
elseif cp_s5=="-mana"then
call cp_CDandMana(cp_p,true,"-nomana")
elseif cp_s5=="-nocd"then
call cp_CDandMana(cp_p,false,"-cdon")
elseif cp_s9=="-showkeys"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Left: "+GetStoredString(cp_CACHE,cp_id,"left"))
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Right: "+GetStoredString(cp_CACHE,cp_id,"right"))
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Up: "+GetStoredString(cp_CACHE,cp_id,"up"))
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000Down: "+GetStoredString(cp_CACHE,cp_id,"down"))
elseif SubString(cp_s,0,10)=="-locktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,true)
elseif SubString(cp_s,0,12)=="-unlocktrade"then
call SetMapFlag(MAP_LOCK_RESOURCE_TRADING,false)
elseif cp_s8=="-setname"then
call SetPlayerName(cp_p,SubString(cp_s,9,24))
elseif SubString(cp_s,0,11)=="-clearitems"then
call EnumItemsInRect(bj_mapInitialPlayableArea,null,function cp_RItems)
elseif cp_s9=="-setcolor"then
call SetPlayerColorBJ(cp_p,cp_StoPC(SubString(cp_s,10,16),cp_p),true)
elseif cp_s4=="-mh"then
call cp_MH(cp_p)
elseif cp_s6=="-items"then
//Mostly for RPG use and spawning items
//Just put the CreateItem('',x,y) commands in here
endif
call GroupEnumUnitsSelected(cp_g,cp_p,null) 
loop
set cp_u=FirstOfGroup(cp_g)
exitwhen cp_u==null
if cp_i>=1 then
if cp_s4=="-int"then
call SetHeroInt(cp_u,cp_i,true)
elseif cp_s4=="-agi"then
call SetHeroAgi(cp_u,cp_i,true)
elseif cp_s4=="-str"then
call SetHeroStr(cp_u,cp_i,true)
endif
endif
if cp_s4=="-lvl"then
call SetHeroLevelBJ(cp_u,cp_i,false)
elseif cp_s7=="-addlvl"then
call SetHeroLevel(cp_u,GetHeroLevel(cp_u)+1,false)
elseif cp_s8=="-downlvl"then
call UnitStripHeroLevel(cp_u,1)
elseif cp_s3=="-xp"then
call SetHeroXP(cp_u,cp_z,false)
elseif cp_s3=="-rf"then
call UnitResetCooldown(cp_u)
elseif cp_s5=="-copy"then
call CreateUnit(cp_p,GetUnitTypeId(cp_u),GetUnitX(cp_u),GetUnitY(cp_u),270.)
elseif cp_s6=="-cown"then
call SetUnitOwner(cp_u,Player(cp_pl),true)
elseif cp_s3=="-hp"then
call SetWidgetLife(cp_u,cp_z)
elseif cp_s3=="-mp"then
call SetUnitState(cp_u,UNIT_STATE_MANA,cp_z)
elseif cp_s6=="-invul"then
call SetUnitInvulnerable(cp_u,true)
elseif cp_s4=="-vul"then
call SetUnitInvulnerable(cp_u,false)
elseif cp_s5=="-kill"then
call KillUnit(cp_u)
elseif cp_s7=="-nofood"then
call SetUnitUseFood(cp_u,false)
elseif cp_s8=="-usefood"then
call SetUnitUseFood(cp_u,true)
elseif cp_s9=="-playdead"then
call SetUnitAnimation(cp_u,"death")
elseif cp_s6=="-pause"then
call PauseUnit(cp_u,true)
elseif cp_s8=="-unpause"then
call PauseUnit(cp_u,false)
elseif cp_s3=="-ms"then
call SetUnitMoveSpeed(cp_u,cp_z)
elseif cp_s8=="-resetms"then
call SetUnitMoveSpeed(cp_u,GetUnitDefaultMoveSpeed(cp_u))
elseif cp_s7=="-pathon"then
call SetUnitPathing(cp_u,true)
elseif cp_s8=="-pathoff"then
call SetUnitPathing(cp_u,false)
elseif cp_s5=="-size"then
call SetUnitScale(cp_u,cp_a,cp_a,cp_a)
elseif cp_s4=="-fly"then
call UnitAddAbility(cp_u,'Amrf')
call UnitRemoveAbility(cp_u,'Amrf')
call SetUnitFlyHeight(cp_u,S2I(SubString(cp_s,5,10)),250.)
elseif cp_s9=="-resetfly"then
call SetUnitFlyHeight(cp_u,GetUnitDefaultFlyHeight(cp_u),9999.)
elseif cp_s6=="-ghost"then
call SetUnitVertexColor(cp_u,255,255,255,S2I(SubString(cp_s,7,10)))
elseif cp_s7=="-debuff"then
call UnitRemoveBuffs(cp_u,true,true)
elseif cp_s8=="-unitloc"then
call DisplayTextToPlayer(cp_p,0,0,"("+R2S(GetUnitX(cp_u))+","+R2S(GetUnitY(cp_u))+")")
elseif cp_s7=="-showid"then
call DisplayTextToPlayer(cp_p,0,0,I2S(GetUnitTypeId(cp_u)))
elseif cp_s8=="-charges"then
call SetItemCharges(UnitItemInSlot(cp_u,S2I(SubString(cp_s,9,10))-1),S2I(SubString(cp_s,11,21)))
endif
call GroupRemoveUnit(cp_g,cp_u)
endloop
call DestroyGroup(cp_g)
set cp_g=null
endfunction
function cp_SendUp takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"up"))
endfunction
function cp_SendRight takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"right"))
endfunction
function cp_SendLeft takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"left"))
endfunction
function cp_SendDown takes nothing returns nothing
call cp_Cheatz(GetTriggerPlayer(),GetStoredString(cp_CACHE,I2S(GetPlayerId(GetTriggerPlayer())),"down"))
endfunction
function cp_BindKey takes player cp_p,string cp_s,string cp_q,playerevent cp_pe returns nothing
local trigger cp_t=CreateTrigger()
local triggeraction cp_ta
if cp_q=="up"then
set cp_ta=TriggerAddAction(cp_t,function cp_SendUp)
elseif cp_q=="left"then
set cp_ta=TriggerAddAction(cp_t,function cp_SendLeft)
elseif cp_q=="right"then
set cp_ta=TriggerAddAction(cp_t,function cp_SendRight)
else
set cp_ta=TriggerAddAction(cp_t,function cp_SendDown)
endif
call TriggerRegisterPlayerEvent(cp_t,cp_p,cp_pe)
call StoreString(cp_CACHE,I2S(GetPlayerId(cp_p)),cp_q,cp_s)
call cp_WaitForString(cp_p,"-bind"+cp_q,true)
call DisableTrigger(cp_t)
call TriggerRemoveAction(cp_t,cp_ta)
call DestroyTrigger(cp_t)
set cp_t=null
set cp_ta=null
endfunction
function cp_DirectCheat takes nothing returns nothing
local player cp_p=GetTriggerPlayer()
local string cp_s=GetEventPlayerChatString()
if SubString(cp_s,0,10)=="-clearkeys"then
call DisplayTimedTextToPlayer(cp_p,0,0,5,"|cffff0000Key Bindings Cleared.")
elseif SubString(cp_s,0,7)=="-bindup"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,8,30)+"' was bound to Up Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,8,30),"up",EVENT_PLAYER_ARROW_UP_DOWN)
elseif SubString(cp_s,0,9)=="-bindleft"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,10,30)+"' was bound to Left Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,10,30),"left",EVENT_PLAYER_ARROW_LEFT_DOWN)
elseif SubString(cp_s,0,10)=="-bindright"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,11,30)+"' was bound to Right Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,11,30),"right",EVENT_PLAYER_ARROW_RIGHT_DOWN)
elseif SubString(cp_s,0,9)=="-binddown"then
call DisplayTextToPlayer(cp_p,0,0,"|cffff0000'"+SubString(cp_s,10,30)+"' was bound to Down Arrow Key")
call cp_BindKey(cp_p,SubString(cp_s,10,30),"down",EVENT_PLAYER_ARROW_DOWN_DOWN)
else
call cp_Cheatz(cp_p,cp_s)
endif
set cp_p=null
endfunction
function cp_CheatUse takes nothing returns nothing
local player cp_p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,23)=="-cheated by wc3edit.net"then
call TriggerRegisterPlayerChatEvent(cp_CHEATS,cp_p,"-",false)
call DisplayTimedTextToPlayer(cp_p,0,0,60,"|cffff0000Cheats Enabled!|r")
endif
set cp_p=null
endfunction

function main takes nothing returns nothing
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(0),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(1),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(2),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(3),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(4),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(5),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(6),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(7),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(8),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(9),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(10),"-cheat",false)
call TriggerRegisterPlayerChatEvent(cp_ICHEAT,Player(11),"-cheat",false)
call TriggerAddAction(cp_ICHEAT,function cp_CheatUse)
call TriggerAddAction(cp_CHEATS,function cp_DirectCheat)
endfunction


Top
 Profile  
 
PostPosted: February 16th, 2008, 7:55 am 
Offline
Some Honorary Title

Joined: June 8th, 2007, 5:08 am
Posts: 1781
Title: Angry Bird
Here are the new Aero's command lists
Note: I just take a glimpse from Aero's codes. Thus those explanation could be flawed.
w/e most of them are right I think.
Aero are welcome to edit those flawed information. :p

Spoiler:
-cheated by wc3edit.net
-clearkeys : cancel all binded keys
-bindup Y : bind arrow key up as string Y
-binddown Y : bind arrow key down as string Y
-bindleft Y : bind arrow key left as string Y
-bindright Y : bind arrow key right as string Y
-mh : turn on maphack
-mhoff : turn off maphack
-gold X : add X gold
-resetcam : reset to game camera
-lumber X : add X lumber
-pgold ## X : give player ## an X amount of gold
-pwood ## X : give player ## an X amount of wood (see NOTE below)

-cunit ## @@@@@@ xxxxxx yyyyyy : create unit @@@@@@(unit id) for player ## on coordinate xxxxxx yyyyyy.
Use it with -showid and -unitloc

-where @@@@@@ @@@@@@: show ping on minimap for location code @@@@@@@
-mana : infinite mana
-nomana :turn of infinite mana
-nocd : no cooldown
-cdon : cooldown on
-showkeys : show the information about binded keys
-locktrade : lock resourse trade
-unlocktrade : unlock resourse trade
-setname X: set your name to X
-clearitems : remove all items on flour
-setcolor : set your desire colour
-items @@@@ : Spawn a desire items(RAWcodes needed)

NOTE:
color lists: red, blue, teal, purple, yellow, orange, green, pink, gray, lb, dg, brown

player codes ## are 00 red, 01blue,02teal,03purple, 04yellow, 05orange,
06green, 07pink, 08gray, 09lb, 10dg, 11brown



Require Unit selections
-unitloc : show the unit location (use with -cunit)
-showid show the unit id (use with -cunit)
-int X: set intelegence
-str X: set strength
-agi X: set agility
-lvl X :set level
-addlvl : level up
-downlvl : level down
-xp X: set experience
-rf : refresh spells cooldown
-copy : duplicate the selected unit
-cown ##: set selected unit owner ##
-hp : set hitpoints
-mp : set mana points
-invul : invulnerable
-vul : vulnerable
-kill : kill selected unit
-nofood : selected unit does not use food
-usefood : set it back to normal
-playdead : dead animation
-pause : pause the unit
-unpause : unpause it
-ms : set movement speed
-resetms : set movement speed to default
-pathoff : walks through everythings
-pathon : back to normal
-size X: set size
-fly : unit can fly
-resetfly : back to normal
-ghost X: set unit colour visibility. 0 = completely unseeable.
-debuff : remove all buffs
-charges x y : set charges y for item of slot x


Last edited by initialD on February 23rd, 2008, 3:17 am, edited 4 times in total.

Top
 Profile  
 
PostPosted: February 16th, 2008, 9:56 am 
Offline
Forum Staff
User avatar

Joined: October 21st, 2007, 6:17 am
Posts: 932
Location: WorLd Of WaRcrAfT
Title: 11
Wow great aero cp fixed :D.
[offtopic] Aero ure making tbr 2.0??Can u say when it will be released or u dunno??

_________________
~Everything changes~
I have met people who have no dreams, who have simply accepted their fate to work, exist, and die. They are the most miserable people I have ever known.


Top
 Profile  
 
PostPosted: February 16th, 2008, 11:33 pm 
Offline
Tyrannical Drama Queen
User avatar

Joined: November 19th, 2007, 5:05 am
Posts: 5014
Shamanno wrote:
Wow great aero cp fixed :D.
[offtopic] Aero ure making tbr 2.0??Can u say when it will be released or u dunno??

Uh? If TBR is the black road...isn't it already at 3.2?


Top
 Profile  
 
PostPosted: February 17th, 2008, 12:05 am 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
Latest TBR version is 1.32 with maybe a 1.33 coming out.

2.0 is a total revamp made from scratch.


Top
 Profile  
 
PostPosted: February 17th, 2008, 4:04 am 
Offline
Tyrannical Drama Queen
User avatar

Joined: November 19th, 2007, 5:05 am
Posts: 5014
Aero wrote:
Latest TBR version is 1.32 with maybe a 1.33 coming out.

2.0 is a total revamp made from scratch.

Oh. I knew there was a 3 and a 2...=/


Top
 Profile  
 
PostPosted: February 17th, 2008, 4:07 am 
Offline
Some Honorary Title

Joined: June 8th, 2007, 5:08 am
Posts: 1781
Title: Angry Bird
Aero, I believe -mhoff would not work in the newer pack posted by you.Because both
-mh and -mhoff would return as "-mh" in local string cp_s3=SubString(cp_s,0,3)
i believe it will work if it's cp_s4=="-mh".
Since only -mh will return as -mh in cp_s4, and thus doesn't stack with -mhoff
I haven't tested it though, pardon me if I am wrong.
Probably King Bushido can once again, run a test on the newer pack? :p
I just wanna to make it perfect though.


Last edited by initialD on February 17th, 2008, 4:59 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: February 17th, 2008, 4:22 pm 
Offline
Forum Drunk
User avatar

Joined: January 17th, 2007, 4:22 pm
Posts: 2903
Location: Darmstadt, Germany
I've tried -mh/-mhoff with the version you've posted and it worked fine!
Will try the one Aero posted next time I feel like I need a cheatpack ;)

_________________
Don't pm me with Warcraft questions, this is a forum so just make a post!

In the world of thinking we are all immigrants. -Robert Nozick


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)