ThenatrenLightarrow.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --[[
  2. Script Name : SpawnScripts/ForestRuins/ThenatrenLightarrow.lua
  3. Script Purpose : Thenatren Lightarrow
  4. Script Author : John Adams
  5. Script Date : 2008.09.19
  6. Script Notes : Auto-Generated Conversation from PacketParser Data - added flavor emotes 2022.2.20 Dorbin
  7. --]]
  8. function spawn(NPC)
  9. EcologyEmotes(NPC,Spawn)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function InRange(NPC, Spawn)
  13. if math.random(1, 100) <= 80 then
  14. choice = math.random(1,4)
  15. if choice ==1 then
  16. PlayFlavor(NPC, "", "Careful near those ruins, friend! It's a magical place and full of danger!", "point", 0, 0, Spawn)
  17. elseif choice ==2 then
  18. FaceTarget(NPC, Spawn)
  19. PlayFlavor(NPC, "", "The air is restless. Be careful, my friend!", "hello", 0, 0, Spawn)
  20. elseif choice ==3 then
  21. FaceTarget(NPC, Spawn)
  22. PlayFlavor(NPC, "", "I would watch my step near those ruins, if I were you! There's been a lot of activity there lately.", "hello", 0, 0, Spawn)
  23. else
  24. FaceTarget(NPC, Spawn)
  25. PlayFlavor(NPC, "", "I've been sent to keep a close watch on the ruins. There has been a lot of activity here lately.", "hello", 0, 0, Spawn)
  26. end
  27. end
  28. end
  29. function EcologyEmotes(NPC,Spawn)
  30. local choice = math.random(1,4)
  31. if choice == 1 then
  32. PlayFlavor(NPC, "", "", "peer", 0, 0, Spawn)
  33. AddTimer(NPC, 12000, "EcologyEmotes",1,Spawn)
  34. elseif choice == 2 then
  35. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  36. AddTimer(NPC, 11000, "EcologyEmotes",1,Spawn)
  37. elseif choice == 3 then
  38. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  39. AddTimer(NPC, 10000, "EcologyEmotes",1,Spawn)
  40. elseif choice == 4 then
  41. PlayFlavor(NPC, "", "", "stare", 0, 0, Spawn)
  42. AddTimer(NPC, 8000, "EcologyEmotes",1,Spawn)
  43. end
  44. end
  45. function hailed(NPC, Spawn)
  46. FaceTarget(NPC, Spawn)
  47. PlayFlavor(NPC, "", "Watch yourself near those ruins, they are dangerous!", "", 1689589577, 4560189)
  48. end