NAlmiatheCorruptor.lua 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. function spawn(NPC)
  9. dmgMod = GetStr(NPC)/10
  10. SetInfoStructUInt(NPC, "override_primary_weapon", 1)
  11. SetInfoStructUInt(NPC, "primary_weapon_damage_low", math.floor(5 + dmgMod))
  12. SetInfoStructUInt(NPC, "primary_weapon_damage_high", math.floor(15 + dmgMod))
  13. end
  14. function hailed(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function Garbled(NPC,Player)
  20. local choice = MakeRandomInt(1,3)
  21. if choice == 1 then
  22. PlayFlavor(NPC, "voiceover/english/optional3/darkelf_base_2/ft/darkelf/darkelf_base_2_1_garbled_gf_36e875b.mp3", "Atzeen fahrseh", "", 761026681, 962675039, Spawn, 2)
  23. elseif choice == 2 then
  24. 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)
  25. elseif choice == 3 then
  26. 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)
  27. end
  28. end
  29. function aggro(NPC,Player)
  30. AddTimer(NPC,math.random(15000,30000),"FifteenCall",1,Player)
  31. SetTempVariable(NPC, "CalloutTimer", "false")
  32. if GetTempVariable(NPC, "CalloutTimer")== "false" and math.random(0,100) <=100 and IsPlayer(Player) then
  33. SetTempVariable(NPC, "CalloutTimer", "true")
  34. AddTimer(NPC,10000,"ResetTimer")
  35. if not HasLanguage(Player,20 )then
  36. Garbled(NPC,Player)
  37. else
  38. local choice = MakeRandomInt(1,3)
  39. if choice == 1 then
  40. 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)
  41. elseif choice == 2 then
  42. 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)
  43. end
  44. end
  45. end
  46. end