/doability

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

plure
orc pawn
orc pawn
Posts: 16
Joined: Tue Mar 15, 2016 8:24 am

/doability

Post by plure » Fri Jan 18, 2019 12:57 pm

/doability 6 doesn't work, the code is:

Code: Select all

VOID DoAbility(PSPAWNINFO pChar, PCHAR szLine)
{
	if (!szLine[0] || !cmdDoAbility)
		return;
	PSKILLMGR pSkmgr = pSkillMgr;
	DWORD Index;
	CHAR szBuffer[MAX_STRING] = { 0 };
	GetArg(szBuffer, szLine, 1);
	int abil = atoi(szBuffer);
	if (abil && abil > 5 && abil < NUM_SKILLS)//user wants us to activate a ability by its REAL ID...
	{
		if (DWORD nToken = pCSkillMgr->GetNameToken(abil))
		{
			if (char *thename = pStringTable->getString(nToken, 0)) {
				strcpy_s(szBuffer, thename);
			}
		}
	}
I suspect (I'm at work and too busy atm) to make it work for /doability 6 it should be changed to:

Code: Select all

VOID DoAbility(PSPAWNINFO pChar, PCHAR szLine)
{
	if (!szLine[0] || !cmdDoAbility)
		return;
	PSKILLMGR pSkmgr = pSkillMgr;
	DWORD Index;
	CHAR szBuffer[MAX_STRING] = { 0 };
	GetArg(szBuffer, szLine, 1);
	int abil = atoi(szBuffer);
	if (abil && abil > 6 && abil < NUM_SKILLS)//user wants us to activate a ability by its REAL ID...
	{
		if (DWORD nToken = pCSkillMgr->GetNameToken(abil))
		{
			if (char *thename = pStringTable->getString(nToken, 0)) {
				strcpy_s(szBuffer, thename);
			}
		}
	}

Knightly
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Mar 08, 2014 2:48 am

Re: /doability

Post by Knightly » Fri Jan 18, 2019 1:43 pm

The default /doability goes to 10 I believe.

plure
orc pawn
orc pawn
Posts: 16
Joined: Tue Mar 15, 2016 8:24 am

Re: /doability

Post by plure » Sat Jan 19, 2019 5:04 pm

I dislike the idea that people start using MQ2 and their socials they have used for years suddenly no longer work as expected... I like the idea of using ID's personally, because that makes sense to me, but I am sure people that are new won't be comfortable with the change to how the game works.

Maybe something like /doability id #n would be reasonable.

Knightly
decaying skeleton
decaying skeleton
Posts: 4
Joined: Sat Mar 08, 2014 2:48 am

Re: /doability

Post by Knightly » Sat Jan 19, 2019 7:05 pm

I had mentioned this in RG chat, but I agree. Couple ways to handle it, either an argument as plure mentioned or a new command so you're not overloading, or remap whatever abilities have IDs 6-10 to other IDs so it doesn't impact the player.

I think that last option is closest to the current execution but I think it will be annoying for the devs. Whatever the choice I agree with plure that you should maintain base game command functionality.