• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Easy npc dont work

Jamaika

New Member
Joined
Aug 20, 2009
Messages
7
Reaction score
0
Hello

When i say to my npc enigma, he dont answers and dont port me.
- No errors in the console

PHP:
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

 
function creatureSayCallback(cid, type, msg)
	if(npcHandler.focus ~= cid) then
        return false
    end
	
local telePos = {x= 1874, y= 234, z= 7}
	
	    if msgcontains('enigma') then
	        selfSay('Sorry, but we are dont rise to enigma, Muehee', cid)
			doTeleportThing(cid,telePos)
		else
		    selfSay('What?, no matter. Go Sleep!', cid)
			doTeleportThing(cid,telePos)
        end
	return true
    
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Please help.

---Solved---
Sorry for unnecessary thread, but i ´ve sitted on it 4h.
 
Last edited:
Back
Top