UrsellWimfell.lua 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/UrsellWimfell.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.10 12:06:27
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. AddTimer(NPC, 5000, "EmoteLoop")
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. PlayFlavor(NPC,"","Aye, me and Samwell used to be friends, real good friends! But ever since he got in that shipwreck he don't have one eye for me! No matter what I do!","ponder",0,0,Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function EmoteLoop(NPC)
  19. local Sam = GetSpawnLocationID(NPC,379563)
  20. if Sam ~= nil then
  21. SetTarget(NPC,Sam)
  22. end
  23. local emoteChoice = MakeRandomInt(1,3)
  24. if emoteChoice == 1 then
  25. -- ponder
  26. PlayAnimation(NPC, 11557)
  27. AddTimer(NPC, MakeRandomInt(19000), "EmoteLoop")
  28. elseif emoteChoice == 2 then
  29. -- sniff
  30. PlayAnimation(NPC, 12246)
  31. AddTimer(NPC, MakeRandomInt(6000,9000), "EmoteLoop")
  32. else
  33. -- tapfoot
  34. PlayAnimation(NPC, 11558)
  35. AddTimer(NPC, MakeRandomInt(15000,18000), "EmoteLoop")
  36. end
  37. end