athirdcircleinitiate.lua 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : SpawnScripts/BrawlersDojo/athirdcircleinitiate.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.18 02:12:18
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. require "SpawnScripts/Generic/CombatModule"
  10. function spawn(NPC, Spawn)
  11. combatModule(NPC, Spawn)
  12. AddTimer(NPC, math.random(2000,5000), "EmoteLoop")
  13. SetTempVariable(NPC,"Talking","false")
  14. SetTempVariable(NPC,"Reset",nil)
  15. SetInfoStructString(NPC, "action_state", "mood_angry")
  16. end
  17. function hailed(NPC, Spawn)
  18. if HasQuest(Spawn,5790) and GetQuestStepProgress(Spawn,5790,1)==0 then
  19. FaceTarget(NPC, Spawn)
  20. Dialog.New(NPC, Spawn)
  21. Dialog.AddDialog("If your brain were half as good as your brawn, you'd be a quarter the warrior I am!")
  22. Dialog.AddVoiceover("voiceover/english/barbarian_eco_race_evil/ft/eco/evil/barbarian_eco_race_evil_ogre_gm_85d4dfd9.mp3",3300429686, 1230722065)
  23. PlayFlavor(NPC, "", "", "flex",0,0 , Spawn, 0)
  24. Dialog.AddOption("Is that so? Spar with me!","Dialog1")
  25. Dialog.Start()
  26. end
  27. end
  28. function Dialog1(NPC, Spawn)
  29. FaceTarget(NPC, Spawn)
  30. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn, 0)
  31. AddTimer(NPC,3000,"attack",1,Spawn)
  32. end
  33. function attack(NPC,Spawn)
  34. SpawnSet(NPC,"attackable",1)
  35. SpawnSet(NPC,"show_level",1)
  36. Attack(NPC,Spawn)
  37. PlayFlavor(NPC, "voiceover/english/optional3/barbarian_base_1/ft/barbarian/barbarian_base_1_2_aggro_gm_d2336620.mp3", "Your overconfidence will be your undoing.", "", 549554872, 2137888085, Spawn, 0)
  38. end
  39. function aggro(NPC,Spawn)
  40. if GetTempVariable(NPC,"Reset")== nil then
  41. else
  42. ClearHate(NPC, Spawn)
  43. SetInCombat(Spawn, false)
  44. SetInCombat(NPC, false)
  45. ClearEncounter(NPC)
  46. SetTarget(Spawn,nil)
  47. end
  48. end
  49. function healthchanged(NPC, Spawn)
  50. if GetHP(NPC) < GetMaxHP(NPC) * 0.26 then
  51. SpawnSet(NPC,"attackable",0)
  52. SpawnSet(NPC,"show_level",0)
  53. -- if IsInCombat(NPC,Spawn) then
  54. SetTempVariable(NPC,"Reset",1)
  55. ClearHate(NPC, Spawn)
  56. SetInCombat(Spawn, false)
  57. SetInCombat(NPC, false)
  58. ClearEncounter(NPC)
  59. SetTarget(Spawn,nil)
  60. -- end
  61. AddTimer(NPC,1500,"end2",1,Spawn)
  62. AddTimer(NPC,3000,"bow",1,Spawn)
  63. AddTimer(NPC,5000,"bow2",1,Spawn)
  64. end
  65. end
  66. function end2(NPC,Spawn)
  67. ClearHate(NPC, Spawn)
  68. SetInCombat(Spawn, false)
  69. SetInCombat(NPC, false)
  70. ClearEncounter(NPC)
  71. SetTarget(Spawn,nil)
  72. end
  73. function bow(NPC,Spawn)
  74. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn, 0)
  75. SetStepComplete(Spawn,5790,1)
  76. end
  77. function bow2(NPC,Spawn)
  78. Runback(NPC)
  79. end
  80. function respawn(NPC)
  81. spawn(NPC)
  82. PlayFlavor(NPC, "", "", "confused", 0, 0, Spawn, 0)
  83. end
  84. function death(NPC,Spawn)
  85. Despawn(NPC)
  86. end
  87. function victory(NPC)
  88. SetTempVariable(NPC,"Reset",nil)
  89. SetTempVariable(NPC,"Talking","false")
  90. end