找回密码
 点一下
查看: 2006|回复: 12

OrcVsOrc

  [复制链接]
发表于 2007-1-23 16:32:27 | 显示全部楼层 |阅读模式
121的War3Patch.mpq里多了原本在包外的
AI ScriptsGruntMaster.wai
AI ScriptsWyrmMonger.wai

另外还多了下面这个文件:
很神奇呢~~

[jass]
//============================================================================
// OrcVsOrc

//***************************************************************************
//*
//*  Global Variables
//*
//***************************************************************************

globals
    trigger morningbegintrigger = null
    trigger nightbegintrigger = null
    trigger morningendtrigger = null
    trigger nightendtrigger = null

    integer musicVolume = 127
    integer stopMusicFadeOut = 0
    integer morningstart = 0
    integer morningend = 1
    integer nightstart = 2
    integer nightend = 3
endglobals

function InitGlobals takes nothing returns nothing
endfunction

//***************************************************************************
//*
//*  Destructable Objects
//*
//***************************************************************************

function CreateAllDestructables takes nothing returns nothing
endfunction

//***************************************************************************
//*
//*  Items
//*
//***************************************************************************

function CreateAllItems takes nothing returns nothing
endfunction

//***************************************************************************
//*
//*  Unit Items
//*
//***************************************************************************


//***************************************************************************
//*
//*  Unit Creation
//*
//***************************************************************************

//===========================================================================
function CreateUnitsForPlayer0 takes nothing returns nothing
    local player p = Player(0)
    local unit u
    local trigger t
    local real life

endfunction

//===========================================================================
function CreateUnitsForPlayer1 takes nothing returns nothing
    local player p = Player(1)
    local unit u
    local trigger t
    local real life

endfunction

//===========================================================================
function CreateNeutralPassive takes nothing returns nothing
    local player p = Player(PLAYER_NEUTRAL_PASSIVE)
    local unit u
    local trigger t
    local real life

    set u = CreateUnit( p, 'ngol', 3000.0, 3000.0, 270 )
    call SetResourceAmount( u, 7500 )
    set u = CreateUnit( p, 'ngol', 7200.0, 7200.0, 270 )
    call SetResourceAmount( u, 7500 )
endfunction

//===========================================================================
function CreatePlayerUnits takes nothing returns nothing
    call CreateUnitsForPlayer0(  )
    call CreateUnitsForPlayer1(  )
endfunction

//===========================================================================
function CreateNeutralUnits takes nothing returns nothing
    call CreateNeutralPassive(  )
endfunction

//***************************************************************************
//*
//*  Triggers
//*
//***************************************************************************

//===========================================================================
function TriggerResponseGlueSound takes nothing returns nothing
    call DisplayTextToPlayer(Player(0), 0, 0, "Playing glue music")
    call PlayMusic("GlueMusic")
endfunction

//===========================================================================
function TriggerResponseGameSound takes nothing returns nothing
    call DisplayTextToPlayer(Player(0), 0, 0, "Playing game music")
    call PlayMusic("Music")
endfunction

//===========================================================================
function TriggerResponseIncreaseVolume takes nothing returns nothing
    call DisplayTextToPlayer(Player(0), 0, 0, "Increasing music volume")
    set musicVolume = musicVolume + 32
    call SetMusicVolume(musicVolume)
endfunction

//===========================================================================
function TriggerResponseLowerMusicVolumeGroup takes nothing returns nothing
    call DisplayTextToPlayer(Player(0), 0, 0, "Lowering Music Volume Group Volume")
    call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_MUSIC,0.5)
endfunction

//===========================================================================
function TriggerResponseLowerUnitVolumeGroup takes nothing returns nothing
    call DisplayTextToPlayer(Player(0), 0, 0, "Lowering Unit Volume Group Volume")
    call VolumeGroupSetVolume(SOUND_VOLUMEGROUP_UNITSOUNDS,0.5)
endfunction

//===========================================================================
function TriggerResponseResetVolumeGroups takes nothing returns nothing
    call DisplayTextToPlayer(Player(0), 0, 0, "Resetting Volume Groups")
    call VolumeGroupReset()
endfunction

//===========================================================================
function MorningBeginTriggerResponse takes nothing returns nothing
    call DisplayTextToPlayer(Player(0),0,0,"morning start")
endfunction

//===========================================================================
function NightBeginTriggerResponse takes nothing returns nothing
    call DisplayTextToPlayer(Player(0),0,0,"night start")
endfunction

//===========================================================================
function MorningEndTriggerResponse takes nothing returns nothing
    call DisplayTextToPlayer(Player(0),0,0,"morning end")
endfunction

//===========================================================================
function NightEndTriggerResponse takes nothing returns nothing
    call DisplayTextToPlayer(Player(0),0,0,"night end")
endfunction

