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

Disappear with nps

Dominik ms

Member
Joined
Jan 20, 2010
Messages
424
Reaction score
6
I have this code.
And i want to disappear with npc when player leave, go with distance ex.4 sqm, without say "bye"??

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

local talkState = {}
function onCreatureSay(cid, type, msg)
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid

	if (msg == "hi") then
		selfSay("Welcome, ".. getCreatureName(cid) ..".", cid, true)
		talkState[talkUser] = 1
	end
end
 
Back
Top