Quote:
Originally Posted by Vexyl
The latest version of the quests can be found at:
http://code.google.com/p/projecteqqu...ource/checkout
You will need an svn client to checkout the repository.
TortoiseSVN is a good choice if you're using Windows.
The server may not have the check_handin plugin. Make sure that check_handin.pl is in your quests/plugins folder.
The svn repo does contain this file, so it would be best to checkout the latest revision.
If you decide to use TortoiseSVN then make a folder called quests and checkout on this link:
http://projecteqquests.googlecode.com/svn/trunk/
|
Check_handin.pl is there,so is the quests folder (i know all the proper foldrs and stuff are there too but there may be a few things missing, if i resource will i have to do anything else to make it work (like copy any files anywhere) or is it pretty immediate?
Btw thanks for all your advice so far. =] i appreciate all feedback.
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) {
if ($required{$req} < $hashref->{$req}) {
$hashref->{$req} -= $required{$req};
} else {
delete $hashref->{$req};
}
}
return 1;
}
sub return_items {
my $hashref = shift;
my $client = plugin::val('client');
foreach my $k (keys(%{$hashref}))
{
next if($k == 0);
my $r;
for($r = 0; $r < $hashref->{$k}; $r++)
{
if ($client)
{
my $Attuneable = $client->GetItemStat($k, "attuneable");
if ($Attuneable == 1)
{
# If the item is attuneable, return it as attuned
$client->SummonItem($k, 0, 1);
}
else
{
quest::summonitem($k, 0);
}
}
else
{
# This shouldn't be needed, but just in case
quest::summonitem($k, 0);
}
}
delete $hashref->{$k};
}
}
1;