MQ2MMOBugsTools and Levitation?

Clueless

New member
Joined
Aug 1, 2006
Messages
17
Reaction score
0
Points
0
When the plugin MQ2MMOBugsTools is loaded the command:
Code:
/memspell 8 "Levitation"
stops working. This may also be causing some crashes as I crash a LOT more when I use Levitation rather then Levitate.


I have confirmed this by unloading the plugin and typing:
Code:
/memspell 8 "Levitation"
then loading the plugin and testing it again.


All the other spells I have tried with this do work, I tried the command in all slot and it's the same.
 
Tested it with today's compile and still having the same problem.
 
/memspell 8 2894 <--- tested and memorizes Levitation on a shaman.

To determine a spells id if you do not have access to Lucy do the following.

/echo ${Me.Book[Levitation]}

This returns the spell location in your book (not the main spell database) - For this example lets say it returned "109". Now we take this number and type:

/echo ${Me.Book[109]}

This should return "Levitation". Now to get the id add .ID to the end of this last command.

/echo ${Me.Book[109].ID}

This will return the Spell ID as located from your spellbook and should then be able to use in a /memspell line no matter if there are multiple spells with the same name or a single one. It may not be very effective but its a workaround until /memspell can be modified to pull from your spellbook rather than from the main spell database.
 
This could be due to the fact that there are really 3 "Levitation" spells in the spell database. I havent personally looked into the coding of how it tries to memorize a spell, but it may be triggering a spell you dont have. Perhaps try to mem it by the spell id (2894) if /memspell accepts spell id's as well as names.

http://lucy.allakhazam.com/spell.html?id=2894&source=Live
http://lucy.allakhazam.com/spell.html?id=7544&source=Live
http://lucy.allakhazam.com/spell.html?id=970&source=Live

I tried all this and if I = /plugin mq2mmobugstools unload, it works perfectly. If I = /plugin mq2mmobugstools, it stops working with the exact same command.

I tried it by number and name, I did the echo command and it returns "23" so it is seeing the right spell. See this thread for all the specifics of what we went through trouble shooting the problem Macroquest Thread
 
I tried it by number and name, I did the echo command and it returns "23" so it is seeing the right spell.

Which echo command did you type that returns 23? I'm guessing the first one which is the slot in your book where Levitation is located... now type:

/echo ${Me.Book[23]} ${Me.Book[23].ID}

This should return Levitation and a number. That number is the spell id it should memorize. Then do /memspell <slotnum> <number>
 
Which echo command did you type that returns 23? I'm guessing the first one which is the slot in your book where Levitation is located... now type:

/echo ${Me.Book[23]} ${Me.Book[23].ID}

This should return Levitation and a number. That number is the spell id it should memorize. Then do /memspell <slotnum> <number>


This link show the days of troubleshooting we went through to get to the point that I reported the error here. Link to MQ2 Thread

Here is the snippit from the link that applies to your question:

dont_know_at_all said:
Clueless said:
Another stupid question, should this be:
They are the same...

Clueless said:
I thought the icon was for checking it after it was cast an the dobuff was for calling it up when it is needed. Kind of like you use the item name to cast the spell and the spell name for checking and watching worn off messages. Or am I missing something here in the logic?
Yes, icon refers to the buff window only.

On your gems, are any other spells named anything close to levitation?
Clear gem1 and type
Code:
/memspell 1 "Levitation"
Does it get memmed?

Does not work:
Code:
/memspell 8 "Levitation"

Does not work:
Code:
/memspell 8 "2894"

Does not work:
Code:
/memspell 8 2894

Does not work:
Code:
DoBuff5=Levitation
DoBuffIcon5=2894
DoBuffGem5=gem8
DoBuffAliases5=Lev|Levitate|
DoBuffRefresh5=0
DoBuffMana5=30
BattleBuff5=FALSE

Does not work:
Code:
DoBuff5=2894
DoBuffIcon5=2894
DoBuffGem5=gem8
DoBuffAliases5=Lev|Levitate|
DoBuffRefresh5=0
DoBuffMana5=30
BattleBuff5=FALSE

and

nils said:
We are just trying to solve the problem. I am sitting here with my chanter logged in and it all works for me so you can see where the problem is a little frustrating and I am just trying to look at every possibility. What do you get if you type /echo ${Me.Book["Levitation"]} ?

