Page 1 of 1

Taffrock Instance Boss Fight

Posted: Sun Oct 20, 2013 3:28 pm
by Bill D Cat
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)

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
And in the onload section I define the function:

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

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 12:22 am
by rock5
I think you want to know if player.Battling is the flag you should be checking to see if you are out of combat? The answer to that is 'yes'. The player.Battling flag corresponds to the messages you see in game "Entering combat" and "Leaving combat".

Note: player:breakFight() is for breaking out of the player:fight() sequence. Seeing as you are in TRAVEL mode and are not using the player:fight() sequence, I don't think player:breakFight() will do anything.

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 2:49 am
by Bill D Cat
Okay, I'll do some more testing with variations on this setup. The only reason I added the player:breakFight() was because I saw the bot would get locked into combat and not teleport to the next tablet. But now that I've run it a few more times, I think the loop isn't repeating, so once I get to the 4th tablet it just falls out of the constraints of the current waypoint code and into the normal combat routine.

So far, the Warrior class has the hardest time killing this elite, mostly due to the lack of any attack skills that don't require rage to use. So that's why I was sticking to the white damage of the attack() command for that class. I also considered the priest's Bone Chill as a DOT for this fight, but noticed that it isn't part of the default profile, and isn't included in the levelupSkills1to10() function either.

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 3:30 am
by Bill D Cat
Ran one of my Champion test characters through the instance after taking out the player:breakFight() and it locked into the standard combat mode! Needless to say my character died because it wasn't teleporting to the next tablet like it should have. It also never cast Rune Pulse as instructed by the function. Back to the drawing board.

(Even though the attached log says I killed the elite, I can assure you I died instead.)

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 3:46 am
by rock5
That is player:fight(). So that means it wasn't in TRAVEL mode at the time. Which means that code wouldn't work anyway because it wont get executed until it reaches that waypoint and it seemed to have attacked the mob before it got there.

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 12:35 pm
by Bill D Cat
The last thing in waypoint #49 is a __WPL:setForcedWaypointType("TRAVEL") command, and the second line of the log that I attached clearly shows that the first teleport worked just fine. So it was executing the code that I wrote to engage the elite and teleport to each tablet. I'm going to try again with the player:breakFight() added back in to see if it jumps to the second tablet or not.

Edit: At least this time it cast Rune Pulse, but would not teleport to the second tablet until the character died.

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 1:38 pm
by rock5
There is a part in player:target_Object that checks if you have aggro and tries to kill the mob before collecting. Try player:target_NPC instead. If there is a casting bar, you will have to add a wait for it to disappear. Eg.

Code: Select all

player:target_NPC(106729) -- Balanced Inscription
repeat yrest(200) player:updateCasting() until not player.Casting
player:target_NPC(106675) -- Eulogy Rubbing
repeat yrest(200) player:updateCasting() until not player.Casting

Re: Taffrock Instance Boss Fight

Posted: Mon Oct 21, 2013 2:11 pm
by Bill D Cat
Getting a lot closer with those changes. I think I need to limit myself to 1 attack at a time, or I risk spending too much time in the AOE damage zone near the elite. At least now it teleports to each tablet after attacking.