Files
Leviathan/Client/Game/resource/creaturestate_script.lua
T
2026-06-01 12:46:52 +02:00

49 lines
1.4 KiB
Lua

-- *******************************************************************************************
-- ****** 크리처 동작 관련 *******************************************************************
-- *******************************************************************************************
-- handle(테이머 핸들) c_handle(크리처 핸들) t_handle(타겟 핸들)
function call_creature_standby( handle ) -- 크리처 주인 따라 댕기기
c_standby( handle )
end
function call_creature_move( handle ) -- 크리처 이동
local Location = 1
c_move( handle, Location )
end
function call_creature_attack( handle, c_handle, t_handle ) -- 크리처 공격
c_attack( handle, c_handle, t_handle )
-- local SkillSlot = 0
-- c_skill( t_handle, c_handle, SkillSlot )
local MonsterHP = gethp( t_handle )
local Location = 1
if MonsterHP == 0 or MonsterHP < 0 then -- 몬스터의 HP가 0이라면 따르기로 전환
c_move( c_handle, Location )
end
end
-- 크리처 스킬 퀵슬롯에 장착된 스킬을 자동으로 사용하고자 할때 해당 스킬이 장착된 슬롯의 번호를 넘겨주면된다
-- gethp
-- getmp
-- getmax_hp
-- getmax_mp
function call_creature_idle( handle, c_handle ) -- 크리처 대기
-- local SkillSlot = 1 -- 현재 크리처 스킬 퀵슬롯에 장착돼있는 스킬만 가능
-- local MasterHP = gethp( handle )
-- if MasterHP == 70 or MasterHP < 70 then -- 힐링
-- c_skill( handle, c_handle, SkillSlot )
-- end
c_idle( c_handle )
end