9
3

asmallpieceofparchment.lua 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --[[
  2. Script Name : ItemScripts/asmallpieceofparchment.lua
  3. Script Author : Premierio015\\Dorbin - Item text
  4. Script Date : 2021.07.04 10:07:23
  5. Script Purpose :
  6. :
  7. --]]
  8. local TheFallenAssassin = 5283
  9. local ItemID = 2804
  10. function examined(Item, Player)
  11. if CanReceiveQuest(Player,TheFallenAssassin) then
  12. Dialog1(Item,Player)
  13. else
  14. conversation = CreateConversation()
  15. AddConversationOption(conversation, "[Keep the parchment.]")
  16. AddConversationOption(conversation, "[Destroy the parchment.]", "QuestFinish")
  17. StartDialogConversation(conversation, 2, Item, Player, "This piece of parchment is a copy of orders you've already read. You don't need it anymore, but someone else might.")
  18. end
  19. end
  20. function Dialog1(Item,Player)
  21. conversation = CreateConversation()
  22. if CanReceiveQuest(Player,TheFallenAssassin) then
  23. AddConversationOption(conversation, "[Inspect the parchment.]", "Dialog2")
  24. end
  25. AddConversationOption(conversation, "[Put the parchment away.]", "CloseItemConversation")
  26. StartDialogConversation(conversation, 2, Item, Player, "This parchment appears offical. You can make out the Freeport Militia emblem embossed on the edge of the material.")
  27. end
  28. function Dialog2(Item,Player)
  29. conversation = CreateConversation()
  30. if CanReceiveQuest(Player,TheFallenAssassin) then
  31. AddConversationOption(conversation, "[Write the task in your journal.]", "Offer")
  32. end
  33. AddConversationOption(conversation, "[Put the parchment away.]", "CloseItemConversation")
  34. StartDialogConversation(conversation, 2, Item, Player, "\"Your orders are to be carried out by the morrow's dawn. Nothing less than the Lord's head will prove your success in this mission. Fail and your life will be forfeit.\" The statement is signed, Captain Molacus.")
  35. end
  36. function Offer(Item,Player)
  37. if CanReceiveQuest(Player,TheFallenAssassin) then
  38. OfferQuest(nil,Player,TheFallenAssassin)
  39. end
  40. CloseItemConversation(Item,Player)
  41. end
  42. function QuestFinish(Item,Player)
  43. CloseItemConversation(Item,Player)
  44. if HasItem(Player,ItemID,1) then
  45. RemoveItem(Player,ItemID)
  46. end
  47. end