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

Solved 9.81 NPC don't speak anything at goodbye

hrex

New Member
Joined
Apr 12, 2009
Messages
27
Reaction score
2
Hello,
first*
sorry for my english and my script becaouse i am not scripter heh i am just thinker and remake another npc
second*
so i wanna make all npc (100% RL) from island of destiny and i made druid yandur, maybe only without 2 topics from rl.. but she doesn't speak at goodbye :< i dont know what is problem that it's script xml and lua, please help me :<

XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Druid Yandur" script="data/npc/scripts/DRUID.lua" walkinterval="20000" floorchange="0">
<health now="100" max="100"/>
<look type="144" head="115" body="115" legs="132" feet="115" addons="3"/>
<voices>
<voice text="Are you injured? Come and get a free healing at my little hut." interval2="200" margin="1" yell="no"/>
<voice text="If you like to choose a druid's way of life, talk to me." interval2="200" margin="1" yell="no"/>
<voice text="Sometimes it's not the loudest voice which has the most valuable information to give." interval2="200" margin="1" yell="no"/>
<voice text="Follow your instincts and let nature guide you." interval2="200" margin="1" yell="no"/>
</voices>
<parameters>
<parameter key="message_farewell" value="Farewell |PLAYERNAME|, may you always have friends in your company."/>
<parameter key="message_walkaway" value="Leaving without a friendly word... what a pity." />
</parameters>
</npc>

LUA
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

local Topic, Town = {}, {}

function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() end


function creatureSayCallback(cid, type, msg)
if (msgcontains(msg, "hello") or msgcontains(msg, "hi")) and (not npcHandler:isFocused(cid)) then
local v = getPlayerVocation(cid)
if v == 0 then
npcHandler:say("Welcome to my humble hut, "..getPlayerName(cid).."! Are you interested in learning something about the druid vocation?", cid)
Topic[cid] = 1
else
npcHandler:say("Sorry you have vocation. Can I help you ?", cid)
Topic[cid] = 0
end
elseif Topic[cid] == 1 then
if msgcontains(msg, "yes") then
npcHandler:say("I\'m happy to hear that, dear "..getPlayerName(cid)..". I\'ll gladly give you some {information} or help you to become a {druid} right away. What would you prefer?", cid)
Topic[cid] = 2
elseif msgcontains(msg, "no") then
npcHandler:say("That\'s sad, but maybe you just lack some information about our beautiful vocation?", cid)
Topic[cid] = 2
else
npcHandler:say("I\'m not quite sure if I understand you, but maybe you\'d like some {information} about druids in general?", cid)
Topic[cid] = 2
end
elseif Topic[cid] == 2 then
if msgcontains(msg, "yes") or msgcontains(msg, "information") then
npcHandler:say("Depending on how much time you have, I can either give you the {short} or the {detailed} version. Choose whatever suits you most!", cid)
Topic[cid] = 3
elseif msgcontains(msg, "druid") then
npcHandler:say("Are you sure that you have all needed information and are ready to become a druid forever?", cid)
Topic[cid] = 17
else
npcHandler:say("No, no, you are given the choice between receiving {information} or becoming a {druid} if you\'ve already made up your mind.", cid)
Topic[cid] = 2
end
elseif Topic[cid] == 3 then
if msgcontains(msg, "short") then
npcHandler:say("In short: Druids are focused on ice, earth and healing magic. We use runes, spells and rods to hunt our enemies and usually try to avoid body contact. Easy, right?", cid)
Topic[cid] = 4
elseif msgcontains(msg, "detailed") or msgcontains(msg, "long") then
npcHandler:say("That\'s wonderful. As a druid, your spirit is close to nature and its powers. Your aim is also to protect your friends with powerful healing magic. Can you follow me so far?", cid)
Topic[cid] = 6
else
npcHandler:say("That's not an option, my impatient young student. Would you like to listen to the {short} version or to the {detailed} version of my druid lecture?", cid)
Topic[cid] = 3
end
elseif Topic[cid] == 4 then
if msgcontains(msg, "yes") then
npcHandler:say("Well, anyway "..getPlayerName(cid)..", after having learnt a few basic things about druids, do you think that vocation would be fine for you?", cid)
Topic[cid] = 5
else
npcHandler:say("Well, anyway "..getPlayerName(cid)..", after having learnt a few basic things about druids, do you think that vocation would be fine for you?", cid)
Topic[cid] = 5
end
elseif Topic[cid] == 5 then
if msgcontains(msg, "yes") then
npcHandler:say("That's good to hear, "..getPlayerName(cid)..". Since this is such an important decision, I have to ask you, though, whether you have gotten all the information that you need?", cid)
Topic[cid] = 17
elseif msgcontains(msg, "no") then
npcHandler:say("Well, the other vocations have their own advantages and disadvantages. Maybe you will find something more suitable for you by talking to {Hykrion}, {Estrella} and {Narai}. Come and talk to me anytime!", cid)
Topic[cid] = 0
else
npcHandler:say("<ahem> This is the point of the conversation where you answer with '{yes}' or '{no}'.", cid)
Topic[cid] = 5
end
elseif Topic[cid] == 6 then
if msgcontains(msg, "yes") then
npcHandler:say("Good. Don\'t assume that druids are weak and can\'t defend themselves. Our magic is as strong as that of sorcerers, just in a different way. Do you understand that so far?", cid)
Topic[cid] = 7
else
npcHandler:say("Well, in short, druids use nature spells and healing magic. Can you follow me so far?", cid)
Topic[cid] = 6
end
elseif Topic[cid] == 7 then
if msgcontains(msg, "yes") then
npcHandler:say("Good. Whereas sorcerers call forth hellfire and death itself, druids ask nature for assistance to conjure powerful ice storms and rock showers. Can you follow me so far?", cid)
Topic[cid] = 8
else
npcHandler:say("To say it in easy words: Druids and sorcerers have similar powers, but different types of spells. Do you understand that so far?", cid)
Topic[cid] = 7
end
elseif Topic[cid] == 8 then
if msgcontains(msg, "yes") then
npcHandler:say("Good. Like all mages, we do not have that much health and should be careful when fighting strong monsters, but we can easily keep our distance and deal great damage anyway. Do you understand?", cid)
Topic[cid] = 9
else
npcHandler:say("I said, the difference between sorcerer and druid spells is the focus. Sorcerers use black magic and druids white magic, so to speak. Can you follow me so far?", cid)
Topic[cid] = 8
end
CONTINUED...
 
