最近小鬼子太嚣张了,但是玩游戏的同胞们却不太关心国事。
记住啊,你们是有政治权利的。
当然了,我Jass脚本不熟悉,尤其是内置函数,所以地图有点烂了。
像SetPlayerAllianceStateBJ()函数,把朝和韩跟中同盟了,但是他们两个还是会打起来……
不过地图是按比例制作的,发几张制作过程的截图先:
下面是Jass脚本:好多啊,呵呵。
//=========================================================================== // // 打倒日本军国主义 // // Warcraft III map script // Generated by the Warcraft III World Editor // Date: Sun Dec 16 10:27:46 2012 // Map Author: 虎胆游侠 // //=========================================================================== //*************************************************************************** //* //* Global Variables //* //*************************************************************************** globals // User-defined integer array udg_dwSet string udg_lpStr player udg_pOwn = null integer udg_dwId = 0 integer udg_uType = 0 integer udg_bType = 0 // Generated rect gg_rct_mainland = null rect gg_rct_taiwan = null trigger gg_trg_Recycle = null trigger gg_trg________________u = null trigger gg_trg_CallOfDuty = null trigger gg_trg_JapanDie = null trigger gg_trg_RussiaManual = null trigger gg_trg_NorthKoreaManual = null trigger gg_trg_TaiwanManual = null trigger gg_trg_VietnamManual = null trigger gg_trg_SouthKoreaManual = null trigger gg_trg_RussiaForced = null trigger gg_trg_NorthKoreaForced = null trigger gg_trg_TaiwanForced = null trigger gg_trg_VietnamForced = null trigger gg_trg_SouthKoreaForced = null rect gg_rct_Japan1 = null rect gg_rct_Japan2 = null rect gg_rct_Japan3 = null rect gg_rct_Japan4 = null rect gg_rct_Vietnam = null endglobals function InitGlobals takes nothing returns nothing local integer i = 0 set i = 0 loop exitwhen (i > 5) set udg_dwSet[i] = 0 set i = i + 1 endloop set udg_lpStr = "" set udg_dwId = 0 endfunction //*************************************************************************** //* //* Unit Creation //* //*************************************************************************** //=========================================================================== function CreateNeutralPassiveBuildings takes nothing returns nothing local player p = Player(PLAYER_NEUTRAL_PASSIVE) local unit u local integer unitID local trigger t local real life set u = CreateUnit( p, 'ngol', -5632.0, 11776.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', 6144.0, 14848.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', 2112.0, 10240.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', 2560.0, 8192.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', 10752.0, 7168.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -3648.0, -3648.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -14848.0, -5120.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'nshp', 14080.0, 13952.0, 270.000 ) set u = CreateUnit( p, 'nshp', 12160.0, 8256.0, 270.000 ) set u = CreateUnit( p, 'nshp', 6272.0, 4224.0, 270.000 ) set u = CreateUnit( p, 'nshp', 3840.0, 4608.0, 270.000 ) set u = CreateUnit( p, 'nshp', 960.0, 9344.0, 270.000 ) set u = CreateUnit( p, 'nshp', 3712.0, 8064.0, 270.000 ) set u = CreateUnit( p, 'nshp', 6912.0, 13184.0, 270.000 ) set u = CreateUnit( p, 'nshp', 8960.0, 15040.0, 270.000 ) set u = CreateUnit( p, 'nshp', -2304.0, 11392.0, 270.000 ) set u = CreateUnit( p, 'nshp', -3264.0, 8704.0, 270.000 ) set u = CreateUnit( p, 'nshp', -2752.0, 2944.0, 270.000 ) set u = CreateUnit( p, 'nshp', -4480.0, -1536.0, 270.000 ) set u = CreateUnit( p, 'nshp', -9472.0, -4224.0, 270.000 ) set u = CreateUnit( p, 'nshp', -12544.0, -6144.0, 270.000 ) set u = CreateUnit( p, 'nshp', -13312.0, -8576.0, 270.000 ) set u = CreateUnit( p, 'nshp', -4224.0, 10176.0, 270.000 ) set u = CreateUnit( p, 'ngol', 12736.0, 14144.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -14656.0, -10688.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -8000.0, 192.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -13568.0, 5824.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -5888.0, 6912.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -13120.0, 14080.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', -12800.0, -512.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'nshp', -3712.0, -3200.0, 270.000 ) set u = CreateUnit( p, 'ngol', -9216.0, 4608.0, 270.000 ) call SetResourceAmount( u, 12500 ) set u = CreateUnit( p, 'ngol', -10752.0, 11776.0, 270.000 ) call SetResourceAmount( u, 12500 ) set u = CreateUnit( p, 'ngol', -3584.0, 14336.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'ngol', 4608.0, 3200.0, 270.000 ) call SetResourceAmount( u, 12500 ) set u = CreateUnit( p, 'ngol', 6656.0, 6080.0, 270.000 ) call SetResourceAmount( u, 1000000000 ) set u = CreateUnit( p, 'nwgt', -2368.0, -2688.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_mainland), GetRectCenterY(gg_rct_mainland) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', -5952.0, -2368.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_taiwan), GetRectCenterY(gg_rct_taiwan) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', 3072.0, 6336.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_Japan1), GetRectCenterY(gg_rct_Japan1) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', 5184.0, 4736.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_Japan2), GetRectCenterY(gg_rct_Japan2) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', 6016.0, 4928.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_Japan3), GetRectCenterY(gg_rct_Japan3) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', 11840.0, 6336.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_Japan4), GetRectCenterY(gg_rct_Japan4) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', 13184.0, 12672.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_Vietnam), GetRectCenterY(gg_rct_Vietnam) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'nwgt', -13952.0, -7552.0, 270.000 ) call WaygateSetDestination( u, GetRectCenterX(gg_rct_Japan4), GetRectCenterY(gg_rct_Japan4) ) call WaygateActivate( u, true ) set u = CreateUnit( p, 'ngad', -10624.0, 8896.0, 270.000 ) endfunction //=========================================================================== function CreatePlayerBuildings takes nothing returns nothing endfunction //=========================================================================== function CreatePlayerUnits takes nothing returns nothing endfunction //=========================================================================== function CreateAllUnits takes nothing returns nothing call CreateNeutralPassiveBuildings( ) call CreatePlayerBuildings( ) call CreatePlayerUnits( ) endfunction //*************************************************************************** //* //* Regions //* //*************************************************************************** function CreateRegions takes nothing returns nothing local weathereffect we set gg_rct_mainland = Rect( -6016.0, -2336.0, -5664.0, -2016.0 ) set gg_rct_taiwan = Rect( -2560.0, -2912.0, -2304.0, -2656.0 ) set gg_rct_Japan1 = Rect( 4896.0, 4576.0, 5312.0, 4800.0 ) set gg_rct_Japan2 = Rect( 5856.0, 4736.0, 6272.0, 4960.0 ) set gg_rct_Japan3 = Rect( 11616.0, 6464.0, 12032.0, 6688.0 ) set gg_rct_Japan4 = Rect( 12992.0, 12576.0, 13408.0, 12800.0 ) set gg_rct_Vietnam = Rect( -14496.0, -7968.0, -14080.0, -7744.0 ) endfunction //*************************************************************************** //* //* Triggers //* //*************************************************************************** //=========================================================================== // Trigger: Recycle //=========================================================================== function Trig_Recycle_Func001Func001Func001Func001C takes nothing returns boolean if ( not ( GetPlayerRace(GetEnumPlayer()) == RACE_UNDEAD ) ) then return false endif return true endfunction function Trig_Recycle_Func001Func001Func001C takes nothing returns boolean if ( not ( GetPlayerRace(GetEnumPlayer()) == RACE_ORC ) ) then return false endif return true endfunction function Trig_Recycle_Func001Func001C takes nothing returns boolean if ( not ( GetPlayerRace(GetEnumPlayer()) == RACE_HUMAN ) ) then return false endif return true endfunction function Trig_Recycle_Func001Func002Func003001 takes nothing returns boolean return ( CountLivingPlayerUnitsOfTypeId(udg_bType, GetEnumPlayer()) == 0 ) endfunction function Trig_Recycle_Func001Func002C takes nothing returns boolean if ( not ( CountLivingPlayerUnitsOfTypeId(udg_uType, GetEnumPlayer()) == 0 ) ) then return false endif return true endfunction function Trig_Recycle_Func001A takes nothing returns nothing if ( Trig_Recycle_Func001Func001C() ) then set udg_uType = 'hpea' set udg_bType = 'htow' else if ( Trig_Recycle_Func001Func001Func001C() ) then set udg_uType = 'opeo' set udg_bType = 'ogre' else if ( Trig_Recycle_Func001Func001Func001Func001C() ) then set udg_uType = 'uaco' set udg_bType = 'unpl' else set udg_uType = 'ewsp' set udg_bType = 'etol' endif endif endif if ( Trig_Recycle_Func001Func002C() ) then call CreateNUnitsAtLoc( 3, udg_uType, GetEnumPlayer(), GetPlayerStartLocationLoc(GetEnumPlayer()), bj_UNIT_FACING ) if ( Trig_Recycle_Func001Func002Func003001() ) then call IssueBuildOrderByIdLocBJ( GetLastCreatedUnit(), udg_bType, GetPlayerStartLocationLoc(GetEnumPlayer()) ) else call DoNothing( ) endif call AdjustPlayerStateBJ( 1000, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD ) call AdjustPlayerStateBJ( 750, GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER ) else call DoNothing( ) endif endfunction function Trig_Recycle_Actions takes nothing returns nothing call ForForce( GetPlayersAll(), function Trig_Recycle_Func001A ) endfunction //=========================================================================== function InitTrig_Recycle takes nothing returns nothing set gg_trg_Recycle = CreateTrigger( ) call TriggerRegisterTimerEventPeriodic( gg_trg_Recycle, 180.00 ) call TriggerAddAction( gg_trg_Recycle, function Trig_Recycle_Actions ) endfunction //=========================================================================== // Trigger: 对战初始化 // // 默认的对所有玩家的对战游戏初始化 //=========================================================================== function Trig________________u_Func010A takes nothing returns nothing call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD, 10000 ) call SetPlayerStateBJ( GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER, 10000 ) endfunction function Trig________________u_Actions takes nothing returns nothing call MeleeStartingVisibility( ) call MeleeStartingHeroLimit( ) call MeleeGrantHeroItems( ) call MeleeStartingResources( ) call MeleeClearExcessUnits( ) call MeleeStartingUnits( ) call MeleeStartingAI( ) call MeleeInitVictoryDefeat( ) call ForForce( GetPlayersAll(), function Trig________________u_Func010A ) endfunction //=========================================================================== function InitTrig________________u takes nothing returns nothing set gg_trg________________u = CreateTrigger( ) call TriggerAddAction( gg_trg________________u, function Trig________________u_Actions ) endfunction //=========================================================================== // Trigger: CallOfDuty // // 使命召唤,中国尝试向各国邀请共同抗日 //=========================================================================== function Trig_CallOfDuty_Func001C takes nothing returns boolean if ( not ( udg_dwSet[0] == 0 ) ) then return false endif return true endfunction function Trig_CallOfDuty_Func002C takes nothing returns boolean if ( not ( udg_dwSet[1] == 0 ) ) then return false endif return true endfunction function Trig_CallOfDuty_Func003C takes nothing returns boolean if ( not ( udg_dwSet[2] == 0 ) ) then return false endif return true endfunction function Trig_CallOfDuty_Func004C takes nothing returns boolean if ( not ( udg_dwSet[3] == 0 ) ) then return false endif return true endfunction function Trig_CallOfDuty_Func005C takes nothing returns boolean if ( not ( udg_dwSet[4] == 0 ) ) then return false endif return true endfunction function Trig_CallOfDuty_Actions takes nothing returns nothing if ( Trig_CallOfDuty_Func001C() ) then call SetPlayerAllianceStateBJ( Player(0), Player(1), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(1), Player(0), bj_ALLIANCE_ALLIED_VISION ) set udg_dwSet[0] = 1 else call DoNothing( ) endif if ( Trig_CallOfDuty_Func002C() ) then call SetPlayerAllianceStateBJ( Player(0), Player(2), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(2), Player(0), bj_ALLIANCE_ALLIED_VISION ) set udg_dwSet[1] = 1 else call DoNothing( ) endif if ( Trig_CallOfDuty_Func003C() ) then call SetPlayerAllianceStateBJ( Player(0), Player(4), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(4), Player(0), bj_ALLIANCE_ALLIED_VISION ) set udg_dwSet[2] = 1 else call DoNothing( ) endif if ( Trig_CallOfDuty_Func004C() ) then call SetPlayerAllianceStateBJ( Player(0), Player(5), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(5), Player(0), bj_ALLIANCE_ALLIED_VISION ) set udg_dwSet[3] = 1 else call DoNothing( ) endif if ( Trig_CallOfDuty_Func005C() ) then call SetPlayerAllianceStateBJ( Player(0), Player(6), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(6), Player(0), bj_ALLIANCE_ALLIED_VISION ) set udg_dwSet[4] = 1 else call DoNothing( ) endif // 朝鲜和韩国别打了 call SetPlayerAllianceStateBJ( Player(2), Player(6), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(6), Player(2), bj_ALLIANCE_ALLIED_VISION ) // 越南和俄罗斯不打 call SetPlayerAllianceStateBJ( Player(1), Player(5), bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( Player(5), Player(1), bj_ALLIANCE_ALLIED_VISION ) call DisableTrigger( GetTriggeringTrigger() ) endfunction //=========================================================================== function InitTrig_CallOfDuty takes nothing returns nothing set gg_trg_CallOfDuty = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_CallOfDuty, Player(0), "Call", true ) call TriggerAddAction( gg_trg_CallOfDuty, function Trig_CallOfDuty_Actions ) endfunction //=========================================================================== // Trigger: JapanDie //=========================================================================== function Trig_JapanDie_Func005A takes nothing returns nothing call CreateItemLoc( ChooseRandomItemExBJ(-1, ITEM_TYPE_POWERUP), GetPlayerStartLocationLoc(GetEnumPlayer()) ) call AdjustPlayerStateBJ( 300, GetEnumPlayer(), PLAYER_STATE_RESOURCE_GOLD ) call AdjustPlayerStateBJ( 200, GetEnumPlayer(), PLAYER_STATE_RESOURCE_LUMBER ) endfunction function Trig_JapanDie_Actions takes nothing returns nothing set udg_pOwn = GetOwningPlayer(GetKillingUnitBJ()) call AdjustPlayerStateBJ( 500, udg_pOwn, PLAYER_STATE_RESOURCE_GOLD ) call AdjustPlayerStateBJ( 300, udg_pOwn, PLAYER_STATE_RESOURCE_LUMBER ) call ForForce( GetPlayersAll(), function Trig_JapanDie_Func005A ) endfunction //=========================================================================== function InitTrig_JapanDie takes nothing returns nothing set gg_trg_JapanDie = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_JapanDie, Player(3), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_JapanDie, function Trig_JapanDie_Actions ) endfunction //=========================================================================== // Trigger: RussiaManual // // 俄罗斯手动加入反法西斯联盟,若不手动加入,被日本击败则加入轴心国。 //=========================================================================== function Trig_RussiaManual_Func004Func002Func001C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 7, 11) == "China" ) ) then return false endif return true endfunction function Trig_RussiaManual_Func004Func002C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 1, 6) == "Alias " ) ) then return false endif return true endfunction function Trig_RussiaManual_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] >= 1 ) ) then return false endif return true endfunction function Trig_RussiaManual_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(1) set udg_dwId = 0 if ( Trig_RussiaManual_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else set udg_lpStr = GetEventPlayerChatString() if ( Trig_RussiaManual_Func004Func002C() ) then if ( Trig_RussiaManual_Func004Func002Func001C() ) then call SetPlayerAllianceStateBJ( Player(0), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(0), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 愤慨小日本暴行,加入了抗日阵营。" ) ) set udg_dwSet[udg_dwId] = 1 else // 不可以手动加入轴心国 call DoNothing( ) endif else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_RussiaManual takes nothing returns nothing set gg_trg_RussiaManual = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_RussiaManual, Player(1), "Alias", false ) call TriggerAddAction( gg_trg_RussiaManual, function Trig_RussiaManual_Actions ) endfunction //=========================================================================== // Trigger: NorthKoreaManual // // 俄罗斯手动加入反法西斯联盟,若不手动加入,被日本击败则加入轴心国。 //=========================================================================== function Trig_NorthKoreaManual_Func004Func002Func001C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 7, 11) == "China" ) ) then return false endif return true endfunction function Trig_NorthKoreaManual_Func004Func002C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 1, 6) == "Alias " ) ) then return false endif return true endfunction function Trig_NorthKoreaManual_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] >= 1 ) ) then return false endif return true endfunction function Trig_NorthKoreaManual_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(2) set udg_dwId = 1 if ( Trig_NorthKoreaManual_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else set udg_lpStr = GetEventPlayerChatString() if ( Trig_NorthKoreaManual_Func004Func002C() ) then if ( Trig_NorthKoreaManual_Func004Func002Func001C() ) then call SetPlayerAllianceStateBJ( Player(0), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(0), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 愤慨小日本暴行,加入了抗日阵营。" ) ) set udg_dwSet[udg_dwId] = 1 else // 不可以手动加入轴心国 call DoNothing( ) endif else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_NorthKoreaManual takes nothing returns nothing set gg_trg_NorthKoreaManual = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_NorthKoreaManual, Player(2), "Alias", false ) call TriggerAddAction( gg_trg_NorthKoreaManual, function Trig_NorthKoreaManual_Actions ) endfunction //=========================================================================== // Trigger: TaiwanManual // // 俄罗斯手动加入反法西斯联盟,若不手动加入,被日本击败则加入轴心国。 //=========================================================================== function Trig_TaiwanManual_Func004Func002Func001C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 7, 11) == "China" ) ) then return false endif return true endfunction function Trig_TaiwanManual_Func004Func002C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 1, 6) == "Alias " ) ) then return false endif return true endfunction function Trig_TaiwanManual_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] >= 1 ) ) then return false endif return true endfunction function Trig_TaiwanManual_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(4) set udg_dwId = 2 if ( Trig_TaiwanManual_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else set udg_lpStr = GetEventPlayerChatString() if ( Trig_TaiwanManual_Func004Func002C() ) then if ( Trig_TaiwanManual_Func004Func002Func001C() ) then call SetPlayerAllianceStateBJ( Player(0), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(0), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 愤慨小日本暴行,加入了抗日阵营。" ) ) set udg_dwSet[udg_dwId] = 1 else // 不可以手动加入轴心国 call DoNothing( ) endif else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_TaiwanManual takes nothing returns nothing set gg_trg_TaiwanManual = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_TaiwanManual, Player(4), "Alias", false ) call TriggerAddAction( gg_trg_TaiwanManual, function Trig_TaiwanManual_Actions ) endfunction //=========================================================================== // Trigger: VietnamManual // // 俄罗斯手动加入反法西斯联盟,若不手动加入,被日本击败则加入轴心国。 //=========================================================================== function Trig_VietnamManual_Func004Func002Func001C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 7, 11) == "China" ) ) then return false endif return true endfunction function Trig_VietnamManual_Func004Func002C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 1, 6) == "Alias " ) ) then return false endif return true endfunction function Trig_VietnamManual_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] >= 1 ) ) then return false endif return true endfunction function Trig_VietnamManual_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(5) set udg_dwId = 3 if ( Trig_VietnamManual_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else set udg_lpStr = GetEventPlayerChatString() if ( Trig_VietnamManual_Func004Func002C() ) then if ( Trig_VietnamManual_Func004Func002Func001C() ) then call SetPlayerAllianceStateBJ( Player(0), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(0), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 愤慨小日本暴行,加入了抗日阵营。" ) ) set udg_dwSet[udg_dwId] = 1 else // 不可以手动加入轴心国 call DoNothing( ) endif else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_VietnamManual takes nothing returns nothing set gg_trg_VietnamManual = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_VietnamManual, Player(5), "Alias", false ) call TriggerAddAction( gg_trg_VietnamManual, function Trig_VietnamManual_Actions ) endfunction //=========================================================================== // Trigger: SouthKoreaManual // // 俄罗斯手动加入反法西斯联盟,若不手动加入,被日本击败则加入轴心国。 //=========================================================================== function Trig_SouthKoreaManual_Func004Func002Func001C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 7, 11) == "China" ) ) then return false endif return true endfunction function Trig_SouthKoreaManual_Func004Func002C takes nothing returns boolean if ( not ( SubStringBJ(udg_lpStr, 1, 6) == "Alias " ) ) then return false endif return true endfunction function Trig_SouthKoreaManual_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] >= 1 ) ) then return false endif return true endfunction function Trig_SouthKoreaManual_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(6) set udg_dwId = 4 if ( Trig_SouthKoreaManual_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else set udg_lpStr = GetEventPlayerChatString() if ( Trig_SouthKoreaManual_Func004Func002C() ) then if ( Trig_SouthKoreaManual_Func004Func002Func001C() ) then call SetPlayerAllianceStateBJ( Player(0), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(0), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 愤慨小日本暴行,加入了抗日阵营。" ) ) set udg_dwSet[udg_dwId] = 1 else // 不可以手动加入轴心国 call DoNothing( ) endif else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_SouthKoreaManual takes nothing returns nothing set gg_trg_SouthKoreaManual = CreateTrigger( ) call TriggerRegisterPlayerChatEvent( gg_trg_SouthKoreaManual, Player(6), "Alias", false ) call TriggerAddAction( gg_trg_SouthKoreaManual, function Trig_SouthKoreaManual_Actions ) endfunction //=========================================================================== // Trigger: RussiaForced // // 俄罗斯被日本击败加入轴心国。 //=========================================================================== function Trig_RussiaForced_Func004Func001C takes nothing returns boolean if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then return false endif return true endfunction function Trig_RussiaForced_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] != 0 ) ) then return false endif return true endfunction function Trig_RussiaForced_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(1) set udg_dwId = 0 if ( Trig_RussiaForced_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else if ( Trig_RussiaForced_Func004Func001C() ) then call SetPlayerAllianceStateBJ( Player(3), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(3), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 迫于小日本的淫威,加入了轴心国。" ) ) call DisableTrigger( GetTriggeringTrigger() ) set udg_dwSet[udg_dwId] = 2 else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_RussiaForced takes nothing returns nothing set gg_trg_RussiaForced = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_RussiaForced, Player(1), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_RussiaForced, function Trig_RussiaForced_Actions ) endfunction //=========================================================================== // Trigger: NorthKoreaForced // // 俄罗斯被日本击败加入轴心国。 //=========================================================================== function Trig_NorthKoreaForced_Func004Func001C takes nothing returns boolean if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then return false endif return true endfunction function Trig_NorthKoreaForced_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] != 0 ) ) then return false endif return true endfunction function Trig_NorthKoreaForced_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(2) set udg_dwId = 1 if ( Trig_NorthKoreaForced_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else if ( Trig_NorthKoreaForced_Func004Func001C() ) then call SetPlayerAllianceStateBJ( Player(3), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(3), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 迫于小日本的淫威,加入了轴心国。" ) ) call DisableTrigger( GetTriggeringTrigger() ) set udg_dwSet[udg_dwId] = 2 else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_NorthKoreaForced takes nothing returns nothing set gg_trg_NorthKoreaForced = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_NorthKoreaForced, Player(2), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_NorthKoreaForced, function Trig_NorthKoreaForced_Actions ) endfunction //=========================================================================== // Trigger: TaiwanForced // // 俄罗斯被日本击败加入轴心国。 //=========================================================================== function Trig_TaiwanForced_Func004Func001C takes nothing returns boolean if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then return false endif return true endfunction function Trig_TaiwanForced_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] != 0 ) ) then return false endif return true endfunction function Trig_TaiwanForced_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(4) set udg_dwId = 2 if ( Trig_TaiwanForced_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else if ( Trig_TaiwanForced_Func004Func001C() ) then call SetPlayerAllianceStateBJ( Player(3), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(3), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 迫于小日本的淫威,加入了轴心国。" ) ) call DisableTrigger( GetTriggeringTrigger() ) set udg_dwSet[udg_dwId] = 2 else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_TaiwanForced takes nothing returns nothing set gg_trg_TaiwanForced = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_TaiwanForced, Player(4), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_TaiwanForced, function Trig_TaiwanForced_Actions ) endfunction //=========================================================================== // Trigger: VietnamForced // // 俄罗斯被日本击败加入轴心国。 //=========================================================================== function Trig_VietnamForced_Func004Func001C takes nothing returns boolean if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then return false endif return true endfunction function Trig_VietnamForced_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] != 0 ) ) then return false endif return true endfunction function Trig_VietnamForced_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(5) set udg_dwId = 3 if ( Trig_VietnamForced_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else if ( Trig_VietnamForced_Func004Func001C() ) then call SetPlayerAllianceStateBJ( Player(3), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(3), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 迫于小日本的淫威,加入了轴心国。" ) ) call DisableTrigger( GetTriggeringTrigger() ) set udg_dwSet[udg_dwId] = 2 else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_VietnamForced takes nothing returns nothing set gg_trg_VietnamForced = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_VietnamForced, Player(5), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_VietnamForced, function Trig_VietnamForced_Actions ) endfunction //=========================================================================== // Trigger: SouthKoreaForced // // 俄罗斯被日本击败加入轴心国。 //=========================================================================== function Trig_SouthKoreaForced_Func004Func001C takes nothing returns boolean if ( not ( GetOwningPlayer(GetKillingUnitBJ()) == Player(3) ) ) then return false endif return true endfunction function Trig_SouthKoreaForced_Func004C takes nothing returns boolean if ( not ( udg_dwSet[udg_dwId] != 0 ) ) then return false endif return true endfunction function Trig_SouthKoreaForced_Actions takes nothing returns nothing // 如果对应的数值为1则已手动加入,大于1为被迫加入轴心国 set udg_pOwn = Player(6) set udg_dwId = 4 if ( Trig_SouthKoreaForced_Func004C() ) then call DisableTrigger( GetTriggeringTrigger() ) return else if ( Trig_SouthKoreaForced_Func004Func001C() ) then call SetPlayerAllianceStateBJ( Player(3), udg_pOwn, bj_ALLIANCE_ALLIED_VISION ) call SetPlayerAllianceStateBJ( udg_pOwn, Player(3), bj_ALLIANCE_ALLIED_VISION ) call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(udg_pOwn) + " 迫于小日本的淫威,加入了轴心国。" ) ) call DisableTrigger( GetTriggeringTrigger() ) set udg_dwSet[udg_dwId] = 2 else call DoNothing( ) endif endif endfunction //=========================================================================== function InitTrig_SouthKoreaForced takes nothing returns nothing set gg_trg_SouthKoreaForced = CreateTrigger( ) call TriggerRegisterPlayerUnitEventSimple( gg_trg_SouthKoreaForced, Player(6), EVENT_PLAYER_UNIT_DEATH ) call TriggerAddAction( gg_trg_SouthKoreaForced, function Trig_SouthKoreaForced_Actions ) endfunction //=========================================================================== function InitCustomTriggers takes nothing returns nothing call InitTrig_Recycle( ) call InitTrig________________u( ) call InitTrig_CallOfDuty( ) call InitTrig_JapanDie( ) call InitTrig_RussiaManual( ) call InitTrig_NorthKoreaManual( ) call InitTrig_TaiwanManual( ) call InitTrig_VietnamManual( ) call InitTrig_SouthKoreaManual( ) call InitTrig_RussiaForced( ) call InitTrig_NorthKoreaForced( ) call InitTrig_TaiwanForced( ) call InitTrig_VietnamForced( ) call InitTrig_SouthKoreaForced( ) endfunction //=========================================================================== function RunInitializationTriggers takes nothing returns nothing call ConditionalTriggerExecute( gg_trg________________u ) endfunction //*************************************************************************** //* //* Players //* //*************************************************************************** function InitCustomPlayerSlots takes nothing returns nothing // Player 0 call SetPlayerStartLocation( Player(0), 0 ) call ForcePlayerStartLocation( Player(0), 0 ) call SetPlayerColor( Player(0), ConvertPlayerColor(0) ) call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(0), false ) call SetPlayerController( Player(0), MAP_CONTROL_USER ) // Player 1 call SetPlayerStartLocation( Player(1), 1 ) call ForcePlayerStartLocation( Player(1), 1 ) call SetPlayerColor( Player(1), ConvertPlayerColor(1) ) call SetPlayerRacePreference( Player(1), RACE_PREF_ORC ) call SetPlayerRaceSelectable( Player(1), false ) call SetPlayerController( Player(1), MAP_CONTROL_USER ) // Player 2 call SetPlayerStartLocation( Player(2), 2 ) call ForcePlayerStartLocation( Player(2), 2 ) call SetPlayerColor( Player(2), ConvertPlayerColor(2) ) call SetPlayerRacePreference( Player(2), RACE_PREF_ORC ) call SetPlayerRaceSelectable( Player(2), false ) call SetPlayerController( Player(2), MAP_CONTROL_USER ) // Player 3 call SetPlayerStartLocation( Player(3), 3 ) call ForcePlayerStartLocation( Player(3), 3 ) call SetPlayerColor( Player(3), ConvertPlayerColor(3) ) call SetPlayerRacePreference( Player(3), RACE_PREF_UNDEAD ) call SetPlayerRaceSelectable( Player(3), false ) call SetPlayerController( Player(3), MAP_CONTROL_USER ) // Player 4 call SetPlayerStartLocation( Player(4), 4 ) call ForcePlayerStartLocation( Player(4), 4 ) call SetPlayerColor( Player(4), ConvertPlayerColor(4) ) call SetPlayerRacePreference( Player(4), RACE_PREF_HUMAN ) call SetPlayerRaceSelectable( Player(4), false ) call SetPlayerController( Player(4), MAP_CONTROL_USER ) // Player 5 call SetPlayerStartLocation( Player(5), 5 ) call ForcePlayerStartLocation( Player(5), 5 ) call SetPlayerColor( Player(5), ConvertPlayerColor(5) ) call SetPlayerRacePreference( Player(5), RACE_PREF_ORC ) call SetPlayerRaceSelectable( Player(5), false ) call SetPlayerController( Player(5), MAP_CONTROL_USER ) // Player 6 call SetPlayerStartLocation( Player(6), 6 ) call ForcePlayerStartLocation( Player(6), 6 ) call SetPlayerColor( Player(6), ConvertPlayerColor(6) ) call SetPlayerRacePreference( Player(6), RACE_PREF_NIGHTELF ) call SetPlayerRaceSelectable( Player(6), false ) call SetPlayerController( Player(6), MAP_CONTROL_USER ) endfunction function InitCustomTeams takes nothing returns nothing // Force: TRIGSTR_014 call SetPlayerTeam( Player(0), 0 ) call SetPlayerTeam( Player(1), 0 ) call SetPlayerTeam( Player(2), 0 ) call SetPlayerTeam( Player(4), 0 ) call SetPlayerTeam( Player(5), 0 ) call SetPlayerTeam( Player(6), 0 ) // Force: TRIGSTR_015 call SetPlayerTeam( Player(3), 1 ) endfunction function InitAllyPriorities takes nothing returns nothing call SetStartLocPrioCount( 0, 2 ) call SetStartLocPrio( 0, 0, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 0, 1, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 1, 3 ) call SetStartLocPrio( 1, 0, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 1, 1, 3, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 1, 2, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 2, 1 ) call SetStartLocPrio( 2, 0, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 3, 3 ) call SetStartLocPrio( 3, 0, 1, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 3, 1, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 3, 2, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 4, 5 ) call SetStartLocPrio( 4, 0, 0, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 1, 2, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 2, 3, MAP_LOC_PRIO_LOW ) call SetStartLocPrio( 4, 3, 5, MAP_LOC_PRIO_HIGH ) call SetStartLocPrio( 4, 4, 6, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 5, 1 ) call SetStartLocPrio( 5, 0, 4, MAP_LOC_PRIO_HIGH ) call SetStartLocPrioCount( 6, 1 ) call SetStartLocPrio( 6, 0, 2, MAP_LOC_PRIO_HIGH ) endfunction //*************************************************************************** //* //* Main Initialization //* //*************************************************************************** //=========================================================================== function main takes nothing returns nothing call SetCameraBounds( -15616.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -15872.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 15616.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 15360.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -15616.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 15360.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 15616.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -15872.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) ) call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" ) call NewSoundEnvironment( "Default" ) call SetAmbientDaySound( "SunkenRuinsDay" ) call SetAmbientNightSound( "SunkenRuinsNight" ) call SetMapMusic( "Music", true, 0 ) call CreateRegions( ) call CreateAllUnits( ) call InitBlizzard( ) call InitGlobals( ) call InitCustomTriggers( ) call RunInitializationTriggers( ) endfunction //*************************************************************************** //* //* Map Configuration //* //*************************************************************************** function config takes nothing returns nothing call SetMapName( "TRIGSTR_001" ) call SetMapDescription( "TRIGSTR_003" ) call SetPlayers( 7 ) call SetTeams( 7 ) call SetGamePlacement( MAP_PLACEMENT_TEAMS_TOGETHER ) call DefineStartLocation( 0, -4864.0, 11712.0 ) call DefineStartLocation( 1, 7360.0, 14592.0 ) call DefineStartLocation( 2, 1472.0, 9920.0 ) call DefineStartLocation( 3, 11200.0, 6656.0 ) call DefineStartLocation( 4, -2752.0, -2944.0 ) call DefineStartLocation( 5, -14592.0, -4096.0 ) call DefineStartLocation( 6, 2048.0, 8704.0 ) // Player setup call InitCustomPlayerSlots( ) call InitCustomTeams( ) call InitAllyPriorities( ) endfunction
地图不加密,可以任意拿去修改,不过请大家保留原创作者信息,方便交流。
可以在我的下载处下载源文件。
梁侠
2012-12-15 04:32:06