christiandb
Member
As the title says, how to make a NPC check the pz/battle sign of a player before talking to him? I really need this because there are people abusing the boat NPC's.
Thanks in advance,
Chris
Thanks in advance,
Chris
if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid)
elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
npcHandler:say('You do not have enough money!', cid)
else
doTeleportThing(cid, parameters.destination, 0)
doSendMagicEffect(parameters.destination, 10)
end
if(parameters.level ~= nil and getPlayerLevel(cid) < parameters.level) then
npcHandler:say('You must reach level ' .. parameters.level .. ' before I can let you go there.', cid)
elseif(doPlayerRemoveMoney(cid, parameters.cost) ~= TRUE) then
npcHandler:say('You do not have enough money!', cid)
elseif(isPlayerPzLocked(cid) ~= FALSE) then
npcHandler:say('You are pz-locked, come back later!', cid)
else
doTeleportThing(cid, parameters.destination, 0)
doSendMagicEffect(parameters.destination, 10)
end
help[21/12/2008 17:53:19] Lua Script Error: [Npc interface]
[21/12/2008 17:53:19] data/npc/scripts/boat_ankrahmun.luanCreatureSay
[21/12/2008 17:53:19] data/npc/lib/npcsystem/modules.lua:164: attempt to call global 'isPlayerPzLocked' (a nil value)
[21/12/2008 17:53:19] stack traceback:
[21/12/2008 17:53:19] data/npc/lib/npcsystem/modules.lua:164: in function 'callback'
[21/12/2008 17:53:19] data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
[21/12/2008 17:53:19] data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
[21/12/2008 17:53:19] data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
[21/12/2008 17:53:19] data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'
[21/12/2008 17:53:19] data/npc/scripts/boat_ankrahmun.lua:10: in function <data/npc/scripts/boat_ankrahmun