Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 09-09-2008, 05:07 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Any time you are only checking for certain classes and not all classes, then you have to do a Not Equal check as well for the other classes you don't want to use that turn in.

Don't ask me why it doesn't work the other way, as I have no clue. I also don't know why for equals you have to use ==, but for not equals, you have to use "ne". It doesn't make sense to me, but it does work.

Here is an example of what I mean:

Code:
if (($class == 'Wizard' || $class == 'Magician' || $class == 'Enchanter' || $class == 'Necromancer') && ($class ne 'Warrior' && $class ne 'Rogue' && $class ne 'Monk' && $class ne 'Berserker' && $class ne 'Shadowknight' && $class ne 'Paladin' && $class ne 'Ranger' && $class ne 'Bard' && $class ne 'Beastlord' && $class ne 'Cleric' && $class ne 'Druid' && $class ne 'Shaman'))
So, for every if(class) check, you have to include every class and just ne the ones you don't want.

Also, don't forget to add this at the bottom as shown in my example:
Code:
else {
 	    plugin::return_items(\%itemcount);
	}
Or the NPC will eat any incorrect items turned into it.

I imagine there are much better ways of doing this, but I haven't really gone back and tried lately. The next time I make a similar armor quest using better code, I will definitely post it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 09-10-2008 at 01:10 AM..
Reply With Quote
 


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:48 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