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.

638 lines
16 KiB

--------------------------------------------------------------------------------
-- KDArena Routine --
--------------------------------------------------------------------------------
function DummyRoutineFunc( )
cExecCheck "DummyRoutineFunc"
end
----------------------------------------------------------------------
-- MapLogin Function
----------------------------------------------------------------------
function PlayerMapLogin( MapIndex, Handle )
cExecCheck "PlayerMapLogin"
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD>, <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ, <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> ij<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ
local Var = InstanceField[ MapIndex ]
local CurSec = cCurrentSecond()
local TeamNumber = cGetKQTeamType( Handle ) + 1
local CharNo = cGetCharNo( Handle )
DebugLog( "TeamNumer : "..TeamNumber )
if Var == nil
then
return
end
if CurSec == nil
then
return
end
if TeamNumber == nil
then
return
end
if CharNo == nil
then
return
end
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD>, <EFBFBD>ڵ<EFBFBD>, <EFBFBD>߰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
local PlayerCount = #Var[ "Player" ]
local OldHandle = 0
local PlayerInsert = true
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ã<EFBFBD><EFBFBD>
for i = 1, PlayerCount
do
if CharNo == Var[ "Player" ][ i ][ "CharNo" ]
then
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD>߰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>ڵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PlayerInsert = false
OldHandle = Var[ "Player" ][ i ][ "Handle" ]
Var[ "Player" ][ i ][ "Handle" ] = Handle
Var[ "Player" ][ i ][ "FlagPickSec" ] = CurSec + ArenaFlag[ "PickDelay" ]
Var[ "Player" ][ i ][ "InMap" ] = true
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ<EFBFBD><EFBFBD> <EFBFBD>ٸ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if TeamNumber ~= Var[ "Player" ][ i ][ "TeamNumber" ]
then
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local DelTeamNumber = Var[ "Player" ][ i ][ "TeamNumber" ]
local TeamMemberCount = #Var[ "Team" ][ DelTeamNumber ][ "Member" ]
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for DelMemberIndex = 1, TeamMemberCount
do
if Var[ "Team" ][ DelTeamNumber ][ "Member" ] == OldHandle
then
for MoveIndex = DelMemberIndex, ( TeamMemberCount - 1 )
do
Var[ "Team" ][ DelTeamNumber ][ "Member" ][ MoveIndex ] = Var[ "Team" ][ DelTeamNumber ][ "Member" ][ ( MoveIndex + 1 ) ]
end
Var[ "Team" ][ DelTeamNumber ][ "Member" ][ TeamMemberCount ] = nil
break
end
end
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for MoveIndex = i, ( PlayerCount - 1 )
do
Var[ "Player" ][ MoveIndex ] = Var[ "Player" ][ ( MoveIndex + 1 ) ]
end
Var[ "Player" ][ PlayerCount ] = nil
return
end
break
end
end
if PlayerInsert == true
then
------------------------------------------------------------
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>߰<EFBFBD>
------------------------------------------------------------
if TeamNumber >= DEF_TEAM
then
return
end
local P_InsertIndex = ( PlayerCount + 1 )
local T_InsertIndex = ( #Var[ "Team" ][ TeamNumber ][ "Member" ] + 1 )
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <EFBFBD>߰<EFBFBD>
Var[ "Player" ][ P_InsertIndex ] = {}
Var[ "Player" ][ P_InsertIndex ][ "Handle" ] = Handle
Var[ "Player" ][ P_InsertIndex ][ "CharNo" ] = CharNo
Var[ "Player" ][ P_InsertIndex ][ "FlagPickSec" ] = CurSec + ArenaFlag[ "PickDelay" ]
Var[ "Player" ][ P_InsertIndex ][ "InMap" ] = true
Var[ "Player" ][ P_InsertIndex ][ "TeamNumber" ] = TeamNumber
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <EFBFBD>߰<EFBFBD>
Var["Team"][ TeamNumber ][ "Member" ][ T_InsertIndex ] = Handle
elseif OldHandle ~= Handle
then
------------------------------------------------------------
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
------------------------------------------------------------
local MemberCount = #Var["Team"][ TeamNumber ][ "Member" ]
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for i = 1, MemberCount
do
if OldHandle == Var["Team"][ TeamNumber ][ "Member" ][ i ]
then
Var["Team"][ TeamNumber ][ "Member" ][ i ] = Handle
break
end
end
end
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for i = 1, #TeamUniform[ TeamNumber ]
do
cViewSlotEquip( Handle, TeamUniform[ TeamNumber ][ i ] )
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ƴϸ<EFBFBD> <EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var[ "KQLimitTime" ] <= 0
then
return
end
-- <EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cScoreInfo( Handle, #TeamNumberList, Var[ "Team" ][ RED_TEAM ][ "Score" ], Var[ "Team" ][ BLUE_TEAM ][ "Score" ] )
cTimer_Obj( Handle, ( Var[ "KQLimitTime" ] - CurSec ) )
end
----------------------------------------------------------------------
-- Click Functions
----------------------------------------------------------------------
function ArenaGate_Click( NPCHandle, PlayerHandle, PlayerCharNo, Arg )
cExecCheck "ArenaGate_Click"
-- <EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local NPCMapIndex = cGetCurMapIndex( NPCHandle )
if NPCMapIndex == nil
then
return
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local Var = InstanceField[ NPCMapIndex ]
if Var == nil
then
return
end
if Var[ "ArenaGate" ] == nil
then
return
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ã<EFBFBD><EFBFBD>
local WarpInfo = nil
for i = 1, Var[ "ArenaGate" ][ "Count" ]
do
if Var[ "ArenaGate" ][ i ] == NPCHandle
then
WarpInfo = WarpGate[ i ]
if WarpInfo == nil
then
return
end
break
end
end
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
for i = 1, #Var[ "Player" ]
do
if Var[ "Player" ][ i ][ "CharNo" ] == PlayerCharNo
then
if Var[ "Player" ][ i ][ "TeamNumber" ] == WarpInfo[ "Team" ]
then
cCastTeleport( PlayerHandle, "SpecificCoord", WarpInfo[ "X" ], WarpInfo[ "Y" ] );
end
end
end
end
----------------------------------------------------------------------
-- Entrance Functions
----------------------------------------------------------------------
function ArenaFlag_Entrance( Handle, MapIndex )
cExecCheck "ArenaFlag_Entrance"
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD>
local Var = InstanceField[ MapIndex ]
local CurSec = cCurrentSecond()
if Var == nil
then
return ReturnAI[ "END" ]
end
if CurSec == nil
then
return ReturnAI[ "END" ]
end
if Var[ "KQLimitTime" ] == 0
then
return ReturnAI[ "END" ]
end
local ArenaFlagInfo = Var[ "ArenaFlag" ]
if ArenaFlagInfo == nil
then
return ReturnAI[ "END" ]
end
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ ã<EFBFBD><EFBFBD>
local FlagTeamNumber = DEF_TEAM
for i = 1, #TeamNumberList
do
if ArenaFlagInfo[ TeamNumberList[ i ] ][ "Handle" ] == Handle
then
FlagTeamNumber = TeamNumberList[ i ]
end
end
if FlagTeamNumber == DEF_TEAM
then
return ReturnAI[ "END" ]
end
------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> 30 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ġ<EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD>
------------------------------------------------------------
if ArenaFlagInfo[ FlagTeamNumber ][ "Drop_LifeTime" ] ~= nil
then
if ArenaFlagInfo[ FlagTeamNumber ][ "Drop_LifeTime" ] <= CurSec
then
local Regen_Flag = RegenInfo[ "NPC" ][ "ArenaFlag" ][ FlagTeamNumber ]
local Regen_Handle = nil
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cNPCVanish( Handle )
ArenaFlagInfo[ FlagTeamNumber ][ "Handle" ] = nil
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
Regen_Handle = cMobRegen_XY( Var[ "MapIndex" ], Regen_Flag[ "Index" ], Regen_Flag[ "X" ], Regen_Flag[ "Y" ], Regen_Flag[ "Dir" ] )
if Regen_Handle ~= nil
then
cSetAIScript ( MainLuaScriptPath, Regen_Handle )
cAIScriptFunc( Regen_Handle, "Entrance", "ArenaFlag_Entrance" )
ArenaFlagInfo[ FlagTeamNumber ][ "Handle" ] = Regen_Handle
ArenaFlagInfo[ FlagTeamNumber ][ "PlayerHandle" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "PlayerTeam" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "Drop_LifeTime" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "X" ] = Regen_Flag[ "X" ]
ArenaFlagInfo[ FlagTeamNumber ][ "Y" ] = Regen_Flag[ "Y" ]
ArenaFlagInfo[ FlagTeamNumber ][ "GoalConditionNoticeTime"] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "Penalty"] = nil
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȸ<EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cScriptMessage( Var[ "MapIndex" ], ArenaFlag[ FlagTeamNumber ][ "ScriptMsg" ][ "Return_Flag" ] )
return ReturnAI[ "END" ]
end
end
------------------------------------------------------------
-- <EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
------------------------------------------------------------
local PlayerList = { cNearObjectList( Handle, ArenaFlag[ "CheckDistance_Falg" ], ObjectType[ "Player" ] ) }
for i = 1, #PlayerList
do
-- <EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for PlayerIndex = 1, #Var[ "Player" ]
do
-- <EFBFBD>ڵ<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var[ "Player" ][ PlayerIndex ][ "Handle" ] == PlayerList[ i ] and
Var[ "Player" ][ PlayerIndex ][ "FlagPickSec" ] <= CurSec
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> Ȯ<EFBFBD><EFBFBD>( <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
local bAbstateCheck = false
for j = 1, #ArenaFlag[ "Drop_Abstate" ]
do
if cAbstateRestTime( PlayerList[ i ], ArenaFlag[ "Drop_Abstate" ][ j ] ) ~= nil
then
bAbstateCheck = true
break
end
end
if bAbstateCheck == false
then
if Var[ "Player" ][ PlayerIndex ][ "TeamNumber" ] == FlagTeamNumber
then
if ArenaFlagInfo[ FlagTeamNumber ][ "Drop_LifeTime" ] ~= nil
then
------------------------------------------------------------
-- <EFBFBD>Ʊ<EFBFBD> : <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
------------------------------------------------------------
local Regen_Flag = RegenInfo[ "NPC" ][ "ArenaFlag" ][ FlagTeamNumber ]
local Regen_Handle = nil
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cNPCVanish( Handle )
ArenaFlagInfo[ FlagTeamNumber ][ "Handle" ] = nil
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
Regen_Handle = cMobRegen_XY( Var[ "MapIndex" ], Regen_Flag[ "Index" ], Regen_Flag[ "X" ], Regen_Flag[ "Y" ], Regen_Flag[ "Dir" ] )
if Regen_Handle ~= nil
then
cSetAIScript ( MainLuaScriptPath, Regen_Handle )
cAIScriptFunc( Regen_Handle, "Entrance", "ArenaFlag_Entrance" )
ArenaFlagInfo[ FlagTeamNumber ][ "Handle" ] = Regen_Handle
ArenaFlagInfo[ FlagTeamNumber ][ "PlayerHandle" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "PlayerTeam" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "Drop_LifeTime" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "X" ] = Regen_Flag[ "X" ]
ArenaFlagInfo[ FlagTeamNumber ][ "Y" ] = Regen_Flag[ "Y" ]
ArenaFlagInfo[ FlagTeamNumber ][ "GoalConditionNoticeTime" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "Penalty"] = nil
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȸ<EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cScriptMessage( Var[ "MapIndex" ], ArenaFlag[ FlagTeamNumber ][ "ScriptMsg" ][ "Return_Flag" ] )
return ReturnAI[ "END" ]
end
else
------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD>
------------------------------------------------------------
--
local FlagData = ArenaFlag[ FlagTeamNumber ]
local PenaltyData = ArenaFlag["Penalty"]
local Player_X, Player_Y = cObjectLocate( Handle )
if X == nil or Y == nil
then
Player_X = 0
Player_Y = 0
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
ArenaFlagInfo[ FlagTeamNumber ][ "Handle" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "PlayerHandle" ] = Var[ "Player" ][ PlayerIndex ][ "Handle" ]
ArenaFlagInfo[ FlagTeamNumber ][ "PlayerTeam" ] = Var[ "Player" ][ PlayerIndex ][ "TeamNumber" ]
ArenaFlagInfo[ FlagTeamNumber ][ "Drop_LifeTime" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "X" ] = Player_X
ArenaFlagInfo[ FlagTeamNumber ][ "Y" ] = Player_Y
ArenaFlagInfo[ FlagTeamNumber ][ "GoalConditionNoticeTime" ] = nil
ArenaFlagInfo[ FlagTeamNumber ][ "Penalty"] = {}
ArenaFlagInfo[ FlagTeamNumber ][ "Penalty"]["Step"] = 1
ArenaFlagInfo[ FlagTeamNumber ][ "Penalty"]["CheckTime"] = CurSec + PenaltyData["Step"][ 1 ]["CheckTick"]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> <EFBFBD>ɱ<EFBFBD>
cSetAbstate( PlayerList[i], FlagData["Abstate"]["Index"],
FlagData["Abstate"]["Str"],
FlagData["Abstate"]["KeepTime"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>г<EFBFBD>Ƽ <EFBFBD>ο<EFBFBD>
for PenaltyIndex = 1, #PenaltyData["Abstate"]
do
cSetAbstate( PlayerList[i], PenaltyData["Abstate"][PenaltyIndex]["Index"],
PenaltyData["Abstate"][PenaltyIndex]["Str"],
PenaltyData["Abstate"][PenaltyIndex]["KeepTime"] )
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ǥ<EFBFBD><EFBFBD>
cDirectionalArrow( PlayerList[ i ], ArenaFlag[ FlagTeamNumber ][ "GoalPoint" ][ "X" ], ArenaFlag[ FlagTeamNumber ][ "GoalPoint" ][ "Y" ] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD><EFBFBD><EFBFBD>
local PlayerName = cGetPlayerName( PlayerList[ i ] )
if PlayerName == nil
then
PlayerName = ""
end
cScriptMessage( Var[ "MapIndex" ], ArenaFlag[ FlagTeamNumber ][ "ScriptMsg" ][ "Have_Flag" ], PlayerName )
cNPCVanish( Handle )
return ReturnAI[ "END" ]
end
end
break
end
end
end
return ReturnAI[ "END" ]
end
function ArenaStone_Entrance( Handle, MapIndex )
cExecCheck "ArenaStone_Entrance"
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD>
local Var = InstanceField[ MapIndex ]
local CurSec = cCurrentSecond()
if Var == nil
then
return ReturnAI[ "END" ]
end
if CurSec == nil
then
return ReturnAI[ "END" ]
end
if Var[ "ArenaStone" ] == nil
then
return ReturnAI[ "END" ]
end
if Var[ "ArenaStone" ][ "SkillUseTime" ] == nil
then
return ReturnAI[ "END" ]
end
if Var[ "ArenaStone" ][ "SkillUseTime" ][ Handle ] == nil
then
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
Var[ "ArenaStone" ][ "SkillUseTime" ][ Handle ] = CurSec + ArenaStone[ "IntervalTime" ]
return ReturnAI[ "END" ]
end
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
if Var[ "ArenaStone" ][ "SkillUseTime" ][ Handle ] <= CurSec
then
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSkillBlast( Handle, Handle, ArenaStone[ "SkillIndex" ] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var[ "ArenaStone" ][ "SkillUseTime" ][ Handle ] = CurSec + ArenaStone[ "IntervalTime" ]
end
return ReturnAI[ "END" ]
end
function ArenaCrystal_Entrance( Handle, MapIndex )
cExecCheck "ArenaCrystal"
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD>, ũ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż HP <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local Var = InstanceField[ MapIndex ]
local CurSec = cCurrentSecond()
local CurHP, MaHP = cObjectHP( Handle )
if Var == nil
then
return ReturnAI[ "END" ]
end
if CurSec == nil
then
return ReturnAI[ "END" ]
end
if CurHP == nil
then
return returnAI[ "END" ]
end
if Var[ "ArenaCrystal" ] == nil
then
return ReturnAI[ "END" ]
end
-- ũ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż HP <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD>
if CurHP > 1
then
------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD>ų
------------------------------------------------------------
if Var[ "ArenaCrystal" ][ "SkillUseTime" ] == nil
then
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
Var[ "ArenaCrystal" ][ "SkillUseTime" ] = CurSec + ArenaCrystal[ "Routine" ][ "BlastTime" ]
return ReturnAI[ "END" ]
end
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
if Var[ "ArenaCrystal" ][ "SkillUseTime" ] <= CurSec
then
-- ũ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż <EFBFBD><EFBFBD>ġ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local X, Y = cObjectLocate( Handle )
if X == nil or Y == nil
then
return ReturnAI[ "END" ]
end
-- <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--cMagicFieldSpread( Handle, X, Y, 0, ArenaCrystal[ "Routine" ][ "MagicField" ], 0 )
cSkillBlast( Handle, Handle, ArenaCrystal[ "Routine" ][ "SkillIndex" ] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ų <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var[ "ArenaCrystal" ][ "SkillUseTime" ] = CurSec + ArenaCrystal[ "Routine" ][ "BlastTime" ]
end
else
------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD>ų
------------------------------------------------------------
if Var[ "ArenaCrystal" ][ "SkillUseTime" ] ~= nil
then
if Var[ "ArenaCrystal" ][ "SkillUseTime" ] <= CurSec
then
-- <EFBFBD><EFBFBD>ų<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSkillBlast( Handle, Handle, ArenaCrystal[ "Dead" ][ "SkillIndex" ] )
Var[ "ArenaCrystal" ][ "SkillUseTime" ] = nil
Var[ "ArenaCrystal" ][ "VanishTime" ] = CurSec + ArenaCrystal[ "Dead" ][ "BlastTime" ]
end
end
-- <EFBFBD>Ҹ<EFBFBD><EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
if Var[ "ArenaCrystal" ][ "VanishTime" ] ~= nil
then
if Var[ "ArenaCrystal" ][ "VanishTime" ] <= CurSec
then
-- <EFBFBD>ڵ<EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var[ "ArenaCrystal" ][ "Handle" ] = nil
-- <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>Ҹ<EFBFBD>
cAIScriptSet( Handle )
cKillObject( Handle )
end
end
end
return ReturnAI[ "END" ]
end