He ain't replying when I say hi.
Error:
So if someone can help me please, Ill rep+ of course.
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
local storage = 25600
local s = getPlayerStorageValue(cid, storage)
local newPos = {x=94, y=125, z=7} ---
function creatureSayCallback(cid, type, msg)
if (msgcontains(msg, 'hi') or msgcontains(msg, 'hello') or msgcontains(msg, 'hey')) and not npcHandler:isFocused(cid) then
npcHandler:say('Hello ' .. getCreatureName(cid) .. ' to teleport say {teleport}!', cid)
npcHandler:addFocus(cid)
elseif not npcHandler:isFocused(cid) then
return false
elseif msgcontains(msg, 'bye') or msgcontains(msg, 'good bye') then
npcHandler:say('Good bye ' .. getCreatureName(cid) .. ' come back if you want to be teleported!', cid)
npcHandler:releaseFocus(cid)
elseif msgcontains(msg, 'teleport') then
local s = getplayerStorageValue(cid,storage)
if s == -1 then
npcHandler:say('Would you like to be teleported?!', cid)
setPlayerStorageValue(cid,storage,1)
elseif msgcontains(msg, 'yes') and s == 1 then
npcHandler:say('Are you ready?', cid)
setPlayerStorageValue(cid,storage,2)
elseif msgcontains(msg, 'yes') and s == 2 then
doTeleportThing(cid,newPos)
end
return true
end
end
Error:
Code:
[19/11/2010 19:22:27] [Error - Npc interface]
[19/11/2010 19:22:27] data/npc/scripts/melchior.lua
[19/11/2010 19:22:27] Description:
[19/11/2010 19:22:27] (luaGetCreatureStorage) Creature not found
So if someone can help me please, Ill rep+ of course.