Last edited by a moderator:
Code:
elseif Topic[cid] == 9 then
if msgcontains(msg, "yes") then
npcHandler:say("You are a good listener, "..getPlayerName(cid)..". As a druid, you\'ll be welcome in hunting parties not only as a healer and supporter but also as fighter. Can you follow me so far?", cid)
Topic[cid] = 10
else
npcHandler:say("To put this differently: Don\'t get hit by monsters. Rather shoot spells on them from a distance as druids don\'t have a lot of hit points. Do you understand?", cid)
Topic[cid] = 10
end
elseif Topic[cid] == 10 then
if msgcontains(msg, "yes") then
npcHandler:say("Good. Last but not least, we can create runes storing magic power and enchant gems at elemental shrines to be used in weapons. Do you understand that so far?", cid)
Topic[cid] = 11
else
npcHandler:say("Well, I just said that druids can create runes and enchant gems which are used in weapons. Do you understand that so far?", cid)
Topic[cid] = 10
end
elseif Topic[cid] == 11 then
if msgcontains(msg, "yes") then
npcHandler:say("Once a druid reaches character level 20, he or she can receive a vocation promotion and become an elder druid. Did you listen to everything I told you?", cid)
Topic[cid] = 12
else
npcHandler:say("Again, at level 20 a druid can be promoted to an elder druid and at level 80 can join to Brotherhood of Bones. Did understand everything I told you?", cid)
Topic[cid] = 11
end
elseif Topic[cid] == 12 then
if msgcontains(msg, "yes") then
npcHandler:say("So, dear "..getPlayerName(cid)..", let\'s test your newly gained knowledge! Let me ask you: How is a promoted druid called? {Master Druid}, {Elder Druid} or {Royal Druid}?", cid)
Topic[cid] = 13
end
elseif Topic[cid] == 13 then
if msgcontains(msg, "master") and msgcontains(msg, "druid") then
npcHandler:say("I'm sorry "..getPlayerName(cid)..", but the sorcerers are the ones which gain a 'Master' title. We druids will become 'Elder'. Another question for you: Name one of the elements which we mastered - is it {ice}, {holy} or {fire}?", cid)
Topic[cid] = 14
elseif msgcontains(msg, "elder") and msgcontains(msg, "druid") then
npcHandler:say("Yes, well done! Elder druids are well respected among Tibians. Another question for you: Name one of the elements which we mastered - is it {ice}, {holy} or {fire}?", cid)
Topic[cid] = 14
elseif msgcontains(msg, "royal druid") and msgcontains(msg, "druid") then
npcHandler:say("I\'m sorry "..getPlayerName(cid)..", but the paladins are the ones which gain a 'Royal' title. We druids will become 'Elder'. Another question for you: Name one of the elements which we mastered - is it {ice}, {holy} or {fire}?", cid)
Topic[cid] = 14
else
npcHandler:say("This isn\'t an answer to my question, "..getPlayerName(cid)..". Please think again: how is a promoted druid called? {Master Druid}, {Elder Druid} or {Royal Druid}?", cid)
Topic[cid] = 13
end
elseif Topic[cid] == 14 then
if msgcontains(msg, "earth") then
npcHandler:say("Although that wasn\'t one of the answers I gave you, you\'re right, earth is also correct. Next question: Where are magically enchanted gems used? In {weapons}, as {decoration} or as {food}?", cid)
Topic[cid] = 15
elseif msgcontains(msg, "fire") then
npcHandler:say("That's rather a sorcerer\'s job, although we can use some basic fire magic, too. You may want to try again: {Ice} or {holy}?", cid)
Topic[cid] = 14
elseif msgcontains(msg, "ice") then
npcHandler:say("Very good "..getPlayerName(cid)..", you remembered that detail about the ice storms. Next question: Where are magically enchanted gems used? In {weapons}, as {decoration} or as {food}?", cid)
Topic[cid] = 15
elseif msgcontains(msg, "energy") then
npcHandler:say("That's rather a sorcerer's job, although we can use some basic energy magic, too. You may want to try again: {Ice}, {fire} or {holy}?", cid)
Topic[cid] = 14