//===========================================================================
function InitCustomTriggers takes nothing returns nothing
    local player player0 = Player(0)
    local trigger trig
    local integer duration = 0

    local unit unitGlueSound = CreateUnit        (player0, 'hfoo',    1600,    1600,    0)
    local unit unitGameSound = CreateUnit        (player0, 'hfoo',    1800,    1600,    0)
    local unit unitIncreaseVolume = CreateUnit    (player0, 'hfoo',    1600,    1800,    0)

    local unit unitLowerMusicVolumeGroup = CreateUnit    (player0, 'hfoo',    1800,    1800,    0)
    local unit unitLowerUnitVolumeGroup = CreateUnit        (player0, 'hfoo',   1600,    2000,    0)
    local unit unitResetVolumeGroups = CreateUnit        (player0, 'hfoo',   1800,    2000,    0)

    // Create Default Melee Starting Units
    call MeleeStartingUnits()

    // Mucho Moneys
    call SetPlayerState( Player(0), PLAYER_STATE_RESOURCE_GOLD,       100000 )
    call SetPlayerState( Player(0), PLAYER_STATE_RESOURCE_FOOD_CAP,      100 )
    call SetPlayerState( Player(0), PLAYER_STATE_RESOURCE_LUMBER,      10000 )
    call SetPlayerState( Player(1), PLAYER_STATE_RESOURCE_GOLD,       100000 )
    call SetPlayerState( Player(1), PLAYER_STATE_RESOURCE_FOOD_CAP,      100 )
    call SetPlayerState( Player(1), PLAYER_STATE_RESOURCE_LUMBER,      10000 )

    // Sound debug triggers

    set duration = GetSoundFileDuration("intro.mp3")

    set morningbegintrigger = CreateTrigger()
    set nightbegintrigger = CreateTrigger()
    set morningendtrigger = CreateTrigger()
    set nightendtrigger = CreateTrigger()
   
    call TriggerRegisterGameStateEvent(morningbegintrigger,GAME_STATE_TIME_OF_DAY,EQUAL,6)
    call TriggerRegisterGameStateEvent(morningendtrigger,GAME_STATE_TIME_OF_DAY,EQUAL,19)
    call TriggerRegisterGameStateEvent(nightbegintrigger,GAME_STATE_TIME_OF_DAY,EQUAL,21)
    call TriggerRegisterGameStateEvent(nightendtrigger,GAME_STATE_TIME_OF_DAY,EQUAL,5)

    call TriggerAddAction(morningbegintrigger,function MorningBeginTriggerResponse)
    call TriggerAddAction(morningendtrigger,function MorningEndTriggerResponse)
    call TriggerAddAction(nightbegintrigger,function NightBeginTriggerResponse)
    call TriggerAddAction(nightendtrigger,function NightEndTriggerResponse)

    set trig = CreateTrigger()
    call TriggerRegisterUnitEvent(trig,unitGlueSound,EVENT_UNIT_SELECTED)
    call TriggerAddAction(trig,function TriggerResponseGlueSound)

    set trig = CreateTrigger()
    call TriggerRegisterUnitEvent(trig,unitGameSound,EVENT_UNIT_SELECTED)
    call TriggerAddAction(trig,function TriggerResponseGameSound)

    set trig = CreateTrigger()
    call TriggerRegisterUnitEvent(trig,unitIncreaseVolume,EVENT_UNIT_SELECTED)
    call TriggerAddAction(trig,function TriggerResponseIncreaseVolume)

    set trig = CreateTrigger()
    call TriggerRegisterUnitEvent(trig,unitLowerMusicVolumeGroup,EVENT_UNIT_SELECTED)
    call TriggerAddAction(trig,function TriggerResponseLowerMusicVolumeGroup)

    set trig = CreateTrigger()
    call TriggerRegisterUnitEvent(trig,unitLowerUnitVolumeGroup,EVENT_UNIT_SELECTED)
    call TriggerAddAction(trig,function TriggerResponseLowerUnitVolumeGroup)

    set trig = CreateTrigger()
    call TriggerRegisterUnitEvent(trig,unitResetVolumeGroups,EVENT_UNIT_SELECTED)
    call TriggerAddAction(trig,function TriggerResponseResetVolumeGroups)
endfunction

//===========================================================================
function RunInitializationTriggers takes nothing returns nothing
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_ORC )
    call SetPlayerRaceSelectable( Player(0), true )
    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_HUMAN )
    call SetPlayerRaceSelectable( Player(1), true )
    call SetPlayerController( Player(1), MAP_CONTROL_COMPUTER )

endfunction

function InitCustomTeams takes nothing returns nothing
    // Force: Force 1
    call SetPlayerTeam( Player(0), 0 )

    // Force: Force 2
    call SetPlayerTeam( Player(1), 1 )

endfunction

//***************************************************************************
//*
//*  Main Initialization
//*
//***************************************************************************

