*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
endfunctionand 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_LUMBERguess what it changes ;) )
now search for
function mainand look for a line starting with
callnow add:
Code:
call InitTrig_blubb( )
under it.
just save the file!
part threeopen 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
_________________
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