Page 1 of 1

BUG: $char(gem,"spell name")

Posted: Wed Sep 10, 2003 2:33 pm
by Curious

Code: Select all

:Start
/cast "turtle skin"
:CastLoop
/doevents
/if n $char(gem,"turtle skin")<0 /goto :CastLoop
/goto :Start
The :CastLoop exits as soon as the spell is done casting - not when the gem becomes active again. Also, a /delay 5 is now needed after the loop or you get the error "You are not ready yet"

Posted: Thu Sep 11, 2003 9:03 am
by javaspot
On my system $char(gem,"name of spell") crashes the client.

Posted: Thu Sep 11, 2003 1:06 pm
by driftinsupra
I scripts it crashes my client....when typed with a /echo it is just fine.

Posted: Thu Sep 11, 2003 6:52 pm
by Shocks
Same here $char(gem,spellname) also is what is crashing my script.

Thanks all devs.

Posted: Fri Sep 12, 2003 2:39 am
by Curious
It's strange to hear the number of people who chrash using $char(gem,spellname) ... it doesn't crash me. Is there a specific spell everyone is checking to get the crash? I use it in a buff-up routine, casting Spirit of Wolf along with 4 other buffs - and the only problems I have are mentioned in the first post.

Ensnare

Posted: Fri Sep 12, 2003 9:18 am
by Shocks
Ensnare seems to be the one that crashes me. Ill check other spells.

Yep I found no other spells that crash me just Ensnare. Very strange....

Posted: Fri Sep 12, 2003 11:54 pm
by javaspot
Mine was "Ring of the Nexus"

shot in the dark ...

Posted: Sat Sep 13, 2003 1:39 am
by MacroFiend
but what spell gems were the crashing spells mem'd in ... and what page/position in your spell book are they scribed?

Posted: Sun Sep 14, 2003 6:29 am
by Shocks
It seems to be Gem slot one thats causing me to crash. Checking with more spells.

Posted: Sun Sep 14, 2003 11:16 am
by motd2k
$char(gem,"Spell name") always returns -2... which used to be the value for an unrefreshed gem.

Looks like the struct is incorrect, the value at the address in memory to which the structure points is always 1.


MOTD

Posted: Sun Sep 14, 2003 2:58 pm
by Curious
On my system, $char(gem,"spell name") only returns -2 while casting. When I get the message of "you feel faster" (or whatever), it returns the gem slot the spell is assigned to, even though the gem is not yet active.

For spells I have not memorized, it returns a 0

Never tried a spell in gem slot 1 (only used 2-6), but never had a crash using it.

Posted: Sun Sep 14, 2003 3:12 pm
by Shocks
I bet dimes to dollars you do that on gem 1 it will crash.

Posted: Sun Sep 14, 2003 6:45 pm
by motd2k
tis a strange problem. Whats happening is you are actually getting the spellstate for the gem *above* the one you are asking for...

Let say you have Harvest in Gem2 and Shielding in Gem3... you do a /echo $char(gem,"Shielding") and you get the spellstate for Harvest. Odd. Looking into it ATM. (thats obviously also why gem1 causes a CTD)



MOTD

Posted: Sun Sep 14, 2003 6:58 pm
by motd2k
Okay, cludged a fix together...

in eqlib_macroparser change...

Code: Select all

                                pSpellSlot = (PEQCASTSPELLWINDOW)pCastSpellWindow->SpellSlots[[color=red]sp[/color]]; 
                                if (pSpellSlot->spellstate != 0) {
                                    strcpy(szTemp,"-2");

to...

Code: Select all

                                pSpellSlot = (PEQCASTSPELLWINDOW)pCastSpellWindow->SpellSlots[[color=red]sp+1[/color]]; 
                                if (pSpellSlot->spellstate != 0) {
                                    strcpy(szTemp,"-2");

Posted: Tue Sep 16, 2003 4:18 pm
by Shocks
Thanks alot MOTD that works like a charm. Would you by chance have any idea about the /memspell issue?