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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 07-14-2003, 08:48 AM
Fyrre
Sarnak
 
Join Date: Jan 2003
Posts: 33
Default $itemcount problem

I have an armor quest, and the item turn in isn't functioning as I want it to. The spell being cast on the user summons the specified item. The problem is that ANY turn in attempts to cast all the spells in the code on the user.

Code:
EVENT_ITEM {
if ($itemcount("210") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your chestplate.  Congratulations!") castspell("$userid","523") }
if ($itemcount("211") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your leggings.  Congratulations!") castspell("$userid","637") }
if ($itemcount("212") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your bracer.  Congratulations!") castspell("$userid","638") }
if ($itemcount("213") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your helm.  Congratulations!") castspell("$userid","639") }
if ($itemcount("214") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your armplates.  Congratulations!") castspell("$userid","751") }
if ($itemcount("215") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your boots.  Congratulations!") castspell("$userid","852") }
if ($itemcount("216") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your gauntlets.  Congratulations!") castspell("$userid","887") }
if ($itemcount("220") && $itemcount("217") && $itemcount("218") && $itemcount("219") { say("Here is your mask.  Congratulations!") castspell("$userid","888") }
}
Could someone please correct me on this code? I'm sure something isn't right.
Reply With Quote
  #2  
Old 07-14-2003, 09:47 AM
dcl
Sarnak
 
Join Date: Jun 2003
Posts: 71
Default

I believe you need to set the $itemcount = to something...

ie.

if ($itemcount("210") == 1 && $itemcount("217") == 1 && $itemcount("218") == 1 && $itemcount("219") == 1 ){ say("Here is your chestplate. Congratulations!") castspell("$userid","523") }


You were also missing a ) after the last $itemcount
Reply With Quote
  #3  
Old 07-14-2003, 03:48 PM
killspree
Dragon
 
Join Date: Jun 2002
Posts: 776
Default

Yeah, try $itemcount("id") == 1, also try without quotes, and make sure to add in that last parentheses.
__________________
Xeldan
Lead Content Designer
Shards of Dalaya
Reply With Quote
  #4  
Old 07-14-2003, 05:27 PM
Fyrre
Sarnak
 
Join Date: Jan 2003
Posts: 33
Default

Thanks, it works like a charm.
Reply With Quote
  #5  
Old 07-16-2003, 09:37 AM
mamba666
Sarnak
 
Join Date: Apr 2003
Posts: 41
Default

Using 4.4 I used $itemcount without the quotes and it worked. With Quotes did not work for me.
Reply With Quote
  #6  
Old 07-20-2003, 12:15 PM
krich
Hill Giant
 
Join Date: May 2003
Location: The Great Northwest
Posts: 150
Default

The simple explanation is that Windows likes quotes, Linux does not (has to do with the atoi function). I think this might have been fixed, but not sure. Check my rantings about atoi in the dev forum for more info (and cussing).

Regards,

krich
Reply With Quote
  #7  
Old 07-20-2003, 01:17 PM
Bigpull
Discordant
 
Join Date: Feb 2003
Posts: 305
Default

itemcount is a variable, variables do not require quotes, functions are what require quotes.
Reply With Quote
Reply


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 03:15 AM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3