Advertisement
Guest User

TormentaJamees

a guest
Aug 23rd, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.05 KB | None | 0 0
  1. -- A quest no quests.lua --
  2.  
  3. [44] = {
  4. name = "Andares da Tormenta", startstorageid = Storage.AndaresDaTormentaQuest.QuestLine, startstoragevalue = 1,
  5. missions = {
  6. [1] = {
  7. name = "Vamos para a Tormenta", storageid = Storage.AndaresDaTormentaQuest.Tormenta1, startvalue = 1, endvalue = 2, description = function(player)
  8. 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))
  9. end,
  10. },
  11. [2] = {
  12. name = "Destrua quem vive na primeira sala", storageid = Storage.AndaresDaTormentaQuest.Tormenta2, startvalue = 2, endvalue = 3, description = function(player)
  13. return ("Sozinho você não consegue, mas com 6 amigos talvez..."):format(math.max(player:getStorageValue(Storage.AndaresDaTormentaQuest), 0))
  14. end,
  15. }
  16. }
  17. }
  18.  
  19. -- Aqui o NPC q dá a quest e a missao 1 "Vamos para a Tormenta" --
  20.  
  21. 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)
  22.  
  23. -- Aqui o npc do barco que leva até lá se tiver a quest "Vamos para a Tormenta" --
  24.  
  25. local function addTravelKeyword(keyword, cost, destination, action, condition, tormenta)
  26. if condition then
  27. keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'I\'m sorry but I don\'t sail there.'}, condition)
  28. end
  29. if tormenta == true then
  30. 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'})
  31. travelTormenta:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, cost = cost, discount = 'postman', destination = destination}, nil, action)
  32. travelTormenta:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'Voce pode ser medroso, mas eh inteligente.', reset = true})
  33. else
  34. keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'Nao posso te levar la.'})
  35. end
  36.  
  37. local travelKeyword = keywordHandler:addKeyword({keyword}, StdModule.say, {npcHandler = npcHandler, text = 'Do you seek a passage to ' .. keyword:titleCase() .. ' for |TRAVELCOST|?', cost = cost, discount = 'postman'})
  38. travelKeyword:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, cost = cost, discount = 'postman', destination = destination}, nil, action)
  39. travelKeyword:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, text = 'We would like to serve you some time.', reset = true})
  40. end
  41.  
  42. 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