9
3

acursedcutthroat.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : SpawnScripts/Graveyard/acursedcutthroat.lua
  3. Script Purpose : a cursed cutthroat
  4. Script Author : Scatman
  5. Script Date : 2009.08.01
  6. Script Notes :
  7. --]]
  8. local spoke = false
  9. function spawn(NPC)
  10. spoke = false
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function aggro(NPC, Spawn)
  19. local chance = math.random(1, 100)
  20. if chance <= 25 then
  21. local choice = math.random(1, 6)
  22. if choice == 1 then
  23. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_18d1544d.mp3", "As I rise from the grave, you will now take my place!", "", 485726074, 3646499350, Spawn)
  24. elseif choice == 2 then
  25. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_c6c2672d.mp3", "Brains! It's what's for dinner.", "", 2091371377, 2422178491, Spawn)
  26. elseif choice == 3 then
  27. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_daf16808.mp3", "To the grave with you!", "", 958122326, 1810359159, Spawn)
  28. elseif choice == 4 then
  29. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_2168c5.mp3", "Seek death and it finds you.", "", 2988489621, 1045543573, Spawn)
  30. elseif choice == 5 then
  31. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_8bc7a2cc.mp3", "Your blood calls to me.", "", 1242322025, 1154999668, Spawn)
  32. elseif choice == 6 then
  33. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_aggro_c77d7bff.mp3", "Your eyes are so pretty.", "", 1412152942, 873988632, Spawn)
  34. end
  35. end
  36. end
  37. function healthchanged(NPC, Spawn)
  38. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  39. if hp_percent <= 0.50 and spoke == false then
  40. spoke = true
  41. RandomCallOut(NPC, Spawn)
  42. AddTimer(NPC, 30000, "ResetSpoke")
  43. end
  44. end
  45. function RandomCallOut(NPC, Spawn)
  46. local choice = math.random(1, 5)
  47. if choice == 1 then
  48. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_halfhealth_29344c6f.mp3", "I didn't need those bones anyway.", "", 1704957193, 2042978689)
  49. elseif choice == 2 then
  50. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_halfhealth_a4c947e4.mp3", "I'm shattered and broken.", "", 4021018144, 1305053073)
  51. elseif choice == 3 then
  52. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_halfhealth_d9ece37f.mp3", "You've shaken the dust from my bones.", "", 2011286772, 326848383)
  53. elseif choice == 4 then
  54. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_halfhealth_f1d542e0.mp3", "Dying didn't feel good the first time.", "", 766636803, 1915881366)
  55. elseif choice == 5 then
  56. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_aggro_18d1544d.mp3", "As I rise from the grave, you will now take my place!", "", 485726074, 3646499350)
  57. end
  58. end
  59. function ResetSpoke(NPC)
  60. spoke = false
  61. end
  62. function killed(NPC, Spawn)
  63. local chance = math.random(1, 100)
  64. if chance <= 25 then
  65. local choice = math.random(1, 5)
  66. if choice == 1 then
  67. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_victory_39c9d69e.mp3", "We're all just bones in the end.", "", 3276297174, 633510318, Spawn)
  68. elseif choice == 2 then
  69. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_victory_cbcd383a.mp3", "Their bones will join mine!", "", 680786598, 666536798, Spawn)
  70. elseif choice == 3 then
  71. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_victory_ccde17c2.mp3", "Another falls to join our ranks.", "", 3285235030, 4198320186, Spawn)
  72. elseif choice == 4 then
  73. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_victory_d2a649e7.mp3", "The life ebbs from them so quickly.", "", 2674394976, 3151731037, Spawn)
  74. elseif choice == 5 then
  75. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_victory_fda8e7a9.mp3", "So stops the awful beating of their heart.", "", 1120117600, 3872148135, Spawn)
  76. end
  77. end
  78. end
  79. function death(NPC, Spawn)
  80. spoke = false
  81. local chance = math.random(1, 100)
  82. if chance <= 25 then
  83. local choice = math.random(1, 4)
  84. if choice == 1 then
  85. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_death_bb6b2b8e.mp3", "You cannot eliminate us!", "", 897103301, 541292352, Spawn)
  86. elseif choice == 2 then
  87. PlayFlavor(NPC, "voiceover/english/optional3/skeleton_base_2/ft/skeleton/skeleton_base_2_1_death_edc04fb8.mp3", "That pile of bones was my friend!", "", 2317728806, 1758283676, Spawn)
  88. elseif choice == 3 then
  89. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_death_fbcb503b.mp3", "Rest in peace.", "", 3591309093, 1423656405, Spawn)
  90. elseif choice == 4 then
  91. PlayFlavor(NPC, "voiceover/english/skeleton_base_1/ft/skeleton/skeleton_base_1_1_death_ff39f327.mp3", "Final death comes at last.", "", 3768284332, 62777040, Spawn)
  92. end
  93. end
  94. end