Closed GoogleCodeExporter closed 9 years ago
fix:
function NpcHandler:isInRange(cid)
if (isPlayer(cid) == TRUE) then
local distance = getDistanceBetween(getCreaturePosition(getNpcCid()), getCreaturePosition(cid)) or -1
-- local direction = getCreatureLookDirection(getNpcCid())
if(cid == self.focus) and (direction == EAST or direction == WEST) then
return (distance <= self.talkRadius+1)
elseif (distance ~= -1) then
return (distance <= self.talkRadius)
end
end
end
Original comment by otclient...@gmail.com
on 15 Jul 2012 at 6:24
Avesta doesn't uses Jiddo NPC System.
FIX;
function getDistanceToCreature(id)
if id == 0 or id == nil then
return nil
end
local creaturePosition = getCreaturePosition(id)
cx = creaturePosition.x
cy = creaturePosition.y
cz = creaturePosition.z
if cx == nil then
return nil
end
sx, sy, sz = selfGetPosition()
if cz ~= sz then
return 10000000
end
return math.max(math.abs(sx - cx), math.abs(sy - cy))
end
Original comment by owntibia...@googlemail.com
on 15 Jul 2012 at 10:53
No, it does. But probably you don't know how to do it.
Original comment by otclient...@gmail.com
on 16 Jul 2012 at 12:39
Might be fixed, didn't test it much.
Original comment by r...@ymail.com
on 17 Jul 2012 at 6:25
necro, how to make avesta work with jiddo's npc system??
Original comment by asyv.15....@gmail.com
on 13 Jun 2014 at 11:07
Original issue reported on code.google.com by
owntibia...@googlemail.com
on 15 Jul 2012 at 8:11