BeggarsCourtcitizenshiptask.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : ItemScripts/BeggarsCourtcitizenshiptask.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.06.26 03:06:10
  5. Script Purpose :
  6. :
  7. --]]
  8. function examined(Item, Player)
  9. conversation = CreateConversation()
  10. AddConversationOption(conversation, "[read more]","Dialog2")
  11. StartDialogConversation(conversation, 2, Item, Player, "By order of the Overlord, all residents wishing to become citizens of the city must complete a trial to prove themselves.")
  12. end
  13. function Dialog2(Item, Player)
  14. conversation = CreateConversation()
  15. AddConversationOption(conversation, "[read about where tokens are found]","Dialog3")
  16. StartDialogConversation(conversation, 2, Item, Player, "Tokens are scattered throughout the surrounding area. You must find five of these tokens to earn the right to speak to a city official.")
  17. end
  18. function Dialog3(Item, Player)
  19. conversation = CreateConversation()
  20. AddConversationOption(conversation, "[read more]","Dialog4")
  21. StartDialogConversation(conversation, 2, Item, Player, "Each district has been assigned an area in which to hunt for their tokens. Only tokens from within that area will be accepted.")
  22. end
  23. function Dialog4(Item, Player)
  24. conversation = CreateConversation()
  25. if GetLevel(Player)<6 then
  26. AddConversationOption(conversation, "[I need more experience to pursue Citizenship]","CloseItemConversation")
  27. elseif not HasQuest(Player,5867) and not HasCompletedQuest(Player,5867)then
  28. AddConversationOption(conversation, "[write this in your quest journal]","StartQuest")
  29. end
  30. if HasQuest(Player,5867) or HasCompletedQuest(Player,5867) then
  31. AddConversationOption(conversation, "[continue]","StartQuest")
  32. end
  33. AddConversationOption(conversation, "[put the note away]","CloseItemConversation")
  34. StartDialogConversation(conversation, 2, Item, Player, "Beggar's Court residents must gather five tokens from the Sunken City.")
  35. end
  36. function StartQuest(Item,Player)
  37. conversation = CreateConversation()
  38. if not HasQuest(Player,5867) and not HasCompletedQuest(Player,5867)then
  39. OfferQuest(nil,Player,5867)
  40. end
  41. AddConversationOption(conversation, "[put the note away]","CloseItemConversation")
  42. StartDialogConversation(conversation, 2, Item, Player, "Use the citizenship sign to report to Abbetor T'avi once you complete your task.")
  43. end