9
3

amisspelledGuttersnipenote.lua 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. --[[
  2. Script Name : ItemScripts/amisspelledGuttersnipenote.lua
  3. Script Author : Premierio015\\Dorbin
  4. Script Date : 2021.06.25 06:06:02
  5. Script Purpose :
  6. :
  7. --]]
  8. local BalancingTheGangs = 5260
  9. function examined(Item, Player)
  10. if CanReceiveQuest(Player,BalancingTheGangs) then
  11. Dialog1(Item,Player)
  12. else
  13. conversation = CreateConversation()
  14. AddConversationOption(conversation, "[Keep the note]")
  15. AddConversationOption(conversation, "[Toss away the note]", "QuestFinish")
  16. StartDialogConversation(conversation, 2, Item, Player, "This note is a copy of gibberish you made sense of earlier. It has no more use to you.")
  17. end
  18. end
  19. function Dialog1(Item,Player)
  20. conversation = CreateConversation()
  21. if CanReceiveQuest(Player,BalancingTheGangs) then
  22. AddConversationOption(conversation, "[Attempt to read the note]", "Dialog2")
  23. end
  24. AddConversationOption(conversation, "[Put the note away]", "CloseItemConversation")
  25. StartDialogConversation(conversation, 2, Item, Player, "The letter seems to be just a bunch of gibberish and misspelled words upon first glance.")
  26. end
  27. function Dialog2(Item,Player)
  28. conversation = CreateConversation()
  29. if CanReceiveQuest(Player,BalancingTheGangs) then
  30. AddConversationOption(conversation, "Perhaps I can even the odds...", "Offer")
  31. end
  32. AddConversationOption(conversation, "[Put the note away]", "CloseItemConversation")
  33. StartDialogConversation(conversation, 2, Item, Player, "From what you can tell, this letter was meant for a member of the Black Magi. Some sort of deal was being struck to band them with the Guttersnipes against the Giantslayers... or at least that is what it seems.")
  34. end
  35. function Offer(Item,Player)
  36. if CanReceiveQuest(Player,BalancingTheGangs) then
  37. OfferQuest(nil,Player,BalancingTheGangs)
  38. end
  39. CloseItemConversation(Item,Player)
  40. end
  41. function QuestFinish(Item,Player)
  42. CloseItemConversation(Item,Player)
  43. if HasItem(Player,2262,1) then
  44. RemoveItem(Player,2262)
  45. end
  46. end