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:43
Amber.xml
<?xml version="1.0" encoding="UTF-8"?><npcname="Amber"script="data/npc/scripts/Rookgaard/Amber.lua"walkinterval="2000"floorchange="0"><healthnow="100"max="100"/><looktype="136"head="58"body="113"legs="113"feet="95"addons="1"/><parameters><parameterkey="message_greet"value="Oh hello, nice to see you |PLAYERNAME| Are you here to hear some stories of my {adventures} or do you need {help}"/><parameterkey="message_farewell"value="See you later, |PLAYERNAME|."/><parameterkey="module_keywords"value="1"/><parameterkey="keywords"value="How are you;job;adventure;sea;explore;tibia;time;dungeon;sewer;king;rookgaard;academy;help;information;destiny;thais;main;castle;magic;weapon;monsters;orcs;cyclops;minotaur;dragon;premium;bank;food;tools;rope;shovel;torch;raft;mission;quest;Al Dee;Amber;Billy;Cipfried;Dallheim;Dixi;Hyacinth;Lily;Loui;Norma;Obi;Paulie;Santiago;Seymour;The Oracle;Tom;Willie;Zerbrus;Zirella"/><parameterkey="keyword_reply1"value="I'm recovering from a sea passage."/><parameterkey="keyword_reply2"value="I'm an explorer who seeks adventures."/><parameterkey="keyword_reply3"value=" I fought fierce monsters, climbed the highest mountains, explored the deepest dungeons and crossed the sea on a raft."/><parameterkey="keyword_reply4"value="My voyage on the sea was exhausting. The weather was bad, the waves high and my raft quite simple. There's a certain excitement to it, though."/><parameterkey="keyword_reply5"value="I've been almost everywhere in Tibia."/><parameterkey="keyword_reply6"value="I'm trying to explore each spot of Tibia, and one day I'll have seen it all."/><parameterkey="keyword_reply7"value="Sorry, I lost my watch in a storm."/><parameterkey="keyword_reply8"value="I had no time to explore the dungeons of this isle yet, but I've seen two big caves in the East, and there is a ruined tower to the north-west. Oh, and there're the sewers"/><parameterkey="keyword_reply9"value="I like sewers. I made my very first battle experience in the sewers below Thais. The small sewer system of Rookgaard has some nasty rats to fight."/><parameterkey="keyword_reply10"value="King Tibianus is the ruler of Thais. The island of Rookgaard belongs to his kingdom."/><parameterkey="keyword_reply11"value="It's a nice little island on which you can learn how to fight. I can see it in your eyes - you want to become a famous adventurer and explorer just like me!"/><parameterkey="keyword_reply12"value="A fine institution, but it needs definitely more funds from the king."/><parameterkey="keyword_reply13"value="Well, I can give you general hints or tell you about my adventures and many other topics. Oh, and if you are bored, I might have a small quest for you."/><parameterkey="keyword_reply14"value="Well, I can give you general hints or tell you about my adventures and many other topics. Oh, and if you are bored, I might have a small quest for you."/><parameterkey="keyword_reply15"value="You will find your destiny. I'm sure it's something big and important."/><parameterkey="keyword_reply16"value="A fine city, but the king has some problems enforcing the law."/><parameterkey="keyword_reply17"value="You'll be surprised once you leave this island. The world outside there is gigantic."/><parameterkey="keyword_reply18"value="If you travel to Thais, you really should visit the marvellous castle there."/><parameterkey="keyword_reply19"value="Spells are only taught in the guildhalls of the mainland."/><parameterkey="keyword_reply20"value="The best weapons on this isle are just toothpicks, compared with the weapons warriors of the mainland wield."/><parameterkey="keyword_reply21"value="Oh, I fought orcs, cyclopses, minotaurs, even dragons, and many other creatures."/><parameterkey="keyword_reply22"value="Not the nicest guys you can encounter. I had some clashes with them and finally ended up being their prisoner for a few months."/><parameterkey="keyword_reply23"value="I don't like the way they look at you. Their eye seems to pierce right through you. Creepy!"/><parameterkey="keyword_reply24"value="They are nasty monsters, particularly as they have distance fighters and mages in their clans. My backpack is handmade from minotaur leather."/><parameterkey="keyword_reply25"value="Their breath is so hot! I had to cut my hair after my last encounter with a dragon because the ends were all burnt. That's what you gotta deal with as a female adventurer!"/><parameterkey="keyword_reply26"value="I wouldn't want to miss being a premium adventurer. Everything is so much easier!"/><parameterkey="keyword_reply27"value="I have almost no money with me anyway, so no need to deposit any at the bank."/><parameterkey="keyword_reply28"value="My favourite dish is salmon. Oh please, bring me some."/><parameterkey="keyword_reply29"value="The most important tools you need are a rope, a shovel and maybe a torch."/><parameterkey="keyword_reply30"value="One day I fell into a hole without having a rope. I was yelling for help for three whole days! Eventually a fisherman passed by and pulled me out with his own rope, lucky me."/><parameterkey="keyword_reply31"value="Sometimes I have the strong urge to use it to knock someone out."/><parameterkey="keyword_reply32"value="You know, on mainland you will be able to cast magic spells which provide you with light. You won't really need torches anymore."/><parameterkey="keyword_reply33"value="I left my raft at the south-eastern shore. I forgot my private notebook on it. If you could return it to me, I would be very grateful."/><parameterkey="keyword_reply34"value="I left my raft at the south-eastern shore. I forgot my private notebook on it. If you could return it to me, I would be very grateful."/><parameterkey="keyword_reply35"value="I left my raft at the south-eastern shore. I forgot my private notebook on it. If you could return it to me, I would be very grateful."/><parameterkey="keyword_reply36"value="I don't have much to say about him. I think he sells tools."/><parameterkey="keyword_reply37"value="Did you know my name is also the name of a gem?"/><parameterkey="keyword_reply38"value="He brought me some of his famous rat stew. I really didn't want to insult him, but I simply can't eat something like that. So I told him I'm a vegetarian and I only eat fish."/><parameterkey="keyword_reply39"value="A gentle person. You should visit him if you have questions or need healing."/><parameterkey="keyword_reply40"value="An extraordinary warrior. He's the first and last line of defence of Rookgaard."/><parameterkey="keyword_reply41"value="I don't really know her, but she seems to be a nice girl."/><parameterkey="keyword_reply42"value="Hyacinth is a great healer. He lives somewhere hidden on this isle."/><parameterkey="keyword_reply43"value="Hm, I think I haven't met her yet."/><parameterkey="keyword_reply44"value="Never seen him around."/><parameterkey="keyword_reply45"value="She has changed a lot since I last saw her."/><parameterkey="keyword_reply46"value="He's a funny little man."/><parameterkey="keyword_reply47"value="No, I didn't go to the bank yet."/><parameterkey="keyword_reply48"value="He promised to repair my raft."/><parameterkey="keyword_reply49"value="I think this poor guy was a bad choice as head of the academy."/><parameterkey="keyword_reply50"value="The oracle is said to show you your destiny once you are level 8."/><parameterkey="keyword_reply51"value="To me he seems a bit rude, but maybe that's just my impression."/><parameterkey="keyword_reply52"value="He's funny in his own way."/><parameterkey="keyword_reply53"value="An extraordinary warrior. He's the first and last line of defence of Rookgaard."/><parameterkey="keyword_reply54"value="She seriously asked me if she could have the remains of my raft as fire wood! Can you imagine that??"/></parameters></npc>
Amber.lua
local keywordHandler = KeywordHandler:new()local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)local talkState ={}local orcish ={["Charach"]="Hi",["Futchi"]="Bye",["Mok"]="Yes",["Burp"]="No",["Ikem goshak"]="Offer",["Goshak"]="Buy",["Porak"]="Weapon",["Bata"]="Armor or Helmet",["Dora"]="Shield",["Burka Bata"]="Sword",["Charcha"]="Sabre",["Hakhak"]="Hatchet",["Burka"]="Short Sword",["Batuk"]="Bow",["Pixo"]="Arrows",["Tulak Bora"]="Studded Armor",["Aka Bora"]="Leather Armor",["Donga"]="Brass Shield",["Grofa"]="Studded Helmet",["Humak"]="Human",["Minotaur"]="Minotaur",["Ork"]="Orcs",["Arash"]="Have",["Ba"]="Which",["Bana"]="Slave",["Bata"]="Long/Longer",["Batash"]="Here",["Booz"]="More",["Buta"]="Damn(ed)/Stupid",["Ferut"]="Come",["Gort"]="People",["Ikem"]="I/me",["Karak"]="Dominate",["Karakim"]="Dominate",["Karek"]="Dominate",["Kiskesh"]="All",["Klamuk"]="Paleskin",["Maruk"]="You/Your",["Mora"]="Before",["Omark"]="Must",["Ouk"]="We",["Pashak"]="Sell",["Ta"]="That/It",["Taka"]="What",["Tefar"]="Want",["Ul"]="For/To",["Utash"]="Gosh",["Nixda"]="Money",}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()endlocal shopModule = ShopModule:new()
npcHandler:addModule(shopModule)function creatureSayCallback(cid, type, msg)if(not npcHandler:isFocused(cid))thenreturnfalseendlocal talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and0or cid
if msgcontains(msg,'orcish')or msgcontains(msg,'prisoner')then
npcHandler:say("I speak some Orcish words, not many though, just a few basics like 'yes' and 'no'.", cid)
talkState[talkUser]=1elseif msgcontains(msg,'salmon')then
npcHandler:say("Yeah! If you give me some salmon, I'll tell you another Orcish word. Okay?", cid)
talkState[talkUser]=2elseif msgcontains(msg,'notebook')then
npcHandler:say("Do you bring me my notebook?", cid)
talkState[talkUser]=3elseif msgcontains(msg,'addon')thenif(getPlayerStorageValue(cid,91361)>1and getPlayerStorageValue(cid,91361)< os.time())then
npcHandler:say("Just in time! Your backpack is finished. Here you go, I hope you like it..", cid)
doPlayerAddOutfit(cid,136,1)
doPlayerAddOutfit(cid,128,1)
doPlayerSetStorageValue(cid,91361,1)elseif(getPlayerStorageValue(cid,91361)> os.time())then
npcHandler:say("it is not ready yet.", cid)elseif(getPlayerStorageValue(cid,91361)==1)then
npcHandler:say("You already have a accessory like mine.", cid)else
npcHandler:say("Ah, you noticed my new accessory? Sorry, this one is not for sale. It's handmade from rare {minotaur leather}.", cid)endelseif msgcontains(msg,'minotaur leather')then
npcHandler:say("Well, if you really like this backpack, I could make one for you, but minotaur leather is hard to come by these days. Are you willing to put some work into this?", cid)
talkState[talkUser]=4elseif msgcontains(msg,'backpack')then
npcHandler:say("Ah, right, almost forgot about the backpack! Have you brought me 100 pieces of minotaur leather as requested?", cid)
talkState[talkUser]=5elseif(talkState[talkUser]==1)thenif(msgcontains(msg,'yes'))then
npcHandler:say("It's 'mok' in Orcish. I tell you more if you bring me some food.", cid)else
npcHandler:say("In Orcish that's 'burp'. I tell you more if you bring me some food.",cid)end
talkState[talkUser]=0elseif(talkState[talkUser]==2)thenif(msgcontains(msg,'yes'))thenif(doPlayerRemoveItem(cid,2668,1))thenfor k,v in pairs(orcish[math.random(1,orcish.len())])do
npcHandler:say(k.." means "..v, cid)breakendelse
npcHandler:say("You don't have any salmon!", cid)endelse
npcHandler:say("Ok, then I won't tell you another Orcish word.",cid)end
talkState[talkUser]=0elseif(talkState[talkUser]==3)thenif(msgcontains(msg,'yes'))thenif(doPlayerRemoveItem(cid,1972,1))then
npcHandler:say("thank you.", cid)else
npcHandler:say("Mhm, whatever you have there, it is not my notebook.", cid)endelse
npcHandler:say("Too bad.",cid)end
talkState[talkUser]=0elseif(talkState[talkUser]==4)thenif(msgcontains(msg,'yes'))then
npcHandler:say("Alright then, if you bring me 100 pieces of fine minotaur leather I will see what I can do for you. You probably have to kill really many minotaurs though... so good luck!", cid)else
npcHandler:say("Ok.",cid)end
talkState[talkUser]=0elseif(talkState[talkUser]==5)thenif(msgcontains(msg,'yes'))thenif(doPlayerRemoveItem(cid,5878,100))then
npcHandler:say("Great! Alright, I need a while to finish this backpack for you. Come ask me later, okay?.", cid)
setPlayerStorageValue(cid,91361,os.time()+(60*60*2))else
npcHandler:say("I need 100 minotaur leather.", cid)endelse
npcHandler:say("Too bad.",cid)end
talkState[talkUser]=0elseifnot(foodSayString(msg))then
npcHandler:say('sorry but I do not know what they wanted.', cid)endreturntrueend
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
Amber.xml
Amber.lua
Editado Agosto 31 por Poccnn