|
我菜 勿笑
[jass]function SelectHero takes nothing returns nothing
local integer i
local timer tm=CreateTimer()
set i = GetPlayerState(Player(i),PLAYER_STATE_RESOURCE_FOOD_USED) - 1
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_FOOD_USED,i)
if i==0 then
else
call TimerStart( tm, 1.00, false,function SelectHero )
endif
endfunction
function MobileCamp takes nothing returns nothing
if IsPlayerAlly(GetTriggerPlayer(),Player(5)) ==true then
call SetUnitPositionLoc( GetTriggerUnit(), Location(8590,8499))
else
call SetUnitPositionLoc( GetTriggerUnit(), Location(-8519,-8777))
endif
endfunction
function invilization_1 takes nothing returns nothing
local integer i=0
local trigger SelectHero=CreateTrigger()
local timer tm=CreateTimer()
call SetMapMusic( gg_snd_bgm, true, 0 )
call PlayMusic( gg_snd_bgm )
call TriggerRegisterEnterRectSimple( SelectHero, gg_rct_SelectHeroAura )
call TriggerAddAction(SelectHero,function MobileCamp)
call DestroyTrigger(gg_trg_GameInvilization)
loop
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_GOLD,1000)
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_FOOD_CAP,0)
call SetPlayerState(Player(i),PLAYER_STATE_RESOURCE_FOOD_USED,20)
set i=i+1
exitwhen i>11
endloop
call TimerStart( tm, 1.00, false,function SelectHero )
endfunction
function invilization_all takes nothing returns nothing
local trigger trg_invilization = CreateTrigger()
call TriggerAddAction(trg_invilization,function invilization_1)
call TriggerRegisterTimerEventSingle( trg_invilization, 0.01 )
endfunction
//===========================================================================
function InitTrig_GameInvilization takes nothing returns nothing
set gg_trg_GameInvilization = CreateTrigger( )
call TriggerAddAction( gg_trg_GameInvilization, function invilization_all )
endfunction[/jass] |
|