elseif msgcontains(msg, "death") then
npcHandler:say("No! Death magic is mainly for sorcerers and I personally don't like it. Although, druids can use some basic death magic, too. You may want to try again: {Ice}, {fire} or {holy}?", cid)
Topic[cid] = 14
elseif msgcontains(msg, "holy") then
npcHandler:say("Although one can easily mistake healing magic for 'holy magic', it's not the same thing. Only paladins can use holy magic. So just try again: {Fire}, {ice} or {earth}?", cid)
Topic[cid] = 14
else
npcHandler:say("What element is this supposed to be? I know only {earth, {fire}, {ice}, {energy}, {death} and {holy}.", cid)
Topic[cid] = 14
end
elseif Topic[cid] == 15 then
if msgcontains(msg, "weapons") then
npcHandler:say("Right, enchanted gems add elemental damage to weapons. I have one last question for you, "..getPlayerName(cid)..". What do you think a druid will spend most of his money on - buying {runes} or buying {weapons}?", cid)
Topic[cid] = 16
elseif msgcontains(msg, "decoration") then
npcHandler:say("Well... although some may use them for decoration, that's not their main purpose. They are used on weapons to add elemental damage. ...", cid)
npcHandler:say("I have one last question for you, "..getPlayerName(cid)..". What do you think a druid will spend most of his money on - buying {runes} or buying {weapons}?", cid)
Topic[cid] = 16
elseif msgcontains(msg, "food") then
npcHandler:say("Nyargh! I hope you don\'t ruin your teeth when trying to bite on them...! They are used on weapons to add elemental damage. ...", cid)
npcHandler:say("I have one last question for you, "..getPlayerName(cid)..". What do you think a druid will spend most of his money on - buying {runes} or buying {weapons}?", cid)
Topic[cid] = 16
else
npcHandler:say("That wasn\'t among the allowed answers. The question was whether magical gems are used for {weapons}, as {decoration} or as {food}?", cid)
Topic[cid] = 15
end
elseif Topic[cid] == 16 then
if msgcontains(msg, "weapons") then
npcHandler:say("Although we can use weapons, spells and runes are so much more effective. This is why we usually buy runes and mana potions. That was easy, don\'t you think?", cid)
Topic[cid] = 4
elseif msgcontains(msg, "runes") then
npcHandler:say("Right, although we need of course some basic equipment, most of our money is spent on buying new runes and mana potions. That was easy, don't you think?", cid)
Topic[cid] = 4
else
npcHandler:say("Please try giving a clear answer - what does a druid spend a lot of money on, rather on {runes} or on {weapons}?", cid)
Topic[cid] = 16
end
elseif Topic[cid] == 17 then
if msgcontains(msg, 'yes') then
npcHandler:say("Be aware that this decision is final, "..getPlayerName(cid).."! Step in front of me and announce it proudly: DO YOU WANT TO BE A DRUID?", cid)
Topic[cid] = 18
else
npcHandler:say("I\'ll give you all the information you require. The {short} version or the {long} version?", cid)
Topic[cid] = 3
end
elseif Topic[cid] == 18 then
if msgcontains(msg, 'yes') then
npcHandler:say("You are DRUID now.", cid)
doPlayerSetVocation(cid, 2)
Topic[cid] = 0
else
npcHandler:say("Well, maybe you need some more time. Just make sure you choose the right vocation for you, no matter if it\'s the druid profession or something else. Talk to the other vocation masters, too, and take care!", cid)
Topic[cid] = 0
end
elseif msgcontains(msg, "information") then
npcHandler:say("Which information do you require? I can tell you about {druids}, {spells}, {monsters}, {rods}, {runes}, {potions}, {shrines} or {equipment} as well as about some other topics, just ask me.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "druids") then
npcHandler:say("As a druid, your spirit is close to nature and its powers. Your aim is also to protect your friends with powerful {healing} magic. Don\'t assume, though, that druids are weak and can\'t defend themselves. ...", cid)
npcHandler:say("Our {magic} is as strong as that of sorcerers, just in a different way. Whereas {sorcerers} call forth hellfire and death itself, druids ask nature for assistance to conjure powerful ice storms and rock showers. ...", cid)
npcHandler:say("Like all magicians, we do not have that much health and should be careful when fighting strong monsters, but we can easily keep distance and deal great damage anyway. ...", cid)
npcHandler:say("That\'s why druids are welcome in parties not only as healers and supporters but also as fighters. ...", cid)
npcHandler:say("Last but not least, we can create {runes} storing magic power and enchant gems at {elemental} shrines to be used in {weapons}. Once a druid reaches level 20, he or she can receive a vocation promotion and be elder druid. ...", cid)
npcHandler:say("That's it! If you need other {information}, let me know.", cid)
Topic[cid] = 0
CONTINUED...
 
Last edited by a moderator:
Code:
elseif msgcontains(msg, "healing") then
npcHandler:say("I just ran out of mana - but simply use that rune on my table on yourself to get healed.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "magic") then
npcHandler:say("I know a lot about magic, what's of interest to you? I can tell you about {elements}, {spells} or {runes}.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "sorcerers") then
npcHandler:say("", cid)
Topic[cid] = 0
elseif msgcontains(msg, "runes") then
npcHandler:say("We can cast {magic} onto blank runes to turn them into magic runes to be used whenever we need them. Popular rune spells are 'Stone Shower' or 'Stalagmite'", cid)
Topic[cid] = 0
elseif msgcontains(msg, "spells") then
npcHandler:say("We know a range of instant spells such as 'Ice Strike', for example, with which we can deal direct damage. We can also cast magic onto blank runes to turn them into magic runes to be used whenever we need them ...", cid)
npcHandler:say("Your magic will do more damage the higher your {magic level} is. Our most devastating spells are called 'Wrath of Nature' and 'Eternal Winter'. ...", cid)
npcHandler:say("Only really experienced druids can unleash their power, though. You can buy new spells in each city, just look for a druid trainer.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "elemental") or msgcontains(msg, "elements") then
npcHandler:say("There are six elements in Tibia: {fire}, {energy}, {ice}, {earth}, {holy} and {death}. Each element has its counterpart against which it is especially effective.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "monsters") then
npcHandler:say("As a young druid you won\'t be able to kill strong monsters all by yourself. For this reason you should rather team up with a friend or hunt easy monsters. ...", cid)
npcHandler:say("Trolls or rotworms, for example, are good monsters for a start, or anything that is slow enough for you to hit it with your magic rod while outrunning it.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "rods") then
npcHandler:say("Rods are very useful magical tools for druids. They are also really easy to use - simply equip one like you would a weapon and aim at a monster to unleash a magic attack which consumes {mana}. ...", cid)
npcHandler:say("As a new druid, you can find your first rod in the cellar of this building. Currently, there are eight different rods. The higher your level, the more powerful is the rod that you can use.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "potions") then
npcHandler:say("For us druids, only {mana} potions are actually interesting. We usually don\'t need health potions since we have healing spells. ...", cid)
npcHandler:say("Mana potions can be bought in different sizes and in each large city from the magic shop. They will come in handy once you run out of mana. ...", cid)
npcHandler:say("Simply use one on yourself to drink it and refill your magical energy. They aren't cheap, though, so you might want to save your money until it\'s really worth it.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "shrines") then
npcHandler:say("From every main {city}, special portals close to the local {depot} lead to elemental shrines. Common gems can be used on these shrines to enchant them with elemental powers which then can be used on knight weapons.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "equipment") then
npcHandler:say("We don't really rely on protective equipment because we actually try to avoid close contact. It\'s better for us to wear light gear such as {robes} so that we can save our capacity for resources like {runes}.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "mana") then
npcHandler:say("Our magic energy. Each spell costs mana and will decrease your magical energy, but your mana storage slowly refills itself as long as you regularly eat something. You can also use potions to fill up your mana instantly.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "magic level") then
npcHandler:say("With each spell you cast, you will slowly get better at using {magic}. Those 'magic levels' are similar to character levels. With each new level, you will deal more damage with your {spells}.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "captain") then
npcHandler:say("You\'ll find him just to the north, up the hill and on the ship docking there.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "estrella") then
npcHandler:say("I respect every being... even if it\'s as arrogant and self-centred as Estrella, haha. Just kidding, below the surface she is a decent person.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "hykrion") then
npcHandler:say("He\'s never afraid to fight for his friends. He can have quite a bad temper, though, if you catch him on the wrong foot.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "narai") then
npcHandler:say("One of the most warmhearted and gentle people I know.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "raffael") then
npcHandler:say("I don\'t need to shop at his booth. Nature gives me everything that I need.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "kurt") then
npcHandler:say("I rather avoid his company. He's a little too rough for my taste", cid)
Topic[cid] = 0
elseif msgcontains(msg, "yandur") then
npcHandler:say("Can be nice t'have a healer around. Talk t'him for {druid} info.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "knight") then
npcHandler:say("Knights are capable fighters and excellent blockers. Talk to {Hykrion} if you want to know more.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "sorcerer") then
npcHandler:say("Sorcerers are on the more destructive side of elemental magic, but otherwise very similar to us. Talk to {Estrella} if you want to know more.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "paladin") then
npcHandler:say("Paladins are very good distance fighters and even blessed with some magic skills. Talk to {Narai} if you want to know more.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "vocation") then
npcHandler:say("This might be one of the biggest choices you have to make. All the vocations - {druids}, {sorcerers}, {paladins} and {knights} - have their good sides.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "ship") then
npcHandler:say("She's pretty, ain't she? Will bring ya almost anywhere and even fo' free. Just once though! Gotta ask fo' a {passage}.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "city") then
npcHandler:say("There are many cities worthwhile staying in. The {captain} can tell you more. My personal favourite? The {elvish} city.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "depot") then
npcHandler:say("A depot is basically some sort of a locker room - each large {city} has at least one. You can store your belongings there safely.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "elvish") then
npcHandler:say("The most popular elvish {city} is Ab'Dendriel. It\'s almost completely made of plants and trees, you should visit it!", cid)
Topic[cid] = 0
elseif msgcontains(msg, "name") then
npcHandler:say("My name is Yandur Brighthand. I was told I had some elvish roots.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "job") then
npcHandler:say("I teach new Tibians the basic knowledge about druids.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "death") then
npcHandler:say("Death defies life. Go away with that!", cid)
Topic[cid] = 0
elseif msgcontains(msg, "ice") then
npcHandler:say("One of the great forces of nature. We can call powerful ice storms to fight fire monsters such as fire elementals.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "earth") then
npcHandler:say("Earth itself will come to our help when we ask for it. Our earth spells are very good against energy creatures and spirit beings. Some even poison the enemy.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "holy") then
npcHandler:say("Holy magic has been researched by {paladins}. It's especially feared by undead monsters like skeletons.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "fire") then
npcHandler:say("{Sorcerers} are best at using fire magic, but we also have some basic fire magic at our disposal. I recommend using it against earth creatures such as spiders.", cid)
Topic[cid] = 0
elseif msgcontains(msg, "energy") then
npcHandler:say("Energy is one of the main strengths that {sorcerers} have. The basic spells which druids can use work well against ice or water creatures such as polar bears.", cid)
Topic[cid] = 0
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)

third*
in script doesn't work, this bye from second topic, and walkaway in xml, this same problem, rest of script working but voices one is extra from old npc, from i remake in this; this is voice what i dont need, in addition to these three problems, rest working 100 %
Harr! Wanna go off this island? Need me an' my ship
and i don't know what responsible for it, please me for this 3 problems - bye, walkaway and one unwanted voice, help me please !! :<< it's stopped my work.. :<<
 
Last edited:
What exactly do you mean? If you releaseFocus while taking to the npc it won't respond anymore till you say hi again.
 
Yes, i know and script is 100 % working at real but i need information about relasefocus in talk with npc for example if player say no for talkstate 3 npc realse focus with him do you understand me ? If you want i can share with you my scripts from IOD when i the end for your help :)
 
Last edited:
yes i know :D but where i must paste that in table from your script ? ;p

[18] = {y = 0, e = 0, yes = "You are DRUID now.", els = "Well, maybe you need some more time. Just make sure you choose the right vocation for you, no matter if it\'s the druid profession or something else. Talk to the other vocation masters, too, and take care!" npcHandler:releaseFocus(cid), voc = 2}

how to do that ? becaouse that its wrong :D its all posible in such way ?
 
If it should release focus after the person became a druid, add it here.
Code:
if x.voc then
     doPlayerSetVocation(cid, x.voc)
end
Above the end.
 
its not what i meant, when player say no its focusrealse but i need to add this in another issues becaouse in another npc from IOD, sometimes for else just realsefocus for exampel -
player - hi
npc - hello do u want some information about sorccers ?
player - gfdgdg (something)
npc - what do you mean ?
player - gfdgdg (something)
npc - go away !(releasefocus)
so i need information how can i add this realsefocus in this line in tabel
[8] = {y = 9, e = 8, yes = "Good. Like all mages, we do not have that much health and should be careful when fighting strong monsters, but we can easily keep our distance and deal great damage anyway. Do you understand?", els = "I said, the difference between sorcerer and druid spells is the focus. Sorcerers use black magic and druids white magic, so to speak. Can you follow me so far?"},
or this
["detailed"] = {state = 3, t = 6, mes = "That's wonderful. As a druid, your spirit is close to nature and its powers. Your aim is also to protect your friends with powerful healing magic. Can you follow me so far?"},
its possible ? whether I would have to do in the structure of the last "yes" ?
 
A table is just to store information, you shouldn't add functions there (besides the player name but that to get the name for the message).
You could do it like voc, add something like: releasefocus = true in the table, then where it checks for the message and topic and all.
Code:
if x.releasefocus then
     npcHandler:releaseFocus(cid)
end
So you can just check if a value exists and/or if it's true.
 
Back
Top