You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					
					
						
							170 lines
						
					
					
						
							7.8 KiB
						
					
					
				
			
		
		
	
	
							170 lines
						
					
					
						
							7.8 KiB
						
					
					
				//===========================================================================
 | 
						|
// 
 | 
						|
// 只是另外一张魔兽争霸的地图
 | 
						|
// 
 | 
						|
//   Warcraft III map script
 | 
						|
//   Generated by the Warcraft III World Editor
 | 
						|
//   Date: Tue Jul 19 11:22:49 2022
 | 
						|
//   Map Author: 未知
 | 
						|
// 
 | 
						|
//===========================================================================
 | 
						|
//***************************************************************************
 | 
						|
//*
 | 
						|
//*  Global Variables
 | 
						|
//*
 | 
						|
//***************************************************************************
 | 
						|
library YDTriggerSaveLoadSystem initializer Init
 | 
						|
globals
 | 
						|
        hashtable YDHT
 | 
						|
    hashtable YDLOC
 | 
						|
endglobals
 | 
						|
    private function Init takes nothing returns nothing
 | 
						|
            set YDHT = InitHashtable()
 | 
						|
        set YDLOC = InitHashtable()
 | 
						|
    endfunction
 | 
						|
endlibrary
 | 
						|
globals
 | 
						|
    // Generated
 | 
						|
    trigger gg_trg_start = null
 | 
						|
    trigger gg_trg_spell = null
 | 
						|
    unit gg_unit_hfoo_0000 = null
 | 
						|
endglobals
 | 
						|
function InitGlobals takes nothing returns nothing
 | 
						|
endfunction
 | 
						|
//***************************************************************************
 | 
						|
//*
 | 
						|
//*  Unit Creation
 | 
						|
//*
 | 
						|
//***************************************************************************
 | 
						|
//===========================================================================
 | 
						|
function CreateBuildingsForPlayer0 takes nothing returns nothing
 | 
						|
    local player p = Player(0)
 | 
						|
    local unit u
 | 
						|
    local integer unitID
 | 
						|
    local trigger t
 | 
						|
    local real life
 | 
						|
    set u = CreateUnit( p, 'htow', -256.0, 320.0, 270.000 )
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function CreateUnitsForPlayer0 takes nothing returns nothing
 | 
						|
    local player p = Player(0)
 | 
						|
    local unit u
 | 
						|
    local integer unitID
 | 
						|
    local trigger t
 | 
						|
    local real life
 | 
						|
    set gg_unit_hfoo_0000 = CreateUnit( p, 'hfoo', -340.6, 19.9, 302.210 )
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function CreatePlayerBuildings takes nothing returns nothing
 | 
						|
    call CreateBuildingsForPlayer0( )
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function CreatePlayerUnits takes nothing returns nothing
 | 
						|
    call CreateUnitsForPlayer0( )
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function CreateAllUnits takes nothing returns nothing
 | 
						|
    call CreatePlayerBuildings( )
 | 
						|
    call CreatePlayerUnits( )
 | 
						|
endfunction
 | 
						|
//***************************************************************************
 | 
						|
//*
 | 
						|
//*  Triggers
 | 
						|
//*
 | 
						|
//***************************************************************************
 | 
						|
//===========================================================================
 | 
						|
// Trigger: start
 | 
						|
//===========================================================================
 | 
						|
function Trig_startActions takes nothing returns nothing
 | 
						|
    call FogEnableOff( )
 | 
						|
    call FogMaskEnable( false )
 | 
						|
    call SetPlayerStateBJ( Player(0), PLAYER_STATE_RESOURCE_GOLD, 1000 )
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function InitTrig_start takes nothing returns nothing
 | 
						|
    set gg_trg_start = CreateTrigger()
 | 
						|
    call TriggerAddAction(gg_trg_start, function Trig_startActions)
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
// Trigger: spell
 | 
						|
//===========================================================================
 | 
						|
function Trig_spellConditions takes nothing returns boolean
 | 
						|
    return ((GetSpellAbilityId() == 'AAns'))
 | 
						|
endfunction
 | 
						|
function Trig_spellActions takes nothing returns nothing
 | 
						|
    local integer ydl_localvar_step = LoadInteger(YDLOC, GetHandleId(GetTriggeringTrigger()), 0xCFDE6C76) <?='\n'?> set ydl_localvar_step = ydl_localvar_step + 3 <?='\n'?> call SaveInteger(YDLOC, GetHandleId(GetTriggeringTrigger()), 0xCFDE6C76, ydl_localvar_step) <?='\n'?> call SaveInteger(YDLOC, GetHandleId(GetTriggeringTrigger()), 0xECE825E7, ydl_localvar_step)
 | 
						|
    call SaveInteger(YDLOC, GetHandleId(GetTriggeringTrigger())*ydl_localvar_step, <?=StringHash( "level")?>, GetUnitAbilityLevel(gg_unit_hfoo_0000, 'AAns'))
 | 
						|
    call SetUnitAbilityLevelSwapped( 'AAns', gg_unit_hfoo_0000, ( LoadInteger(YDLOC, GetHandleId(GetTriggeringTrigger())*ydl_localvar_step, <?=StringHash( "level")?>) + 1 ) )
 | 
						|
    call DisplayTextToPlayer( Player(0), 0, 0, I2S(( LoadInteger(YDLOC, GetHandleId(GetTriggeringTrigger())*ydl_localvar_step, <?=StringHash( "level")?>) + 1 )) )
 | 
						|
    call FlushChildHashtable(YDLOC, GetHandleId(GetTriggeringTrigger())*ydl_localvar_step)
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function InitTrig_spell takes nothing returns nothing
 | 
						|
    set gg_trg_spell = CreateTrigger()
 | 
						|
    call TriggerRegisterAnyUnitEventBJ( gg_trg_spell, EVENT_PLAYER_UNIT_SPELL_EFFECT )
 | 
						|
    call TriggerAddCondition(gg_trg_spell, Condition(function Trig_spellConditions))
 | 
						|
    call TriggerAddAction(gg_trg_spell, function Trig_spellActions)
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function InitCustomTriggers takes nothing returns nothing
 | 
						|
    call InitTrig_start( )
 | 
						|
    call InitTrig_spell( )
 | 
						|
endfunction
 | 
						|
//===========================================================================
 | 
						|
function RunInitializationTriggers takes nothing returns nothing
 | 
						|
    call ConditionalTriggerExecute( gg_trg_start )
 | 
						|
endfunction
 | 
						|
//***************************************************************************
 | 
						|
//*
 | 
						|
//*  Players
 | 
						|
//*
 | 
						|
//***************************************************************************
 | 
						|
function InitCustomPlayerSlots takes nothing returns nothing
 | 
						|
    // Player 0
 | 
						|
    call SetPlayerStartLocation( Player(0), 0 )
 | 
						|
    call SetPlayerColor( Player(0), ConvertPlayerColor(0) )
 | 
						|
    call SetPlayerRacePreference( Player(0), RACE_PREF_HUMAN )
 | 
						|
    call SetPlayerRaceSelectable( Player(0), true )
 | 
						|
    call SetPlayerController( Player(0), MAP_CONTROL_USER )
 | 
						|
endfunction
 | 
						|
function InitCustomTeams takes nothing returns nothing
 | 
						|
    // Force: TRIGSTR_002
 | 
						|
    call SetPlayerTeam( Player(0), 0 )
 | 
						|
endfunction
 | 
						|
//***************************************************************************
 | 
						|
//*
 | 
						|
//*  Main Initialization
 | 
						|
//*
 | 
						|
//***************************************************************************
 | 
						|
//===========================================================================
 | 
						|
function main takes nothing returns nothing
 | 
						|
    call SetCameraBounds( -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), -3328.0 + GetCameraMargin(CAMERA_MARGIN_LEFT), 3072.0 - GetCameraMargin(CAMERA_MARGIN_TOP), 3328.0 - GetCameraMargin(CAMERA_MARGIN_RIGHT), -3584.0 + GetCameraMargin(CAMERA_MARGIN_BOTTOM) )
 | 
						|
    call SetDayNightModels( "Environment\\DNC\\DNCLordaeron\\DNCLordaeronTerrain\\DNCLordaeronTerrain.mdl", "Environment\\DNC\\DNCLordaeron\\DNCLordaeronUnit\\DNCLordaeronUnit.mdl" )
 | 
						|
    call NewSoundEnvironment( "Default" )
 | 
						|
    call SetAmbientDaySound( "LordaeronSummerDay" )
 | 
						|
    call SetAmbientNightSound( "LordaeronSummerNight" )
 | 
						|
    call SetMapMusic( "Music", true, 0 )
 | 
						|
    call CreateAllUnits( )
 | 
						|
    call InitBlizzard( )
 | 
						|
    call InitGlobals( )
 | 
						|
    call InitCustomTriggers( )
 | 
						|
    call RunInitializationTriggers( )
 | 
						|
endfunction
 | 
						|
//***************************************************************************
 | 
						|
//*
 | 
						|
//*  Map Configuration
 | 
						|
//*
 | 
						|
//***************************************************************************
 | 
						|
function config takes nothing returns nothing
 | 
						|
    call SetMapName( "只是另外一张魔兽争霸的地图" )
 | 
						|
    call SetMapDescription( "没有说明" )
 | 
						|
    call SetPlayers( 1 )
 | 
						|
    call SetTeams( 1 )
 | 
						|
    call SetGamePlacement( MAP_PLACEMENT_USE_MAP_SETTINGS )
 | 
						|
    call DefineStartLocation( 0, -256.0, 320.0 )
 | 
						|
    // Player setup
 | 
						|
    call InitCustomPlayerSlots( )
 | 
						|
    call SetPlayerSlotAvailable( Player(0), MAP_CONTROL_USER )
 | 
						|
    call InitGenericPlayerSlots( )
 | 
						|
endfunction
 | 
						|
/**/
 | 
						|
 |