wc3edit.net https://forum.wc3edit.net/ |
|
adding gold/lumber cheats to any map in 3 easy steps! http://forum.wc3edit.net/deprotection-cheating-f64/adding-gold-lumber-cheats-to-any-map-in-3-easy-steps-t21.html |
Page 1 of 10 |
Author: | Dekar [ January 22nd, 2007, 7:45 am ] |
Post subject: | adding gold/lumber cheats to any map in 3 easy steps! |
*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: trigger gg_trg_blubb=null go on searching for endfunction and add the following under it: Code: 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: 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: 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 |
Author: | Kalle [ January 22nd, 2007, 7:50 pm ] |
Post subject: | |
thx That helped me a lot I started looking at all this map deprotect and map protect stuff (not that I cheat or so ) 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? mfg, Kalle |
Author: | hamster [ January 28th, 2007, 8:11 am ] |
Post subject: | |
how do you enable single player? |
Author: | Dekar [ January 28th, 2007, 9:58 am ] |
Post subject: | |
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 |
Author: | hamster [ January 28th, 2007, 12:02 pm ] |
Post subject: | |
im not spamming. ty for answer. |
Author: | Dekar [ January 28th, 2007, 12:10 pm ] |
Post subject: | |
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 |
Author: | Kalle [ January 28th, 2007, 3:35 pm ] |
Post subject: | |
I edited it...evil Dekar Kalle PS: I won't do that for ya anymore PPS: Then do as ya wish ... |
Author: | Dekar [ January 28th, 2007, 3:48 pm ] |
Post subject: | |
*unlocked* i wanna leave it open for questions! greets Dekar |
Author: | TrueSith [ January 29th, 2007, 8:00 pm ] |
Post subject: | hello |
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 |
Author: | abraxxas [ January 29th, 2007, 8:20 pm ] |
Post subject: | |
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? |
Page 1 of 10 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |