The script below used to work perfectly but now i'm not getting any msg action on the npc at location 836,940,7.
22:13 You see Nightmare Guard.
Position: [X: 836] [Y: 940] [Z: 7].
22:13 You see Nightmare Guard.
Position: [X: 839] [Y: 940] [Z: 7].
Code:
[30/08/2014 22:12:58] Lua Script Error: [MoveEvents Interface]
[30/08/2014 22:12:58] data/movements/scripts/others/teleporter.lua:onStepIn
[30/08/2014 22:12:58] luaDoCreatureSay(). Creature not found
22:13 You see Nightmare Guard.
Position: [X: 836] [Y: 940] [Z: 7].
22:13 You see Nightmare Guard.
Position: [X: 839] [Y: 940] [Z: 7].
Code:
local pos = {x = 836, y = 940, z = 7, stackpos = 253}
local poss = {x = 839, y = 940, z = 7, stackpos = 253}
function onStepIn(cid, item, pos)
if item.actionid == 30102 then
queststatus = getPlayerStorageValue(cid,6580)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You are not allowed to enter the nightmare knights castle.')
doTeleportThing(cid,{x = 837, y = 942, z = 7})
doCreatureSay(getThingfromPos(pos).uid, "Begone!", TALKTYPE_SAY)
doCreatureSay(getThingfromPos(poss).uid, "Begone!", TALKTYPE_SAY)
else
doCreatureSay(getThingfromPos(pos).uid, "Welcome!", TALKTYPE_SAY)
doCreatureSay(getThingfromPos(poss).uid, "Welcome!", TALKTYPE_SAY)
end
elseif item.actionid == 30103 then
queststatus = getPlayerStorageValue(cid,6580)
if queststatus == -1 then
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You are not allowed to enter the nightmare knights castle.')
doTeleportThing(cid,{x = 838, y = 942, z = 7})
doCreatureSay(getThingfromPos(pos).uid, "Begone!", TALKTYPE_SAY)
doCreatureSay(getThingfromPos(poss).uid, "Begone!", TALKTYPE_SAY)
else
doCreatureSay(getThingfromPos(pos).uid, "Welcome!", TALKTYPE_SAY)
doCreatureSay(getThingfromPos(poss).uid, "Welcome!", TALKTYPE_SAY)
end
end
return 1
end