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 11-13-2008, 07:48 PM
cybernine186
Sarnak
 
Join Date: Feb 2008
Posts: 87
Default check_handin.pl broken/exploit

The plugin to handle things like plugin::check_handin is broken and has a HUGE exploit in it. Example I have had several issues were someone hand's in a bunch of gold or copper and they are given the reward regardless of the item number or count. Can anyone else confirm this, I know that this works because I have tried it my self and found it to be proven.

Here is the code that I currently use for the hand in.

check_handin.pl
Code:
# plugin::check_handin($item1 => #required_amount,...);
# autoreturns extra unused items on success
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) {
	delete $hashref->{$req};
    }
    return 1;
}

sub return_items {    
    my $hashref = shift;
    foreach my $k (keys(%{$hashref})) {
	next if($k == 0);
	my $r;
	for($r = 0; $r < $hashref->{$k}; $r++) {
		quest::summonitem($k);
	}
	delete $hashref->{$k};
    }
}

1;
Reply With Quote
  #2  
Old 11-13-2008, 10:34 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

It's a known issue, yes.
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 08: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