PoccnnEnquanto houver armas no mundo, haverá guerra!PHerói
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino
31 de agosto de 2020 às 09:54
Seymour.xml
<?xml version="1.0" encoding="UTF-8"?><npcname="Seymour"script="data/npc/scripts/default.lua"walkinterval="2000"floorchange="0"><healthnow="100"max="100"/><looktype="128"head="116"body="69"legs="87"feet="20"addons="0"/><parameters><parameterkey="message_greet"value="Hello |PLAYERNAME|. Welcome to the Academy of Rookgaard. May I sign you up as a {student}?"/><parameterkey="message_farewell"value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!"/><parameterkey="message_walkaway"value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!"/><parameterkey="message_idletimeout"value="Good bye, |PLAYERNAME|! And remember: No running up and down in the academy!"/><parameterkey="module_keywords"value="1"/><parameterkey="keywords"value="Billy;Norma;Willie;job;name;Sir;information;lesson;this;Rookgaard;village;island;Thais;Tibia;temple;shop;farm;dungeon;Main;fight;skill;level;equip;premium;potion;antidote;food;weapon;armor;shield;rope;shovel;torch;legs;helmet;shoe;trade;citizen;merchant;king;monster;rat;sewer;troll;money;loot;corpse;Obi;Dixi;Amber;Norma;Willie;Billy;Lily;Lee'Delle;Hyacinth;Tom;academy;train;library;bank;deposit;The Oracle;oracle;vocation;knight;paladin;druid;sorcerer;"/><parameterkey="keyword_reply1"value="Billy is {Willie}\'s cousin, but he has his farm on the {premium} side of the village."/><parameterkey="keyword_reply2"value="Norma has recently opened a bar here meaning she sells drinks and snacks. Nothing of importance to you, young student."/><parameterkey="keyword_reply3"value="Willie is a fine farmer, although he is short-tempered. He sells and buys {food}."/><parameterkey="keyword_reply4"value="I'm the master of this fine {academy}, giving {lessons} to my students."/><parameterkey="keyword_reply5"value="My name is Seymour, but for you I am 'Sir' Seymour."/><parameterkey="keyword_reply6"value="At least you know how to address a man of my importance."/><parameterkey="keyword_reply7"value="Well, I could give you valuable {lessons} or some general {hints} about the game, or a small {quest} if you're interested."/><parameterkey="keyword_reply8"value="Oh, which lesson did you want to attend again? Was it {Rookgaard}, {fighting}, {equipment}, {citizens}, the {academy} or the {oracle}?"/><parameterkey="keyword_reply9"value="Yes, you got it. Ask me for a {lesson} anytime.?"/><parameterkey="keyword_reply10"value="Rookgaard is the name of this {village} as well as of the whole {island}. It belongs to the kingdom of {Thais}, in our world which is called {Tibia}."/><parameterkey="keyword_reply11"value="The most important places in this village are the {temple}, the different {shops}, the {academy} and the {bridges}."/><parameterkey="keyword_reply12"value="The island is separated into a {premium} side and a non-premium side. On both sides you will find {dungeons}, but the premium side tends to be a little less crowded with other players."/><parameterkey="keyword_reply13"value="The city of Thais is reigned by King Tibianus. Of course, there are many other cities but you will learn about them later."/><parameterkey="keyword_reply14"value="The world of Tibia is very large with tons of places to explore. Vast deserts, Caribbean islands, deep jungles, green meadows and jagged mountains await you!"/><parameterkey="keyword_reply15"value="The temple is the place to go when you are very low on {health} or poisoned. Ask {Cipfried} for a heal - he usually notices emergencies by himself."/><parameterkey="keyword_reply16"value="We have a {weapon} and an {armor} shop south of the academy. {Equipment} such as {ropes} are sold to the north-west. {Potions} can be bought to the south. And then there are the {farms}."/><parameterkey="keyword_reply17"value="The farms are west of here. You can buy and sell {food} there which you need to regain {health}."/><parameterkey="keyword_reply18"value="You should not descend into dungeons without proper {equipment}. Once you are all prepared, ask the bridge {guards} for suitable {monsters}."/><parameterkey="keyword_reply19"value="You can leave for mainland once you are level 8. To do so talk to the {oracle}."/><parameterkey="keyword_reply20"value="You have to fight {monsters} to train your {skills} and {level}. If you lose {health}, eat {food} to regain it or use a {potion}."/><parameterkey="keyword_reply21"value="The more you fight with a weapon, the better will be your skill handling this weapon. Don't worry about that right now though, this will become important once you have a {vocation}."/><parameterkey="keyword_reply22"value="Once you gained enough experience for a level, you will advance. This means - among other things - more {health} points, a faster walking speed and more strength to carry things."/><parameterkey="keyword_reply23"value="Don't go hunting without proper equipment. You need at least a suitable {weapon}, {armor}, {shield}, {rope} and {shovel}. A {torch} is also good as well as {legs}, a {helmet} and {shoes}."/><parameterkey="keyword_reply24"value="Paying for your Tibia account will turn it into a premium account. This means access to more areas and functions of the game as well as other neat features."/><parameterkey="keyword_reply25"value="Use a small health potion in case of emergencies to fill up around 75 health points. You can buy them at {Lily}'s shop. She also has {antidote} potions."/><parameterkey="keyword_reply26"value="Some monsters poison you. To heal poison, use an antidote potion on yourself. Buy them at {Lily}'s store."/><parameterkey="keyword_reply27"value="Many monsters, such as rabbits or deer, are excellent food providers. You can also buy food from {Willie} or {Billy}, the farmers."/><parameterkey="keyword_reply28"value="The starter weapon, a club, won't get you far. You should earn some {money} and buy a better weapon such as a sabre from {Obi}'s or {Lee'Delle}'s shop. Simply ask for a {trade}."/><parameterkey="keyword_reply29"value="The starter armor, a coat, does not protect you well. First of all, earn some money and try to get a sturdy leather armor from {Dixi}'s or {Lee'Delle}'s shop. Simply ask for a {trade}."/><parameterkey="keyword_reply30"value="I fear you have to buy your first shield by yourself. A wooden shield from {Dixi} or {Lee'Delle} is a good choice."/><parameterkey="keyword_reply31"value="You definitely need a rope to progress in dungeons, else you might end up stuck. Buy one from {Al Dee} or {Lee'Delle}."/><parameterkey="keyword_reply32"value="A shovel is needed to dig some {dungeon} entrances open. 'Use' it on a loose stone pile to make a hole large enough to enter."/><parameterkey="keyword_reply33"value="A torch will provide you with light in dark {dungeons}. 'Use' it to light it. You can buy them from {Al Dee} or {Lee'Delle}."/><parameterkey="keyword_reply34"value="Leather legs might be a good basic protection. You can buy them from {Dixi} or {Lee'Delle}. Or, once you are strong enough, hunt {trolls}. They sometimes carry them in their {loot}."/><parameterkey="keyword_reply35"value="A sturdy leather helmet is a good choice for a beginner. You can either buy it from {Dixi} and {Lee'Delle}, or, once you are strong enough, {loot} them from {trolls}."/><parameterkey="keyword_reply36"value="Leather boots are basic shoes which will protect you well. You can either buy them from {Dixi} and {Lee'Delle}, or, once you are strong enough, {loot} them from {trolls}."/><parameterkey="keyword_reply37"value="I personally don't have anything to trade, but you can ask {merchants} for a trade. That will open a window where you can see their offers and the things they buy from you."/><parameterkey="keyword_reply38"value="Most of the citizens here are {merchants}. You can give me the name of any non-player character and I will tell you something about him or her."/><parameterkey="keyword_reply39"value="Merchants buy and sell goods. Just ask them for a {trade} to see what they offer or buy from you."/><parameterkey="keyword_reply40"value="Hail to King Tibianus! Long live our king! Not that he cares for an old veteran who is stuck on this godforsaken island..."/><parameterkey="keyword_reply41"value="Good monsters to start hunting are {rats}. They live in the {sewers} below the village."/><parameterkey="keyword_reply42"value="To attack a rat, simply click on it in your battle list. Make sure that you have proper {equipment}, though! Also, I give you 2 gold coins for each {dead rat}."/><parameterkey="keyword_reply43"value="One entrance to the sewers is south of this {academy}. Look for a sewer grate, then use it to climb down."/><parameterkey="keyword_reply44"value="Trolls are quite nasty monsters which you shouldn't face before level 3 or 4 depending on your {equipment}. Ask the bridge {guards} for their locations!"/><parameterkey="keyword_reply45"value="Make money by killing {monsters} and picking up their {loot}. You can sell many of the things they carry."/><parameterkey="keyword_reply46"value="Once a monster is dead, you can select 'Open' on the {corpse} to check what's inside. Sometimes they carry {money} or other items which you can sell to {merchants}."/><parameterkey="keyword_reply47"value="You can even sell some corpses! For example, you can sell fresh dead rats to {Tom} the tanner or me. He also buys other dead creatures, just ask him for a {trade}."/><parameterkey="keyword_reply48"value="Obi sells and buys {weapons}. You can find his shop south of the academy."/><parameterkey="keyword_reply49"value="Dixi sells and buys {armors}, {shields}, {helmets} and {legs}. You can find her shop south of the academy, just go up the stairs in {Obi}'s shop."/><parameterkey="keyword_reply50"value="A traveller from the {main} continent. I wonder what brought her here. No one comes here of his own free will."/><parameterkey="keyword_reply51"value="Norma has recently opened a bar here meaning she sells drinks and snacks. Nothing of importance to you, young student."/><parameterkey="keyword_reply52"value="Willie is a fine farmer, although he is short-tempered. He sells and buys {food}."/><parameterkey="keyword_reply53"value="Billy is {Willie}'s cousin, but he has his farm on the {premium} side of the village."/><parameterkey="keyword_reply54"value="In the southern part of town, Lily sells {potions} which might come in handy once you are deep in a dungeon and need {health}."/><parameterkey="keyword_reply55"value="Lee'Delle's shop is in the western part of town, on the {premium} side. She sells everything cheaper."/><parameterkey="keyword_reply56"value="A mysterious druid who lives somewhere in the wilderness. He sells small health {potions} just like {Lily}."/><parameterkey="keyword_reply57"value="Tom the tanner buys fresh {corpses}, minotaur leather and paws. Always good to make some {money} if you can carry the corpses there fast enough."/><parameterkey="keyword_reply58"value="The academy is the building you are standing in. We have a {library}, a {training} centre, a {bank} and the room of the {oracle}."/><parameterkey="keyword_reply59"value="When you have the time, please visit our training centre downstairs. 'Look' at the blackboards to read some important advice. Oh, you need a {key} for that!"/><parameterkey="keyword_reply60"value="There are many books in the bookcases around you, unless some naughty kids stole them again. Read them for more and detailed information."/><parameterkey="keyword_reply61"value="In a bank you can deposit your earned gold coins safely. Just go downstairs to {Paulie} and ask him to {deposit} your money."/><parameterkey="keyword_reply62"value="Yes, depositing your money will keep it safe, so it is a good idea to store it in the bank. Of course, you can always withdraw it again."/><parameterkey="keyword_reply63"value="The oracle is a mysterious being just upstairs. It will bring you to the {Island of Destiny} to choose your {vocation} once you are level 8."/><parameterkey="keyword_reply64"value="The oracle is a mysterious being just upstairs. It will bring you to the {Island of Destiny} to choose your {vocation} once you are level 8."/><parameterkey="keyword_reply65"value="There are four vocations: {knights}, {paladins}, {sorcerers} and {druids}. You can choose your vocation once you are level 8 and have talked to the {oracle}."/><parameterkey="keyword_reply66"value="Knights are strong melee fighters. You will learn all about them once you are level 8 and reached the Island of {Destiny}."/><parameterkey="keyword_reply67"value="Paladins are swift distance fighters. You will learn all about them once you are level 8 and reached the Island of {Destiny}."/><parameterkey="keyword_reply68"value="Druids are nature magic users and great healers. You will learn all about them once you are level 8 and reached the Island of {Destiny}."/><parameterkey="keyword_reply69"value="Sorcerers are talented elemental magicians. You will learn all about them once you are level 8 and reached the Island of {Destiny}."/></parameters></npc>
Seymour.lua
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)local Topic ={}local count ={}local destiny ={"Hmmm, let me look at you. You got that intelligent sparkle in your eyes and you'd love to handle great power - that must be a future sorcerer!","Hmmm, let me look at you. You have an aura of great wisdom and may have healing hands as well as a sense for the powers of nature - I think you're a natural born druid!","Hmmm, let me look at you. Such a lean and swift fighter you are - I can imagine you really well with a bow - I think you'd make a tremendous paladin!","Hmmm, let me look at you. Strong and sturdy, with a determined look in your eyes - no doubt the knight profession would be suited for you!"}function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid)endfunction onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid)endfunction onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg)endfunction onThink() npcHandler:onThink()endfunction greetCallback(cid)local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and0or cid
Topic[talkUser]=1
count[talkUser]=0returntrueendfunction thinkCallback(cid)local rand = math.random(250)if rand ==1then
selfSay("Get some training in the academy!")elseif rand ==2then
selfSay("Feeling lost? Ask me for help!")elseif rand ==3then
selfSay("Newcomers - visit me! I'll answer your questions!")endreturntrueendfunction creatureSayCallback(cid, type, msg)if(not npcHandler:isFocused(cid))thenreturnfalseendlocal talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and0or cid
if msgcontains(msg,"how")and msgcontains(msg,"are")and msgcontains(msg,"you")then
npcHandler:say("Well, the {king} doesn't send troops anymore, the {academy} is dreadfully low on money, and the end of the world is pretty nigh. Apart from that I'm reasonably fine, I suppose.", cid)
Topic[talkUser]=0elseif msgcontains(msg,"fuck")then
npcHandler:say("For this remark I will wash your mouth with soap, young "..(getPlayerSex(cid)==0and"lady!"or"man!"), cid)
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_YELLOW_RINGS)
Topic[talkUser]=0elseif(msgcontains(msg,"yes")or msgcontains(msg,"student"))and Topic[talkUser]==1then
npcHandler:say("Brilliant! We need fine adventurers like you! If you are ready to learn, just ask me for a {lesson}. You can always ask for the differently coloured words - such as {this} one - to continue the lesson.", cid)
Topic[talkUser]=0elseif msgcontains(msg,"al")and msgcontains(msg,"dee")then
npcHandler:say("Al Dee has a general {equipment} store in the north-western part of the village. He sells useful stuff such as {ropes}.", cid)
Topic[talkUser]=0elseif msgcontains(msg,"island")and msgcontains(msg,"destiny")then
npcHandler:say("This is an island with {vocation} teachers. You can learn all about the different vocations there once you are level 8.", cid)
Topic[talkUser]=0elseif msgcontains(msg,"hint")thenif getPlayerStorageValue(cid,6079)==-1then
setPlayerStorageValue(cid,6079,1)endlocal str = getPlayerStorageValue(cid,6079)
npcHandler:say(hints[str], cid)
setPlayerStorageValue(cid,6079, str ==28and0or str +1)
Topic[talkUser]=0elseif msgcontains(msg,"mission")or msgcontains(msg,"quest")then
npcHandler:say(getPlayerLevel(cid)<4and"You are pretty inexperienced. I think killing rats is a suitable challenge for you. For each fresh {dead rat} I will give you two shiny coins of gold."or"Well I would like to send our king a little present, but I do not have a suitable box. If you find a nice box, please bring it to me.", cid)
Topic[talkUser]=0elseif msgcontains(msg,"destiny")thenif getPlayerStorageValue(cid,6080)<=0then
npcHandler:say("Shall I try and take a guess at your destiny?", cid)
Topic[talkUser]=5elselocal destiny ={[1]="Well, like I told you before, I really think you got that spirit of a sorcerer in you. But of course it's completely up to you!",[2]="Well, like I told you before, I really think you got that spirit of a druid in you. But of course it's completely up to you!",[3]="Well, like I told you before, I really think you got that spirit of a paladin in you. But of course it's completely up to you!",[4]="Well, like I told you before, I really think you got that spirit of a knight in you. But of course it's completely up to you!"}
npcHandler:say("".. destiny[getPlayerStorageValue(cid,6080)].."", cid)endelseif msgcontains(msg,"dead")and msgcontains(msg,"rat")thenif getCount(msg)~=-1and1< getCount(msg)then
count[cid]= getCount(msg)
npcHandler:say("Have you brought ".. count[cid].." dead rats to me to pick up your reward?", cid)else
count[cid]=1
npcHandler:say("Have you brought a dead rat to me to pick up your reward?", cid)end
Topic[talkUser]=2elseif msgcontains(msg,"yes")and Topic[talkUser]==5thenlocal rand = math.random(4)
npcHandler:say(destiny[rand], cid)
setPlayerStorageValue(cid,6080, rand)
Topic[talkUser]=0elseif Topic[talkUser]==2and msgcontains(msg,"yes")thenif getPlayerItemCount(cid,2813)>= count[cid]then
npcHandler:say("Thank you! Here is your reward.", cid)
doPlayerRemoveItem(cid,2813, count[cid])
doPlayerAddMoney(cid, count[cid]*2)else
npcHandler:say(count[cid]>1and"HEY! You do not have so many!"or"HEY! You don't have one! Stop playing tricks on fooling me or I will give you some extra work!", cid)end
Topic[talkUser]=0elseif Topic[talkUser]==2then
npcHandler:say("Go and find some rats to kill!", cid)
Topic[talkUser]=0elseif msgcontains(msg,"time")then
npcHandler:say("It's "..getTibianTime()..", so you are late. Hurry!", cid)
Topic[talkUser]=0elseif Topic[talkUser]==1then
npcHandler:say("Only nonsense on your mind, eh?", cid)
Topic[talkUser]=0elseif msgcontains(msg,"key")then
npcHandler:say("Do you want to buy the Key to Adventure for 5 gold coins?", cid)
Topic[talkUser]=4elseif Topic[talkUser]==4thenif msgcontains(msg,"yes")thenif getPlayerMoney(cid)>=5then
npcHandler:say("Here you are.", cid)
doPlayerRemoveMoney(cid,5)local key = doCreateItemEx(2088,1)
doSetItemActionId(key,4600)
doPlayerAddItemEx(cid, key,1)else
npcHandler:say("You don't have enough money.", cid)endelseif msgcontains(msg,"no")then
npcHandler:say("As you wish.", cid)else
npcHandler:say("Only nonsense on your mind, eh?", cid)end
Topic[talkUser]=0elseif msgcontains(msg,"present box")then
npcHandler:say("Do you have a suitable present box for me?", cid)
Topic[talkUser]=3elseif Topic[talkUser]==3thenif msgcontains(msg,"yes")thenif getPlayerItemCount(cid,1990)>=1then
npcHandler:say("THANK YOU! Here is a helmet that will serve you well.", cid)
doPlayerRemoveItem(cid,1990,1)
doPlayerAddItem(cid,2480,1)else
npcHandler:say("HEY! You don't have one! Stop playing tricks on me or I'll give you some extra work!", cid)endelse
npcHandler:say("HEY! You don't have one! Stop playing tricks on me or I will give some extra work!", cid)end
Topic[talkUser]=0endreturntrueend
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino
Seymour.xml
Seymour.lua