Taffrock Instance Boss Fight
Posted: Sun Oct 20, 2013 3:28 pm
I am trying to finish up my full run-through of the Dwarf starting zone and am having a few issues with the elite mob Dark Gargoylem at the end of the instance. I've figured out a strategy to solo the fight, but I'm having problems working out the logic to scripting it. I'll see if I can explain what I am trying to do, and where my problems are.
The fight takes place in the last room of the instance. There are four "tablets" that spawn in a square pattern around the room, and clicking on them can recover your health. So my strategy is to run in and get aggro from the elite, then use the teleport function to move to the first tablet and use it. Next I want to cast one or two skills, DOTs prefered, and then teleport to the next tablet and repeat the process. Teleport is vitial to the survival, as the elite casts a self centered AOE that acts as a DOT. (Point to note: the damage scales with player level, so even a player at level cap with 100K+ health can easily die if they just stand around in the AOE zone.)
Now here's where I'm having trouble. I can beat the elite almost every time, but because it gives up and retreats, it doesn't die. So checking to see if the mob is dead doesn't work. And because it can take up to 30 seconds to wander off and despawn, checking to see if it is nearby will return true. I'm thinking I need to check if I have aggro still, or am otherwise in a fight (player:Battling perhaps). The big problem is that my loop will continue to teleport between the tablets, and this will eventually cause my character to die for some reason after the elite has wandered off but has not yet despawned.
My code goes something like this: (Waypoint)
And in the onload section I define the function:
The fight takes place in the last room of the instance. There are four "tablets" that spawn in a square pattern around the room, and clicking on them can recover your health. So my strategy is to run in and get aggro from the elite, then use the teleport function to move to the first tablet and use it. Next I want to cast one or two skills, DOTs prefered, and then teleport to the next tablet and repeat the process. Teleport is vitial to the survival, as the elite casts a self centered AOE that acts as a DOT. (Point to note: the damage scales with player level, so even a player at level cap with 100K+ health can easily die if they just stand around in the AOE zone.)
Now here's where I'm having trouble. I can beat the elite almost every time, but because it gives up and retreats, it doesn't die. So checking to see if the mob is dead doesn't work. And because it can take up to 30 seconds to wander off and despawn, checking to see if it is nearby will return true. I'm thinking I need to check if I have aggro still, or am otherwise in a fight (player:Battling perhaps). The big problem is that my loop will continue to teleport between the tablets, and this will eventually cause my character to die for some reason after the elite has wandered off but has not yet despawned.
My code goes something like this: (Waypoint)
Code: Select all
__WPL:setForcedWaypointType("TRAVEL")
repeat
teleport(1417, 1210, 2982)
fightElite()
teleport(1707, 1215, 2982)
fightElite()
teleport(1711, 1426, 2982)
fightElite()
teleport(1414, 1436, 2982)
fightElite()
until some.condition.is.met
Code: Select all
function fightElite()
yrest(1000)
player:target_Object(106729) -- Balanced Inscription
player:target_Object(106675) -- Eulogy Rubbing
gargoylem = player:findNearestNameOrId(106665) -- Dark Gargoylem (Elite)
player:target(gargoylem)
player:aimAt(gargoylem)
if player.Class1 == CLASS_WARRIOR then attack() end
if player.Class1 == CLASS_ROGUE then player:cast("ROGUE_SHADOWSTAB") yrest(500) player:cast("ROGUE_LOW_BLOW") end
if player.Class1 == CLASS_MAGE then player:cast("MAGE_LIGHTNING") yrest(500) player:cast("MAGE_FIREBALL") end
if player.Class1 == CLASS_PRIEST then player:cast("PRIEST_REGENERATE") yrest(500) player:cast("PRIEST_RISING_TIDE") end
if player.Class1 == CLASS_WARLOCK then player:cast("WARLOCK_PERCEPTION_EXTRACTION") yrest(500) player:cast("WARLOCK_PSYCHIC_ARROWS") end
if player.Class1 == CLASS_CHAMPION then player:cast("CHAMPION_RUNE_PULSE") end
player:breakFight()
player:clearTarget()
end