9
3

TabbyCopperpot.lua 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/TabbyCopperpot.lua
  3. Script Purpose : Tabby Copperpot <Provisioner>
  4. Script Author : Dorbin
  5. Script Date : 2022.05.10
  6. Script Notes :
  7. --]]
  8. local letter = 5527
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. end
  17. function LeaveRange(NPC, Spawn)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. conversation = CreateConversation()
  22. if GetFactionAmount(Spawn,11) <0 then
  23. PlayFlavor(NPC, "", "", "shakefist", 0, 0, Spawn)
  24. else
  25. PlayFlavor(NPC, "voiceover/english/merchant_tabby_copperpot/qey_south/tabbycopperpot000.mp3", "", "happy", 3975328823, 1035271851, Spawn)
  26. if GetQuestStep(Spawn,letter)==1 then
  27. AddConversationOption(conversation, "Here is a letter from Tara. She asked me to deliver it to you.","LetterDone")
  28. end
  29. AddConversationOption(conversation, "I am just browsing.", "dlg_3_1")
  30. StartConversation(conversation, NPC, Spawn, "I have many baked goods that would be sure to tickle your taste buds and satisfy your tummy.")
  31. end
  32. end
  33. function LetterDone(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. conversation = CreateConversation()
  36. PlayFlavor(NPC, "voiceover/english/merchant_tabby_copperpot/qey_south/tabbycopperpot001.mp3", "", "heelclick", 3156824996,1043582729, Spawn)
  37. AddConversationOption(conversation, "I'm glad I could help.","Delivered")
  38. StartConversation(conversation, NPC, Spawn, "Oh goody! I've been waiting for a letter from her for some time now. Since she started her training she never has time to visit!")
  39. end
  40. function Delivered(NPC, Spawn)
  41. SetStepComplete(Spawn,letter,1)
  42. FaceTarget(NPC, Spawn)
  43. end