adding gold/lumber cheats to any map in 3 easy steps!

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

adding gold/lumber cheats to any map in 3 easy steps!

Post by Dekar »

*needed tools*

if you follow my steps it should work without any problems!
so please give credits!


part one

youll need mpq recover and mpq master
first of all use mpq-recover to get a listfile for your map
and save it in the listfiles directory of mpq master.
now open your map using mpq master
and load your map
using your listfile (and the other ones already in the directory).
there may be 2 cases now...
1st one is, theres a file named war3map.j
then just extract it!
2nd one is, theres no war3map.j but a folder named
Scripts.
go into this folder and extract the war3map.j which is inside.

part two

open the extracted war3map.j with JassCraft or your favourite editor. (dont use wordpad!)
during reading the first lines you should be able to find globals,
scroll down until you find something like trigger (xy)
( (xy) can be anything)
now add the following line (just place it between other triggers):

Code: Select all

trigger gg_trg_blubb=null
go on searching for endfunction
and add the following under it:

Code: Select all

function Trig_blubb_Actions takes nothing returns nothing
    call AdjustPlayerStateBJ( 1000, GetTriggerPlayer(), PLAYER_STATE_RESOURCE_GOLD )
endfunction
function InitTrig_blubb takes nothing returns nothing
    set gg_trg_blubb = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(12), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(11), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(10), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(9), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(8), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(7), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(6), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(5), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(4), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(3), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(2), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(1), "-cheat", true )
    call TriggerRegisterPlayerChatEvent( gg_trg_blubb, Player(0), "-cheat", true )
    call TriggerAddAction( gg_trg_blubb, function Trig_blubb_Actions )
endfunction
(you can change PLAYER_STATE_RESOURCE_GOLD to PLAYER_STATE_RESOURCE_LUMBER
guess what it changes ;) )

now search for function main
and look for a line starting with call
now add:

Code: Select all

call InitTrig_blubb(  )
under it.
just save the file!

part three

open the map again (using mpq master and the listfile)
now delete (attributes) if its there
and override the old war3map.j using your new one.
grats, you are done!
you can add gold (lumber) by chatting "-cheat" anytime during game!

greets Dekar

[EDIT by Aero --> Shouldn't it be...]

Code: Select all

function GoldCheat takes nothing returns nothing
local player p=GetTriggerPlayer()
call SetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(p,PLAYER_STATE_RESOURCE_GOLD)+1000)
set p=null
endfunction
 
function InitTrig_blubb takes nothing returns nothing 
local trigger t=CreateTrigger()
local integer i=0
loop
exitwhen i>12
call TriggerRegisterPlayerChatEvent(t,Player(i),"-cheat",true)
set i=i+1
endloop
call TriggerAddAction(t,function GoldCheat)
call DestroyTrigger(t)
set t=null 
endfunction
Last edited by Dekar on February 21st, 2007, 4:24 pm, edited 3 times in total.
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
User avatar
Kalle
The Legendary Near-bee - Obey Me Or Die!
Posts: 413
Joined: January 18th, 2007, 2:47 pm
Title: Turkey King
Location: Germany

Post by Kalle »

thx :D
That helped me a lot 8)
I started looking at all this map deprotect and map protect stuff (not that I cheat or so :D )
I wanna see if I can do stuff like that too...
For me, it looks kind of complicated but for that kind of stuff this forum is here right? :D

mfg, Kalle
Good sex is like a good bridge. If you don't have a good partner, you'd better have a good hand. - Mae West
Me, as a perfect example, is telling YOU, that you don't have to take any part in the Map-Cheating/Hacking department to become a Super-Mod (except the Near-Bee part)!
hamster
Newcomer
Posts: 4
Joined: January 27th, 2007, 2:48 pm

Post by hamster »

how do you enable single player?
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Post by Dekar »

stop spamming my forum!
enable singleplayer is custom for every map!
i cant write a general tutorial for this!
you need to learn programming jass!

greets Dekar
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
hamster
Newcomer
Posts: 4
Joined: January 27th, 2007, 2:48 pm

Post by hamster »

im not spamming. ty for answer.
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Post by Dekar »

this thread is just about this cheating method and ill make other
tutorials in future! so dont ask about other ways of cheating here!

greets Dekar
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
User avatar
Kalle
The Legendary Near-bee - Obey Me Or Die!
Posts: 413
Joined: January 18th, 2007, 2:47 pm
Title: Turkey King
Location: Germany

Post by Kalle »

I edited it...evil Dekar :D

Kalle

PS: I won't do that for ya anymore :D
PPS: Then do as ya wish :D...
Last edited by Kalle on January 28th, 2007, 3:51 pm, edited 1 time in total.
Good sex is like a good bridge. If you don't have a good partner, you'd better have a good hand. - Mae West
Me, as a perfect example, is telling YOU, that you don't have to take any part in the Map-Cheating/Hacking department to become a Super-Mod (except the Near-Bee part)!
User avatar
Dekar
Forum Drunk
Posts: 2899
Joined: January 17th, 2007, 4:22 pm
Has thanked: 1 time
Been thanked: 1 time

Post by Dekar »

*unlocked* :)
i wanna leave it open for questions!

greets Dekar
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
TrueSith
Newcomer
Posts: 12
Joined: January 28th, 2007, 5:56 am

hello

Post by TrueSith »

i am new to this but i honestly tryed to follow your help.... i am soryr but i just did not get it to work. trust me i followed it tot he point but you tutoral is not exeactly specific. i ty for trying but if u could help me a bit i would much like it. but none the less i wish not to take u away from toher maps u are working on.


oh and ps...... your sig........ well it says There are only 10 kind of people int his work.... those who yda yda and those who yada yada.... why did u say 10 kind of people? inside joke? or is 10 2 in binary o.o just woundering
User avatar
abraxxas
Junior Member
Posts: 49
Joined: January 17th, 2007, 6:55 pm
Location: N Autriche

Post by abraxxas »

lol gotcha 10 == 2 in Binary, thats the joke int the sig... sry 4 spam but i also got a question how can i change the amout of gold/lumber added?
Image
If God had really intended men to fly, he'd make it easier to get to the airport.

George Winters