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

Simple question - NPC Sys

Erevius

It Was A Good Day
Joined
Feb 12, 2010
Messages
157
Reaction score
7
Location
Poland/Olsztyn
Do you guys know how to make NPC say two delayed messages? I mean, if I use this:
Code:
npcHandler:say("First sentence. ...", cid)
npcHandler:say("Second sentence.", cid)
Will it make npc say the second sentece delayed just after he says the first one? Maybe a bit stupid question, but I'm not using TFS and I want to implement it to my avesta (7.72). If it's not working like this even in TFS, please tell me how to make it.
I just want my npc to talk several delayed messages. Possible?

If I put this into my avesta's NPC script:
Code:
npcHandler:say('First sentence. ...', cid)
npcHandler:say('Second sentence.', cid)
NPC says only the last message.

And finally here is my NpcHandler:say:
Code:
function NpcHandler:say(message, shallDelay)
	if(shallDelay == nil) then
		shallDelay = true
	end
	if(NPCHANDLER_TALKDELAY == TALKDELAY_NONE or shallDelay == false) then
		selfSay(message)
		return
	end
	self.talkDelay.message = message
	self.talkDelay.time = os.time()+self.talkDelayTime
end

If the thread is not understandable, ask for explaination.
 
Last edited:
Back
Top