I have a problem with delay I made with Ispiro help.
When 1 player say to npc a keyword then everything is fine..
But when more players talk to npc in the same time:
When 1 player say a keyword delay starts..
When 2nd players talk to npc, npc change target and talks to this 2nd player..
I tried to explain it clear and I hope you know what I mean.
Ohh and here is code with delay:
Thank you for any help. =]
@PS I used SV except talk_state beacouse i though it will solve the problem
When 1 player say to npc a keyword then everything is fine..
But when more players talk to npc in the same time:
When 1 player say a keyword delay starts..
When 2nd players talk to npc, npc change target and talks to this 2nd player..
I tried to explain it clear and I hope you know what I mean.
Ohh and here is code with delay:
Code:
function onThink() npcHandler:onThink()
if isPlayer(focus) == TRUE then
ts = getPlayerStorageValue(focus, id)
if ts == 30 and (os.clock() - time) > 5 then
npcHandler:say('who manage to master the test are granted the title of an honorary barbarian and the respect of our people
... ', focus)
talk_start = os.clock()
talkset(focus,id,31)
end
if ts == 31 and (os.clock() - talk_start) > 5 then
npcHandler:say('Are you willing to take {the} {barbarian} {test}? ', focus)
talk_start = os.clock()
talkset(focus,id,3)
end
--------------------------------------------------------------------------------------
end
Thank you for any help. =]
@PS I used SV except talk_state beacouse i though it will solve the problem
Last edited: