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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2007, 08:07 AM
Darkonig
Hill Giant
 
Join Date: Dec 2006
Posts: 102
Default

Even using check_handin plugin would have eaten the stuff if the subroutine has syntax errors.

The operation of the check_handin routine is a little inconsistent tho.

If you hand in what is needed along with something else it eats what was needed and ignores the rest, acknowledging that it got what it wanted.

If you hand it more of what's needed than it wants, whether or not you also hand anything else, it does not eat anything does not acknowledge it got what it wanted.

Either way, it only returns the items it didn't want or need if you call the return_items plugin at the end.

I would be quicker to use it if check_handin were coded as:
Code:
sub check_handin {
    my $hashref = shift;
    my %required = @_;
    foreach my $req (keys %required) {
        if ((!defined $hashref->{$req}) || ($hashref->{$req} < $required{$req})) {
            return(0);
        }
    }
    foreach my $req (keys %required) {
        if ($required{$req} < $hashref->{$req}) {
            $hashref->{$req} -= $required{$req};
        } else {
            delete $hashref->{$req};
        }
    }
    return 1;
}
This would make it still accept if you gave too many of an item and return the excess of that item as well as anything else that was given and not needed.
As to the potential to exploit of using a negative quantity required, the person coding the quest could just summon it directly if they wanted to.
Reply With Quote
Reply

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 12:03 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