• 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!

Skull checking npc need help

Angel Of Death

Rise Of Tibia ServerOwner
Joined
Mar 12, 2012
Messages
91
Reaction score
0
Lua:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local storage = getPlayerStorageValue(cid, 60055)

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
 
npcHandler:setMessage(MESSAGE_GREET, "Greetings |PLAYERNAME|.")
 
function creatureSayCallback(cid, type, msg, item, fromPosition, itemEx, toPosition, uid)
	if(not npcHandler:isFocused(cid)) then
		return false
	end
	local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
 
 
	if(msgcontains(msg, "Join")) then
		if getPlayerSkullType(cid) =<4 then
		npcHandler:say( "Welcome", cid, 1000)
	else
		npcHandler:say( "What Are you Talking About!!!!" , cid, 1000)
	end
	
	elseif msgcontains(msg, "yes") then
		if getPlayerSkullType(cid) =<4 then
		--Do Script Functions
	else
		npcHandler:say("I Havent Said AnyThing For You To Say Yes Too!!!", cid, 1000)
	end	
	return true
end
end

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

but the npc doesnt respond
 
Last edited:
Back
Top