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.
SigFiesta/LuaScript/KQ/KDSpring/KDSpring_StepFunc.lua

1101 lines
31 KiB

------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_DIVIDE_TEAM_WAIT( KSMemory, nCurSec )
cExecCheck "SF_DIVIDE_TEAM_WAIT"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if #KSMemory["PLAYER_LIST"] >= KQ_MAX_PLAYER
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ο<EFBFBD> Ȯ<EFBFBD><EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec -- <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>
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
for i = 1, #KSMemory["PLAYER_LIST"]
do -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD>Ƽ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cPartyLeave( KSMemory["PLAYER_LIST"][i]["PHND"] )
end
if #KQ_STEP >= (KSMemory["STEP_NO"] + 1)
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = KSMemory["STEP_NO"] + 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
return true
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_DIVIDE_TEAM( KSMemory, nCurSec )
cExecCheck "SF_DIVIDE_TEAM"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
local nConnectNum = #KSMemory["PLAYER_LIST"] -- ŷ<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, nConnectNum
do
if cIsInMap( KSMemory["PLAYER_LIST"][i]["PHND"], KSMemory["FIELD_NAME"] ) == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
nConnectNum = nConnectNum - 1
KSMemory["PLAYER_LIST"][i]["PIS_MAP"] = false
end
end
if nConnectNum <= 1
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>
return false
end
-- <EFBFBD><EFBFBD> <EFBFBD>ݱ<EFBFBD>
for i = 1, #KSMemory["DOOR_LIST"]
do
cDoorAction( KSMemory["DOOR_LIST"][i], KQ_DOOR[i]["KD_BLOCK"], "close" )
end
for i = 1, #KQ_NPC
do -- NPC <EFBFBD><EFBFBD>ȯ
cNPCRegen( KSMemory["FIELD_NAME"], KQ_NPC[i] )
end
local TeamInfo = KSMemory["TEAM_LIST"] -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local nTeamNo = KQ_TEAM_NO["KTN_DEFAULT"] -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ
local nTeamMemberMaxNum = nConnectNum / 2 -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ִ<EFBFBD><EFBFBD>ɼ<EFBFBD>
if TeamInfo == nil
then -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for i = 1, #KSMemory["PLAYER_LIST"]
do
if KSMemory["PLAYER_LIST"][i]["PIS_MAP"] == true
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD>
-- 50% Ȯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cPermileRate( 500 ) == 1
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
nTeamNo = KQ_TEAM_NO["KTN_RED"]
if #TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TMEMBER_LIST"] >= nTeamMemberMaxNum
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
if #TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TMEMBER_LIST"] < nTeamMemberMaxNum
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
nTeamNo = KQ_TEAM_NO["KTN_BLUE"]
end
end
else -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
nTeamNo = KQ_TEAM_NO["KTN_BLUE"]
if #TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TMEMBER_LIST"] >= nTeamMemberMaxNum
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
if #TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TMEMBER_LIST"] < nTeamMemberMaxNum
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
nTeamNo = KQ_TEAM_NO["KTN_RED"]
end
end
end
local nIndex = (#TeamInfo[nTeamNo]["TMEMBER_LIST"] + 1) -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD>
TeamInfo[nTeamNo]["TMEMBER_LIST"][nIndex] = KSMemory["PLAYER_LIST"][i]["PHND"] -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] = nTeamNo -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ
if nIndex > 1
then -- <EFBFBD><EFBFBD>Ƽ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cPartyJoin( TeamInfo[nTeamNo]["TMEMBER_LIST"][1], TeamInfo[nTeamNo]["TMEMBER_LIST"][nIndex] )
end
-- for j = 1, #KQ_TEAM[nTeamNo]["KT_UNIFORM"]
-- do -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- cViewSlotEquip( TeamInfo[nTeamNo]["TMEMBER_LIST"][nIndex], KQ_TEAM[nTeamNo]["KT_UNIFORM"][j] )
-- end
end
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ġ<EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD>
for i = 1, #KSMemory["PLAYER_LIST"]
do
nTeamNo = KSMemory["PLAYER_LIST"][i]["PTEAM_NO"]
if nTeamNo ~= KQ_TEAM_NO["KTN_DEFAULT"]
then -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ Ȯ<EFBFBD><EFBFBD>
cLinkTo( KSMemory["PLAYER_LIST"][i]["PHND"], KSMemory["FIELD_NAME"], KQ_TEAM[nTeamNo]["KT_POINT_X"], KQ_TEAM[nTeamNo]["KT_POINT_Y"] )
end
end
if #KQ_STEP >= (KSMemory["STEP_NO"] + 1)
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = KSMemory["STEP_NO"] + 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
return true
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_START_WAIT( KSMemory, nCurSec )
cExecCheck "SF_START_WAIT"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
if KSMemory["FLAG_INFO"] == nil
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
cStartMsg_AllInMap( KSMemory["FIELD_NAME"] ) -- ŷ<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, #KQ_ITEM_MOB
do
KSMemory["MOB_LIST"][i] = {}
KSMemory["MOB_LIST"][i]["MHND"] = cMobRegen_XY( KSMemory["FIELD_NAME"], KQ_ITEM_MOB[i]["KIM_INDEX"], KQ_ITEM_MOB[i]["KIM_X"], KQ_ITEM_MOB[i]["KIM_Y"], KQ_ITEM_MOB[i]["KIM_DIR"] )
KSMemory["MOB_LIST"][i]["MREGEN_TIME"] = 0
end
local nNextStep = KSMemory["STEP_NO"] + 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
KSMemory["FLAG_INFO"]["FHND"] = cMobRegen_XY( KSMemory["FIELD_NAME"], KQ_FLAG_POINT["KFP_INDEX"], KQ_FLAG_POINT["KFP_X"], KQ_FLAG_POINT["KFP_Y"], KQ_FLAG_POINT["KFP_DIR"] )
if KSMemory["FLAG_INFO"]["FHND"] == nil then
nNextStep = 10 -- SF_END_WAIT
else
KSMemory["FLAG_INFO"]["FINDEX"] = KQ_FLAG_POINT["KFP_INDEX"]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetAIScript( KQ_SCRIPT_NAME, KSMemory["FLAG_INFO"]["FHND"] )
cAIScriptFunc( KSMemory["FLAG_INFO"]["FHND"], "Entrance", "KF_FLGAG_OBJECT" )
end
if #KQ_STEP >= nNextStep
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = nNextStep -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
return true
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_START( KSMemory, nCurSec )
cExecCheck "SF_START"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for i = 1, #KSMemory["DOOR_LIST"]
do
cDoorAction( KSMemory["DOOR_LIST"][i], KQ_DOOR[i]["KD_BLOCK"], "open" )
end
if #KQ_STEP >= (KSMemory["STEP_NO"] + 1)
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = KSMemory["STEP_NO"] + 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
-- Ÿ<EFBFBD≯<EFBFBD> ǥ<EFBFBD><EFBFBD>
cTimer( KSMemory["FIELD_NAME"], KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] )
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_ROUTINE( KSMemory, nCurSec )
cExecCheck "SF_ROUTINE"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
local TeamInfo = KSMemory["TEAM_LIST"]
local FlagInfo = KSMemory["FLAG_INFO"]
if TeamInfo == nil
then
return false
end
if FlagInfo == nil
then
return false
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ִ<EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> Ȯ<EFBFBD><EFBFBD>
FLAG_PLAYER_CHECK( KSMemory, nCurSec )
if FlagInfo["FREGEN_TIME"] ~= 0
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
if nCurSec >= FlagInfo["FREGEN_TIME"]
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
FlagInfo["FHND"] = cMobRegen_XY( KSMemory["FIELD_NAME"], KQ_FLAG_POINT["KFP_INDEX"], KQ_FLAG_POINT["KFP_X"], KQ_FLAG_POINT["KFP_Y"], KQ_FLAG_POINT["KFP_DIR"] )
if FlagInfo["FHND"] == nil then
FlagInfo["FHND"] = KQ_INVALID_HANDLE
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetAIScript( KQ_SCRIPT_NAME, FlagInfo["FHND"] )
cAIScriptFunc( FlagInfo["FHND"], "Entrance", "KF_FLGAG_OBJECT" )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
FlagInfo["FPHND"] = KQ_INVALID_HANDLE
FlagInfo["FINDEX"] = KQ_FLAG_POINT["KFP_INDEX"]
FlagInfo["FPICK_TIME"] = 0
FlagInfo["FREGEN_TIME"] = 0
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_X"]
FlagInfo["FREGEN_Y"] = KQ_FLAG_POINT["KFP_Y"]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ <EFBFBD>˸<EFBFBD>
cScriptMessage( KSMemory["FIELD_NAME"], KQ_FLAG_SCRIPT_MSG["KFSM_REGEN02"] )
end
end
end
if FlagInfo["FHND"] == KQ_INVALID_HANDLE and -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ڵ<EFBFBD>
FlagInfo["FPHND"] == KQ_INVALID_HANDLE and -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD>ڵ<EFBFBD>
FlagInfo["FREGEN_TIME"] == 0 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD><EFBFBD>
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>
FlagInfo["FREGEN_TIME"] = KQ_FLAG_POINT["KFP_REGEN_TIME"] + nCurSec
end
if KSMemory["WORK_TICK"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <EFBFBD>۾<EFBFBD>(1<EFBFBD>ʿ<EFBFBD> <EFBFBD>ѹ<EFBFBD>)
if FlagInfo["FHND"] ~= KQ_INVALID_HANDLE or -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FlagInfo["FPHND"] ~= KQ_INVALID_HANDLE -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD>
then
local MapMarkTable = {}
local mmData = {}
mmData["Group"] = 0
mmData["x"] = FlagInfo["FREGEN_X"]
mmData["y"] = FlagInfo["FREGEN_Y"]
mmData["KeepTime"] = 1000
mmData["IconIndex"] = KQ_FLAG_ICON
MapMarkTable[mmData["Group"]] = mmData
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ŷ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cMapMark( KSMemory["FIELD_NAME"], MapMarkTable )
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>
local nLogOut_RedTeam = 0 -- <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 nLogOut_BlueTeam = 0 -- <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, #KSMemory["PLAYER_LIST"]
do
if KSMemory["PLAYER_LIST"] [i]["PIS_MAP"] == true
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD>
if cIsInMap( KSMemory["PLAYER_LIST"][i]["PHND"], KSMemory["FIELD_NAME"] ) == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
KSMemory["PLAYER_LIST"][i]["PIS_MAP"] = false
end
end
if KSMemory["PLAYER_LIST"][i]["PIS_MAP"] == false
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>
if KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] == KQ_TEAM_NO["KTN_RED"]
then
nLogOut_RedTeam = nLogOut_RedTeam + 1
elseif KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] == KQ_TEAM_NO["KTN_BLUE"]
then
nLogOut_BlueTeam = nLogOut_BlueTeam + 1
end
end
end
if nLogOut_RedTeam >= #TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TMEMBER_LIST"] or -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
nLogOut_BlueTeam >= #TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TMEMBER_LIST"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
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>
TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TSCORE"] = 0
TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TSCORE"] = 0
KSMemory["GAME_TYPE"] = KQ_GAME_TYEP["KGT_EXTRATIME"]
KSMemory["STEP_NEXT_TIME"] = 0
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>( <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
for i = 1, #KSMemory["MOB_LIST"]
do
if cIsObjectDead( KSMemory["MOB_LIST"][i]["MHND"] ) ~= nil
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>׾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
if KSMemory["MOB_LIST"][i]["MREGEN_TIME"] == 0
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MOB_LIST"][i]["MREGEN_TIME"] = KQ_ITEM_MOB[i]["KIM_REGEN_TICK"] + nCurSec
else -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
if KSMemory["MOB_LIST"][i]["MREGEN_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MOB_LIST"][i]["KSMM_HND"] = cMobRegen_XY( KSMemory["FIELD_NAME"], KQ_ITEM_MOB[i]["KIM_INDEX"], KQ_ITEM_MOB[i]["KIM_X"],
KQ_ITEM_MOB[i]["KIM_Y"], KQ_ITEM_MOB[i]["KIM_DIR"] )
KSMemory["MOB_LIST"][i]["MREGEN_TIME"] = 0
end
end
end
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["WORK_TICK"] = nCurSec + 1
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
if FlagInfo["FPHND"] ~= KQ_INVALID_HANDLE
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for k = 1, #KQ_FLAG_ABSTATE
do
cResetAbstate( FlagInfo["FPHND"], KQ_FLAG_ABSTATE[k]["KFA_INDEX"] )
end
end
if FlagInfo["FHND"] ~= KQ_INVALID_HANDLE
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cNPCVanish( FlagInfo["FHND"] )
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
FlagInfo["FHND"] = KQ_INVALID_HANDLE
FlagInfo["FPHND"] = KQ_INVALID_HANDLE
FlagInfo["FINDEX"] = ""
FlagInfo["FPICK_TIME"] = 0
FlagInfo["FREGEN_TIME"] = 0
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_X"]
FlagInfo["FREGEN_Y"] = KQ_FLAG_POINT["KFP_Y"]
-- <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, #KSMemory["MOB_LIST"]
do
cNPCVanish( KSMemory["MOB_LIST"][i]["MHND"] )
KSMemory["MOB_LIST"][i] = nil
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for i = 1, #TeamInfo
do
if TeamInfo[i]["TPOINT_HND"] ~= KQ_INVALID_HANDLE
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>ڵ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
cNPCVanish( TeamInfo[i]["TPOINT_HND"] )
TeamInfo[i]["TPOINT_HND"] = KQ_INVALID_HANDLE
end
end
cTimer( KSMemory["FIELD_NAME"], 0 )
local nNextStep = 10 -- SF_END_WAIT
if KSMemory["GAME_TYPE"] == KQ_GAME_TYEP["KGT_NORMAL"] and -- <EFBFBD>Ϲ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TSCORE"] == TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TSCORE"] -- <EFBFBD><EFBFBD><EFBFBD>º<EFBFBD>
then
nNextStep = KSMemory["STEP_NO"] + 1 -- SF_EXTRATIME_INIT
else
for i = 1, #KSMemory["PLAYER_LIST"]
do
cSetAbstate( KSMemory["PLAYER_LIST"][i]["PHND"], KQ_STUN_ABSTATE["KSA_INDEX"], KQ_STUN_ABSTATE["KSA_STR"], KQ_STUN_ABSTATE["KSA_KEEPTIME"] )
end
end
if KSMemory["STEP_NEXT_TIME"] ~= 0
then
cScriptMessage( KSMemory["FIELD_NAME"], KQ_MSG["KM_GAME_TIME"][1]["KM_INDEX"] )
end
if #KQ_STEP >= nNextStep
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = nNextStep -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
return true
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ --
------------------------------------------------------------------------------------------
function SF_EXTRATIME_INIT( KSMemory, nCurSec )
cExecCheck "SF_EXTRATIME_INIT"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD> <EFBFBD>ݱ<EFBFBD>
for i = 1, #KSMemory["DOOR_LIST"]
do
cDoorAction( KSMemory["DOOR_LIST"][i], KQ_DOOR[i]["KD_BLOCK"], "close" )
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ġ<EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD>
for i = 1, #KSMemory["PLAYER_LIST"]
do
local nTeamNo = KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ
if KSMemory["PLAYER_LIST"][i]["PIS_MAP"] == true
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
cLinkTo( KSMemory["PLAYER_LIST"][i]["PHND"], KSMemory["FIELD_NAME"], KQ_TEAM[nTeamNo]["KT_POINT_X"], KQ_TEAM[nTeamNo]["KT_POINT_Y"] )
end
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["GAME_TYPE"] = KQ_GAME_TYEP["KGT_EXTRATIME"]
if #KQ_STEP >= (KSMemory["STEP_NO"] + 1)
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = KSMemory["STEP_NO"] + 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
return true
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_END_WAIT( KSMemory, nCurSec )
cExecCheck "SF_END_WAIT"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
local TeamInfo = KSMemory["TEAM_LIST"] -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local RedTeamResult = nil -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local BlueTeamResult = nil -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local PlayerReward = nil -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if TeamInfo == nil
then -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TSCORE"] == TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TSCORE"]
then -- <EFBFBD><EFBFBD><EFBFBD>º<EFBFBD>
RedTeamResult = KQ_RESULT["KR_DRAW"]
BlueTeamResult = KQ_RESULT["KR_DRAW"]
elseif TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TSCORE"] > TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TSCORE"]
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>¸<EFBFBD>
RedTeamResult = KQ_RESULT["KR_WIN"]
BlueTeamResult = KQ_RESULT["KR_LOSE"]
else -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>¸<EFBFBD>
RedTeamResult = KQ_RESULT["KR_LOSE"]
BlueTeamResult = KQ_RESULT["KR_WIN"]
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD>
for i = 1, #KSMemory["PLAYER_LIST"]
do
if KSMemory["PLAYER_LIST"][i]["PIS_MAP"] == true
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>ʿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
if KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] == KQ_TEAM_NO["KTN_RED"]
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
PlayerReward = RedTeamResult
elseif KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] == KQ_TEAM_NO["KTN_BLUE"]
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
PlayerReward = BlueTeamResult
end
cPartyLeave( KSMemory["PLAYER_LIST"][i]["PHND"] ) -- <EFBFBD><EFBFBD>Ƽ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cViewSlotUnEquipAll( KSMemory["PLAYER_LIST"][i]["PHND"] ) -- <EFBFBD>ڽ<EFBFBD>Ƭ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cResetAbstate( KSMemory["PLAYER_LIST"][i]["PHND"], KQ_MAPLOGIN_ABSTATE["KMA_INDEX"] ) -- <EFBFBD>̵<EFBFBD> <EFBFBD>ӵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cKQRewardIndex( KSMemory["PLAYER_LIST"][i]["PHND"], PlayerReward["KRE_REWAED"] ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cEffectMsg( KSMemory["PLAYER_LIST"][i]["PHND"], PlayerReward["KRE_EFFECT_MSG"] ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD>
cEmoticon( KSMemory["PLAYER_LIST"][i]["PHND"], PlayerReward["KRE_EMOTICON"] ) -- <EFBFBD≯<EFBFBD><EFBFBD><EFBFBD>
end
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȣ <EFBFBD>ʱ<EFBFBD>ȭ
KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] = KQ_TEAM_NO["KTN_DEFAULT"]
end
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
for i = 1, #KSMemory["TEAM_LIST"]
do
KSMemory["TEAM_LIST"][i]["TSCORE"] = 0
KSMemory["TEAM_LIST"][i]["TPOINT_HND"] = KQ_INVALID_HANDLE
KSMemory["TEAM_LIST"][i]["TMEMBER_LIST"] = nil
KSMemory["TEAM_LIST"][i]["TMEMBER_LIST"] = {}
end
-- Ÿ<EFBFBD≯<EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
cTimer( KSMemory["FIELD_NAME"], 0 )
if #KQ_STEP >= (KSMemory["STEP_NO"] + 1)
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = KSMemory["STEP_NO"] + 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["STEP_NEXT_TIME"] = nCurSec + KQ_STEP[KSMemory["STEP_NO"]]["KS_NEXT_TIME"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
local MsgIndex = KQ_STEP[KSMemory["STEP_NO"]]["KS_MSG"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgIndex ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
local MsgData = KQ_MSG[MsgIndex] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if MsgData ~= nil
then -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["MSG_NO"] = 1 -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD>
KSMemory["MSG_NEXT_TIME"] = nCurSec + MsgData[1]["KM_TIME"] -- <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
end
end
end
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
end
------------------------------------------------------------------------------------------
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function SF_END( KSMemory, nCurSec )
cExecCheck "SF_END"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if KSMemory["STEP_NEXT_TIME"] <= nCurSec
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD>
cLinkToAll( KSMemory["FIELD_NAME"], KQ_RETURN_MAP["KRM_INDEX"], KQ_RETURN_MAP["KRM_X"], KQ_RETURN_MAP["KRM_Y"] )
-- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cEndOfKingdomQuest( KSMemory["FIELD_NAME"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KSMemory["STEP_NO"] = nil
KSMemory["STEP_NEXT_TIME"] = nil
return true
end
-- <EFBFBD>޽<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KF_MESSAGE( KSMemory, nCurSec )
return true
end
------------------------------------------------------------------------------------------
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD> --
------------------------------------------------------------------------------------------
function FLAG_PLAYER_CHECK( KSMemory, nCurSec )
cExecCheck "FLAG_PLAYER_CHECK"
if KSMemory == nil
then -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
if nCurSec == nil
then -- <EFBFBD>ð<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return false
end
local TeamInfo = KSMemory["TEAM_LIST"]
local FlagInfo = KSMemory["FLAG_INFO"]
if TeamInfo == nil
then -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return
end
if FlagInfo == nil
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return
end
if FlagInfo["FREGEN_TIME"] ~= 0
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return
end
if FlagInfo["FPHND"] == KQ_INVALID_HANDLE
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȹ<EFBFBD><EFBFBD> <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> Ȯ<EFBFBD><EFBFBD>
return
end
local PlayerInfo = nil -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local PlayerMaxNum = #KSMemory["PLAYER_LIST"] -- <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, PlayerMaxNum
do
if FlagInfo["FPHND"] == KSMemory["PLAYER_LIST"][i]["PHND"]
then
PlayerInfo = KSMemory["PLAYER_LIST"][i]
end
end
if PlayerInfo == nil
then -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
return
end
if cIsInMap( PlayerInfo["PHND"], KSMemory["FIELD_NAME"] ) == 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>ġ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
FlagInfo["FHND"] = cMobRegen_XY( KSMemory["FIELD_NAME"], KQ_FLAG["KF_INDEX"], FlagInfo["FREGEN_X"], FlagInfo["FREGEN_Y"], 0 )
if FlagInfo["FHND"] == nil then
FlagInfo["FHND"] = KQ_INVALID_HANDLE
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetAIScript( KQ_SCRIPT_NAME, FlagInfo["FHND"] )
cAIScriptFunc( FlagInfo["FHND"], "Entrance", "KF_FLGAG_OBJECT" )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cScriptMessage( KSMemory["FIELD_NAME"], KQ_FLAG_SCRIPT_MSG["KFSM_DROP"], PlayerInfo["PNAME"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FlagInfo["FPHND"] = KQ_INVALID_HANDLE
FlagInfo["FINDEX"] = KQ_FLAG["KF_INDEX"]
FlagInfo["FPICK_TIME"] = nCurSec + KQ_FLAG["KF_PICK_DELAY"]
FlagInfo["FREGEN_TIME"] = 0
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] ~= KQ_INVALID_HANDLE
then
cNPCVanish( TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] )
TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] = KQ_INVALID_HANDLE
end
end
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ӽð<EFBFBD>
local RestTime = cAbstateRestTime( PlayerInfo["PHND"], KQ_FLAG_ABSTATE[1]["KFA_INDEX"] )
if RestTime == 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>
cResetAbstate( FlagInfo["FPHND"], KQ_FLAG_ABSTATE[2]["KFA_INDEX"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ
FlagInfo["FHND"] = cMobRegen_Obj( KQ_FLAG["KF_INDEX"], PlayerInfo["PHND"] )
if FlagInfo["FHND"] == nil then
FlagInfo["FHND"] = KQ_INVALID_HANDLE
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetAIScript( KQ_SCRIPT_NAME, FlagInfo["FHND"] )
cAIScriptFunc( FlagInfo["FHND"], "Entrance", "KF_FLGAG_OBJECT" )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cScriptMessage( KSMemory["FIELD_NAME"], KQ_FLAG_SCRIPT_MSG["KFSM_DROP"], PlayerInfo["PNAME"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FlagInfo["FPHND"] = KQ_INVALID_HANDLE
FlagInfo["FINDEX"] = KQ_FLAG["KF_INDEX"]
FlagInfo["FPICK_TIME"] = nCurSec + KQ_FLAG["KF_PICK_DELAY"]
FlagInfo["FREGEN_TIME"] = 0
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ġ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FlagInfo["FREGEN_X"], FlagInfo["FREGEN_Y"] = cObjectLocate( PlayerInfo["PHND"] )
if FlagInfo["FREGEN_X"] == nil or FlagInfo["FREGEN_Y"] == nil
then -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD>ġ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_X"]
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_Y"]
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] ~= KQ_INVALID_HANDLE
then
cNPCVanish( TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] )
TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] = KQ_INVALID_HANDLE
end
end
else
if TeamInfo[PlayerInfo["PTEAM_NO"]] ~= nil
then -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD>ġ
FlagInfo["FREGEN_X"], FlagInfo["FREGEN_Y"] = cObjectLocate( PlayerInfo["PHND"] )
if FlagInfo["FREGEN_X"] == nil or FlagInfo["FREGEN_Y"] == nil
then -- <EFBFBD>÷<EFBFBD><EFBFBD>̾<EFBFBD> <EFBFBD><EFBFBD>ġ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD>
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_X"]
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_Y"]
end
-- <EFBFBD><EFBFBD><EFBFBD>ھ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>Ÿ<EFBFBD>
local Dist = cDistanceSquar( KQ_TEAM[PlayerInfo["PTEAM_NO"]]["KT_POINT_X"], KQ_TEAM[PlayerInfo["PTEAM_NO"]]["KT_POINT_Y"], FlagInfo["FREGEN_X"], FlagInfo["FREGEN_Y"] )
local CheckDist = ( KQ_TEAM_POINT_CHECK_DIST * KQ_TEAM_POINT_CHECK_DIST )
if Dist <= CheckDist
then -- <EFBFBD><EFBFBD><EFBFBD>ھ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>Ÿ<EFBFBD> Ȯ<EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for k = 1, #KQ_FLAG_ABSTATE
do
cResetAbstate( PlayerInfo["PHND"], KQ_FLAG_ABSTATE[k]["KFA_INDEX"] )
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
FlagInfo["FHND"] = KQ_INVALID_HANDLE
FlagInfo["FPHND"] = KQ_INVALID_HANDLE
FlagInfo["FINDEX"] = ""
FlagInfo["FPICK_TIME"] = 0
FlagInfo["FREGEN_TIME"] = nCurSec + KQ_FLAG_POINT["KFP_REGEN_TIME"]
FlagInfo["FREGEN_X"] = KQ_FLAG_POINT["KFP_X"]
FlagInfo["FREGEN_Y"] = KQ_FLAG_POINT["KFP_Y"]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
TeamInfo[PlayerInfo["PTEAM_NO"]]["TSCORE"] = TeamInfo[PlayerInfo["PTEAM_NO"]]["TSCORE"] + 1
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cScoreInfo_AllInMap( KSMemory["FIELD_NAME"], #KQ_TEAM , TeamInfo[KQ_TEAM_NO["KTN_RED"]]["TSCORE"],
TeamInfo[KQ_TEAM_NO["KTN_BLUE"]]["TSCORE"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] ~= KQ_INVALID_HANDLE
then
cNPCVanish( TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] )
TeamInfo[PlayerInfo["PTEAM_NO"]]["TPOINT_HND"] = KQ_INVALID_HANDLE
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 KSMemory["GAME_TYPE"] == KQ_GAME_TYEP["KGT_EXTRATIME"]
then
KSMemory["STEP_NEXT_TIME"] = 0
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
if PlayerInfo["PTEAM_NO"] == KQ_TEAM_NO["KTN_RED"]
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
cScriptMessage( KSMemory["FIELD_NAME"], KQ_FLAG_SCRIPT_MSG["KFSM_POINT_RED"], PlayerInfo["PNAME"] )
elseif PlayerInfo["PTEAM_NO"] == KQ_TEAM_NO["KTN_BLUE"]
then -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
cScriptMessage( KSMemory["FIELD_NAME"], KQ_FLAG_SCRIPT_MSG["KFSM_POINT_BLUE"], PlayerInfo["PNAME"] )
end
-- <EFBFBD><EFBFBD>,<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
for i = 1, #KSMemory["PLAYER_LIST"]
do
if KSMemory["PLAYER_LIST"][i]["PTEAM_NO"] == PlayerInfo["PTEAM_NO"]
then
cPlaySound( KSMemory["PLAYER_LIST"][i]["PHND"], KQ_SOUND["KS_GETPOINT"] );
else
cPlaySound( KSMemory["PLAYER_LIST"][i]["PHND"], KQ_SOUND["KS_LOSEPOINT"] );
end
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˸<EFBFBD>
cScriptMessage( KSMemory["FIELD_NAME"], KQ_FLAG_SCRIPT_MSG["KFSM_REGEN01"] )
end
end
end
end
end
end
-- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
KQ_STEP =
{
--------------------------------------------------------------------------------------------
-- <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>( KDSpring_Data )
--------------------------------------------------------------------------------------------
{ KS_FUNC = SF_DIVIDE_TEAM_WAIT, KS_TIMER = false, KS_LINKTO_TEAM = false, KS_NEXT_TIME = 30, KS_MSG = nil }, -- 1 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_DIVIDE_TEAM, KS_TIMER = false, KS_LINKTO_TEAM = false, KS_NEXT_TIME = 5, KS_MSG = "KM_DIVIDE_TEAM" }, -- 2 <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_START_WAIT, KS_TIMER = false, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 55, KS_MSG = "KM_START_WAIT" }, -- 3 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_START, KS_TIMER = false, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 5, KS_MSG = nil }, -- 4 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_ROUTINE, KS_TIMER = true, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 600, KS_MSG = nil }, -- 5 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_EXTRATIME_INIT, KS_TIMER = false, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 10, KS_MSG = "KM_EXTRA_TIME_WAIT" }, -- 6 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
{ KS_FUNC = SF_START_WAIT, KS_TIMER = false, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 10, KS_MSG = nil }, -- 7 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_START, KS_TIMER = false, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 5, KS_MSG = nil }, -- 8 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_ROUTINE, KS_TIMER = true, KS_LINKTO_TEAM = true, KS_NEXT_TIME = 180, KS_MSG = nil }, -- 9 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_END_WAIT, KS_TIMER = false, KS_LINKTO_TEAM = false, KS_NEXT_TIME = 2, KS_MSG = nil }, -- 10 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
{ KS_FUNC = SF_END, KS_TIMER = false, KS_LINKTO_TEAM = false, KS_NEXT_TIME = 60, KS_MSG = "KM_END" }, -- 11 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
}