Serginov
Onkonkoronkonk
As I've seen doNpcTalkALot function is not the best of all. Every player can see what one guy is supposed to see(At least I think it was something like that)
Tested and working on TFS 0.3.6pl1
So I made a new one. Just paste this before the last end in:
npc/lib/npcsystem/npchandler.lua
Usage;
Tested and working on TFS 0.3.6pl1
So I made a new one. Just paste this before the last end in:
npc/lib/npcsystem/npchandler.lua
Code:
function storyTalk(messages, focus, i, self)
if self:isFocused(focus) then
selfSay(messages[i], focus)
end
end
function NpcHandler:story(messages, focus, storyDelay)
if self:isFocused(focus) then
selfSay(messages[1], focus)
local delay = storyDelay
for i = 2, #messages do
addEvent(storyTalk, storyDelay, messages, focus, i, self)
storyDelay = storyDelay + delay
end
end
end
Code:
if msgcontains(msg, "cool story brah!") then
local msg = {"I am ...", "teh coolest dude ... ", "that ever ...", "existed."}
npcHandler:story(msg, cid, 1000)
end
Last edited: