DurioCaepio.lua 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. --[[
  2. Script Name : SpawnScripts/Commonlands/DurioCaepio.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.02.20 06:02:13
  5. Script Purpose :
  6. :
  7. --]]
  8. local PlainOleDisease = 454
  9. function spawn(NPC)
  10. EmoteLoop(NPC)
  11. end
  12. function EmoteLoop (NPC)
  13. PlayAnimation(NPC, 12191)
  14. AddTimer(NPC, 15000, "EmoteLoop")
  15. end
  16. function hailed(NPC, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. local choice = math.random(1, 3)
  19. if choice == 1 then
  20. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1052.mp3", "", "hail", 0, 0, Spawn)
  21. elseif choice == 2 then
  22. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1052.mp3", "", "hail", 0, 0, Spawn)
  23. else
  24. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1052.mp3", "", "hail", 0, 0, Spawn)
  25. end
  26. if GetQuestStep(Spawn, PlainOleDisease) ~= 5 then
  27. PlayFlavor(NPC, "", "Nice to have a healer here.", "", 0, 0, Spawn)
  28. elseif HasQuest(Spawn, PlainOleDisease) and GetQuestStep(Spawn, PlainOleDisease) == 5 then
  29. PlayAnimation(NPC, 11256)
  30. conversation = CreateConversation()
  31. AddConversationOption(conversation, "Uh, yeah. I have some medicine for you from the healer.", "dlg1")
  32. StartConversation(conversation, NPC, Spawn, "Boils 'n pus... his visage burned on my eyes.")
  33. end
  34. end
  35. function dlg1(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. conversation = CreateConversation()
  38. AddConversationOption(conversation, "I'll let him know.", "dlg2")
  39. StartConversation(conversation, NPC, Spawn, "Medicines? Yes. Those are good. They get me sleep... dreamless.")
  40. end
  41. function dlg2(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. SetStepComplete(Spawn, PlainOleDisease, 5)
  44. conversation = CreateConversation()
  45. AddConversationOption(conversation, "Uh, no. I meant the healer.")
  46. StartConversation(conversation, NPC, Spawn, "You've seen the man of disease, too?!")
  47. end
  48. function respawn(NPC)
  49. spawn(NPC)
  50. end