BaseDarkelf1_Male.lua 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. --[[
  2. Script Name : SpawnScripts/Generic/MonsterCallouts/BaseDarkelf1_Male.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.15 12:11:57
  5. Script Purpose :
  6. :
  7. --]]
  8. local HealthCallout = false --REDUCES Half-Health Spam
  9. local CalloutTimer = false --REDUCES Callout Spam
  10. function ResetTimer(NPC) -- 7 SECOND PAUSE BETWEEN VOs
  11. SetTempVariable(NPC, "CalloutTimer", "false")
  12. end
  13. function Garbled(NPC,Player)
  14. local choice = MakeRandomInt(1,3)
  15. if choice == 1 then
  16. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_garbled_gm_8dd636c1.mp3", "Pashtita Nu orlek va tualic zefdat", "", 983323899, 3112871522, Spawn, 2)
  17. elseif choice == 2 then
  18. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_garbled_gm_810a3ce3.mp3", "Ardlelah kovactic ozermav klebitaz", "", 1130393437, 2011449714, Spawn, 2)
  19. elseif choice == 3 then
  20. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_garbled_gm_fab027b8.mp3", "Hach bahr neh jadh osh agh", "", 1055587810, 93253246, Spawn, 2)
  21. end
  22. end
  23. function aggro(NPC,Player)
  24. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  25. SetTempVariable(NPC, "CalloutTimer", "false")
  26. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=33 and IsPlayer(Player) then
  27. SetTempVariable(NPC, "CalloutTimer", "true")
  28. AddTimer(NPC,10000,"ResetTimer")
  29. if not HasLanguage(Player,20 )then
  30. Garbled(NPC,Player)
  31. else
  32. local choice = MakeRandomInt(1,3)
  33. if choice == 1 then
  34. 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, Spawn, 2)
  35. elseif choice == 2 then
  36. 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, Spawn, 2)
  37. elseif choice == 3 then
  38. 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, Spawn, 2)
  39. end
  40. end
  41. end
  42. end
  43. function death(NPC,Player)
  44. if GetTempVariable(NPC, "CalloutTimer")== "false" and IsPlayer(Player) then
  45. if math.random(0,100)<=35 then
  46. if not HasLanguage(Player,20 )then
  47. Garbled(NPC,Player)
  48. else
  49. local choice = MakeRandomInt(1,2)
  50. if choice == 1 then
  51. 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, Spawn, 2)
  52. elseif choice == 2 then
  53. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_death_gm_25576197.mp3", "I will have vengeance!", "", 360053692, 4149753869, Spawn, 2)
  54. end
  55. end
  56. end
  57. end
  58. end
  59. function FifteenCall(NPC,Player)
  60. if IsAlive(NPC) and IsInCombat(NPC)==true and IsPlayer(Player)and GetTempVariable(NPC, "CalloutTimer")== "false" then
  61. if math.random(0,100)<=33 then
  62. SetTempVariable(NPC, "CalloutTimer", "true")
  63. AddTimer(NPC,10000,"ResetTimer")
  64. if not HasLanguage(Player,20 )then
  65. Garbled(NPC,Player)
  66. else
  67. local choice = MakeRandomInt(1,6)
  68. if choice == 1 then
  69. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_battle_gm_a38dc90c.mp3", "Close in until they can't breathe!", "", 1646052354, 1989688436, Spawn, 2)
  70. elseif choice == 2 then
  71. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_battle_cm_4e66222a.mp3", "You cannot deny the power of hate!", "", 2308305258, 1715309735, Spawn, 2)
  72. elseif choice == 3 then
  73. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_battle_gm_316a6c63.mp3", "I crave your suffering!", "", 3367682978, 4121942691, Spawn, 2)
  74. elseif choice == 4 then
  75. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_battle_mm_4832fde6.mp3", "Now, prepare to be eviscerated!", "", 1640233154, 431623172, Spawn, 2)
  76. elseif choice == 5 then
  77. if GetClass(Spawn)<=21 and GetClass(Spawn)>=30 then
  78. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_maomage_gm_7c1c0586.mp3", "Your pathetic parlor tricks won't save you now, magician!", "", 2940784449, 2243650132, Spawn, 2)
  79. elseif GetClass(Spawn)<=1 and GetClass(Spawn)>=10 then
  80. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_maofighter_gm_c01f2ef8.mp3", "Let's see how good of a fighter you really are!", "", 976101228, 853372931, Spawn, 2)
  81. else
  82. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_battle_cm_4e66222a.mp3", "You cannot deny the power of hate!", "", 2308305258, 1715309735, Spawn, 2)
  83. end
  84. elseif choice == 6 then
  85. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_battle_gm_700b6151.mp3", "A feeble attempt from a worthless opponent.", "", 943969253, 2337029939, Spawn, 2)
  86. end
  87. end
  88. end
  89. if IsAlive(NPC)then
  90. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  91. end
  92. end
  93. end
  94. function healthchanged(NPC, Player)
  95. if GetTempVariable(NPC, "CalloutTimer") == "false" and IsPlayer(Player) and IsAlive(NPC)==true then
  96. if GetTempVariable(NPC, "HealthCallout") == "false" then
  97. if GetHP(NPC) < GetMaxHP(NPC) * 0.55 and GetHP(NPC) > GetMaxHP(NPC) * 0.45 then
  98. SetTempVariable(NPC, "HealthCallout", "true")
  99. SetTempVariable(NPC, "CalloutTimer", "true")
  100. AddTimer(NPC,10000,"ResetTimer")
  101. AddTimer(NPC,12500,"HealthReset")
  102. if not HasLanguage(Spawn,2 )then
  103. Garbled(NPC,Player)
  104. else
  105. local choice = MakeRandomInt(1,3)
  106. if choice == 1 then
  107. PlayFlavor(NPC, "voiceover/english/darkelf_base_1/ft/darkelf/darkelf_base_1_1_halfhealth_gm_9e244d19.mp3", "How dare you!", "", 3305445355, 1846155898, Spawn, 2)
  108. elseif choice == 2 then
  109. 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, Spawn, 2)
  110. end
  111. end
  112. end
  113. end
  114. end
  115. end
  116. function victory(NPC,Player)
  117. if IsPlayer(Player)and not HasLanguage(Player,20 )then
  118. Garbled(NPC,Player)
  119. elseif IsPlayer(Player) and HasLanguage(Player,20 )then
  120. local choice = MakeRandomInt(1,3)
  121. if choice == 1 then
  122. 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, Spawn, 2)
  123. elseif choice == 2 then
  124. 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, Spawn, 2)
  125. elseif choice == 3 then
  126. 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, Spawn, 2)
  127. end
  128. end
  129. end