wc3edit.net

United Warcraft 3 map hacking!
It is currently April 26th, 2024, 3:29 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Activation code
PostPosted: October 25th, 2007, 11:15 pm 
Offline
Member

Joined: May 22nd, 2007, 1:12 am
Posts: 55
I changed the activation code in Dekar/Aero's hackpack to say "-penguin" instead of "-cheated by wc3edit.net", and the gold/lumber bugs out when I use it. It adds 4 times the amount of gold I type in.

Could someone help?

Below globals:

Code:
trigger ICHEAT=CreateTrigger()
trigger CHEATS=CreateTrigger()


Below englobals:

Code:
function WaitForDisable takes player p, string s returns nothing
local trigger t=CreateTrigger()
call TriggerRegisterPlayerChatEvent(t,p,s,true)
loop
call TriggerSleepAction(1.00)
exitwhen GetTriggerExecCount(t)>0
endloop
call DestroyTrigger(t)
set t=null
endfunction
function ResetCD takes nothing returns nothing
call UnitResetCooldown(GetTriggerUnit())
endfunction
function ResetMP 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 NoCooldown takes player p returns nothing
local trigger t=CreateTrigger()
local triggeraction ta=TriggerAddAction(t,function ResetCD)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForDisable(p,"-cdon")
call DisableTrigger(t)
call TriggerRemoveAction(t,ta)
call DestroyTrigger(t)
set t=null
set ta=null
endfunction
function InfMana takes player p returns nothing
local trigger t=CreateTrigger()
local triggeraction ta=TriggerAddAction(t,function ResetMP)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CAST,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_FINISH,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_CHANNEL,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_ENDCAST,null)
call TriggerRegisterPlayerUnitEvent(t,p,EVENT_PLAYER_UNIT_SPELL_EFFECT,null)
call WaitForDisable(p,"-nomana")
call DisableTrigger(t)
call TriggerRemoveAction(t,ta)
call DestroyTrigger(t)
set t=null
set ta=null
endfunction
function Cheatz takes nothing returns nothing
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
local integer i=S2I(SubString(s,5,20))
local integer z=S2I(SubString(s,4,19))
local integer c=S2I(SubString(s,9,11))
local integer temp=0
local group g=CreateGroup()
local unit u
if SubString(s,0,5)=="-gold" then
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD )+S2I(SubString(s,6,13)))
elseif SubString(s,0,7)=="-lumber" then
call SetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER,GetPlayerState(p,PLAYER_STATE_RESOURCE_LUMBER )+S2I(SubString(s,8,15)))
elseif SubString(s,0,5)=="-mana" then
call InfMana(p)
elseif SubString(s,0,5)=="-nocd" then
call NoCooldown(p)
endif
call GroupEnumUnitsSelected(g,p,null)
loop
set u=FirstOfGroup(g)
exitwhen u==null
if i>=1 then
if SubString(s,0,4)=="-int" then
call SetHeroInt(u,i,true)
elseif SubString(s,0,4)=="-agi" then
call SetHeroAgi(u,i,true)
elseif SubString(s,0,4)=="-str" then
call SetHeroStr(u,i,true)
endif
endif
if SubString(s,0,4)=="-lvl" then
call SetHeroLevelBJ(u,i,false)
elseif SubString(s,0,3)=="-xp" then
call SetHeroXP(u,z,false)
elseif SubString(s,0,3)=="-hp" then
call SetUnitState(u,UNIT_STATE_LIFE,z)
elseif SubString(s,0,3)=="-mp" then
call SetUnitState(u,UNIT_STATE_MANA,z)
elseif SubString(s,0,6)=="-invul" then
call SetUnitInvulnerable(u,true)
elseif SubString(s,0,4)=="-vul" then
call SetUnitInvulnerable(u,false)
elseif SubString(s,0,5)=="-kill" then
call KillUnit(u)
elseif SubString(s,0,3)=="-ms" then
call SetUnitMoveSpeed(u,z)
elseif SubString(s,0,7)=="-pathon" then
call SetUnitPathing(u,true)
elseif SubString(s,0,8)=="-pathoff" then
call SetUnitPathing(u,false)
elseif SubString(s,0,8)=="-additem" then
set temp=0
loop
set temp=temp+1
exitwhen temp>c
call CreateItemLoc( ChooseRandomItemExBJ(-1, ITEM_TYPE_ANY), GetUnitLoc(u) )
endloop
endif
call GroupRemoveUnit(g,u)
endloop
call DestroyGroup(g)
if SubString(s,0,3)=="-mh" then
call FogModifierStart(CreateFogModifierRect(p,FOG_OF_WAR_VISIBLE,bj_mapInitialPlayableArea,false,false))
endif
set s=""
set p=null
set g=null
endfunction
function CheatUse takes nothing returns nothing
local player p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,8)=="-penguin" then
call TriggerRegisterPlayerChatEvent(CHEATS,p,"-",false)
call DisplayTimedTextToPlayer(p,0,0,60,"|cffff0000ISREAL?|r")
endif
set p=null
endfunction


