TrainerAlegaMasseri.lua 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --[[
  2. Script Name : SpawnScripts/qeynos_combined02/TrainerAlegaMasseri.lua
  3. Script Author : Rylec
  4. Script Date : 2021.02.18 01:02:51
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SpawnSet(NPC, "mood_state", 11852)
  10. AddTimer(NPC, 75000, "EmoteLoop")
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. math.randomseed(os.time())
  15. local voice = math.random(1,3)
  16. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_"..voice.."_1041.mp3", "", "hello", 0, 0, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function EmoteLoop(NPC)
  22. SpawnSet(NPC, "mood_state", 0)
  23. SpawnSet(NPC, "action_state", 11852)
  24. local Emote = MakeRandomInt(1,2)
  25. if Emote == 1 then
  26. PlayAnimation(NPC, 10745)
  27. AddTimer(NPC, 2500, "ResetMood")
  28. else
  29. PlayAnimation(NPC, 11882)
  30. AddTimer(NPC, 2500, "ResetMood")
  31. end
  32. end
  33. function ResetMood(NPC)
  34. SpawnSet(NPC, "mood_state", 11852)
  35. SpawnSet(NPC, "action_state", 0)
  36. AddTimer(NPC, 75000, "EmoteLoop")
  37. end