aninvestigatorofPrexianartifacts.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity/aninvestigatorofPrexianartifacts.lua
  3. Script Purpose : an investigator 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/ghost_human_base_1/ft/ghost/ghost_human_base_1_1_aggro_gm_119a2ca8.mp3", "No. I'm unrest and you will suffer.", "", 3626119416, 3545522817)
  27. elseif choice == 2 then
  28. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_583690dc.mp3", "Summon help! We have invaders!", "", 3340212225, 279643307)
  29. elseif choice == 3 then
  30. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a203c9ec.mp3", "Prepare to face your doom, meddler.", "", 1496819882, 365167432)
  31. elseif choice == 4 then
  32. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_aggro_gm_a30c4f9d.mp3", "To arms!", "", 1238020980, 748146443)
  33. end
  34. elseif GetGender(NPC) == FEMALE then
  35. PlayFlavor(NPC, "voiceover/english/optional3/ghost_human_base_1/ft/ghost/ghost_human_base_1_1_aggro_gf_821554e3.mp3", "Must you aggravate me so!", "", 735262000, 1417243472)
  36. end
  37. end
  38. end
  39. function healthchanged(NPC, Spawn)
  40. local hp_percent = GetHP(NPC) / GetMaxHP(NPC)
  41. if hp_percent <= 0.50 and spoke == false then
  42. spoke = true
  43. if GetGender(NPC) == MALE then
  44. local choice = math.random(1, 3)
  45. if choice == 1 then
  46. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_halfhealth_gm_1babf022.mp3", "Is that all you have?", "", 170267964, 1158805306)
  47. elseif choice == 2 then
  48. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_halfhealth_gm_8529e507.mp3", "I can't hold them forever!", "", 644448824, 755050547)
  49. elseif choice == 3 then
  50. PlayFlavor(NPC, "voiceover/english/optional5/human_base_2/ft/human/human_base_2_2_halfhealth_gm_64f84f7d.mp3", "This time, don't tickle me with your weapon!", "", 425567694, 559993522)
  51. end
  52. elseif GetGender(NPC) == FEMALE then
  53. local choice = math.random(1, 4)
  54. if choice == 1 then
  55. PlayFlavor(NPC, "voiceover/english/optional3/ghost_human_base_1/ft/ghost/ghost_human_base_1_1_halfhealth_gf_fa0af03c.mp3", "For Thule's sake!", "", 2960095639, 2634994717)
  56. elseif choice == 2 then
  57. PlayFlavor(NPC, "voiceover/english/optional3/ghost_human_base_2/ft/ghost/ghost_human_base_2_1_halfhealth_gf_4214f9be.mp3", "Well struck, but I withstood it!", "", 2750294931, 1365592478)
  58. elseif choice == 3 then
  59. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_halfhealth_gf_1babf022.mp3", "Is that all you have?", "", 2979351329, 4050238683)
  60. elseif choice == 4 then
  61. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_halfhealth_gf_8529e507.mp3", "I can't hold them forever!", "", 3371581229, 792393228)
  62. end
  63. end
  64. AddTimer(NPC, 30000, "ResetSpoke")
  65. end
  66. end
  67. function ResetSpoke(NPC)
  68. spoke = false
  69. end
  70. function killed(NPC, Spawn)
  71. local chance = math.random(1, 100)
  72. if chance <= 25 then
  73. if GetGender(NPC) == MALE then
  74. local choice = math.random(1, 4)
  75. if choice == 1 then
  76. PlayFlavor(NPC, "voiceover/english/ghost_human_base_1/ft/ghost/ghost_human_base_1_1_victory_gm_79236cb9.mp3", "It was too late. They have met our fate.", "", 869850080, 2857504352)
  77. elseif choice == 2 then
  78. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_153f12ff.mp3", "One down!", "", 3009518664, 4140389760)
  79. elseif choice == 3 then
  80. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_4553e1e0.mp3", "Flee now or meet this one's fate.", "", 3032162747, 1359206304)
  81. elseif choice == 4 then
  82. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_victory_gm_ec0cd85a.mp3", "I hope they're all this easy.", "", 2687289628, 2303639320)
  83. end
  84. elseif GetGender(NPC) == FEMALE then
  85. PlayFlavor(NPC, "voiceover/english/optional3/ghost_human_base_1/ft/ghost/ghost_human_base_1_1_aggro_gf_821554e3.mp3", "Must you aggravate me so!", "", 735262000, 1417243472, Spawn)
  86. end
  87. end
  88. end
  89. function death(NPC, Spawn)
  90. spoke = false
  91. local chance = math.random(1, 100)
  92. if chance <= 25 then
  93. if GetGender(NPC) == MALE then
  94. PlayFlavor(NPC, "voiceover/english/human_base_1/ft/human/human_base_1_1_death_gm_7612214f.mp3", "All hands retreat!", "", 3033325782, 1103449586)
  95. elseif GetGender(NPC) == FEMALE then
  96. PlayFlavor(NPC, "voiceover/english/optional3/human_base_1/ft/human/human_base_1_1_death_gf_7612214f.mp3", "All hands retreat!", "", 3620177897, 757784861)
  97. end
  98. end
  99. end