AbilityReady & CombatAbilityReady in MQ2-20051101

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

AbilityReady & CombatAbilityReady in MQ2-20051101

Post by Albert » Thu Feb 12, 2009 8:34 am

First of I want to tell that I'm running EQ Titanium against an EQEmu server.

I downloaded the 20051101 zip and it compiled and works fine with my unpatched eqgame.exe

But I'm having a couple of problems.

Me.CombatAbilityReady[1] always returns TRUE if the character has any comabt abilities. NULL for characters without combat abilities. It never returns FALSE. It returns TRUE even when the combat ability is not ready to be used yet. It doesn't matter if I use the name or the number.
Me.CombatAbility[Evasive Discipline] returns 1, and Me.CombatAbility[1] returns Evasive Discipline. So that part is working.
Me.CombatAbilityTimer[1] always returns NULL

Me.Ability[Kick] returns NULL for my warrior character. Even with Kick assigned to slot 1 in the Ability window. But Me.Ability[1] returns Kick!!!
Me.AbilityReady[1] works as it should, but Me.AbilityReady[Kick] always returns NULL.
The strange thing here is that for a Shadowknigh character Me.Ability[Kick] and Me.AbilityReady[Kick] works!!!

I saw that CombatAbility, CombatAbilityReady and CombatAbilityTimer was changed in the 20051130 release to use the EQ functions. But by then the offsets was already changed to the 2005-11-16 patch. So to be able to update the 20051101 code with those changes I need to get hold of the offsets for EQ_PC__GetAltAbilityIndex, EQ_PC__GetCombatAbility and EQ_PC__GetCombatAbilityTimer for the 2005-11-01 eqgame.exe. But I'm not sure how to do that.

Keep in mind that there are a bounch of us out there that are running against EQEmu servers, and then it is the 20051101 code that we need use. (Or at least start from)

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

Post by Albert » Thu Feb 12, 2009 12:45 pm

After some debugging I found why the Me.AbilityReady[Kick] wasn't working.
After it found the skill Kick it checked if the skill level was above 252 and did an automatic "return false;" if it was.

MQ2DataTypes.cpp

Code: Select all

				// name
				for (DWORD nSkill=0;szSkills[nSkill];nSkill++)
					if (!stricmp(GETFIRST(),szSkills[nSkill]))
					{
						// found name
						if (GetCharInfo2()->Skill[nSkill]>252)
-->>							return false;
						for (DWORD nAbility=0;nAbility<10;nAbility++)
						if (EQADDR_DOABILITYLIST[nAbility] == nSkill) 
						{
							if (nAbility<4)
								nAbility+=7;
							else
								nAbility-=3;
							if (SkillDict[nSkill]->AltTimer==2)
								Dest.DWord=gbAltTimerReady;
							else
								Dest.DWord=EQADDR_DOABILITYAVAILABLE[nSkill];
							Dest.Type=pBoolType;
							return true;
						}
					}
Since this server allows skill levels higher then 252 it failed.
But why do the code check the skill level before it checks if the skill is available? Skill level shouldn't have anything to do with it. (I saw that this check is removed in the 20090131 code)


No luck with the CombatAbilityReady[1] thou.
The struct GetCharInfo2()->CombatAbilityTimes[] is just filled with zero's. So I guess the code needs to call the EQ function to get that info.

caj
a hill giant
a hill giant
Posts: 244
Joined: Tue Sep 12, 2006 9:35 am

Post by caj » Thu Feb 12, 2009 4:29 pm

this line is looking for any skill over 252

Code: Select all

if (GetCharInfo2()->Skill[nSkill]>252)
not knowing what your character skill is at or what ever your tring to do but you can change it to 1 or what ever # what you want it to be.


this is what i use for the kick ability

Code: Select all

/if (${Me.AbilityReady[Kick]}) /doability "Kick"
because thats an older mq2 your useing Im not 100% certain that will work either but give it a shot

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

Post by Albert » Thu Feb 12, 2009 5:03 pm

caj wrote:this line is looking for any skill over 252

Code: Select all

if (GetCharInfo2()->Skill[nSkill]>252)
not knowing what your character skill is at or what ever your tring to do but you can change it to 1 or what ever # what you want it to be.


this is what i use for the kick ability

Code: Select all

/if (${Me.AbilityReady[Kick]}) /doability "Kick"
because thats an older mq2 your useing Im not 100% certain that will work either but give it a shot
Why did you bother to post when you can't contribute anything? You obviously didn't read my posts.

caj
a hill giant
a hill giant
Posts: 244
Joined: Tue Sep 12, 2006 9:35 am

Post by caj » Thu Feb 12, 2009 7:30 pm

