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

Npc ( SelfSay)

SasirO

Banned User
Joined
Apr 30, 2009
Messages
559
Reaction score
0
Greetings, i got a problem with my Npc, i want the npc to self say on default for example something like this:
"Everyone who wants free items, come over here!"
like each 4 seconds or something, is it possible?


I got now something like this:
function onThink()
selfSay('Everyone who wants free items, come over here!')
end

But the npc is spamming it :D, how to make delay?
 
Last edited:
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 onThink()
selfSay('Everyone who wants free items, come over here!')
end

npcHandler:addModule(FocusModule:new())
 
Back
Top