KhaiLightfall.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/KhaiLightfall.lua
  3. Script Author : Rylec
  4. Script Date : 2021.02.14 09:02:09
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. EmoteLoop(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. math.randomseed(os.time())
  14. local voice = math.random(1,3)
  15. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1048.mp3", "", "", 0, 0, Spawn)
  16. local choice = math.random(1,2)
  17. if choice == 1 then
  18. Say(NPC, "May yourr life be uneventful frriend.")
  19. else
  20. Say(NPC, "Be gone before I call the guards.")
  21. end
  22. end
  23. function respawn(NPC)
  24. spawn(NPC)
  25. end
  26. function EmoteLoop(NPC)
  27. local emote = MakeRandomInt(1,4)
  28. if emote == 1 then
  29. PlayAnimation(NPC, 11649) -- glare
  30. elseif emote == 2 then
  31. PlayAnimation(NPC, 11881) -- no
  32. elseif emote == 3 then
  33. PlayAnimation(NPC, 11882) -- nod
  34. else
  35. PlayAnimation(NPC, 11976) -- peer
  36. end
  37. math.randomseed(os.time())
  38. AddTimer(NPC, math.random(8000,17000), "EmoteLoop")
  39. end