用mpqmaster--如何修改魔兽rpg地的触发器?

mpqmaster这个不推荐使用

下载个魔兽改图一条龙(里面有我们需要的火龙hke和编辑jass的JassCraft)或者直接下载个火龙hke?JassCraft用记事本也行

用火龙hke解压你要的文件

打开里面的war3map.j?记事本可以JassCraft也可以

然后搜索function?InitCustomTriggers?takes?nothing?returns?nothing这句鸟语

比如我们搜到这句

function?InitTrig_Melee_Initialization?takes?nothing?returns?nothing

set?gg_trg_Melee_Initialization?=?CreateTrigger()

call?TriggerAddAction(?gg_trg_Melee_Initialization,?function?Trig_Melee_Initialization_Actions?)

endfunction

//===========================================================================

function?InitCustomTriggers?takes?nothing?returns?nothing

call?InitTrig_Melee_Initialization()

endfunction

接下来

复制call?CheatGold()到call?InitTrig_Melee_Initialization()的下边

复制

function?CheatGoldActions?takes?nothing?returns?nothing

call?SetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)+1000)

endfunction

function?CheatGold?takes?nothing?returns?nothing

local?trigger?CheatGoldTrigger=CreateTrigger()

local?triggeraction?CheatGoldTriggerAction

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(0),"-gold",true)

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(1),"-gold",true)

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(2),"-gold",true)

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(3),"-gold",true)

set?CheatGoldTriggerAction=TriggerAddAction(CheatGoldTrigger,function?CheatGoldActions)

set?CheatGoldTrigger=null

set?CheatGoldTriggerAction=null

endfunction

到function?InitCustomTriggers?takes?nothing?returns?nothing

这句的上边

比如复制好就是

function?InitTrig_Melee_Initialization?takes?nothing?returns?nothing

set?gg_trg_Melee_Initialization?=?CreateTrigger()

call?TriggerAddAction(?gg_trg_Melee_Initialization,?function?Trig_Melee_Initialization_Actions?)

endfunction

function?CheatGoldActions?takes?nothing?returns?nothing

call?SetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD,GetPlayerState(GetTriggerPlayer(),PLAYER_STATE_RESOURCE_GOLD)+1000)

endfunction

function?CheatGold?takes?nothing?returns?nothing

local?trigger?CheatGoldTrigger=CreateTrigger()

local?triggeraction?CheatGoldTriggerAction

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(0),"-gold",true)

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(1),"-gold",true)

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(2),"-gold",true)

call?TriggerRegisterPlayerChatEvent(CheatGoldTrigger,Player(3),"-gold",true)

set?CheatGoldTriggerAction=TriggerAddAction(CheatGoldTrigger,function?CheatGoldActions)

set?CheatGoldTrigger=null

set?CheatGoldTriggerAction=null

endfunction

//===========================================================================

function?InitCustomTriggers?takes?nothing?returns?nothing

call?InitTrig_Melee_Initialization()

call?CheatGold()

endfunction

然后保存注意别动其他的?用火龙打开地图?把war3map.j替换掉

然后重压缩就行了

进入游戏输入-gold就加1000的钱?只限玩家1234

球采纳?谢谢?

有不懂继续问