DawnTross.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/DawnTross.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 07:06:06
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. AddTimer(NPC, 5000, "EmoteLoop")
  11. SetPlayerProximityFunction(NPC, 4, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. SetTarget(NPC,Spawn)
  16. GenericEcologyHail(NPC, Spawn, faction)
  17. end
  18. function InRange(NPC,Spawn)
  19. GenericEcologyCallout(NPC, Spawn, faction)
  20. end
  21. function EmoteLoop(NPC)
  22. local Karrie = GetSpawn(NPC,2330021)
  23. if Karrie ~=nil then
  24. SetTarget(NPC,Karrie)
  25. end
  26. local emoteChoice = MakeRandomInt(1,4)
  27. if emoteChoice == 1 then
  28. -- ponder
  29. PlayFlavor(NPC,"","","ponder",0,0)
  30. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  31. elseif emoteChoice == 2 then
  32. -- sniff
  33. PlayAnimation(NPC, 12329)
  34. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  35. elseif emoteChoice == 3 then
  36. -- tapfoot
  37. PlayAnimation(NPC, 13056)
  38. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  39. elseif emoteChoice == 4 then
  40. -- peer
  41. PlayAnimation(NPC, 11976)
  42. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  43. end
  44. end