9
3

InitiateLunaru.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/InitiateLunaru.lua
  3. Script Author : Rylec
  4. Script Date : 2021.02.14 08:02:49
  5. Script Purpose :
  6. :
  7. --]]
  8. local count = 1
  9. function spawn(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. math.randomseed(os.time())
  13. local voice = math.random(1,3)
  14. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1048.mp3", "", "", 0, 0, Spawn)
  15. if count == 1 then
  16. stand(NPC, Spawn)
  17. elseif count > 1 and count < 15 then
  18. count = count + 1
  19. Say(NPC, "Sorry, I can't speak now. I must prepare for my sparring exercises.")
  20. else
  21. count = 1
  22. Say(NPC, "Sorry, I can't speak now. I must prepare for my sparring exercises.")
  23. end
  24. AddTimer(NPC, 40000, "Sit")
  25. end
  26. function respawn(NPC)
  27. spawn(NPC)
  28. end
  29. function stand(NPC, Spawn)
  30. SpawnSet(NPC, "visual_state", "0")
  31. PlayAnimation(NPC, "539")
  32. AddTimer(NPC, 1500, "turn", 1, Spawn)
  33. count = count + 1
  34. end
  35. function turn(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. AddTimer(NPC, 1000, "talk")
  38. end
  39. function talk(NPC)
  40. Say(NPC, "Sorry, I can't speak now. I must prepare for my sparring exercises.")
  41. end
  42. function Sit(NPC)
  43. PlayAnimation(NPC, "538")
  44. AddTimer(NPC, 1200, "countReset")
  45. end
  46. function countReset(NPC)
  47. SpawnSet(NPC, "visual_state", "540")
  48. count = 1
  49. end