Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-03-2003, 11:37 AM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default Herein lies the conundrum - Summoning Items in Quest Scripts

I see posts from people claiming they can summon items in quest scripts by saying the following somewhere in the script:

summonitem("11000")

In fact, I read a post that says that you must use the quotation marks in order for it to work.

Well, it just flat out doesn't work for me. I can only get this to work if I remove the quotation marks.

Soooo...being on the Bug Hunt that I am today, I dive into the code to see if it's just me or what (I've been known to have a severe case of anal-cranium interlock in the past).

Looking in void Parser::CommandEx(char * command, int32 npcid, Mob* other, Mob* mob) I see that, in my case, atoi("11000") is failing to convert to 11000, rather returning 0 as it should.

Now, this explains why I can't use quotation marks, but herein lies the conundrum...who are these other people that CAN use quotation marks?

(Windoze? Say it isn't so! )

Some code snippets that snarf (in a rather brutal and ruthless way) the leading quotation mark, inserted where atoi is failing (that I have found, so far):

Code:
else if (strstr(strlwr(arglist[0]),"summonitem")) {
       if (arglist[1][0] == '\"') { memset(strstr(arglist[1], "\""), 32, 1); }  //ADD THIS
       mob->CastToClient()->SummonItem(atoi(arglist[1]));
}
else if (strstr(strlwr(arglist[0]),"castspell")) {
        if (arglist[1][0] == '\"') { memset(strstr(arglist[1], "\""), 32, 1); }  //ADD THIS
        other->CastSpell(atoi(arglist[2]), atoi(arglist[1]));
}

Regards,

Krich
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 08:14 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3