VerinIthelz.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/ScaleYard/VerinIthelz.lua
  3. Script Purpose : Verin Ithelz
  4. Script Author : torsten
  5. Script Date : 2022.07.24
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local VerinsNewThralls = 5701
  9. local PreventativeMaintenance = 5702
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, VerinsNewThralls)
  12. ProvidesQuest(NPC, PreventativeMaintenance)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. if not HasQuest(Spawn, VerinsNewThralls) and not HasCompletedQuest(Spawn, VerinsNewThralls) then
  19. OfferQuest(NPC, Spawn, VerinsNewThralls)
  20. end
  21. if HasCompletedQuest(Spawn, VerinsNewThralls) then
  22. if not HasQuest(Spawn, PreventativeMaintenance) and not HasCompletedQuest(Spawn, PreventativeMaintenance) then
  23. OfferQuest(NPC, Spawn, PreventativeMaintenance)
  24. end
  25. end
  26. if GetQuestStep(Spawn, VerinsNewThralls) == 2 then
  27. SetStepComplete(Spawn, VerinsNewThralls, 2)
  28. end
  29. if GetQuestStep(Spawn, PreventativeMaintenance) == 2 then
  30. SetStepComplete(Spawn, PreventativeMaintenance, 2)
  31. end
  32. RandomGreeting(NPC, Spawn)
  33. end
  34. function RandomGreeting(NPC, Spawn)
  35. local choice = MakeRandomInt(1,2)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "", "My trade will pick up again, you'll see.", "", 0, 0, Spawn, 0)
  38. elseif choice == 2 then
  39. PlayVoice(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1028.mp3", 0, 0, Spawn)
  40. end
  41. end