• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

NPC Say Delay

DjowYeap

New Member
Joined
Mar 11, 2013
Messages
18
Reaction score
2
I created this function to add a delay to selfSay npc function. Tested only in rev.3777 and rev.3884

Function
Code:
function selfSayDelay(messages, interval, cid)
	for i = 1, #messages do
		if(i == 1) then
			selfSay(messages[1], cid)
		else
			addEvent(doCreatureSay, interval * i, getNpcCid(), messages[i], TALKTYPE_PRIVATE_NP) 
		end
	end
end

How to use
Code:
selfSayDelay({"Hahahaha", "Huhuhuhu"}, 2000, cid)
 
Back
Top