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

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

rodgel_j20
Newcomer
Posts: 9
Joined: June 23rd, 2007, 4:39 am

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

Post by rodgel_j20 »

guyz where can i find the "attributes", after I opening the file I can't see the file named "attributes", please help... tanx ^^ :(
User avatar
JJ2197
Legendary Genius
Posts: 1311
Joined: August 8th, 2007, 8:10 am
Title: Legendary Genius²
Location: St. George Utah

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

Post by JJ2197 »

It's not always going to be in the map... but it will be just right under the folders and look like
this (attributes)
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
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

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

Post by Ozzapoo »

[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
Is a local always temporary in a function?

If i do:

Code: Select all

local integer example=null
set example=2
Will 'example' be null the next time the function is activated?

And Lastly, why do you need to use 'DestroyTrigger'?

edit: also, how do you know what to put in the function main? is it always just

**nameoftrigger**( ) ?
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
Vezz211
Newcomer
Posts: 7
Joined: May 10th, 2008, 7:56 pm
Location: STL, MO

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

Post by Vezz211 »

i did the first 2-3 steps but now it wont let me save in the listfile directory wheni click save
Icedaemon
Newcomer
Posts: 10
Joined: June 5th, 2007, 10:45 pm

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

Post by Icedaemon »

Couldnt we just crack the map, add a new script trigger, save and re-optimize it? I feel like its much more simple.
Deogi
Junior Member
Posts: 32
Joined: June 15th, 2008, 5:30 am

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

Post by Deogi »

Yo Dekar, you said change PLAYER_STATE_RESOURCE_GOLD to PLAYER_STATE_RESOURCE_LUMBER. Well, want both of them to work at the same time. I tried making a copy of this trigger and changing PLAYER_STATE_RESOURCE_GOLD to PLAYER_STATE_RESOURCE_LUMBER
But, there were errors. Could someone help me here?
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

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

Post by Ozzapoo »

You need to make the two functions different...
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
Deogi
Junior Member
Posts: 32
Joined: June 15th, 2008, 5:30 am

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

Post by Deogi »

Cool, how the hell do I do that? Meh = NOOB
User avatar
Ozzapoo
The Flying Cow!
Posts: 2196
Joined: November 2nd, 2007, 10:34 pm
Location: Melbourne

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

Post by Ozzapoo »

Paste what you did and I'll see what you did wrong.
Visit Ozzapoo.net, my blog and the home of AutoCP and Cheatpack Detector!
AutoCP3 now available for free!
Deogi
Junior Member
Posts: 32
Joined: June 15th, 2008, 5:30 am

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

Post by Deogi »

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

and make a copy of it but changed PLAYER_STATE_RESOURCE_GOLD to PLAYER_STATE_RESOURCE_LUMBER.