Quote:
Originally Posted by image
I should add I have also disabled return_items (just removed the contents from the sub function) since it is exploitable. This multiquest code won't handle item returns but it never existed in classic anyway.
|
That is true about the old return_items plugin being exploitable, but I have a new one that removes any exploits related to it. A while back, I added the item instance fields for each turned in item (charges and attuned) to the source to allow this to function. Note that this does require some of the newer plugins that may not exist in all older servers, but they can be found here:
https://code.google.com/p/eqemuplugi...e/#svn%2Ftrunk
Code:
sub return_items {
my $hashref = plugin::var('$itemcount');
my $client = plugin::val('$client');
my $items_returned = 0;
my %ItemHash = (
0 => [ plugin::val('$item1'), plugin::val('$item1_charges'), plugin::val('$item1_attuned') ],
1 => [ plugin::val('$item2'), plugin::val('$item2_charges'), plugin::val('$item2_attuned') ],
2 => [ plugin::val('$item3'), plugin::val('$item3_charges'), plugin::val('$item3_attuned') ],
3 => [ plugin::val('$item4'), plugin::val('$item4_charges'), plugin::val('$item4_attuned') ],
);
foreach my $k (keys(%{$hashref}))
{
next if($k == 0);
my $rcount = $hashref->{$k};
my $r;
for ($r = 0; $r < 4; $r++)
{
if ($rcount > 0 && $ItemHash{$r}[0] && $ItemHash{$r}[0] == $k)
{
if ($client)
{
$client->SummonItem($k, $ItemHash{$r}[1], $ItemHash{$r}[2]);
$items_returned = 1;
}
else
{
# This shouldn't be needed, but just in case
quest::summonitem($k, 0);
$items_returned = 1;
}
$rcount--;
}
}
delete $hashref->{$k};
}
# Return true if items were returned
return $items_returned;
}
This is not directly related to the purpose of this thread, but I figured it was worth mentioning since it was brought up.