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

153 lines
3.8 KiB

--------------------------------------------------------------------------------
-- KDFargels Main File --
--------------------------------------------------------------------------------
require( "common" )
require( "KQ/KDFargels/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/KDFargels/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/KDFargels/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/KDFargels/Data/Boss" ) -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Boss<EFBFBD><EFBFBD> <EFBFBD>ൿ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><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/KDFargels/Functions/SubFunc" ) -- <EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Sub Functions
require( "KQ/KDFargels/Functions/Routine" ) -- <EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>ٴ<EFBFBD> AI <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ƾ<EFBFBD><EFBFBD>
require( "KQ/KDFargels/Functions/Progress" ) -- <EFBFBD><EFBFBD> <EFBFBD>ܰ<EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Լ<EFBFBD><EFBFBD><EFBFBD>
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- --
-- -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD> -- --
-- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
function Main( Field )
cExecCheck( "Main" )
local EventMemory = InstanceField[Field]
if EventMemory == nil then
cDebugLog( "EventMemory == nil" )
InstanceField[Field] = { }
EventMemory = InstanceField[Field]
EventMemory["MapIndex"] = Field
EventMemory["CurrentTime"] = 0
EventMemory["EventNumber"] = 1
EventMemory["EventData"] = { }
EventMemory["CheckTime"] = 1
EventMemory["EM_STATE"] = EM_STATE["Start"]
EventMemory["EventState"] = ES_STATE["STATE_1"]
EventMemory["CameraMove"] = { }
EventMemory["CameraMove"]["CameraState"] = CAMERA_STATE["NORMAL"]
EventMemory["CameraMove"]["CheckTime"] = 0
EventMemory["CameraMove"]["Number"] = 1
EventMemory["CameraMove"]["Focus"] = { }
EventMemory["CameraMove"]["Focus"]["X"] = 0
EventMemory["CameraMove"]["Focus"]["Y"] = 0
EventMemory["CameraMove"]["Focus"]["DIR"] = 0
EventMemory["FaceCut"] = { }
EventMemory["FaceCut"]["Number"] = 1
EventMemory["FaceCut"]["CheckTime"] = 0
EventMemory["PlayerList"] = { }
EventMemory["PlayerLogin"] = false
EventMemory["CheckLimitTime"] = 999999999;
DoorCreate( EventMemory )
cSetFieldScript( Field, SCRIPT_MAIN )
cFieldScriptFunc( EventMemory["MapIndex"], "MapLogin", "PlayerMapLogin" )
end
MainRoutine( EventMemory )
end
function MainRoutine( EventMemory )
cExecCheck( "MainRoutine" )
if EventMemory == nil then
return
end
if EventMemory["PlayerLogin"] == false then
return
end
if EVENT_GAME_OVER == true then
return
end
-- 0.1<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if EventMemory["CurrentTime"] + 0.1 > cCurrentSecond() then
return
else
EventMemory["CurrentTime"] = cCurrentSecond()
-- <EFBFBD><EFBFBD><EFBFBD>ѽð<EFBFBD> üũ
if EventMemory["CheckLimitTime"] ~= nil then
if EventMemory["CheckLimitTime"] <= EventMemory["CurrentTime"] then
cTimer( EventMemory["MapIndex"], 0 )
cLinkToAll( EventMemory["MapIndex"], LINK_INFO["RETURNMAP1"]["MAP_INDEX"], LINK_INFO["RETURNMAP1"]["X"], LINK_INFO["RETURNMAP1"]["Y"])
cEndOfKingdomQuest( EventMemory["MapIndex"] )
end
end
end
if EventMemory["EM_STATE"] == EM_STATE["Play"] then
local ReturnValue = EVENT_ROUTINE[EventMemory["EventNumber"]]( EventMemory )
if ReturnValue == EVENT_ROUTINE_END then
EventMemory["EM_STATE"] = EM_STATE["End"]
end
return
elseif EventMemory["EM_STATE"] == EM_STATE["Start"] then
EVENT_INIT_FUCTION[EventMemory["EventNumber"]]( EventMemory )
EventMemory["EM_STATE"] = EM_STATE["Play"]
return
elseif EventMemory["EM_STATE"] == EM_STATE["End"] then
EVENT_DEINIT_FUNCTION( EventMemory )
return
end
end