then why you asking for help?

If you read my post carefully you would have got the idea to change

if (GetCharInfo2()->Skill[nSkill]>252)

to

if (GetCharInfo2()->Skill[nSkill]>1)

why the hell do you need to know if kick ability is true or false. what your describing is a redundant check... I gave you options that was it. fix it yourself then.

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

Post by Albert » Fri Feb 13, 2009 5:47 am

3 reasons to why you shouldn't have posted a reply.

1) Your suggested change will make AbilityReady[] always return FALSE for all abilities that have a skill higher then 1. That is NOT the purpose of that function. So you don't know how it should work.

2) I have already fixed AbilityReady[]. See post nr 2.

3) It is not redundant to know if an Ability is ready to use.


You'r not helping.

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Post by SwiftyMUSE » Fri Feb 13, 2009 9:43 am

Well... as was posted numerous times before about EMU support. Don't look for much of it here, the only version officially supported is the current LIVE release.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

Post by Albert » Sat Feb 14, 2009 10:11 am

Yes, I realize that the majority of the community is running against live. But there are still some of us the are using this old version against EQEmu where there are some servers where it is perfectly legit to use MQ2.

What I really would need is if there is a guide or something about how to find offsets in the eqgame.exe. I remember from way back when I was using MQ2 on live that there was something like that, but I can't seem to find it now.

And this isn't really a support/help post. It's a bug report for an old version of the code.

User avatar
Bad Karma
a snow griffon
a snow griffon
Posts: 346
Joined: Sat Nov 22, 2003 9:34 pm
Contact:

Post by Bad Karma » Sat Feb 14, 2009 10:42 am

Albert wrote:What I really would need is if there is a guide or something about how to find offsets in the eqgame.exe. I remember from way back when I was using MQ2 on live that there was something like that, but I can't seem to find it now.
Clearly, you didn't look very hard. "What [you] really would need is..." staring you right there in the face!
Albert wrote:And this isn't really a support/help post. It's a bug report for an old version of the code.
In which case, it has most likely been resolved in the CURRENT version of the code, and therefore is no longer a valid "bug."
[b]- Bad Karma
________________________________________[/b]

In our own quest for excellence, we should strive to take the time to help those who help themselves.

All others should [b]RTFM[/b]!!!!!!!!!

Albert
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Feb 12, 2009 7:20 am

Post by Albert » Sat Feb 14, 2009 12:50 pm

Bad Karma wrote:
Albert wrote:What I really would need is if there is a guide or something about how to find offsets in the eqgame.exe. I remember from way back when I was using MQ2 on live that there was something like that, but I can't seem to find it now.
Clearly, you didn't look very hard. "What [you] really would need is..." staring you right there in the face!
Albert wrote:And this isn't really a support/help post. It's a bug report for an old version of the code.
In which case, it has most likely been resolved in the CURRENT version of the code, and therefore is no longer a valid "bug."
So nice of you to post a link to a none existing forum.

wassup
Official Guardian and Writer of TFM
Official Guardian and Writer of TFM
Posts: 1487
Joined: Sat Oct 26, 2002 5:15 pm

Post by wassup » Sat Feb 14, 2009 1:30 pm

Albert wrote:
Bad Karma wrote:
Albert wrote:What I really would need is if there is a guide or something about how to find offsets in the eqgame.exe. I remember from way back when I was using MQ2 on live that there was something like that, but I can't seem to find it now.
Clearly, you didn't look very hard. "What [you] really would need is..." staring you right there in the face!
Albert wrote:And this isn't really a support/help post. It's a bug report for an old version of the code.
In which case, it has most likely been resolved in the CURRENT version of the code, and therefore is no longer a valid "bug."
So nice of you to post a link to a none existing forum.
Yes, it does exist...

di28889
a hill giant
a hill giant
Posts: 296
Joined: Sat Jul 12, 2003 11:36 pm

Post by di28889 » Sat Feb 14, 2009 2:15 pm

key Idea is to use search, also a vast amount of the info on this site is now in VIP
For those that are about to [url=http://www.di28889.com/posting.swf]POST[/url] a new topic befor USING SEARCH

http://www.di28889.com/posting.swf

xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: AbilityReady & CombatAbilityReady in MQ2-20051101

Post by xyilla » Sat Sep 06, 2025 1:30 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: AbilityReady & CombatAbilityReady in MQ2-20051101

Post by xyilla » Sat Sep 06, 2025 1:32 am


xyilla
naggy
naggy
Posts: 29514
Joined: Sun Feb 23, 2025 5:36 am

Re: AbilityReady & CombatAbilityReady in MQ2-20051101

Post by xyilla » Sat Sep 06, 2025 1:33 am