CastleviewHamletcitizenshiptask.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : ItemScripts/CastleviewHamletcitizenshiptask.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.01 04:09:34
  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 Circle of Five, all residents wishing to become a full member of the city must complete a trial to prove their worth.")
  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 Dialog4(Item, Player)
  19. conversation = CreateConversation()
  20. if not HasQuest(Player,5719) and not HasCompletedQuest(Player,5719)then
  21. AddConversationOption(conversation, "[write this in your quest journal]","StartQuest")
  22. end
  23. if HasQuest(Player,5719) or HasCompletedQuest(Player,5719) then
  24. AddConversationOption(conversation, "[continue]","StartQuest")
  25. end
  26. AddConversationOption(conversation, "[put the note away]","CloseItemConversation")
  27. StartDialogConversation(conversation, 2, Item, Player, "Castleview Hamlet residents must gather five tokens from the Oakmyst Forest.")
  28. end
  29. function StartQuest(Item,Player)
  30. if not HasQuest(Player,5719) and not HasCompletedQuest(Player,5719)then
  31. OfferQuest(Item,Player,5719)
  32. end
  33. conversation = CreateConversation()
  34. AddConversationOption(conversation, "[put the note]","CloseItemConversation")
  35. StartDialogConversation(conversation, 2, Item, Player, "After you complete your task, report to Marshal Glorfel using the citizenship sign.")
  36. end