LoganMacAdie.lua 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/LoganMacAdie.lua
  3. Script Purpose : Logan MacAdie
  4. Script Author : Scatman
  5. Script Date : 2009.08.08
  6. Script Notes :
  7. --]]
  8. function spawn(NPC, Spawn)
  9. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  10. --AddVisualStateLoop(NPC, 2000, 10000, 11150)
  11. --AddVisualStateLoop(NPC, 2000, 10000, 11557)
  12. --AddVisualStateLoop(NPC, 2000, 10000, 13064)
  13. end
  14. function respawn(NPC, Spawn)
  15. spawn(NPC, Spawn)
  16. end
  17. function InRange(NPC, Spawn)
  18. local chance = math.random(1, 100)
  19. if chance <= 25 then
  20. FaceTarget(NPC, Spawn)
  21. Say(NPC, "I'm sure you'll find whatever you need if you just keep around.", Spawn)
  22. end
  23. end
  24. function LeaveRange(NPC, Spawn)
  25. end
  26. function hailed(NPC, Spawn)
  27. FaceTarget(NPC, Spawn)
  28. local choice = math.random(1, 6)
  29. if choice == 1 then
  30. PlayFlavor(NPC, "", "Well its not easy being the best looking guy in town, but I think I pull it off well.", "flirt", 1689589577, 4560189, Spawn)
  31. elseif choice == 2 then
  32. PlayFlavor(NPC, "", "I'm feeling stronger than usual today.", "charge", 1689589577, 4560189, Spawn)
  33. elseif choice == 3 then
  34. PlayFlavor(NPC, "", "Some of my friends tell me I'm weak. I think its true, I've only been able to lift two goblins and an orc lately.", "pout", 1689589577, 4560189, Spawn)
  35. elseif choice == 4 then
  36. PlayFlavor(NPC, "", "Funny, the wound didn't smell like that yesterday.", "stinky", 1689589577, 4560189, Spawn)
  37. elseif choice == 5 then
  38. PlayFlavor(NPC, "", "Strength isn't just the size of your muscles... It's, well... Yeah it is.", "confused", 1689589577, 4560189, Spawn)
  39. elseif choice == 6 then
  40. PlayFlavor(NPC, "", "Darn. I chugged that barrel much slower than I chugged the last three.", "gutcramp", 1689589577, 4560189, Spawn)
  41. end
  42. end