LoganMacAdie.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. Target(NPC)
  14. end
  15. function respawn(NPC, Spawn)
  16. spawn(NPC, Spawn)
  17. end
  18. function InRange(NPC, Spawn)
  19. if GetFactionAmount(Spawn,11)<0 then
  20. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  21. --[[ local chance = math.random(1, 100)
  22. if chance <= 20 then
  23. FaceTarget(NPC, Spawn)
  24. Say(NPC, "I'm sure you'll find whatever you need if you just keep around.", Spawn)]]--
  25. end
  26. end
  27. function LeaveRange(NPC, Spawn)
  28. end
  29. function hailed(NPC, Spawn)
  30. FaceTarget(NPC, Spawn)
  31. RandomVoiceOver(NPC, Spawn)
  32. local choice = math.random(1, 6)
  33. if choice == 1 then
  34. 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)
  35. elseif choice == 2 then
  36. PlayFlavor(NPC, "", "I'm feeling stronger than usual today.", "charge", 1689589577, 4560189, Spawn)
  37. elseif choice == 3 then
  38. 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)
  39. elseif choice == 4 then
  40. PlayFlavor(NPC, "", "Funny, the wound didn't smell like that yesterday.", "stinky", 1689589577, 4560189, Spawn)
  41. elseif choice == 5 then
  42. PlayFlavor(NPC, "", "Strength isn't just the size of your muscles... It's, well... Yeah it is.", "confused", 1689589577, 4560189, Spawn)
  43. elseif choice == 6 then
  44. PlayFlavor(NPC, "", "Darn. I chugged that barrel much slower than I chugged the last three.", "gutcramp", 1689589577, 4560189, Spawn)
  45. end
  46. end
  47. function RandomVoiceOver(NPC, Spawn)
  48. local choice = math.random(1, 3)
  49. if choice == 1 then
  50. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1002.mp3", "", "", 0, 0, Spawn)
  51. elseif choice == 2 then
  52. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1002.mp3", "", "", 0, 0, Spawn)
  53. else
  54. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1002.mp3", "", "", 0, 0, Spawn)
  55. end
  56. end
  57. function Target(NPC)
  58. local Karrie = GetSpawn(NPC,2330021)
  59. if Karrie ~=nil then
  60. SetTarget(NPC,Karrie)
  61. end
  62. end