[MQ2] 23


And last but not least if I type
Code:
/plugin mq2mmobugstools unload
everything works, all those command work, the macro works, it fixes the problem.

This is why I switched the thread to here.

;)
 
just right click your spell in your spell book, doesnt that still bring up spell info (including ID)
 
just right click your spell in your spell book, doesnt that still bring up spell info (including ID)

Sorry I was editing my post while you posted this, here is what I added above that you may have missed:

And last but not least if I type
Code:
/plugin mq2mmobugstools unload
everything works, all those command work, the macro works, it fixes the problem.

This is why I switched the thread to here.

;)
 
In MQ2MMOBugsTools.cpp, approx. line 1258, replace the entire MemorizeSpell() function with this one:

Code:
[SIZE=2]VOID MemorizeSpell( PSPAWNINFO pChar, PCHAR szLine )
{
char szSpellName[MAX_STRING] = {0};
char szGemSlot[MAX_STRING] = {0};
char szTemp[MAX_STRING] = {0};
unsigned int Gem;
  PCHARINFO pCharInfo = 0;
  pCharInfo = GetCharInfo();
  if (szLine[0] == 0) 
  {
    WriteChatf( "\atUsage: \ag/memspell \ar<\aygem slot\ar> <\ayspell name\ar>" );
    return;
  }
  GetArg(szSpellName,szLine,2);
  GetArg(szGemSlot,szLine,1);
  Gem = (unsigned int)atoi(szGemSlot);
  if (Gem<1 || Gem>9) 
  {
    return;
  }
  Gem--;
  if (PSPELL pSpell=GetSpellByID(GetCharInfo2()->MemorizedSpells[Gem]))
  {
    WriteChatf("spell = %s .", pSpell->Name );
    DoMemorizeSpell(Gem,pSpell->ID,0x2);
  }
  BYTE orig_stand_state = pChar->StandState;
  ForceState(STANDSTATE_SIT);
  pChar->StandState = STANDSTATE_SIT;
  GetCharInfo()->standstate = STANDSTATE_SIT;
    GetCharInfo2()->SpellBook;
    PSPELL pNewSpell=0;
  for (DWORD N = 0 ; N < NUM_BOOK_SLOTS ; N++)
  if (PSPELL pTempSpell=GetSpellByID(GetCharInfo2()->SpellBook[N]))
  {
    if (!stricmp(szSpellName,pTempSpell->Name) || (strstr(pTempSpell->Name,"Rk. II") && !strnicmp(szSpellName,pTempSpell->Name,strlen(pTempSpell->Name)-8)))
    {
      pNewSpell=pTempSpell;
      break;
    }
  }
  if(pNewSpell) 
  {
    if (pNewSpell->Level[pChar->Class-1]>pChar->Level) {
      WriteChatf("\aySpell found in book, but above current level.");
      return;
    }
    DoMemorizeSpell(Gem,pNewSpell->ID,0x1);
  } 
  else
  {
    WriteChatf("\ayCouldn't find spell \ar%s", szSpellName);
  }
  if( orig_stand_state != STANDSTATE_SIT ) 
  {
    ForceState(orig_stand_state);
    pChar->StandState = orig_stand_state;
    GetCharInfo()->standstate = orig_stand_state;
  }
  return;
}

htw

[/SIZE]
 
bah, your going to make me install VS huh? ;) I got lazy and was just using your precompiled stuff :)

Going to take me longer as I have to install from scratch and figure out how to compile this stuff again. I havn't done it in over 8 months.
 
k, give this a try then. =P =P

htw
 

Attachments

  • MQ2MMOBugsTools.dll
    260 KB · Views: 2
Not sure what you changed but it fixed it, thanks :)

For those of us slow folks care to explain?

In short.... He made it cycle through each spell in your spellbook until it finds the one that matches the spell name you supplied. If found it takes the ID and memorizes by the spell id rather than the name alone.
 
In short.... He made it cycle through each spell in your spellbook until it finds the one that matches the spell name you supplied. If found it takes the ID and memorizes by the spell id rather than the name alone.

I wonder why /memspell 8 2894 didn't work? And why when I did the "echo" command it returned the number of the slot in the spellbook that had the spell.