Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 04-02-2008, 03:18 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by Aramid View Post
Using the SAME item each time for each level seems to confuse the program.
That's because plugin::check_handin removes the items from the %itemcount array. I believe this is why it only gets through the first check in the second set of code in the first post.

Then again, there looks to be a syntax error in the 1st set of code, which should do what you're trying to do:
Code:
if (plugin::check_handin(\%itemcount, 2835=>4) {
should be
Code:
if (plugin::check_handin(\%itemcount, 2835=>4)) {
Quote:
Originally Posted by Aramid View Post
If there is a way to clear the items after handing them in and setting the new setglobal, before the next if statememt, then it may work.
I think this would do the trick:

Code:
sub EVENT_ITEM {
	if ($itemcount{2835} == 4 && $qglobals{max_level} == undef) {
		quest::say("These are in excellent shape!  They will be trophies in my collection!");
		$client->Message(6, "Maximus Serilious rewards you with a new level!" );
		quest::exp(9999999);
		quest::setglobal("max_level", 71, 5, "F");
		quest::level(71);
		$itemcount{2835} = undef;
	}
	if ($itemcount{2835} == 4 && $qglobals{max_level} == 71) {
		quest::say("These are in excellent shape!  They will be trophies in my collection!");
		$client->Message(6, "Maximus Serilious rewards you with a new level!" );
		quest::exp(9999999);
		quest::setglobal("max_level", 72, 5, "F");
		quest::level(72);
		$itemcount{2835} = undef;
	}
	Etc...
	Etc...
	Etc...
}
Something else you could do to really trim the code down:

Code:
sub EVENT_ITEM {
	if (plugin::check_handin(\%itemcount, 2835 => 4)) {
		quest::say("These are in excellent shape!  They will be trophies in my collection!");
		quest::exp(9999999);
		if ($qglobals{max_level} == undef) {
			quest::setglobal("max_level", 71, 0, "F");
			quest::level(71);
		} elsif ($qglobals{max_level} >= 75) {
			plugin::return_items(%itemcount);
		} else {
			quest::setglobal("max_level", $qglobals{max_level}++, 0, "F"
			quest::level($qglobals{max_level})
		}
	} else {plugin::return_items(%itemcount);}
}
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
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 04:02 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