bpm91
Intermediate OT User
how to make npc speak 1 sentence at a time instead of all
for example i talk to melchior, and he says all the phrases at once
this also happens for example in the runes npc
for example i talk to melchior, and he says all the phrases at once
Lua:
function creatureSayCallback(cid, type, msg)
if not npcHandler:isFocused(cid) then
return false
end
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, "word of greeting") and getPlayerLevel(cid) >= 30 then
selfSay("The djinns have an ancient code of honour. This code includes a special concept of hospitality. Anybody who utters the word of greeting must not be attacked even if he is an enemy. Well, at least that is what the code says. ...", cid)
selfSay("I have found out, though, that this does not work at all times. There is no point to say the word of greeting to an enraged djinn. ...", cid)
selfSay("I can tell you the word of greeting if you're interested. It is DJANNI'HAH. Remember this word well, stranger. It might save your life one day. ...", cid)
selfSay("And keep in mind that you must choose sides in this conflict. You can only follow the Efreet or the Marid - once you have made your choice there is no way back. I know from experience that djinn do not tolerate double-crossing.", cid)
setPlayerStorageValue(cid, 9030,1)
end
return true
end
this also happens for example in the runes npc
Lua:
elseif msgcontains(msg, 'rod') or msgcontains(msg, 'Rod') then
npcHandler:say("Rods can be wielded by druids only and have a certain level requirement. There are five different rods, would you like to hear about them?", 1)
npcHandler:say("The names of the rods are 'Snakebite Rod', 'Moonlight Rod', 'Volcanic Rod', 'Quagmire Rod', and 'Tempest Rod'.", 1)
talk_state = 1
elseif msgcontains(msg, 'wand') or msgcontains(msg, 'Wand') then
npcHandler:say("Wands can be wielded by sorcerers only and have a certain level requirement. There are five different wands, would you like to hear about them?", 1)
npcHandler:say("The names of the wands are 'Wand of Vortex', 'Wand of Dragonbreath', 'Wand of Plague', 'Wand of Cosmic Energy' and 'Wand of Inferno'.", 1)
talk_state = 2
end
Last edited: