9
3

an_old_darkblade_dagger.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : ItemScripts/an_old_darkblade_dagger.lua
  3. Script Purpose :Quest Stater for The Darkblade Dagger
  4. Script Author : Ememjr\\Dorbin - Quest text
  5. Script Date : 2019-10-07
  6. Script Notes :
  7. --]]
  8. local DarkbladeDagger = 482
  9. function examined(Item, Player)
  10. if CanReceiveQuest(Player,DarkbladeDagger) then
  11. Dialog1(Item,Player)
  12. else
  13. conversation = CreateConversation()
  14. AddConversationOption(conversation, "[Put the dagger away.]", "CloseItemConversation")
  15. StartDialogConversation(conversation, 2, Item, Player, "This strange dagger is like one you've used before. It does not seem to offer anything more to you upon inspection.")
  16. end
  17. end
  18. function Dialog1(Item,Player)
  19. conversation = CreateConversation()
  20. if CanReceiveQuest(Player,DarkbladeDagger) then
  21. AddConversationOption(conversation, "[Pull on the hilt.]", "Dialog2")
  22. end
  23. AddConversationOption(conversation, "[Put the dagger away.]", "CloseItemConversation")
  24. StartDialogConversation(conversation, 2, Item, Player, "This strange dagger does not appear to be very functional. The hilt seems to be hollow.")
  25. end
  26. function Dialog2(Item,Player)
  27. conversation = CreateConversation()
  28. if CanReceiveQuest(Player,DarkbladeDagger) then
  29. AddConversationOption(conversation, "[Read the note.]", "Dialog3")
  30. end
  31. AddConversationOption(conversation, "[Put the dagger away.]", "CloseItemConversation")
  32. StartDialogConversation(conversation, 2, Item, Player, "Without much effort you remove the blade. Examining the hilt reveals a small note tucked inside.")
  33. end
  34. function Dialog3(Item,Player)
  35. conversation = CreateConversation()
  36. if CanReceiveQuest(Player,DarkbladeDagger) then
  37. AddConversationOption(conversation, "I should kill these ratonga!", "Offer")
  38. end
  39. AddConversationOption(conversation, "[Put the dagger away.]", "CloseItemConversation")
  40. StartDialogConversation(conversation, 2, Item, Player, "\"Each Darkblade is to exterminate no less than ten diseased ratonga. The daggers provided by the netherot chanters will bestow reward upon those sincere in their oath, or death to those who ignore this call to duty.\"")
  41. end
  42. function Offer(Item,Player)
  43. if CanReceiveQuest(Player,DarkbladeDagger) then
  44. OfferQuest(nil,Player,DarkbladeDagger)
  45. end
  46. CloseItemConversation(Item,Player)
  47. end
  48. function QuestFinish(Item,Player)
  49. CloseItemConversation(Item,Player)
  50. if HasItem(Player,3767,1) then
  51. RemoveItem(Player,3767)
  52. end
  53. end
  54. --