NAlmiatheCorruptor.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst_Classic/NAlmiatheCorruptor.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.09.11 02:09:27
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/NPCModule"
  9. function spawn(NPC, Spawn)
  10. dmgMod = GetStr(NPC)/10
  11. Named(NPC)
  12. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  13. SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(5 + dmgMod))
  14. SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(15 + dmgMod))
  15. end
  16. function hailed(NPC, Spawn)
  17. end
  18. function respawn(NPC)
  19. spawn(NPC)
  20. end
  21. function Garbled(NPC,Player)
  22. local choice = MakeRandomInt(1,3)
  23. if choice == 1 then
  24. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_garbled_gf_36e875b.mp3", "Atzeen fahrseh", "", 761026681, 962675039, Spawn, 2)
  25. elseif choice == 2 then
  26. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_garbled_gf_fab027b8.mp3", "Hach bahr neh jadh osh agh", "", 3272896968, 3465123316, Spawn, 2)
  27. elseif choice == 3 then
  28. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_garbled_gf_810a3ce3.mp3", "Dark in body and soul! Hah!", "", 1604363761, 647045676, Spawn, 2)
  29. end
  30. end
  31. function aggro(NPC,Player)
  32. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  33. SetTempVariable(NPC, "CalloutTimer", "false")
  34. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=100 and IsPlayer(Player) then
  35. SetTempVariable(NPC, "CalloutTimer", "true")
  36. AddTimer(NPC,10000,"ResetTimer")
  37. if not HasLanguage(Player,20 )then
  38. Garbled(NPC,Player)
  39. else
  40. local choice = MakeRandomInt(1,3)
  41. if choice == 1 then
  42. 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, Spawn, 2)
  43. elseif choice == 2 then
  44. 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, Spawn, 2)
  45. end
  46. end
  47. end
  48. end