FeredirNaDuath.lua 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/FeredirNaDuath.lua
  3. Script Purpose : Feredir Na'Duath
  4. Script Author : Scatman
  5. Script Date : 2009.09.15
  6. Script Notes :
  7. --]]
  8. local WOOD_ELF = 15
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. MovementLoopAddLocation(NPC, 806.83, -21.08, -631.66, 2, 30)
  12. MovementLoopAddLocation(NPC, 809.40, -20.58, -624.21, 2)
  13. MovementLoopAddLocation(NPC, 824.93, -20.36, -621.53, 2)
  14. MovementLoopAddLocation(NPC, 828.00, -20.14, -613.99, 2)
  15. MovementLoopAddLocation(NPC, 834.82, -21.40, -616.09, 2, 60)
  16. MovementLoopAddLocation(NPC, 836.63, -21.13, -607.60, 2)
  17. MovementLoopAddLocation(NPC, 837.98, -20.93, -605.67, 2)
  18. MovementLoopAddLocation(NPC, 840.11, -20.88, -604.95, 2)
  19. MovementLoopAddLocation(NPC, 842.86, -21.05, -605.55, 2)
  20. MovementLoopAddLocation(NPC, 848.78, -20.96, -608.04, 2)
  21. MovementLoopAddLocation(NPC, 856.05, -19.93, -609.18, 2)
  22. MovementLoopAddLocation(NPC, 861.92, -18.97, -608.21, 2)
  23. MovementLoopAddLocation(NPC, 870.01, -18.46, -604.19, 2, 120)
  24. MovementLoopAddLocation(NPC, 870.36, -20.88, -613.71, 2)
  25. MovementLoopAddLocation(NPC, 875.97, -21.14, -624.37, 2)
  26. MovementLoopAddLocation(NPC, 874.31, -20.19, -629.96, 2)
  27. MovementLoopAddLocation(NPC, 867.43, -20.63, -639.17, 2)
  28. MovementLoopAddLocation(NPC, 855.45, -20.85, -646.91, 2)
  29. MovementLoopAddLocation(NPC, 852.47, -20.56, -655.13, 2)
  30. MovementLoopAddLocation(NPC, 846.62, -20.62, -662.08, 2, 90)
  31. MovementLoopAddLocation(NPC, 834.48, -20.89, -661.77, 2)
  32. MovementLoopAddLocation(NPC, 832.38, -20.31, -654.53, 2)
  33. MovementLoopAddLocation(NPC, 829.19, -20.26, -651.75, 2)
  34. MovementLoopAddLocation(NPC, 811.79, -21.20, -649.09, 2)
  35. end
  36. function respawn(NPC)
  37. spawn(NPC)
  38. end
  39. function InRange(NPC, Spawn)
  40. if math.random(0, 100) <= 25 then
  41. FaceTarget(NPC, Spawn)
  42. local choice = math.random(1, 2)
  43. if choice == 1 then
  44. PlayFlavor(NPC, "", "The city is not the most beautiful place in Norrath, but it is at least familiar.", "", 1689589577, 4560189, Spawn)
  45. elseif choice == 2 then
  46. Say(NPC, "I've often wondered whether a kerra tail would be a help or hindrance in life amongst the treetops.", Spawn)
  47. end
  48. end
  49. if GetRace(Spawn) == WOOD_ELF and math.random(0, 100) <= 50 then
  50. SendMessage(Spawn, GetName(NPC) .. " greets you.")
  51. end
  52. end
  53. function LeaveRange(NPC, Spawn)
  54. end
  55. function hailed(NPC, Spawn)
  56. FaceTarget(NPC, Spawn)
  57. local choice = math.random(1, 5)
  58. if choice == 1 then
  59. PlayFlavor(NPC, "", "To be among the highest leaves and branches of a tree is to feel free.", "", 1689589577, 4560189, Spawn)
  60. elseif choice == 2 then
  61. PlayFlavor(NPC, "", "I too long for my home in Faydark. Someday I am sure Tunare will answer us.", "", 1689589577, 4560189, Spawn)
  62. elseif choice == 3 then
  63. PlayFlavor(NPC, "", "With the help of Feir'Dal such as you, I know we will be able to rebuild our homes and live in peace among the trees.", "", 1689589577, 4560189, Spawn)
  64. elseif choice == 4 then
  65. Say(NPC, "The blessing of Tunare is the highest blessing of all.", Spawn)
  66. elseif choice == 5 then
  67. Say(NPC, "I've often wondered whether a kerra tail would be a help or hindrance in life amongst the treetops.", Spawn)
  68. end
  69. end