|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
-- Routine --
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function DummyRoutineFunc()
|
|
|
|
|
cExecCheck "DummyRoutineFunc"
|
|
|
|
|
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
-- MapLogin Function
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
function PlayerMapLogin( MapIndex, Handle )
|
|
|
|
|
cExecCheck "PlayerMapLogin"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local CurSec = cCurrentSecond()
|
|
|
|
|
local TeamType = cGetKQTeamType( Handle )
|
|
|
|
|
local CharNo = cGetCharNo( Handle )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local Var = InstanceField[ MapIndex ]
|
|
|
|
|
if Var == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "PlayerMapLogin : Var nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if CurSec == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "PlayerMapLogin : CurSec nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "PlayerMapLogin : TeamType nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType ~= KQ_TEAM["RED"] and TeamType ~= KQ_TEAM["BLUE"]
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "PlayerMapLogin : Invalid TeamType "..TeamType )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if CharNo == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "PlayerMapLogin : CharNo nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if Var["Team"] == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "PlayerMapLogin : Var[\"Team\"] nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD>
|
|
|
|
|
for i = 1, #LoginResetAbstate
|
|
|
|
|
do
|
|
|
|
|
cResetAbstate( Handle, LoginResetAbstate[ i ] )
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>߰<EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
local PlayerInfo = Player_Get( Var, CharNo )
|
|
|
|
|
if PlayerInfo == nil
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>ű<EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>߰<EFBFBD>
|
|
|
|
|
Player_Insert( Var, CharNo, Handle, TeamType )
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["Handle"] = Handle
|
|
|
|
|
PlayerInfo["IsInMap"] = true
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <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>
|
|
|
|
|
for i = 1, #TeamUniform[ TeamType ]
|
|
|
|
|
do
|
|
|
|
|
cViewSlotEquip( Handle, TeamUniform[ TeamType ][ i ] )
|
|
|
|
|
cSetAbstate( Handle, TeamAbstate[ TeamType ]["Index"], TeamAbstate[ TeamType ]["Str"], TeamAbstate[ TeamType ]["KeepTime"], Handle )
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>̵<EFBFBD> <EFBFBD>ӵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cStaticWalkSpeed( Handle, true, 33 )
|
|
|
|
|
cStaticRunSpeed( Handle, true, 127 )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ƴϸ<EFBFBD> <EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if Var["RoundEndTime"] <= 0
|
|
|
|
|
then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, Ÿ<EFBFBD≯<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
local RedTeamInfo = Var["Team"][ KQ_TEAM["RED"] ]
|
|
|
|
|
local BlueTeamInfo = Var["Team"][ KQ_TEAM["BLUE"] ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <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>
|
|
|
|
|
if PlayerInfo ~= nil
|
|
|
|
|
then
|
|
|
|
|
if PlayerInfo["IsOut"] == false
|
|
|
|
|
then
|
|
|
|
|
Var["Team"][ TeamType ]["Score"] = Var["Team"][ TeamType ]["Score"] + 1
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
|
|
|
|
|
cScoreBoard( Handle, true, Var["Round"], RedTeamInfo["RoundResultCount"]["Win"], RedTeamInfo["Score"], BlueTeamInfo["RoundResultCount"]["Win"], BlueTeamInfo["Score"] )
|
|
|
|
|
cTimer_Obj( Handle, (Var["RoundEndTime"] - CurSec) )
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
-- ServantSummon Function
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
function ServantSummon( MapIndex, ServantHandle, ServantIndex, MasterHandle )
|
|
|
|
|
cExecCheck "ServantSummon"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ServantIndex == Cake["MobIndex"]
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
cSetAIScript ( MainLuaScriptPath, ServantHandle )
|
|
|
|
|
cAIScriptFunc( ServantHandle, "Entrance", "Cake_Entrance" )
|
|
|
|
|
cAIScriptFunc( ServantHandle, "NPCAction", "Cake_NPCAction" )
|
|
|
|
|
|
|
|
|
|
elseif ServantIndex == DrinkCannon["MobIndex"]
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
cSetAIScript ( MainLuaScriptPath, ServantHandle )
|
|
|
|
|
cAIScriptFunc( ServantHandle, "Entrance", "DrinkCannon_Entrance" )
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
-- Cake_Explosion Function
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
function Cake_Explosion( Var, NPCHandle )
|
|
|
|
|
cExecCheck "Cake_Explosion"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local CurSec = cCurrentSecond()
|
|
|
|
|
local TeamType = cGetKQTeamType( NPCHandle )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Var == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Explosion : Var nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if NPCHandle == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Explosion : Var nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if CurSec == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Explosion : CurSec nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Explosion : TeamType nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType ~= KQ_TEAM["RED"] and TeamType ~= KQ_TEAM["BLUE"]
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Explosion : Invalid TeamType "..TeamType )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <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>
|
|
|
|
|
if Var["RoundEndTime"] > 0
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
|
|
|
|
|
local PlayerList = Var["Player"]
|
|
|
|
|
if PlayerList == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Explosion : PlayerList nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for i = 1, #PlayerList
|
|
|
|
|
do
|
|
|
|
|
local PlayerInfo = PlayerList[ i ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
|
|
|
|
|
if PlayerInfo["IsInMap"] == true and -- <EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["TeamType"] == OpposingTeamInfo[ TeamType ] and -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["PrisonLinkToWaitTime"] == 0 and -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["IsOut"] == false and -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ۿ<EFBFBD> <EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cDistanceSquar( NPCHandle, PlayerInfo["Handle"] ) <= ( Cake["Dist"] * Cake["Dist"] ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
local Player_x, Player_y = cObjectLocate( PlayerInfo["Handle"] )
|
|
|
|
|
|
|
|
|
|
if Player_x ~= nil and Player_y ~= nil
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
if cFindAttackBlockLocate( NPCHandle, Player_x, Player_y ) == true -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
PlayerInfo["CakeHandle"] = NPCHandle
|
|
|
|
|
PlayerInfo["CakeAbstateTime"] = CurSec + Cake["SetAbstateWait"]
|
|
|
|
|
PlayerInfo["PrisonLinkToWaitTime"] = CurSec + Cake["LinktoWait"]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cSkillBlast( NPCHandle, NPCHandle, Cake["SkillIndex"] )
|
|
|
|
|
cVanishReserv( NPCHandle, 3 )
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
-- Cake_Entrance Function
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
function Cake_Entrance( Handle, MapIndex )
|
|
|
|
|
cExecCheck "Cake_Entrance"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if cIsObjectDead( Handle ) ~= nil
|
|
|
|
|
then
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if cIsObjectAlreadyDead( Handle ) == true
|
|
|
|
|
then
|
|
|
|
|
cAIScriptSet( Handle )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>߾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
--if cGetMoveState( Handle ) ~= 0
|
|
|
|
|
local MoveState, MoveStateTime, MoveStateSetTime = cGetMoveState( Handle )
|
|
|
|
|
if MoveState ~= 0 or MoveStateSetTime == 0
|
|
|
|
|
then
|
|
|
|
|
return ReturnAI["CPP"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local Var = InstanceField[ MapIndex ]
|
|
|
|
|
|
|
|
|
|
if Var == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_Entrance : Var nil" )
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Cake_Explosion( Var, Handle )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
-- Cake_NPCAction Function
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
function Cake_NPCAction( MapIndex, NPCHandle, PlyHandle, PlyCharNo )
|
|
|
|
|
cExecCheck "Cake_NPCAction"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local TeamType = cGetKQTeamType( NPCHandle )
|
|
|
|
|
local Var = InstanceField[ MapIndex ]
|
|
|
|
|
local MasterHandle = cGetMaster( NPCHandle )
|
|
|
|
|
|
|
|
|
|
if Var == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_NPCAction : Var nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_NPCAction : TeamType nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType ~= KQ_TEAM["RED"] and TeamType ~= KQ_TEAM["BLUE"]
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "Cake_NPCAction : Invalid TeamType "..TeamType )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
|
|
|
|
|
if MasterHandle == PlyHandle
|
|
|
|
|
then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- NPC<EFBFBD>̵<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cMoveStop( NPCHandle )
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Cake_Explosion( Var, NPCHandle )
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
-- DrinkCannon_Entrance Function
|
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
|
function DrinkCannon_Entrance( Handle, MapIndex )
|
|
|
|
|
cExecCheck "DrinkCannon_Entrance"
|
|
|
|
|
|
|
|
|
|
local CurSec = cCurrentSecond()
|
|
|
|
|
local TeamType = cGetKQTeamType( Handle )
|
|
|
|
|
local Var = InstanceField[ MapIndex ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if Var == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "DrinkCannon_Entrance : Var nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- <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>.
|
|
|
|
|
if Var["RoundEndTime"] <= 0
|
|
|
|
|
then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if CurSec == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "DrinkCannon_Entrance : CurSec nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "DrinkCannon_Entrance : TeamType nil" )
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if TeamType ~= KQ_TEAM["RED"] and TeamType ~= KQ_TEAM["BLUE"]
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "DrinkCannon_Entrance : Invalid TeamType "..TeamType )
|
|
|
|
|
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 PlayerList = Var["Player"]
|
|
|
|
|
if PlayerList == nil
|
|
|
|
|
then
|
|
|
|
|
ErrorLog( "DrinkCannon_Entrance : PlayerList nil" )
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
for i = 1, #PlayerList
|
|
|
|
|
do
|
|
|
|
|
local PlayerInfo = PlayerList[ i ]
|
|
|
|
|
|
|
|
|
|
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
|
|
|
|
|
if PlayerInfo["IsInMap"] == true and -- <EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["TeamType"] == OpposingTeamInfo[ TeamType ] and -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["PrisonLinkToWaitTime"] == 0 and -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
PlayerInfo["IsOut"] == false and -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ۿ<EFBFBD> <EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
cDistanceSquar( Handle, PlayerInfo["Handle"] ) <= ( DrinkCannon["Dist"] * DrinkCannon["Dist"] ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȿ<EFBFBD> <EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
local Player_x, Player_y = cObjectLocate( PlayerInfo["Handle"] )
|
|
|
|
|
|
|
|
|
|
if Player_x ~= nil and Player_y ~= nil
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
if cFindAttackBlockLocate( Handle, Player_x, Player_y ) == true -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
|
|
|
|
|
then
|
|
|
|
|
|
|
|
|
|
cSetAbstate( PlayerInfo["Handle"], DrinkCannon["Abstate"]["Index"], 1, DrinkCannon["Abstate"]["KeepTime"], Handle )
|
|
|
|
|
PlayerInfo["PrisonLinkToWaitTime"] = CurSec + DrinkCannon["LinktoWait"]
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cNPCVanish( Handle )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ReturnAI["END"]
|
|
|
|
|
end
|