qweasd011's cheatpack

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

qweasd011's cheatpack

Post by qweasd011 »

Hello now i created my cheatpack it has only few commands thx for hillo for telling me how XD
i think you know how to import cheats at JJ's tutorial but here it is
EDIT:
hmm sorry for the errors XD
P/S "-999" is my command it sets your char to max level :D

[spoiler=under globals]trigger ICHEAT=CreateTrigger()
trigger CHEATS=CreateTrigger()[/spoiler]


[spoiler=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,7)=="-wc3edit.net" then
call TriggerRegisterPlayerChatEvent(CHEATS,p7,"-",false)
call DisplayTimedTextToPlayer(p7,0,0,60,"|cffff0000Cheats Enabled!|r")
endif
set p7=null
endfunction[/spoiler]


[spoiler=under function main]local integer qaz7=0
loop
exitwhen qaz7>11
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(qaz7),"-wc3edit.net",false)
set qaz7=qaz7+1
endloop
call TriggerAddAction(ICHEAT,function CheatUse)
call TriggerAddAction(CHEATS,function Cheatz)[/spoiler]


EDIT POST: WHEN DONE IN -999
Last edited by qweasd011 on May 20th, 2009, 5:50 am, edited 1 time in total.
Image
Keskia
Junior Member
Posts: 28
Joined: August 6th, 2007, 2:01 am

Re: qweasd011's cheatpack

Post by Keskia »

I don't like the names of commads... too complicate (why not just -str, -agi, -int, ... ?)

but -doctor seems to be really cool
rapt3r
Newcomer
Posts: 14
Joined: May 12th, 2009, 4:07 am
Title: http://bg-ws.tk
Location: http://bg-ws.tk

Re: qweasd011's cheatpack

Post by rapt3r »

Great lol i was about to trim done jjs CP but this does it for me lol
Erroz Lots of em >.>
User avatar
Senethior459
Forum Staff
Posts: 2619
Joined: June 2nd, 2007, 6:53 pm
Title: I Just Lost the Game

Re: qweasd011's cheatpack

Post by Senethior459 »

Funny, but you seem to have taken JJ's cheatpack, renamed some commands and removed some functions, and called it your own...
You didn't even change the limits! Some of these commands won't work at all! Look at this:

Code: Select all

elseif SubString(s7,0,7)=="-lumberjack " then
call SetPlayerState(p7,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p7,PLAYER_STATE_RESOURCE_LUMBER)+S2I(SubString(s7,8,15)))

See the (s7,0,7) part? That means it's looking at string s7, and if the characters from character 0 through character 7 match "-lumberjack " then it adds the amount of lumber that they type after it. Except that -lumberjack, with the space after it, is 11 characters. Well, see the part at the end of this little snippet? (s7,8,15)? This code is setting player p7's lumber to (player p7's lumber)+(whatever they typed after -lumberjack). That s7,8,15 is checking for what they type after -lumberjack. However, it's checking characters 8 through 15 of string s7. You've got a problem there, because it's trying to add something. You can't add "ack 542" gold to your current gold. But that's what it would detect, because -lumberjack is longer than -lumber, yet you have it checking the characters that would be correct if it was still -lumber. If you don't change the limits, you're going to have errors everywhere when you try to use this.

-doctor is -autoh in JJ's cheatpack, and they are -str, -agi, and -int in the original.
My Warcraft III Tool Collection
If you want to chat/game with me:
Blizzard: Senethior459#1962
Discord: Kyle#7409
Steam: Spacekidkyle
rapt3r
Newcomer
Posts: 14
Joined: May 12th, 2009, 4:07 am
Title: http://bg-ws.tk
Location: http://bg-ws.tk

Re: qweasd011's cheatpack

Post by rapt3r »

not to mention trying to put them into a map gives errors
initialD
Some Honorary Title
Posts: 1713
Joined: June 8th, 2007, 5:08 am
Title: Angry Bird

Re: qweasd011's cheatpack

Post by initialD »

you should have at least tested it a few times before you release it.
Now go fix your cp. Good luck. 8)
User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Re: qweasd011's cheatpack

Post by qweasd011 »

Well, Okay, I'll remove -doctor and -doctoroff and remove -lists I'll add them when i update them
PS: ill change them to natural
Image
User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Re: qweasd011's cheatpack

Post by qweasd011 »

Done it works

[spoiler=under globals]trigger ICHEAT=CreateTrigger()
trigger CHEATS=CreateTrigger()[/spoiler]

[spoiler=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)=="-999" then
call AddHeroXP(u7,999999999999,true)
elseif SubString(s7,0,5)=="-tele"then
call Tele(u7,"-note")
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,7)=="-cheats" then
call TriggerRegisterPlayerChatEvent(CHEATS,p7,"-",false)
call DisplayTimedTextToPlayer(p7,0,0,60,"|cffff0000Cheats Enabled!|r")
endif
set p7=null
endfunction[/spoiler]

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

[spoiler=commands]"-cheats" 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
-999
-tele
x = add amount here![/spoiler]
Image
rapt3r
Newcomer
Posts: 14
Joined: May 12th, 2009, 4:07 am
Title: http://bg-ws.tk
Location: http://bg-ws.tk

Re: qweasd011's cheatpack

Post by rapt3r »

you could make it easier to change the CP Activator if you made a global string so then instead of changing it from the functions you can change it on the very first CnP
User avatar
qweasd011
Forum Addict
Posts: 451
Joined: November 21st, 2008, 9:36 am
Title: Coleen!

Re: qweasd011's cheatpack

Post by qweasd011 »

it makes the activator secret...
Image