EQ2Bot - New Release discussion

Pygar

EQ2Bot Specialist
We released the new version of EQ2Bot today.

This new version has a complete re-write of all incombat movement functions. The bot now is aware of the true min and max ranges for spells and autoattack and the new functions use that logic. Also added strafe arcing for movement between quadrants while fighting.

CastSpellRange also got some improvements to better handle when targets of spells change and to prevent casting on the wrong player because they happen to be targeting the target of cast. In general just some significant improvements to target and positioning checks while casting.

CheckPosition now supports more values:
Code:
function CheckPosition(int rangetype, int quadrant, uint TID=${KillTarget},int AbilityID, bool castwhilemoving)
{
	; rangetype (1=close, 2=max range, 3=bow shooting)
	; quadrant (0=anywhere, 1=behind, 2=front, 3=flank, 4=rear or flank, 5=front or flank)
Here is a sample from castspellrange:
Code:
function CastSpellRange(int start, int finish, int xvar1, int xvar2, int TargetID, int notall, int refreshtimer, bool castwhilemoving, bool IgnoreMaintained, int CastSpellWhen, bool IgnoreIsReady)
{
	;; Notes:
	;; - IgnoreMaintained:  If TRUE, then the bot will cast the spell regardless of whether or not it is already being maintained (ie, DoTs)
	;;
	;;	CastSpellNow changed to CastSpellWhen
	;;	CastSpellWhen:
	;;		0 = Queue Spell
	;;		1 = Cast Immediately
	;;		2 = Cast When Current Queue Complete
	;;;;;;;
 
Last edited:

mycroft

Script Author: MyPrices
The new mystic routines , the character continually casts spirit of the mastodon.

I had to toggle off the 'buff strength' option for now to stop it.
 
Last edited:

Pygar

EQ2Bot Specialist
There is no new mystic routine...

Sounds like the buff routine in mystic is set to cast the buff everytime it returns true for IsReady....

The buff needs to check if it is maintained or not before casting.
 

milamber

Active Member
Here are the changes that check if the spell is maintained first:

Code:
		case BuffStrength
			if ${BuffStrength}
			{
			if !${Me.Maintained[${SpellType[${PreSpellRange[${xAction},1]}]}](exists)}
				call CastSpellRange ${PreSpellRange[${xAction},1]}
			}
			else
			{
				Me.Maintained[${SpellType[${PreSpellRange[${xAction},1]}]}]:Cancel
			}
			break
 

godfetish

Active Member
Paladin just autoattacks and occasionally casts taunts, not enough to keep aggro off a shaman pet...let alone Conjuror air pet. He casts the big Ardent Sacrament heal pre-combat then runs off to pull just fine.

The Shaman stands behind the MT/MA and has autoattack on and doesn't move or cast - even heals or pre-combat buffs.

The Conjuror will send in the pet and like Mystic stand there with autoattack on out of range behind the MT like the shaman.

I have deleted the class files and moveto.iss and PositionUtils.iss and EQ2Bot and got fresh from SVN to version 1291 before even considering posting.

Have all the class files been updated or is that our responsibility? Cause honestly, it's a little more the fubared...just gonna use the SVN I DLed the 28th and modify it to face pre-ranged attack like always and wait for fixes.
 
Last edited:

Pygar

EQ2Bot Specialist
Have all the class files been updated or is that our responsibility? Cause honestly, it's a little more the fubared...just gonna use the SVN I DLed the 28th and modify it to face pre-ranged attack like always and wait for fixes.
Good luck with that.

Paladin - I have no idea, AFAIK no one maintains the class file and its been considered 'broken' for a long time.

Shaman - Which shaman are we talking about? My defiler kicks ass and takes names.

Conji - I'm updating conji for buff issues today, other than that it should work fine.
 

Pygar

EQ2Bot Specialist
Known bug:
Player target buffs/ spells will spam cast on yourself when the intended target is out of range, out of zone, or not in line of sight.

This bug is a product of the castspell functions now using /useabilityonplayer and cutting down on the target spam. When you /usabilityonplayer Pygar Thorns and Pygar is not in range, the game doesn't say Out of Range, it just casts Thorns on yourself. This is unfortunate, but thats just how the game works.

Our scripts then evaluate the target of thorns, and if it doesn't = Pygar, it cancels the buff and recasts.

Because the target is evaluating to NULL before CastSpellRange is called, there is nothing I can add to the function to test/prevent this, we'll need to fix this in the class files so that they don't call the cast function if there isn't a valid target.

Feel free to post known class / spells that are a problem for this, and I'll work to fix them as time allows.
 

godfetish

Active Member
For being broken it sure survives better than my Guardian...he's a complete flake sometimes, but the Paladin hasn't died from stupid errors in 60+ levels.

The Mystic shaman.
 

Pygar

EQ2Bot Specialist
Further Tweeks to movement the past few days.

Something was happening causing strafe to exceed the heading target when called. I think this was lag related, and I changed how frequently it is checked while moving, this seems to have helped in prelimnary testing. To date, it has never happened for me, so hard to work on.

Added Out of Range (OOR) movement to the bot. Now when spell casts are evaluated, a check for OOR is done BEFORE the cast. If we're OOR, we'll attempt to move to max cast range IF the distance we need to move is equal to or less than the new SLIDER control in the UI.

Initial value of this slider is 25, but you might want it to be more ore less. Setting to 0 will prevent the bot from trying to move into cast range on given target and abort the cast when OOR is determined.

All in all, the bot is now much more aware of what it is casting, who it is casting on, and if that request is possible, and new tools exist for it to resolve those decisions.
 

litewave

Well-Known Member
as for the doability casting on oneself, can't the max range of the spell be compared to the distance of the intended target? or abort if not in zone or isdead? ie a precheck. or is there something i misunderstood in your post?
 

Pygar

EQ2Bot Specialist
Yes it can. I opted to have the bot actually move to range if target is in zone. But I had to put the slider in so you could control how far it will move or not.
 

newbiedd501

Active Member
Auto Hunting

Ok since the changes my guard doesnt pull correctly in auto hunt. I have him ste to bow pull but he will just run to the mob rather than stopping within range and use his bow.what am i doing wrong? any suggestions?
 

godfetish

Active Member
Try putting something in the Cast on Pull spell and hitting set...taunt, anything...then go back to Bow selection. My Paladin was retarded like that until I put in a spell...in the ISX console, I was seeing something that eluded to him attempting to cast a SPELL IN CAPS or whatever is there by default and not finding it then running like an idiot to the mob. Hope that helps.

Between the changes I dunno when eq2bot is stable. I try one day and they can bot for 8 hours straight, the next forced eq2bot update, because isxeq2 is updated (for good reason I am sure, not bitching about fixes to the extension), they are gimped and running off or past mobs(not the MT) and training the group when they run back. Always latest svn before I run eq2...at least to make my primary update (see below)

And, plz for the love of God Almighty, put a face after targeting the mob and it's two wait commands in the Pull function of the eq2bot.iss for us Bow pullers. Maybe Rangers auto-face for ranged, but my guardian doesn't, then he seems to just select the next target further away from the pull point. Which is usually not withing pull range anyway, so he stands there for a timeout...and sometimes even does this recursively until nothing is left to pull, all are on ignore list, and he runs right through them till he realizes he has aggro, and graciously stops to wipe the group... Ok, too much ranting, but watching it is like getting kicked in the nuts...and I just felt myself twinge.
 

mycroft

Script Author: MyPrices
Sleepy mystic

Not sure why , but the mystic script seems to lag behind a lot now.

The fight will finish and the mystic script will continue to cast 2-3 spells after the mob is dead.

I've killed a single mob and the mystic will heal the tank , cast a group ward (the tanks at full HP after the heals), Bolster the tank and then try and cast a slow on the already dead mob.

All this before noticing the mobs dead and then going into auto-follow mode.
 

Pygar

EQ2Bot Specialist
Thats nothing really new on the mystic. the heal routine will heal then apply group ward every time, then the combat funciton says use bolster if it is up, then it runs the actual first spell of the routine. On fast solo kills, this is of course already over.

I prefer to run it maintaining wards, so they get cast before combat, the heal routine doesn't run cause MT is full hp, and the combat script cycles faster and returns quicker.

The only fix is to add something to the combat and heal routine to bomb out when KillTarget doesn't exist or is dead.
 

Pygar

EQ2Bot Specialist
And, plz for the love of God Almighty, put a face after targeting the mob and it's two wait commands in the Pull function of the eq2bot.iss for us Bow pullers. Maybe Rangers auto-face for ranged, but my guardian doesn't, then he seems to just select the next target further away from the pull point. Which is usually not withing pull range anyway, so he stands there for a timeout...and sometimes even does this recursively until nothing is left to pull, all are on ignore list, and he runs right through them till he realizes he has aggro, and graciously stops to wipe the group... Ok, too much ranting, but watching it is like getting kicked in the nuts...and I just felt myself twinge.
I've got 4 people bitching to remove the face for every 1 that wants it. My guard will face the mob when i hit range attack, but this is an eq2 setting. Turn on autoface, and he'll auto face. Casters complain about facing targets to pull them, and in general people don't want any face commands that are not required.
 

godfetish

Active Member
hrmm...well then something is odd. Cause while I autoface on melee it works fine, but I'm not finding autoface for ranged working...mind boggling, so I will just continue adding a face in to fix it.
 

cybris

Active Member
Don't know what the problem is but when I set a spell to pull the bot dosen't wait for the spell to finish casting it then charges the target. This is even with engage in melee unchecked. Happens to me on my wizard and templar.

Also it is not looting correctly it dosen't loot chest at all even when all loot options checked. I am doing this solo so there is no roll window. In groups it rolls correctly.
 

godfetish

Active Member
there is no wait while casting in the pull function after the cast spell...also, the running to the mob is being caused by the fastmoves at the end of the pull function. What I did was edit the function pull to:

Code:
			;;;; Otherwise, Using "PullSpell" ;;;;;;;;;;;;;

			call CastSpell "${PullSpell}"
			CurrentAction:Set["${Target} pulled using ${PullSpell}"]
			;echo "DEBUG: Pulled...waiting for mob to come within range"
		do
		{
			waitframe
		}
		while ${Me.CastingSpell}

			;if ${Target.Distance} > 5 && !${pulling} && ${PathType}!=2
			;{
			;	if ${AutoMelee}
			;		call FastMove ${Target.X} ${Target.Z} 5
			;	elseif ${Target.Distance} > ${MARange}
			;		call FastMove ${Target.X} ${Target.Z} ${MARange}
			;}

			if ${Target(exists)}
			{
				KillTarget:Set[${Target.ID}]
				engagetarget:Set[TRUE]
				return ${Target.ID}
			}
		}
	}
	while ${tcount:Inc}<=${EQ2.CustomActorArraySize}
	FlushQueued CantSeeTarget

	engagetarget:Set[FALSE]
	return 0
}
and at the head of the combat section change the beginning to account for the move if needed by making the bot wait for a few seconds then decide whether to move in:

Code:
;these checks should be done before calling combat, once called, combat should insue, regardless.
			if !${Actor[${KillTarget}].InCombatMode}
				break
			
			wait 50 ${Target(exists)} && ${Target.Distance} <= 10
			
			if ${Actor[${KillTarget}].Distance} > ${MARange}
			{
				call FastMove ${Target.X} ${Target.Z} 3
				if !${Actor[${KillTarget}](exists)}
					break
				call ProcessTriggers
			}

			if !${Actor[${KillTarget}](exists)}
				break

			;face ${Target.X} ${Target.Y} ${Target.Z}
Look at where I edited the text by searching for the commented( ; ) lines and try em out to see if the fixes help with the puller. My non-pulling bots just have been using the normal one, except the strafing around is a little herky-jerky, guess without using the right mouse button, strafing isn't very artistic so I can't complain, at least my scouts move behind the mob.
 
Top Bottom