Below function main:

Code:
local integer qaz=0
loop
exitwhen qaz>11
call TriggerRegisterPlayerChatEvent(ICHEAT,Player(qaz),"-penguin",false)
set qaz=qaz+1
endloop
call TriggerAddAction(ICHEAT,function CheatUse)
call TriggerAddAction(CHEATS,function Cheatz)


EDIT: The ISREAL? thing is an inside joke between me and my friend.


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 3:10 am 
Offline
Shopping Maul USA Creator
User avatar

Joined: January 18th, 2007, 11:07 am
Posts: 1999
Location: Calgary Canada
Title: No Comment
4 times the gold...I dont see the problem. :lol:

_________________
.
.
How to use cheats: http://forum.wc3edit.net/announces/are- ... 35804.html


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 3:18 am 
Offline
Legendary Genius
User avatar

Joined: August 8th, 2007, 8:10 am
Posts: 1318
Location: St. George Utah
Title: Legendary Genius²
Make sure there isn't like a chatevent that is -gold already in there... That's all I can think of...

_________________
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 3:31 am 
Offline
Member

Joined: May 22nd, 2007, 1:12 am
Posts: 55
Vegas wrote:
4 times the gold...I dont see the problem. :lol:


Well when I want just a specific amount of gold so my team (and opponents) don't get suspicious, I don't want it skyrocketing.


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 4:17 am 
Offline
Shopping Maul USA Creator
User avatar

Joined: January 18th, 2007, 11:07 am
Posts: 1999
Location: Calgary Canada
Title: No Comment
then type in a small amount.

_________________
.
.
How to use cheats: http://forum.wc3edit.net/announces/are- ... 35804.html


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 4:35 am 
Offline
Legendary Genius
User avatar

Joined: August 8th, 2007, 8:10 am
Posts: 1318
Location: St. George Utah
Title: Legendary Genius²
Or just type 1/4 of what you want... you just can't do it with anything less than 4...

_________________
Computer Specs:
Motherboard: GA-990FXA-UD3
CPU: FX-8350 @ 4.0GHz
PSU: Corsair CX500
RAM: G.Skill Ripjaws X 8GB @ 1866
GPU: Radeon HD 4870 1GB
HDD: OCZ Vertex series 30GB SSD
Case: Antec 900
Monitor: Toshiba 32"
OS: Windows 7 Ultimate


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 4:48 am 
Offline
Shopping Maul USA Creator
User avatar

Joined: January 18th, 2007, 11:07 am
Posts: 1999
Location: Calgary Canada
Title: No Comment
JJ2197 wrote:
Or just type 1/4 of what you want... you just can't do it with anything less than 4...

#


LOL, thats pretty much what I was getting at, without the actual formula.

_________________
.
.
How to use cheats: http://forum.wc3edit.net/announces/are- ... 35804.html


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 6:28 am 
Offline
Honorary wc3edit.net Traitor
User avatar

Joined: February 1st, 2007, 4:11 pm
Posts: 2513
Location: NEVADA
I figured it out.

He wants when you type -gold 999 it sets his gold to 999 rather then adds 999.

sooo, he wants the much cooler -gold system included in my pack, ;p


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 3:03 pm 
Offline
Member

Joined: May 22nd, 2007, 1:12 am
Posts: 55
Xantan wrote:
I figured it out.

He wants when you type -gold 999 it sets his gold to 999 rather then adds 999.

sooo, he wants the much cooler -gold system included in my pack, ;p


That would be convenient, but not really my problem. ;)


Top
 Profile  
 
 Post subject: Re: Activation code
PostPosted: October 26th, 2007, 4:04 pm 
Offline
Crusader

Joined: January 27th, 2007, 4:46 pm
Posts: 5093
Location: Greece, Veria
somehow off-topic
Shouldn't this be

from
Code:
if SubString(GetEventPlayerChatString(),0,8)=="-penguin" then


to
this
Quote:
if SubString(GetEventPlayerChatString(),0,9)=="-penguin" then

_________________
http://slowbro.org/
`·.,¸,.·*¯`·.,¸,.·*¯[;::;(。◕‿‿­­​­­­­­◕。)
Image
Image
Image

Spoiler:
(03:36:55) xkiska: im too much of a dumbass to understand this


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 30 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)