Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- A quest no quests.lua --
- [44] = {
- name = "Andares da Tormenta", startstorageid = Storage.AndaresDaTormentaQuest.QuestLine, startstoragevalue = 1,
- missions = {
- [1] = {
- name = "Vamos para a Tormenta", storageid = Storage.AndaresDaTormentaQuest.Tormenta1, startvalue = 1, endvalue = 2, description = function(player)
- return ("Um estranho monge te falou sobre um lugar corrompido por energias negras e barbaridades. Viaje para la e acabe com isso."):format(math.max(player:getStorageValue(Storage.AndaresDaTormentaQuest), 0))
- end,
- },
- [2] = {
- name = "Destrua quem vive na primeira sala", storageid = Storage.AndaresDaTormentaQuest.Tormenta2, startvalue = 2, endvalue = 3, description = function(player)
- return ("Sozinho você não consegue, mas com 6 amigos talvez..."):format(math.max(player:getStorageValue(Storage.AndaresDaTormentaQuest), 0))
- end,
- }
- }
- }
- -- Aqui o NPC q dá a quest e a missao 1 "Vamos para a Tormenta" --
- local node1 = keywordHandler:addKeyword({'tormenta'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce quer ir la? Bom, eu posso te ajudar. Vou falar com o Captain Bluebear para te levar la.'}, function(player) return player:setStorageValue(Storage.AndaresDaTormentaQuest, 1) end)
- -- Aqui o npc do barco que leva até lá se tiver a quest "Vamos para a Tormenta" --
- local function addTravelKeyword(keyword, cost, destination, action, condition, tormenta)
- if condition then
- keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'I\'m sorry but I don\'t sail there.'}, condition)
- end
- if tormenta == true then
- local travelTormenta = keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'Voce esta louco! Mas te levo ' .. keyword:titleCase() .. ' por |TRAVELCOST|. Quer ir?', cost = cost, discount = 'postman'})
- travelTormenta:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, cost = cost, discount = 'postman', destination = destination}, nil, action)
- travelTormenta:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'Voce pode ser medroso, mas eh inteligente.', reset = true})
- else
- keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'Nao posso te levar la.'})
- end
- local travelKeyword = keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'Do you seek a passage to ' .. keyword:titleCase() .. ' for |TRAVELCOST|?', cost = cost, discount = 'postman'})
- travelKeyword:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, cost = cost, discount = 'postman', destination = destination}, nil, action)
- travelKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'We would like to serve you some time.', reset = true})
- end
- addTravelKeyword('tormenta', 1, Position(32555, 32467, 7), nil, nil, function(player) if player:getStorageValue(Storage.AndaresDaTormentaQuest) >= 0 then return true else return false end end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement