View Single Post
  #6  
Old 04-18-2006, 09:30 PM
Muuss
Dragon
 
Join Date: May 2003
Posts: 539
Default

I've just downloaded and tested your installer, very very great work, nice improvement for newcomers !

2 small suggestions :

quests/plugins/check_handin.pl needs to be updated, the one you're using isn't safe to use (it may lead to odd results depending how the quest has been written), this is the new one :

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;

Second point, I have to say thank you, i saw that you included questeditor in your package, which makes me feel proud and happy
There's a new version, with a very few improvements but several little fixes, like () removed after the event subs, some ; added where they were missing and a button that creates an empty quest based on the check_handin plugin.

http://eqemu.vilvert.fr/quest_editor-1.8.zip
__________________
Muuss - [PEQGC] Dobl, the ogre that counts for 2 !
http://www.vilvert.fr/page.php?id=10
Reply With Quote