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/KDWater/KDWater.lua

109 lines
3.2 KiB

--------------------------------------------------------------------------------
-- Main File --
--------------------------------------------------------------------------------
require( "common" )
--[[
require( "Data/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> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>
require( "Data/Process" ) -- <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><EFBFBD><EFBFBD>
require( "Data/Servant" ) -- <EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
require( "Data/Regen" ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD>׷<EFBFBD>, <EFBFBD><EFBFBD>, NPC, <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>)
require( "Functions/SubFunc" ) -- <EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Sub Functions
require( "Functions/Routine" ) -- <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ٴ<EFBFBD> AI <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD>
require( "Functions/Progress" ) -- <EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD>
--]]--
require( "KQ/KDWater/Data/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> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD>
require( "KQ/KDWater/Data/Process" ) -- <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><EFBFBD><EFBFBD>
require( "KQ/KDWater/Data/Servant" ) -- <EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
require( "KQ/KDWater/Data/Regen" ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD>׷<EFBFBD>, <EFBFBD><EFBFBD>, NPC, <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>)
require( "KQ/KDWater/Functions/SubFunc" ) -- <EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Sub Functions
require( "KQ/KDWater/Functions/Routine" ) -- <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ٴ<EFBFBD> AI <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD>
require( "KQ/KDWater/Functions/Progress" ) -- <EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD>
--]]--
function Main( Field )
cExecCheck "Main"
local Var = InstanceField[ Field ]
if Var == nil
then
InstanceField[ Field ] = {} -- ŷ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>̺<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var = InstanceField[ Field ]
Var["MapIndex"] = Field -- <EFBFBD><EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD>( <EFBFBD>ʵ<EFBFBD> <EFBFBD>ε<EFBFBD><EFBFBD><EFBFBD> )
Var["InitialSec"] = cCurrentSecond() -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
Var["CurSec"] = Var["InitialSec"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
Var["StepFunc"] = KQInit -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD>
Var["Round"] = 1 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
Var["RoundEndTime"] = 0 -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
Var["RoundTimeOver"]= false -- <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["Player"] = {}
-- Var["Player"][ i ]["CharNo"] = nil
-- Var["Player"][ i ]["CharID"] = nil
-- Var["Player"][ i ]["Handle"] = nil
-- Var["Player"][ i ]["TeamType"] = KQ_TEAM["MAX"]
-- Var["Player"][ i ]["Goal"] = nil
-- Var["Player"][ i ]["IsInMap"] = true
-- Var["Player"][ i ]["BalloonHandle"] = nil
-- Var["Player"][ i ]["BalloonAbstateTime"] = 0
-- Var["Player"][ i ]["PrisonLinkToWaitTime"] = 0
-- Var["Player"][ i ]["IsOut"] = false
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ڵ<EFBFBD>
-- Var["Door"] = nil
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD>ʱ<EFBFBD>ȭ
Var["Team"] = {}
Var["Team"][ KQ_TEAM["RED"] ] =
{
Score = 0,
Win = 0,
Lose = 0,
Draw = 0,
}
Var["Team"][ KQ_TEAM["BLUE"] ] =
{
Score = 0,
Win = 0,
Lose = 0,
Draw = 0,
}
-- InvisibleDoor <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["InvisibleDoor"] = nil
-- <EFBFBD><EFBFBD> <EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetFieldScript ( Var["MapIndex"], MainLuaScriptPath )
cFieldScriptFunc( Var["MapIndex"], "MapLogin", "PlayerMapLogin" )
cFieldScriptFunc( Var["MapIndex"], "ServantSummon", "ServantSummon" )
end
-- 0.1<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if Var["CurSec"] + 0.1 > cCurrentSecond()
then
return
else
Var["CurSec"] = cCurrentSecond()
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ( Functions/Progress.lua )
Var["StepFunc"]( Var )
end