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

130 lines
4.1 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/NPC" ) -- NPC <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/KDSoccer_W/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/KDSoccer_W/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/KDSoccer_W/Data/NPC" ) -- NPC <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
require( "KQ/KDSoccer_W/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/KDSoccer_W/Functions/SubFunc" ) -- <EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Sub Functions
require( "KQ/KDSoccer_W/Functions/Routine" ) -- <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ٴ<EFBFBD> AI <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD>
require( "KQ/KDSoccer_W/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["KQLimitTime"] = 0 -- ŷ<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"] = InitSoccer -- <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 ]["SpeedUpBuff"] = {} -- <EFBFBD>ɸ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
-- Var["Player"][ i ]["InvincibleBuff"] = {} -- <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["Team"] = {}
Var["Team"][ KQ_TEAM["RED"] ] = 0
Var["Team"][ KQ_TEAM["BLUE"] ] = 0
-- Kicker <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["Kicker"] = {}
-- Var["Kicker"]["IsPlayer"] = nil
-- Var["Kicker"]["TeamType"] = KQ_TEAM["MAX"]
-- Var["Kicker"]["CharNo"] = nil
-- Var["Kicker"]["NPCHandle"] = nil
-- InvisibleDoor <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["InvisibleDoor"] = nil
-- SoccerBall <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["SoccerBall"] = nil
-- Referee <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["Referee"] = {}
-- Var["Referee"]["Handle"] = nil
-- Var["Referee"]["FollowCheckTime"] = 0
-- Var["Referee"]["RoutineCheckTime"] = 0
-- Keeper <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["Keeper"] = {}
-- Var["Keeper"][ i ]["Handle"] = nil
-- Var["Keeper"][ i ]["TeamType"] = KQ_TEAM["MAX"]
-- Var["Keeper"][ i ]["RoutineCheckTime"] = 0
-- Var["Keeper"][ i ]["MoveStep"] = 1
-- Var["Keeper"][ i ]["MoveBack"] = false
-- BuffBox <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var["BuffBox"] = {}
-- Var["BuffBox"][ i ] = 0 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD>
-- InvisibleMonster <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ
Var[ "InvisibleMonster" ] = {}
-- Var[ "InvisibleMonster" ][ i ][ "Handle" ] = nil --InitSoccer <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ<EFBFBD><EFBFBD> <EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
-- Var[ "InvisibleMonster" ][ i ][ "MonsterNumber" ] = RegenInvisibleMonster[ "MonsterNumber" ]
-- Var[ "InvisibleMonster" ][ i ][ "RoutineCheckTime" ] = 0
-- Var[ "InvisibleMonster" ][ i ][ "MoveStep" ] = 1
-- Var[ "InvisibleMonster" ][ i ][ "MoveBack" ] = false
-- <EFBFBD><EFBFBD> <EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cSetFieldScript ( Var["MapIndex"], MainLuaScriptPath ) --<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>.
cFieldScriptFunc( Var["MapIndex"], "MapLogin", "PlayerMapLogin" ) --Routine.lua
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