iam king..! royalguard..they started attacking me..why.,,.?
behavior_RoyalGuardDuty.lua
-------------------------------------------------------------------------
-- Do the timer loop
local EndTime = GetProperty("", "EndTime")
while GetGametime() < EndTime do
local Enemy = Find("", "__F((Object.GetObjectsByRadius(Sim)=="..Range..")AND(Object.IsHostile())AND(Object.GetState(fighting))AND(Object.IsOfficeLevelLower(6)))", "Enemy", -1)
if Enemy > 0 then
gameplayformulas_SimAttackWithRangeWeapon("", "Enemy")
BattleJoin("", "Enemy", false)
end
-- Fight until the fight is over even if the measure is over
while GetState("", STATE_FIGHTING) do
Sleep(2)
end
NextAnim = Rand(2)
if NextAnim == 0 then
PlayAnimation("", "watch_for_guard")
elseif NextAnim == 1 then
PlayAnimation("", "sentinal_idle")
-----------------------------------------------------------------------
How can stop attacking me?
help..