KualdinSwoonsong.lua 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/KualdinSwoonsong.lua
  3. Script Purpose : Kualdin Swoonsong
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Script Notes :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function InRange(NPC, Spawn)
  15. if math.random(0, 100) <= 25 then
  16. Talk(NPC, Spawn)
  17. end
  18. end
  19. function LeaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. Talk(NPC, Spawn)
  23. end
  24. function Talk(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. local choice = math.random(1, 3)
  27. if choice == 1 then
  28. PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_multhail2_1c41a7b8.mp3", "Hail, fair adventurer. If you can spare some time, my devotees are gathering to hear the latest masterpiece from yours truly. ", "", 2123310145, 515687997, Spawn)
  29. elseif choice == 2 then
  30. PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_callout_47db249c.mp3", "Gather around people ... gather around. I'll be warming up my voice in a few minutes.", "smirk", 1269733907, 434806140, Spawn)
  31. elseif choice == 3 then
  32. PlayFlavor(NPC, "voiceover/english/kualdin_swoonsong/qey_village05/100_kualdin_swoonsong_multhail1_7f060d18.mp3", "Hail fair, adventurer. Please be on your way. I've no time for chatting with commoners. I must warm up my voice. My fans await me...", "", 2685665398, 3421389957, Spawn)
  33. end
  34. end