//===========================================================================
function main takes nothing returns nothing
    call SetCameraBounds( 768.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 512.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 9472.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 9216.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 768.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 9216.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 9472.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 512.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
    call SetDayNightModels( "EnvironmentDNCDNCLordaeronDNCLordaeronTerrainDNCLordaeronTerrain.mdl", "EnvironmentDNCDNCLordaeronDNCLordaeronUnitDNCLordaeronUnit.mdl" )
    call SetAmbientDaySound( "LordaeronSummerDay" )
    call SetAmbientNightSound( "LordaeronSummerNight" )
    call SetMapMusic( "Music", true, 0 )
    call CreateNeutralUnits(  )
    call CreatePlayerUnits(  )
    call InitBlizzard(  )
    call InitGlobals(  )
    call InitCustomTriggers(  )
    call RunInitializationTriggers(  )

endfunction

//***************************************************************************
//*
//*  Map Configuration
//*
//***************************************************************************

function config takes nothing returns nothing
    call SetMapName( "TRIGSTR_000" )
    call SetMapDescription( "TRIGSTR_002" )
    call SetPlayers( 2 )
    call SetTeams( 2 )
    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )

    call DefineStartLocation( 0, 3840.0, 3072.0 )
    call DefineStartLocation( 1, 6400.0, 7168.0 )

    // Player setup
    call InitCustomPlayerSlots(  )
    call InitCustomTeams(  )
endfunction
[/jass]
 楼主| 发表于 2007-1-23 16:35:29 | 显示全部楼层
这个文件的路径和名称我还没猜出来~~不过显然不是War3map.j或者Scripts\\War3map.j

而且文件中出现了TRIGSTR_000这种字眼~~而事实是包中没有一个wts文件~~
回复

使用道具 举报

 楼主| 发表于 2007-1-23 16:53:17 | 显示全部楼层
虽然最上面的注释里写着OrcVsOrc~~

下面的玩家设置里面确是OrcVsHuman~~而且刷新的单位还都是步兵~~HOHO~~
回复

使用道具 举报

 楼主| 发表于 2007-1-23 20:11:57 | 显示全部楼层
根据我对这个.j文件的分析~~我们可以大致猜想出该地图的样子~~

这张地图尺寸为160X160~~地形为夏日的洛丹伦(Lordaeron Summer)~~

地图镜头范围设置如图~~
Size.jpg


拥有两个玩家Player 1和Player 2~~Player 1的种族选为兽人~~控制者为玩家~~Player 2的种族选为人类~~控制者为电脑~~但是并没有势力选项卡中固定玩家设置并没有钩上~~

势力分为Force 1和Force 2~~Player 1和Player 2分别属于Force 1和Force 2~~

开始位置分别为( 3840.0, 3072.0 ) 和( 6400.0, 7168.0 )

两个玩家各自拥有一个金矿~~位于( 3000.0, 3000.0 )和( 7200.0, 7200.0 )~~黄金数量都为7500~~金矿和开始位置的相对关系如图~~

Minimap.jpg
两个玩家的初始黄金木材都为10000~~可用人口为100~~
State.jpg

在地图开始运行后~~Player 1会获得6个额外的步兵~~位置在
( 1600, 2000 ) ( 1800, 2000 )
( 1600, 1800 ) ( 1800, 1800 )
( 1600, 1600 ) ( 1800, 1600 )
排成3X2的两列方阵~~如图所示~~
Debug.jpg
选中左上角的步兵~~会显示"Lowering Unit Volume Group Volume"~~并将单位回话音降低~~

选中右上角的步兵~~会显示""Resetting Volume Groups"~~并将所有音效的音量设回默认值~~

选中左中的步兵~~会显示"Increasing music volume"~~并将音乐音量调高~~

选中右中的步兵~~会显示"Lowering Music Volume Group Volume"~~并将音乐音量调低~~

选中左下角的步兵~~会显示"Playing glue music"~~并开始播放TFT的主题背景音乐“冰封王座”(即游戏主菜单界面的背景音乐)~~

选中右下角的步兵~~会显示"Playing game music"~~并开始播放当前所选种族的主题音乐(即正常游戏音乐)~~


而当游戏时间处于5点、6点、19点、21点时会分别自动提示"night end"、"morning start"、"morning end"、"night start"~~


显然这个地图是暴雪用来测试音量控制函数和游戏时间函数的~~另外~~这个.j文件明显是直接编辑而不是使用触发编辑器生成~~从变量的名字都不带udg就能看出来老~~
回复

使用道具 举报

发表于 2007-1-24 23:48:51 | 显示全部楼层
really MB
回复

使用道具 举报

发表于 2007-1-25 10:30:20 | 显示全部楼层
MD殿的探索精神已经升华到一种境界老..555
回复

使用道具 举报

发表于 2007-1-25 11:13:35 | 显示全部楼层
well.
回复

使用道具 举报

发表于 2007-1-25 12:05:49 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

发表于 2007-1-25 21:26:48 | 显示全部楼层
貌似在论坛某地方看到了1.21所有的更新文件列表
回复

使用道具 举报

发表于 2007-1-28 00:10:52 | 显示全部楼层
看到这么多"加滋"符文眼睛就眯成了一条缝,继而晕倒...
回复

使用道具 举报

发表于 2007-1-28 00:19:31 | 显示全部楼层
看到别人晕就跟着晕
回复

使用道具 举报

发表于 2007-1-28 00:22:40 | 显示全部楼层
楼上的跟风属于灌水行为...
建议XXX
回复

使用道具 举报

发表于 2007-1-28 00:24:04 | 显示全部楼层
LS居然检举我
   拖出去TJJ
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-11-22 10:15 , Processed in 0.050075 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表