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/PetSystem/PetBaseRoutineFunc.lua

594 lines
20 KiB

function PetBaseRoutine( PetMem )
cExecCheck( "PetBaseRoutine" )
if PetMem == nil
then
DebugLog( "PetBaseRoutine::PetMem is nil" )
return ReturnAI["END"]
end
local nHandle = PetMem["PetInfo"]["nHandle"]
-- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cIsObjectDead( nHandle ) == 1
then
-- AI <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cAIScriptSet( nHandle )
-- <EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
gPetAIMemory["PetBase"][ nHandle ] = nil
DebugLog( "PetBaseRoutine::Pet Has Died - nHandle( "..nHandle.." )" )
return ReturnAI["END"]
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> üũ )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>θ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ ( <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>õ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ҷ<EFBFBD><EFBFBD><EFBFBD> üũ )
-- <EFBFBD><EFBFBD><EFBFBD>ΰ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ÿ<EFBFBD> üũ( <EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>󰡶<EFBFBD> )
-- <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 nMasterHandle = PetMem["MasterInfo"]["nHandle"]
if cIsObjectDead( nMasterHandle ) == 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><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>.. <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ǹ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
end
local sMasterMode = cGetObjectMode( nMasterHandle );
if sMasterMode == 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>
cAIScriptSet( nHandle )
gPetAIMemory["PetBase"][ nHandle ] = nil
DebugLog( "PetBaseRoutine::cGetObjectMode Fail - nHandle( "..nHandle.." )" )
return ReturnAI["END"]
end
DebugLog( "PetBaseRoutine:: Point 1 - <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.." )
-------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------
------ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ൿ <EFBFBD><EFBFBD>ȭ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><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 tMode = PetMem["PetInfo"]["PetMode"] -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <EFBFBD>ϱ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- <EFBFBD>׾<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> AI<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> AI <EFBFBD>ʱ<EFBFBD>ȭ
if tMode["nMasterMode"] == PMM_DIE and sMasterMode ~= "corpse"
then
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
tMode["nMasterMode"] = PMM_NONE
tMode["nActionMode"] = PAM_NONE
end
-- <EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD> <EFBFBD>׼<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ƴҶ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD>׻<EFBFBD> <EFBFBD>ʱ<EFBFBD>ȭ <EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD>
if tMode["nMasterMode"] ~= PMM_IDLE or tMode["nActionMode"] ~= PAM_IDLE_ACT
then
PetMem["PetInfo"]["Time"]["EnterIdleAction"] = PetMem["InitialSec"]
end
if sMasterMode == "linking"
then
tMode["nMasterMode"] = PMM_LINK
DebugLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_LINK - nHandle( "..nHandle.." )" )
elseif sMasterMode == "corpse"
then
if tMode["nMasterMode"] < PMM_DIE -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>üũ
then
-- Die <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
-- <EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD><EFBFBD>Ѱ<EFBFBD>ó<EFBFBD><EFBFBD> ǥ<EFBFBD><EFBFBD>
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
tMode["nActionMode"] = PAM_NONE
-- PupCaseDesc <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD> PAI Ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Valid <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD>޼<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 tPetDieActRecord = { cPet_GetActionRecord( nHandle, "die" ) } -- { "PupAITypeString", "SM_Inx", "HairEffect", "SoundFile" }
if tPetDieActRecord ~= nil
then
if tPetDieActRecord[ 1 ] == "script"
then
if tPetDieActRecord[ 2 ] ~= "-"
then
PetBaseScriptMessage( nHandle, tPetDieActRecord[ 2 ] )
end
if tPetDieActRecord[ 3 ] ~= "-"
then
PetBaseObjectEffect( nHandle, tPetDieActRecord[ 3 ] )
end
if tPetDieActRecord[ 4 ] ~= "-"
then
PetBaseObjectSound( nHandle, tPetDieActRecord[ 4 ] )
end
cExecCheck( "PetBaseRoutine" )
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
end
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
end
CheckLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_DIE - nHandle( "..nHandle.." )" )
end
tMode["nMasterMode"] = PMM_DIE
DebugLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_DIE - nHandle( "..nHandle.." )" )
elseif sMasterMode == "normal" or sMasterMode == "fight" or sMasterMode == "riding" or sMasterMode == "house" or sMasterMode == "booth"
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ҷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ
if cPet_IsMasterCalling( nHandle ) == true
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>θ<EFBFBD>
if tMode["nMasterMode"] <= PMM_CALL -- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>üũ
then
-- Call <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- PupCaseDesc <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD> PAI Ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Valid <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD>޼<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 tPetCallActRecord = { cPet_GetActionRecord( nHandle, "call" ) } -- { "PupAITypeString", "SM_Inx", "HairEffect", "SoundFile" }
if tPetCallActRecord ~= nil
then
if tPetCallActRecord[ 1 ] == "script"
then
if tPetCallActRecord[ 2 ] ~= "-"
then
PetBaseScriptMessage( nHandle, tPetCallActRecord[ 2 ] )
end
if tPetCallActRecord[ 3 ] ~= "-"
then
PetBaseObjectEffect( nHandle, tPetCallActRecord[ 3 ] )
end
if tPetCallActRecord[ 4 ] ~= "-"
then
PetBaseObjectSound( nHandle, tPetCallActRecord[ 4 ] )
end
cExecCheck( "PetBaseRoutine" )
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
end
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
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 tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
-- <EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD> <EFBFBD>̵<EFBFBD> <EFBFBD><EFBFBD>û<EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ٱ⺸<EFBFBD><EFBFBD> Ŭ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><EFBFBD>Ѱ<EFBFBD>ó<EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>׳<EFBFBD> <EFBFBD><EFBFBD>ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>޸𸮸<EFBFBD> ǥ<EFBFBD><EFBFBD>.
-- cRunTo( nHandle, tPetCoord["x"], tPetCoord["y"], 1000 )
-- <EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD><EFBFBD>Ѱ<EFBFBD>ó<EFBFBD><EFBFBD> ǥ<EFBFBD><EFBFBD>
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
tMode["nActionMode"] = PAM_NONE
CheckLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_CALL - nHandle( "..nHandle.." )" )
end
tMode["nMasterMode"] = PMM_CALL
DebugLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_CALL - nHandle( "..nHandle.." )" )
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>θ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if tMode["nActionMode"] <= PAM_FAR_MISSED -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ൿ<EFBFBD>ϴ°<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ƴҶ<EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>.
then
if tMode["nActionMode"] <= PAM_FAR_MISSED -- <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ൿ<EFBFBD>ϴ°<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ƴҶ<EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD>.
then
local nDistanceSquare = cDistanceSquar( nHandle, nMasterHandle )
----------------------------------------------------------------------
---------- //<EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Pattern Decision ---------------------------------
if nDistanceSquare < PS_nDS_AwayStart
then
if tMode["nMasterMode"] == PMM_AWAY
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>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
-- cRunTo( nHandle, tPetCoord["x"], tPetCoord["y"], 1000 )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
end
if tMode["nMasterMode"] ~= PMM_IDLE
then
local nWaitIdleActSec = cRandomInt( PetSystem_nSecMinWaitActAtIdle, PetSystem_nSecMaxWaitActAtIdle )
-- Idle <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PetMem["PetInfo"]["Time"]["ExecSaveTendency"] = PetMem["CurSec"] + PetSystem_nSecWaitSaveTendencyAtIdle
PetMem["PetInfo"]["Time"]["ExecIdleActMode"] = PetMem["CurSec"] + nWaitIdleActSec
CheckLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_IDLE - nHandle( "..nHandle.." )" )
end
tMode["nMasterMode"] = PMM_IDLE
DebugLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_IDLE - nHandle( "..nHandle.." )" )
elseif nDistanceSquare < PS_nDS_FarStart
then
if tMode["nMasterMode"] ~= PMM_AWAY
then
-- Away <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- PupCaseDesc <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͼ<EFBFBD> PAI Ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD> Valid <EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD>޼<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 tPetFollowActRecord = { cPet_GetActionRecord( nHandle, "follow" ) } -- { "PupAITypeString", "SM_Inx", "HairEffect", "SoundFile" }
if tPetFollowActRecord ~= nil
then
if tPetFollowActRecord[ 1 ] == "script"
then
if tPetFollowActRecord[ 2 ] ~= "-"
then
PetBaseScriptMessage( nHandle, tPetFollowActRecord[ 2 ] )
end
if tPetFollowActRecord[ 3 ] ~= "-"
then
PetBaseObjectEffect( nHandle, tPetFollowActRecord[ 3 ] )
end
if tPetFollowActRecord[ 4 ] ~= "-"
then
PetBaseObjectSound( nHandle, tPetFollowActRecord[ 4 ] )
end
cExecCheck( "PetBaseRoutine" )
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
end
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
end
CheckLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_AWAY - nHandle( "..nHandle.." )" )
end
tMode["nMasterMode"] = PMM_AWAY
DebugLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_AWAY - nHandle( "..nHandle.." )" )
else
if tMode["nMasterMode"] == PMM_AWAY or tMode["nMasterMode"] == PMM_IDLE
then
-- <EFBFBD>ʹ<EFBFBD> <EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><EFBFBD>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
-- cRunTo( nHandle, tPetCoord["x"], tPetCoord["y"], 1000 )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
end
if tMode["nMasterMode"] ~= PMM_FAR
then
-- Far <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PetMem["PetInfo"]["Time"]["EnterFarIdle"] = PetMem["CurSec"]
CheckLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_FAR - nHandle( "..nHandle.." )" )
end
tMode["nMasterMode"] = PMM_FAR
DebugLog( "PetBaseRoutine::PET_MASTER_MODE-PMM_FAR - nHandle( "..nHandle.." )" )
end
---------- <EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Pattern Decision// ---------------------------------
----------------------------------------------------------------------
end
end
end
elseif sMasterMode == "logoutwait"
then
-- <EFBFBD>α׾ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <EFBFBD>̰<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>˾ƺ<EFBFBD><EFBFBD><EFBFBD>
else
-- <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
DebugLog( "PetBaseRoutine:: Point 2 - <EFBFBD>ൿ<EFBFBD>ϰ<EFBFBD> <EFBFBD>ִ<EFBFBD> <EFBFBD>Ϳ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><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 tMode["nMasterMode"] == PMM_IDLE -----------------------------------------------------------------------------------------------------------PMM_IDLE
then
-- <EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD> <EFBFBD>ð<EFBFBD> ī<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ϱ<EFBFBD>
-- <EFBFBD>ൿ Ÿ<EFBFBD>ӿ<EFBFBD> <EFBFBD>ൿ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if PetMem["PetInfo"]["Time"]["ExecIdleActMode"] < PetMem["CurSec"]
then
-- <EFBFBD>ൿ<EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
--local tPetIdleActRecord = { cPet_GetActionRecord( nHandle, "idle" ) } -- { "PupAITypeString", "SM_Inx", "HairEffect", "SoundFile" }
if PetMem["PetInfo"]["tCurIdleActRecord"] == nil
then
PetMem["PetInfo"]["tCurIdleActRecord"] = { cPet_GetActionRecord( nHandle, "idle" ) }
end
--if tPetIdleActRecord ~= nil
if PetMem["PetInfo"]["tCurIdleActRecord"] ~= nil
then
if PetBaseIdleAction( PetMem, PetMem["PetInfo"]["tCurIdleActRecord"] ) == false
then
ErrorLog( "PetBaseRoutine::PetBaseIdleAction Failed ["..nHandle.."]" );
end
cExecCheck( "PetBaseRoutine" )
else
ErrorLog( "PetBaseRoutine::cPet_GetActionRecord Failed ["..nHandle.."]" );
end
-- <EFBFBD>ൿ<EFBFBD><EFBFBD><EFBFBD>·<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tMode["nActionMode"] = PAM_IDLE_ACT
DebugLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_IDLE_ACT - nHandle( "..nHandle.." )" )
else
tMode["nActionMode"] = PAM_IDLE_WAIT
DebugLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_IDLE_WAIT - nHandle( "..nHandle.." )" )
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<EFBFBD>ӿ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>û
if PetMem["PetInfo"]["Time"]["ExecSaveTendency"] < PetMem["CurSec"]
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
if cPet_SaveTendency( nHandle ) == nil
then
ErrorLog( "PetBaseRoutine::cPet_SaveTendency Failed ["..nHandle.."]" )
else
CheckLog( "PetBaseRoutine::cPet_SaveTendency Failed ["..nHandle.."]" )
end
PetMem["PetInfo"]["Time"]["ExecSaveTendency"] = PetMem["CurSec"] + PetSystem_nSecWaitSaveTendencyAtIdle
end
elseif tMode["nMasterMode"] == PMM_AWAY -----------------------------------------------------------------------------------------------------------PMM_AWAY
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>̵<EFBFBD>
local tMasterCoord = PetMem["MasterInfo"]["Coord"]["Cur"]
local tTargetCoord = {}
tTargetCoord["x"], tTargetCoord["y"] = cGetCoord_Circle( tMasterCoord["x"], tMasterCoord["y"], PetSystem_nDistanceFollowingStop )
if tTargetCoord["x"] ~= nil
then
cRunTo( nHandle, tTargetCoord["x"], tTargetCoord["y"], PetSystem_nSpeedRateFollowingMil )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tTargetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tTargetCoord["y"]
else
ErrorLog( "Following Move Target Coord is not Found" )-- <EFBFBD><EFBFBD><EFBFBD>и޼<EFBFBD><EFBFBD><EFBFBD>
end
elseif tMode["nMasterMode"] == PMM_FAR -----------------------------------------------------------------------------------------------------------PMM_FAR
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> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD> üũ <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<EFBFBD><EFBFBD>
if PetMem["PetInfo"]["Time"]["EnterFarIdle"] + PetSystem_nSecWaitMissingAtFar < PetMem["CurSec"]
then
-- <EFBFBD><EFBFBD>ȯ <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>û
if cPet_Unsummon( nMasterHandle ) == 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>
end
-- AI <EFBFBD><EFBFBD>ũ<EFBFBD><EFBFBD>Ʈ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
cAIScriptSet( nHandle )
-- <EFBFBD>޸<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
gPetAIMemory["PetBase"][ nHandle ] = nil
DebugLog( "PetBaseRoutine::Pet Has Unsummoned - nHandle( "..nHandle.." )" )
return ReturnAI["END"]
end
elseif tMode["nMasterMode"] == PMM_CALL -----------------------------------------------------------------------------------------------------------PMM_CALL
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>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
local tDestCoord = PetMem["PetInfo"]["Coord"]["Next"]
local tMasterCoord = PetMem["MasterInfo"]["Coord"]["Cur"]
local nCallingDistanceSquare = cDistanceSquar( tPetCoord["x"], tPetCoord["y"], tDestCoord["x"], tDestCoord["y"] )
local nFollowingDistanceSquare = cDistanceSquar( nHandle, nMasterHandle )
local nDistanceSquare
-- <EFBFBD>ҷ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִٸ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- <EFBFBD>װ<EFBFBD> <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 tMode["nActionMode"] == PAM_CALL_COME
then
nDistanceSquare = nCallingDistanceSquare
else
nDistanceSquare = nFollowingDistanceSquare
end
if tMode["nActionMode"] == PAM_CALL_SEE
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ð<EFBFBD><EFBFBD><EFBFBD>ŭ<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ĵٺ<EFBFBD><EFBFBD><EFBFBD>.
if PetMem["PetInfo"]["Time"]["LastEnterStayAtCallSee"] + PetSystem_nSecStayAtCallSee < PetMem["CurSec"]
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tMode["nMasterMode"] = PMM_NONE
tMode["nActionMode"] = PAM_NONE
end
-- <EFBFBD>Ĵٺ<EFBFBD><EFBFBD><EFBFBD>
cSetObjectDirect( nHandle, tMasterCoord["x"], tMasterCoord["y"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǥ<EFBFBD><EFBFBD>
--?????????????????????????????????????????????????????
else
----------------------------------------------------------------------
---------- //<EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Pattern Decision ---------------------------------
if nDistanceSquare < PS_nDS_CallingStop
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѱ<EFBFBD><EFBFBD>̴<EFBFBD>.
if tMode["nActionMode"] == PAM_CALL_COME
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>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
-- cRunTo( nHandle, tPetCoord["x"], tPetCoord["y"], 1000 )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
end
if tMode["nActionMode"] ~= PAM_CALL_SEE
then
PetMem["PetInfo"]["Time"]["LastEnterStayAtCallSee"] = PetMem["CurSec"]
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ĵٺ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> : <EFBFBD><EFBFBD><EFBFBD>ʳ<EFBFBD> <EFBFBD>Ĵٺ<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
tMode["nActionMode"] = PAM_CALL_SEE
DebugLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_CALL_SEE - nHandle( "..nHandle.." )" )
else
if tMode["nActionMode"] ~= PAM_CALL_COME
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> <EFBFBD>θ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD> üũ<EFBFBD>Ͽ<EFBFBD> <EFBFBD>̵<EFBFBD><EFBFBD>Ѵ<EFBFBD>. <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 tMasterCoord = PetMem["MasterInfo"]["Coord"]["Cur"]
local tTargetCoord = {}
tTargetCoord["x"], tTargetCoord["y"] = cGetCoord_Circle( tMasterCoord["x"], tMasterCoord["y"], PetSystem_nDistanceCallingStop )
if tTargetCoord["x"] ~= nil
then
cRunTo( nHandle, tTargetCoord["x"], tTargetCoord["y"], PetSystem_nSpeedRateCallingMil )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tTargetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tTargetCoord["y"]
else
ErrorLog( "Calling Move Target Coord is not Found" )-- <EFBFBD><EFBFBD><EFBFBD>и޼<EFBFBD><EFBFBD><EFBFBD>
end
end
tMode["nActionMode"] = PAM_CALL_COME
DebugLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_CALL_COME - nHandle( "..nHandle.." )" )
end
---------- <EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Pattern Decision// ---------------------------------
----------------------------------------------------------------------
end
elseif tMode["nMasterMode"] == PMM_DIE -----------------------------------------------------------------------------------------------------------PMM_DIE
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>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
local tDestCoord = PetMem["PetInfo"]["Coord"]["Next"]
local tMasterCoord = PetMem["MasterInfo"]["Coord"]["Cur"]
local nDiedDistanceSquare = cDistanceSquar( tPetCoord["x"], tPetCoord["y"], tDestCoord["x"], tDestCoord["y"] )
local nFollowingDistanceSquare = cDistanceSquar( nHandle, nMasterHandle )
local nDistanceSquare
-- <EFBFBD>ҷ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִٸ<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ǥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
-- <EFBFBD>װ<EFBFBD> <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 tMode["nActionMode"] == PAM_DIE_COME
then
nDistanceSquare = nDiedDistanceSquare
else
nDistanceSquare = nFollowingDistanceSquare
end
if tMode["nActionMode"] == PAM_DIE_SAD
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>.
if PetMem["PetInfo"]["Time"]["LastEnterStayAtDiedSad"] + PetSystem_nSecStayAtDiedSad < PetMem["CurSec"]
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
tMode["nMasterMode"] = PMM_NONE
tMode["nActionMode"] = PAM_NONE
end
-- <EFBFBD>Ĵٺ<EFBFBD><EFBFBD><EFBFBD>
cSetObjectDirect( nHandle, tMasterCoord["x"], tMasterCoord["y"] )
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>μ<EFBFBD> ǥ<EFBFBD><EFBFBD>
else
----------------------------------------------------------------------
---------- //<EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Pattern Decision ---------------------------------
if nDistanceSquare < PS_nDS_DiedStop
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѱ<EFBFBD><EFBFBD>̴<EFBFBD>.
if tMode["nActionMode"] == PAM_DIE_COME
then
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>߱<EFBFBD>
local tPetCoord = PetMem["PetInfo"]["Coord"]["Cur"]
-- cRunTo( nHandle, tPetCoord["x"], tPetCoord["y"], 1000 )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tPetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tPetCoord["y"]
end
if tMode["nActionMode"] ~= PAM_DIE_SAD
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>
PetMem["PetInfo"]["Time"]["LastEnterStayAtDiedSad"] = PetMem["CurSec"]
CheckLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_DIE_SAD - nHandle( "..nHandle.." )" )
end
tMode["nActionMode"] = PAM_DIE_SAD
DebugLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_DIE_SAD - nHandle( "..nHandle.." )" )
else
if tMode["nActionMode"] ~= PAM_DIE_COME
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> <EFBFBD>θ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD> <EFBFBD>ѹ<EFBFBD><EFBFBD><EFBFBD> üũ<EFBFBD>Ͽ<EFBFBD> <EFBFBD>̵<EFBFBD><EFBFBD>Ѵ<EFBFBD>. <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 tMasterCoord = PetMem["MasterInfo"]["Coord"]["Cur"]
local tTargetCoord = {}
tTargetCoord["x"], tTargetCoord["y"] = cGetCoord_Circle( tMasterCoord["x"], tMasterCoord["y"], PetSystem_nDistanceDiedStop )
if tTargetCoord["x"] ~= nil
then
cRunTo( nHandle, tTargetCoord["x"], tTargetCoord["y"], PetSystem_nSpeedRateMasterDiedMil )
PetMem["PetInfo"]["Coord"]["Next"]["x"] = tTargetCoord["x"]
PetMem["PetInfo"]["Coord"]["Next"]["y"] = tTargetCoord["y"]
else
ErrorLog( "Master Died Move Target Coord is not Found" )-- <EFBFBD><EFBFBD><EFBFBD>и޼<EFBFBD><EFBFBD><EFBFBD>
end
CheckLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_DIE_COME - nHandle( "..nHandle.." )" )
end
tMode["nActionMode"] = PAM_DIE_COME
DebugLog( "PetBaseRoutine::PET_ACTION_MODE-PAM_DIE_COME - nHandle( "..nHandle.." )" )
end
---------- <EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD> Pattern Decision// ---------------------------------
----------------------------------------------------------------------
end
elseif tMode["nMasterMode"] == PMM_LINK -----------------------------------------------------------------------------------------------------------PMM_LINK
then
tMode["nActionMode"] = PAM_LINK
else
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ȵ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̰ų<EFBFBD> <EFBFBD>ƹ<EFBFBD><EFBFBD>͵<EFBFBD> <EFBFBD>ƴϰų<EFBFBD>..
end
-- <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> AI <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
return ReturnAI["CPP"]
end