anovicegraverobber.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. --[[
  2. Script Name : SpawnScripts/Graveyard/anovicegraverobber.lua
  3. Script Purpose : a novice graverobber
  4. Script Author : Scatman
  5. Script Date : 2009.07.25
  6. Script Notes :
  7. --]]
  8. local spoke = false
  9. local MALE = 1
  10. local FEMALE = 2
  11. function spawn(NPC)
  12. spoke = false
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function hailed(NPC, Spawn)
  18. FaceTarget(NPC, Spawn)
  19. end
  20. function aggro(NPC, Spawn)
  21. spoke = false
  22. local chance = math.random(1, 100)
  23. if chance <= 20 then
  24. if GetGender(NPC) == MALE then
  25. local choice = math.random(1, 3)
  26. if choice == 1 then
  27. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_aggro_gm_88cef174.mp3", "Overhear my plansies. Gore you I will!", "", 3355146665, 1217299863, Spawn)
  28. elseif choice == 2 then
  29. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gm_4af7a99.mp3", "You're not as sneaky as you thought.", "", 1683997219, 1178080164, Spawn)
  30. elseif choice == 3 then
  31. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gm_7c145a1f.mp3", "Sees us, did we? Must not let you talk then.", "", 1928944506, 4197211546, Spawn)
  32. end
  33. elseif GetGender(NPC) == FEMALE then
  34. local choice = math.random(1, 5)
  35. if choice == 1 then
  36. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gf_4af7a99.mp3", "You're not as sneaky as you thought.", "", 1898398655, 853136085, Spawn)
  37. elseif choice == 2 then
  38. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gf_7c145a1f.mp3", "Sees us, did we? Must not let you talk then.", "", 2661963919, 697614069, Spawn)
  39. elseif choice == 3 then
  40. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_aggro_gf_ce5970ec.mp3", "Startle us, you did! We'll remedy that.", "", 3905874632, 4086824059, Spawn)
  41. elseif choice == 4 then
  42. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_aggro_gf_a3d8a506.mp3", "Not very nice of you to be all sneaky.", "", 2210593426, 1217099089, Spawn)
  43. elseif choice == 5 then
  44. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_battle_gf_7509fbcd.mp3", "Youses never see this one coming.", "", 105547293, 3999948070, Spawn)
  45. end
  46. end
  47. end
  48. end
  49. function healthchanged(NPC, Spawn)
  50. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  51. if hp_percent <= 0.50 and spoke == false then
  52. spoke = true
  53. if GetGender(NPC) == MALE then
  54. local choice = math.random(1, 3)
  55. if choice == 1 then
  56. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gm_9c7df7ea.mp3", "That patch of fur will never grow back, you know.", "", 2241929269, 2874755723, Spawn)
  57. elseif choice == 2 then
  58. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gm_a2ace12c.mp3", "Don't hurt us! We're no threat to your mightiness.", "", 3593075606, 2907318102, Spawn)
  59. elseif choice == 3 then
  60. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_halfhealth_gm_7cab6d92.mp3", "That wasn't very nice to do, friend.", "", 413844109, 3656803270, Spawn)
  61. end
  62. elseif GetGender(NPC) == FEMALE then
  63. local choice = math.random(1, 4)
  64. if choice == 1 then
  65. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_halfhealth_gf_7cab6d92.mp3", "That wasn't very nice to do, friend.", "", 2063305887, 2078518166, Spawn)
  66. elseif choice == 2 then
  67. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_2/ft/ratonga/ratonga_base_2_1_halfhealth_gf_ff30e9f.mp3", "Shifty thingsies you are.", "", 1975586766, 1774921113, Spawn)
  68. elseif choice == 3 then
  69. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gf_9c7df7ea.mp3", "That patch of fur will never grow back, you know.", "", 4146309857, 1135607887, Spawn)
  70. elseif choice == 4 then
  71. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_halfhealth_gf_a2ace12c.mp3", "Don't hurt us! We're no threat to your mightiness.", "", 1631608737, 385456101, Spawn)
  72. end
  73. end
  74. end
  75. end
  76. function killed(NPC, Spawn)
  77. spoke = false
  78. local chance = math.random(1, 100)
  79. if chance <= 20 then
  80. if GetGender(NPC) == MALE then
  81. local choice = math.random(1, 3)
  82. if choice == 1 then
  83. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gm_15e8fc93.mp3", "One less worry in my life!", "", 4116602987, 3804155045, Spawn)
  84. elseif choice == 2 then
  85. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gm_732f23e7.mp3", "The dead tell no tales", "", 636430623, 2715556056, Spawn)
  86. elseif choice == 3 then
  87. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gm_935883a.mp3", "Shhh ... shhh ... it's ok ... shhh ...shhh. Stop fighting it...", "", 1459182295, 1340643629, Spawn)
  88. end
  89. elseif GetGender(NPC) == FEMALE then
  90. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_victory_gf_732f23e7.mp3", "The dead tell no tales", "", 1062202875, 1393213249, Spawn)
  91. end
  92. end
  93. end
  94. function death(NPC, Spawn)
  95. spoke = false
  96. local chance = math.random(1, 100)
  97. if chance <= 20 then
  98. if GetGender(NPC) == MALE then
  99. PlayFlavor(NPC, "voiceover/english/optional3/ratonga_base_1/ft/ratonga/ratonga_base_1_1_death_gm_e9ba5c44.mp3", "Flee and take care of them later.", "", 2862575499, 3074650652, Spawn)
  100. elseif GetGender(NPC) == FEMALE then
  101. end
  102. end
  103. end