9
3

amenacingraiderTrollHeroic.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : SpawnScripts/SunkenCity_Classic/amenacingraiderTrollHeroic.lua
  3. Script Author : LordPazuzu
  4. Script Date : 2023.10.27 08:10:05
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/CombatModule"
  9. dofile("SpawnScripts/Generic/MonsterCallouts/BaseTroll1.lua")
  10. function spawn(NPC, Spawn)
  11. combatModule(NPC, Spawn)
  12. Appearance(NPC)
  13. SpawnSet(NPC, "heroic", 1)
  14. local Level = GetLevel(NPC)
  15. local level1 = 7
  16. local level2 = 8
  17. local difficulty1 = 6
  18. local hp1 = 200
  19. local power1 = 90
  20. local difficulty2 = 6
  21. local hp2 = 240
  22. local power2 = 100
  23. if Level == level1 then
  24. SpawnSet(NPC, "difficulty", difficulty1)
  25. SpawnSet(NPC, "hp", hp1)
  26. SpawnSet(NPC, "power", power1)
  27. elseif Level == level2
  28. then
  29. SpawnSet(NPC, "difficulty", difficulty2)
  30. SpawnSet(NPC, "hp", hp2)
  31. SpawnSet(NPC, "power", power2)
  32. end
  33. AddTimer(NPC,MakeRandomInt(3500,10000),"EmoteLoop")
  34. end
  35. function EmoteLoop(NPC)
  36. if not IsInCombat(NPC) and GetRunbackDistance(NPC)<2 then
  37. local choice = MakeRandomInt(1,5)
  38. if choice == 1 then
  39. PlayFlavor(NPC,"","","itch",0,0)
  40. elseif choice == 2 then
  41. PlayFlavor(NPC,"","","feint",0,0)
  42. elseif choice == 3 then
  43. PlayFlavor(NPC,"","","tapfoot",0,0)
  44. elseif choice == 4 then
  45. PlayFlavor(NPC,"","","peer",0,0)
  46. elseif choice == 5 then
  47. PlayFlavor(NPC,"","","swear",0,0)
  48. end
  49. end
  50. AddTimer(NPC,MakeRandomInt(6500,12000),"EmoteLoop")
  51. end
  52. function hailed(NPC, Spawn)
  53. FaceTarget(NPC, Spawn)
  54. end
  55. function respawn(NPC)
  56. spawn(NPC)
  57. end
  58. function Appearance(NPC)
  59. if GetGender(NPC)==2 then
  60. SpawnSet(NPC,"model_type",105)
  61. else
  62. SpawnSet(NPC,"model_type",106)
  63. end
  64. end