Postado Setembro 20, 2019 5 anos MARAVILHOOOOOOSOS, como vocês estão? Espero que estejam bem. ? Esses dias fuçando as profundezas sombrias do meu computador encontrei essa quest, a Barbarian Test Quest, do tibia global e agora compartilho-a com vocês. Para quem não conhece, é aquela quest que dá alguns acessos na cidade de Svargrond do tibia global. Mais informações, visite o link: https://www.tibiawiki.com.br/wiki/Barbarian_Test_Quest As falas do NPC estão 99% iguais ao do tibia global, salvo algumas pequenas modificações/adaptações feitas por mim dando o meu toque, é claro ?. (todos gostam do meu toque) Obviamente, a quest se aplica melhor para servidores de tibia clássico, mas deixei os id's dos itens facilmente editáveis para você adaptar para o seu servidor, seja ele de qual tipo for, para TFS 0.4 ou OTX 2.x. Configuração: 1) Em data/lib, crie um arquivo chamado Barbarian Test Quest.lua e cole isto dentro: Spoiler -- Barbarian Test Quest by Dwarfer BARBARIAN_TEST = { first_test = { honeycomb_id = 5902, -- id da honeycomb que o NPC pede sips = 20, -- goles que o NPC dará ao jogador sip_chance = 80, -- chance para ter sucesso no teste sips_to_complete = 10, -- quantos goles sucessivos o jogador deve completar corpse_id = 2317, -- id do corpo para o qual o jogador se transforma ao cair de bêbado drunk_duration = 30, -- duração da "bebedeira" storages = { -- só modifique se necessário sips = 87340, succeed = 87341 } }, second_test = { filled_meadhorn_id = 7140, -- id do chifre cheio de rum empty_meadhorn_id = 7141, -- id do chifre vazio filled_bucket_id = 7142, -- id do balde de rum lying_bear_id = 7174, -- id do urso "fingindo" sleeping_bear_id = 7175 -- id do urso "dormindo" }, third_test = { standing_mammoth_id = 7176, -- id do mammoth parado sleeping_mammoth_id = 7177 -- id do mammoth "dormindo" }, storages = { -- só modifique se necessário first_test = 87342, second_test = 87343, third_test = 87344, finished = 87345 } } 2) Em data/npc/scripts, crie um arquivo chamado Sven.lua e cole isto dentro: Spoiler -- Barbarian Test Quest by Dwarfer local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local npcTopic = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local function doNpcTellStory(cid, story_tab) for i = 1, #story_tab do npcHandler:say(story_tab[i], cid) end end function creatureSayCallback(cid, type, msg) local talkUser, msg = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid, string.lower(msg) if (not npcHandler:isFocused(cid)) then if isInArray({"hi", "hello"}, msg) then npcHandler:addFocus(cid) npcHandler:say("Be greeted, "..getPlayerName(cid).."! What brings you here?", cid) npcTopic[talkUser] = 1 else return false end elseif (msgcontains(msg, "mission") or msgcontains(msg, "test")) and (npcTopic[talkUser] == 2 or npcTopic[talkUser] == 1) then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.finished) == 1 then npcHandler:say("You have braved all three tests and are now an honorary barbarian.", cid) else if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test) == -1 then doNpcTellStory(cid, {"All of our juveniles have to take the barbarian test to become a true member of our community. Foreigners who manage to master the test are granted the title of an honorary barbarian and the respect of our people ...", "Are you willing to take the barbarian test?"}) npcTopic[talkUser] = 3 elseif getPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test) == 2 then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.second_test) == 1 then npcHandler:say("You have not finished your test yet. Remember, you need to prove you can hug a bear.", cid) elseif getPlayerStorageValue(cid, BARBARIAN_TEST.storages.second_test) == 2 then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test) == -1 then npcHandler:say("Talk to me about {bear hug} if you have finished the test.", cid) elseif getPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test) == 1 then npcHandler:say("You have not finished your test yet. Remember, you need to prove you can knock over a mammoth.", cid) else npcHandler:say("Talk to me about {mammoth} if you have finished the test.", cid) end end end end elseif msgcontains(msg, "yes") then if npcTopic[talkUser] == 3 then doNpcTellStory(cid, {"That's the spirit! The barbarian test consists of a few tasks you will have to fulfil. All are rather simple - for a barbarian that is...", "Your first task is to drink some barbarian mead. But be warned, it's a strong brew that could even knock out a bear. You need tomake at least ten sips of mead in a row without passing out to pass the test ...", "Do you think you can do this?"}) npcTopic[talkUser] = 4 elseif npcTopic[talkUser] == 4 then local itemName = getItemNameById(BARBARIAN_TEST.first_test.honeycomb_id) setPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test, 1) doNpcTellStory(cid, {"Good, but to make barbarian mead we need some "..itemName.." which is rare here. I'd hate to waste mead just to learn you're not worth it ...", "Therefore, you have to get your own "..itemName..". You'll probably need more than one try so better get some extra "..itemName.."s. Then talk to me again about {barbarian mead}."}) elseif npcTopic[talkUser] == 5 then local mission = BARBARIAN_TEST.first_test local itemId = mission.honeycomb_id if getPlayerItemCount(cid, itemId) >= 1 then doPlayerRemoveItem(cid, itemId, 1) setPlayerStorageValue(cid, mission.storages.sips, mission.sips) npcHandler:say("Good, for this ".. getItemNameById(itemId) .. " I allow you ".. mission.sips .. " sips from the mead bucket over there. Talk to me again about barbarian mead if you have passed the test.", cid) else npcHandler:say("You don\'t have some "..getItemNameById(itemId).. " with you.", cid) end end elseif msgcontains(msg, "no") and isInArray({3,4,5}, npcTopic[talkUser]) then npcHandler:say("I see. Maybe later.", cid) elseif msgcontains(msg, "barbarian") then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test) == -1 then npcHandler:say("A true barbarian is something special among our people. Everyone who wants to become a barbarian will have to pass the {barbarian test}.", cid) npcTopic[talkUser] = 2 elseif getPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test) == 1 then if getPlayerStorageValue(cid, BARBARIAN_TEST.first_test.storages.succeed) < BARBARIAN_TEST.first_test.sips_to_complete then npcHandler:say("Do you have some "..getItemNameById(BARBARIAN_TEST.first_test.honeycomb_id).." with you?", cid) npcTopic[talkUser] = 5 else doNpcTellStory(cid, {"An impressive start. Here, take your own mead horn to fill it at the mead bucket as often as you like ...", "But there is much left to be done. Your next test will be to hug a bear ...", "You will find one in a cave north of the town. If you are lucky, it's still sleeping. If not ... well that might hurt ...", "Unless you feel that you hugged the bear, the test is not passed. Once you are done, talk to me about the bear hugging."}) setPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test, 2) setPlayerStorageValue(cid, BARBARIAN_TEST.storages.second_test, 1) doPlayerAddItem(cid, BARBARIAN_TEST.second_test.empty_meadhorn_id, 1) end else npcHandler:say("You have already braved the first barbarian test.", cid) end elseif msgcontains(msg, "hug") then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test) == -1 then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.second_test) == 2 then doNpcTellStory(cid, {"Amazing. That was a clever and brave as a barbarian is supposed to be. But a barbarian also has to be strong and fearless. To prove that you will have to knock over a mammoth ...", "Did your face just turn into the color of fresh snow? However, you will find a lonely mammoth north west of the town in the wilderness. Knock it over to prove to be a true barbarian ...", "Return to me and talk about the mammoth pushing when you are done."}) setPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test, 1) else npcHandler:say("Prove you can hug a bear.", cid) end else npcHandler:say("You have already proved you can hug a bear.".. (getPlayerStorageValue(cid, BARBARIAN_TEST.storages.finished) == 1 and "" or " Keep on doing your missions."), cid) end elseif msgcontains(msg, "mammoth") then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.finished) == -1 then if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test) == 2 then doNpcTellStory(cid, {"As you have passed all three test, I welcome you in our town as an honorary barbarian. You can now become a citizen. Don't forget to talk to the people here. Some of them might need some help ...", "We usually solve our problems on our own but some of the people might have a mission for you. Old Iskan, on the ice in the northern part of the town had some trouble with his dogs lately."}) setPlayerStorageValue(cid, BARBARIAN_TEST.storages.finished, 1) else npcHandler:say("Prove you can knock over a mammoth.", cid) end else npcHandler:say("You are already an honorary barbarian. Nothing more to talk about.", cid) end elseif msgcontains(msg, "bye") then npcHandler:say("May wind and weather be with you, "..getPlayerName(cid)..".", cid) npcTopic[talkUser] = 0 npcHandler:releaseFocus(cid) elseif msgcontains(msg, "name") then doNpcTellStory(cid, {"I am Sven the Younger. My father, Sven the Elder has been missing in the ice waste since I was young. But unless one of our people is buried properly, we assume that he is still in the realm of the living...", "Therefore, I am still known as 'the Younger', even though I have grown old."}) elseif (msgcontains(msg, "here") or msgcontains(msg, "job")) then npcHandler:say("I am the jarl of my people. It's an honour and I am very proud of it", cid) elseif msgcontains(msg, "people") then npcHandler:say("Our people are simple and honest. We don\'t like the scheming ways of the {city} dwellers that live on the main continent.", cid) elseif (msgcontains(msg, "jarl") or msgcontains(msg, "leader")) then npcHandler:say("I am more than just the spokesman and highest judge amount my {people}. I don\'t raise taxes, and when the clans feel that it is necessary, I will be replaced by another jarl.", cid) elseif (msgcontains(msg, "king") or msgcontains(msg, "queen")) then npcHandler:say("We don\'t need any kings and queens here. Being the jarl of my people, I see that the laws are followed.", cid) elseif msgcontains(msg, "ferumbras") then npcHandler:say("Even here we heard about this powerful man. Travellers from the south only fare to whisper his name.", cid) elseif msgcontains(msg, "excalibug") then doNpcTellStory(cid, {"On the campfire, there are numerous tales about this weapon. It's told that it has been missing since ages ...", "In my opinion, the power and fame of a weapon shouldn\'t exceed the power and fame of it's wielder. And I have not heard of any hero whose fame would surpass that of excalibug."}) elseif msgcontains(msg, "join") then npcHandler:say("You might become an honorary barbarian if you manage to pass the barbarian test.", cid) elseif msgcontains(msg, "honourary barbarian") then npcHandler:say("An honourary barbarian earns the right to become a citizen here. But to prove yourself worthy, you have to pass the barbarian test.", cid) elseif msgcontains(msg, "news") then npcHandler:say("There is something evil going on. I have it in my bones.", cid) elseif (msgcontains(msg, "how are you?") or msgcontains(msg, "bones")) then doNpcTellStory(cid, {"There is something in the air that worries me. A great evil is threatening all of us ...", "I might not have the gift of dreams that foresee the future like my {mother} did, but I seem to have inherited some of her gift nonetheless. Sometimes I just feel that something is about to happen ...", "And this time it's something sinister and evil that threatens us all."}) elseif msgcontains(msg, "mother") then doNpcTellStory(cid, {"My mother was that what my people call a witch. This is someone who has special magical abilities without any training on Nibelor ...", "She used her powers more instinctively to amplify her healing skills when herbs would not suffice. She also had the gift to foretell the future ...", "At first, the druids of Nibelor scorned her, but later they accepted her for her abilities and good intentions."}) elseif msgcontains(msg, "rumours") then doNpcTellStory(cid, {"It's an old tale but it persists in the minds of the Svargrondar. It is about my father. There are rumours that he is still alive. ...", "People regularly report about seeing him on top of the cliff right next to Svargrond. I myself would be glad if finally his corpse were found. Then I would be jarl 'Sven the Elder' ..... sounds much better."}) elseif (msgcontains(msg, "guards") or msgcontains(msg, "army")) then doNpcTellStory(cid, {"We don't have an army and we don't need one. Even if the raiders call us weak, everyone of us knows how to fight ...", "All adults serve as guards for some days each month as a service for the community."}) elseif msgcontains(msg, "monsters") then npcHandler:say("There are many dangerous creatures that roam our isles. But having seen what men can do to each other, I wouldn't call any of them a monster.", cid) elseif msgcontains(msg, "santa claus") then npcHandler:say("We heard that this mythical dwarf lives somewhere on the southern Ice Islands.", cid) elseif msgcontains(msg, "city") then doNpcTellStory(cid, {"Our people lived as nomads some generations ago. The contact with Carlin taught us another way of living ...", "We did not like everything about it but we are not stupid. We have seen the many advantages ...", "If you cannot adapt to this land, you are dead and so we adapted to it and built this city. When the contact to Carlin got lost during the years of the serpents, we kept this city alive ...", " And we survived, even though the {raiders} did their best to make us fail."}) elseif msgcontains(msg, "years of serpents") then doNpcTellStory(cid, {"For more than two generations no ship had reached our shores because the giant sea serpents attacked and sank most ships that tried to travel here ...", "Not long ago the sea serpents disappeared as suddenly as they had come. Now ships visit us again on a regular base."}) elseif msgcontains(msg, "raiders") then doNpcTellStory(cid, {"In the past, all barbarian tribes roamed the lands of Chyll as nomads. When the Carliners came here and the trade flourished, we used the resources to build this permanent settlement ...", "Some of our people claimed that it was wrong to settle down and to abandon the ancient ways. A female {shaman} rose in the ranks of those who opposed the erection of a settlement ...", "She gathered all those who were not content, who did not want any foreign influence and who refused to learn ...", "They tried to destroy everything our ancestors had built, but with the help of the Carliners they were stopped and driven away. Now they still roam the land and attack everyone they see ...", "They became the raiders, our worst enemy. Nowadays, there are three larger tribes that often build camps in the South of our land ...", "And after all those years, surviving several generations, this female shaman is still their leader."}) elseif msgcontains(msg, "camp") then npcHandler:say("The raiders' camps are mainly located in the south-western part of the isle. The camps are named after the major clans of the raiders: Ragnir, Bittermor and Grimhorn.", cid) elseif msgcontains(msg, "mines") then doNpcTellStory(cid, {"A long time ago when the trade with Carlin was flourishing, people actually worked in the mines. ...", "During the years of the serpents, the mines had been abandoned. Later, the raiders took shelter there, although they blame us for living in a fortified city ...", "Now, the traders of Carlin are back but some other foreigners seem to have claimed the mines from the raiders ...", "It's neither our business nor would we have the manpower to help them to recapture the mines. Also, if they do not have the strength to get the mines back on their own, they don't deserve them anyway."}) elseif msgcontains(msg, "god") then doNpcTellStory(cid, {"We know of father Chyll and his freezing breath. We care little for other gods. It is foolish to meddle with beings that are so powerful ...", "We leave it to the druids and shamans to handle such affairs."}) elseif msgcontains(msg, "chyll") then doNpcTellStory(cid, {"Father north wind is called Chyll by our people. He is an unforgiving hunter. He knows no mercy with the weak ...", "Chyll is a harsh god and the best you can do is to avoid his attention. Only the shamans and druids deal with him."}) elseif (msgcontains(msg, "druid") or msgcontains(msg, "shaman")) then npcHandler:say("Most shaman and druids of our people live on the sacred isle {Nibelor}. There, they divine the future, calm the wrath of father Chyll and prepare the dead for their last travel to the lands of {Everspring}.", cid) elseif msgcontains(msg, "nibelor") then npcHandler:say("Nibelor has always been a sacred place for our people. The druids and shamans live there.", cid) elseif msgcontains(msg, "everspring") then doNpcTellStory(cid, {"Everspring is the realm of the dead. It is a place of peace and harmony where those who boldly braved the challenges of life dwell for eternity and share stories at the campfires after a hunt ...", "Every true {barbarian} that is properly brought into afterlife will join the great hunt in Everspring where the animals are fat and have the thickest furs."}) elseif msgcontains(msg, "cult") then npcHandler:say("I don\'t care what people who come here believe in. If they provoke father Chyll, he will take care of them on his own. If their gods prove to be more powerful than Chyll, they might deserve to live.", cid) elseif msgcontains(msg, "carlin") then npcHandler:say("We are friend of the Carliners. Still we don't allow their politics to influence our way to handle things here.", cid) elseif msgcontains(msg, "edron") then npcHandler:say("We have heard only little about this far away place.", cid) elseif msgcontains(msg, "thais") then npcHandler:say("We understand that our friends from Carlin are wary with the realm ruled by Thais but this is not of our concern.", cid) elseif msgcontains(msg, "venore") then npcHandler:say("We did not allow them to stay here. This had nothing to do with our friendship with Carlin but for the way they handled things and their harmful approach to go hunting.", cid) elseif msgcontains(msg, "port hope") then npcHandler:say("We have heard only little about this far away place.", cid) elseif msgcontains(msg, "enemies") then doNpcTellStory(cid, {"Our enemies are numerous. Those of our people that we call the raiders are full of hate towards us. Then there are the voracious chakoyas that leave their icy homes to kill and slaughter from time to time ...", "Sometimes, the great ice dragons find their way here to wreak havoc, and there are many more hungry beasts of all kinds."}) elseif msgcontains(msg, "chakoya") then doNpcTellStory(cid, {"The chakoyas are neither beast nor man. Yet, they share the worst and more dangerous traits of both of them. Their small and furry appearance can be very misleading at first glance ...", "But as soon as you've seen a pack of chakoyas literally shredding a mammoth into pieces with their claws and teeth, all misconceptions will be gone."}) elseif msgcontains(msg, "ice dragons") then doNpcTellStory(cid, {"The dragons on our isles have adapted to the climate as every creature here. Instead of being aligned to fire, they became creatures of the cold ...", "They are fierce and dangerous but, luckily, they only prey on beasts of the sea or those that wander the ice near their lairs."}) elseif msgcontains(msg, "yeti") then npcHandler:say("The yetis are mythical beasts. Only few that encountered those creatures lived to tell the tale. The chakoyas worship them as divine beings, although they have no real relations to them as far as we can tell.", cid) elseif msgcontains(msg, "dwarf") then npcHandler:say("I met some of those little people in the past. Considering our experience with the chakoyas, we don't underestimate someone just for its look. And those dwarfs proved indeed to be powerful, courageous and enduring.", cid) -- we, dwarfs s2 xD elseif msgcontains(msg, "elf") then npcHandler:say("Some time ago, a few elves came here but they could not stand the cold and so they left pretty soon. Most likely it was Nibelor in which they have been interested.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_WALKAWAY, "May wind and weather be with you.") npcHandler:setMessage(MESSAGE_FAREWELL, "May wind and weather be with you.") O arquivo.xml do NPC Sven, em data/npc é o seguinte: <?xml version="1.0" encoding="UTF-8"?> <npc name="Sven" script="Sven.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="143" head="76" body="100" legs="132" feet="97" addons="3" mount="0"/> </npc> 3) Em data/actions/scripts, aconselho criar uma pasta chamada barbarian_test para colocar os arquivos referentes à quest. Dentro dessa pasta, um por um, coloque os arquivos com os nomes abaixo: bucketmead.lua Spoiler local condition = createConditionObject(CONDITION_DRUNK) setConditionParam(condition, CONDITION_PARAM_TICKS, BARBARIAN_TEST.first_test.drunk_duration * 1000) function onUse(cid, item, fromPosition, itemEx, toPosition) if item.actionid == 8952 then local mission = BARBARIAN_TEST.first_test if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test) == 1 then local sips_left = getPlayerStorageValue(cid, mission.storages.sips) > 0 and getPlayerStorageValue(cid, mission.storages.sips) or 0 local rand = math.random(0, 100) local succeed = getPlayerStorageValue(cid, mission.storages.succeed) > 0 and getPlayerStorageValue(cid, mission.storages.succeed) or 0 if sips_left > 0 then if succeed < mission.sips_to_complete then if rand <= mission.sip_chance then doCreatureSay(cid, "The world seems to spin but you manage to stay on your feet.", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, mission.storages.succeed, succeed + 1) else local outfit = {lookTypeEx = mission.corpse_id} doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HITBYPOISON) doSetCreatureOutfit(cid, outfit, 5 * 1000) doCreatureSay(cid, "The mead was too strong. You passed out for a moment.", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, mission.storages.succeed, 0) doAddCondition(cid, condition) end else doCreatureSay(cid, "You already passed the test, no need to torture yourself anymore.", TALKTYPE_ORANGE_1) end setPlayerStorageValue(cid, mission.storages.sips, sips_left - 1) else if succeed >= mission.sips_to_complete then doCreatureSay(cid, "You already passed the test, no need to torture yourself anymore.", TALKTYPE_ORANGE_1) else doCreatureSay(cid, "You don\'t have enough tries to prove be a strong barbarian.", TALKTYPE_ORANGE_1) end end elseif getPlayerStorageValue(cid, BARBARIAN_TEST.storages.first_test) == 2 then doCreatureSay(cid, "You have already passed on this test.", TALKTYPE_ORANGE_1) end end return true end meadhorn.lua Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.second_test) == 1 then if item.itemid == BARBARIAN_TEST.second_test.filled_meadhorn_id then if itemEx.itemid == BARBARIAN_TEST.second_test.lying_bear_id then doTransformItem(itemEx.uid, BARBARIAN_TEST.second_test.sleeping_bear_id) doTransformItem(item.uid, BARBARIAN_TEST.second_test.empty_meadhorn_id) setPlayerStorageValue(cid, BARBARIAN_TEST.storages.second_test, 2) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Bearhugger!") addEvent(function() local check_bear = getTileItemById(toPosition, BARBARIAN_TEST.second_test.sleeping_bear_id) if check_bear.uid > 0 then doTransformItem(check_bear.uid, BARBARIAN_TEST.second_test.lying_bear_id) end end, 10 * 1000) end elseif item.itemid == BARBARIAN_TEST.second_test.empty_meadhorn_id then if itemEx.itemid == BARBARIAN_TEST.second_test.filled_bucket_id then doTransformItem(item.uid, BARBARIAN_TEST.second_test.filled_meadhorn_id) doSendMagicEffect(toPosition, CONST_ME_MAGIC_RED) end end end return true end mammothpushing.lua Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test) == 1 then if getCreatureCondition(cid, CONDITION_DRUNK) then doCreatureSay(cid, "You hustle the mammoth. What a fun\n*hicks*", TALKTYPE_ORANGE_1) doTransformItem(item.uid, BARBARIAN_TEST.third_test.sleeping_mammoth_id) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Honorary Barbarian") setPlayerStorageValue(cid, BARBARIAN_TEST.storages.third_test, 2) addEvent(function() local mammoth = getTileItemById(toPosition, BARBARIAN_TEST.third_test.sleeping_mammoth_id) if mammoth.uid > 0 then doTransformItem(mammoth.uid, BARBARIAN_TEST.third_test.standing_mammoth_id) end end, 10 * 1000) else doCreatureSay(cid, "You are too sober to do this madness.", TALKTYPE_ORANGE_1) end end return true end Em data/actions.xml adicione as tags abaixo: (caso altere os ids dos itens para adaptar ao seu servidor, lembre de alterá-los nas tags também) <action actionid="8952" script="barbarian_test/bucketmead.lua" /> <action itemid="7140;7141" script="barbarian_test/meadhorn.lua" /> <action itemid="7176" script="barbarian_test/mammothpushing.lua" /> Coloque o actionid 8952 (ou o valor que desejar, lembrando de modificar na tag no actions.xml) no balde de rum localizado próximo ao NPC. Lembre de colocar um NPC adicional ao lado do NPC Sven que venda "rum" para que o jogador possa ficar bêbado e realizar a última missão (missão do mammoth). OBS: Ao finalizar a quest, o jogador receberá a storage 87345 igual a 1. Essa informação pode ser útil para dar acesso a determinadas áreas somente após terminar a quest, por exemplo. É isso. Espero que seja útil ao servidores que desejam ter um pouquinho mais de RPG. GRANDE ABRAÇO! ? Esse script faz parte de um conjunto de quests do tibia global que pretendo ir fazendo aos poucos a depender do feedback do pessoal. Veja também: Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Setembro 20, 2019 5 anos @Dwarfer preciso de um freela seu, me chama no discord. exotikz#9905
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.