9
3

anexcavatorofPrexianartifacts.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity/anexcavatorofPrexianartifacts.lua
  3. Script Purpose : an excavator of Prexian artifacts <Dismal Rage>
  4. Script Author : Scatman
  5. Script Date : 2009.08.01
  6. Script Notes :
  7. --]]
  8. local MALE = 1
  9. local FEMALE = 2
  10. local spoke = false
  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. local chance = math.random(1, 100)
  22. if chance <= 25 then
  23. if GetGender(NPC) == MALE then
  24. local choice = math.random(1, 4)
  25. if choice == 1 then
  26. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_aggro_gm_10fd87eb.mp3", "There is no escape for you now!", "", 2989643101, 2260454555)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_aggro_gm_beacbb30.mp3", "I hope you put your affairs in order.", "", 799093996, 16617637)
  29. elseif choice == 3 then
  30. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_aggro_gm_fe18133.mp3", "Look what strolled into the spider's web!", "", 4178015902, 2202039151)
  31. elseif choice == 4 then
  32. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_1/ft/darkelf/darkelf_base_1_3_aggro_gm_10fd87eb.mp3", "There is no escape for you now!", "", 3427660043, 2534456197)
  33. end
  34. elseif GetGender(NPC) == FEMALE then
  35. local choice = math.random(1, 4)
  36. if choice == 1 then
  37. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_1/ft/darkelf/darkelf_base_1_1_aggro_gf_10fd87eb.mp3", "There is no escape for you now!", "", 3641868496, 1960514853)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_aggro_gf_8e7390a8.mp3", "Welcome to torment and destruction!", "", 3770648926, 2897017212)
  40. elseif choice == 3 then
  41. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_aggro_gf_ded507db.mp3", "More intruders to deal with? Stop them!", "", 338410258, 2808797910)
  42. elseif choice == 4 then
  43. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_aggro_gf_fb890c79.mp3", "I have no time for meddlers. Destroy them!", "", 1947039155, 2094447273)
  44. end
  45. end
  46. end
  47. end
  48. function healthchanged(NPC, Spawn)
  49. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  50. if hp_percent <= 0.50 and spoke == false then
  51. spoke = true
  52. if GetGender(NPC) == MALE then
  53. local choice = math.random(1, 3)
  54. if choice == 1 then
  55. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_halfhealth_gm_577ab333.mp3", "You'll pay for that one, peon!", "", 1420508530, 39058961)
  56. elseif choice == 2 then
  57. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_halfhealth_gm_9e244d19.mp3", "How dare you!", "", 3305445355, 1846155898)
  58. elseif choice == 3 then
  59. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_1/ft/darkelf/darkelf_base_1_3_halfhealth_gm_9e244d19.mp3", "How dare you!", "", 2287743179, 1322949627)
  60. end
  61. elseif GetGender(NPC) == FEMALE then
  62. local choice = math.random(1, 5)
  63. if choice == 1 then
  64. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_1/ft/darkelf/darkelf_base_1_1_halfhealth_gf_577ab333.mp3", "You'll pay for that one, peon!", "", 2534123849, 501758946)
  65. elseif choice == 2 then
  66. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_1/ft/darkelf/darkelf_base_1_1_halfhealth_gf_9e244d19.mp3", "How dare you!", "", 2905660023, 2043697886)
  67. elseif choice == 3 then
  68. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_1/ft/darkelf/darkelf_base_1_2_halfhealth_gf_9e244d19.mp3", "How dare you!", "", 2263865273, 2956956838)
  69. elseif choice == 4 then
  70. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_halfhealth_gf_8d198fee.mp3", "You may escape, but we will find you!", "", 1924616636, 4174763308)
  71. elseif choice == 5 then
  72. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_halfhealth_gf_d3fcd4c5.mp3", "How dare you strike me!", "", 1224879133, 2564393271)
  73. end
  74. end
  75. AddTimer(NPC, 30000, "ResetSpoke")
  76. end
  77. end
  78. function ResetSpoke(NPC)
  79. spoke = false
  80. end
  81. function killed(NPC, Spawn)
  82. local chance = math.random(1, 100)
  83. if chance <= 25 then
  84. if GetGender(NPC) == MALE then
  85. local choice = math.random(1, 3)
  86. if choice == 1 then
  87. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_victory_gm_dff26fa.mp3", "It is a shame we must end it this way ... I could have used you.", "", 1363661737, 942201815)
  88. elseif choice == 2 then
  89. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_victory_gm_f4fc7cf8.mp3", "Did you really think you had a chance?", "", 607143583, 3133144305)
  90. elseif choice == 3 then
  91. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_victory_gm_f5088778.mp3", "Get up! Death isn't good enough for you!", "", 3381713633, 2145918189)
  92. end
  93. elseif GetGender(NPC) == FEMALE then
  94. end
  95. end
  96. end
  97. function death(NPC, Spawn)
  98. spoke = false
  99. local chance = math.random(1, 100)
  100. if chance <= 25 then
  101. if GetGender(NPC) == MALE then
  102. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_death_gm_8d7bb2b9.mp3", "Hold them and I'll return with help!", "", 2338278515, 1160150777)
  103. elseif GetGender(NPC) == FEMALE then
  104. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_death_gf_8bbec3e3.mp3", "No matter what I promise, you will not survive!", "", 2832420662, 2950405548)
  105. end
  106. end
  107. end