Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Quests

Archive::Quests Archive area for Quests's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 06-17-2004, 08:38 AM
nadr man
Sarnak
 
Join Date: Feb 2004
Posts: 37
Default

Well, i just did 2 things.

1. I reinstalled perl -- it went in fine.
2. I downloaded quests from quests.eqemulator.net.

At this point, those downloaded quests don't work. Atm i think it's my plugin.pl causing my problem. I'm using the plugin.pl from The Lazy Perl Quest Writer stickied in this forum.

it looks like this:

Quote:
$SERVER="Khalzed-dur";
$version="0.0.1";

@remove=("job","mrace","interest","guild");


#this is the main controller routine for default quests
sub dispatch{
my($pack, $filename, $line, $subr, $has_args, $want_array)=caller(1);

#$debug && quest::say("[debug]in dispatch");
#$debug && quest::say("[debug] package : $pack");
#$debug && quest::say("[debug] subroutine : $subr");

#get all variables in caller's scope
# first, we want to cleanup what was set by previous call
undef $job;
undef $interest;
undef $guild;
undef $mrace;
#$debug=0;

no strict 'refs';
my $package;
($package=$subr) =~ s/::\w+// ;
my $stash = *{$package . '::'}{HASH};
my $n;

foreach $old (@remove){
defined ${$old} && eval { "undef $package"."::"."$old"};
}
foreach $n (keys %$stash) {
my $fullname = $package . '::' . $n;
if( defined $$fullname){
$$n=${$fullname};
# potentially unsafe, don't do :push(@remove,$n); for the moment

#uncomment to get report of what is available
#quest::say("$n -> $$n (eqiv to $fullname)\n");
}
}

$debug && quest::say("checking event");

#this looks for the correct routine to use, based on l=globals and event type
if(defined $subr){
my $event;
if($subr =~ /EVENT_SAY/) { $event="say";}
if($subr =~ /EVENT_SLAY/) { $event="slay";}
if($subr =~ /EVENT_DEATH/) { $event="death";}
if($subr =~ /EVENT_SPAWN/) { $event="spawn";}
if($subr =~ /EVENT_ITEM/) { $event="item";}
if($subr =~ /EVENT_ATTACK/) { $event="attack";}
if($subr =~ /EVENT_WAYPOINT/) { $event="waypoint";}

#now lookup the routine, and return after first match.
#the following assumes npc have a $job, $mrace and $guild global
# This is where precedence takes place :
# first look for an interest oriented event, then a job oriented match,
# then race dependant, then guild ...
# whatever you set as a global category for the mob
# If guild behaviour is more important (or more specific)
# than race or job, for example, move the line up.
# zone usually comes last, as it allows to reproduce the genuine
# 'default.pl' behavior.
# returning ensures you don't get 2,3 or 4 answers for an event

#$debug && showvars();
#$debug && showfuncs();
defined $interest && defined &{"$interest$event"} && &{"$interest$event"} && return;
defined $job && defined &{"$job$event"} && &{"$job$event"} && return;
defined $mrace && defined &{"$mrace$event"} && &{"$mrace$event"} && return;
defined $guild && defined &{"$guild$event"} && &{"$guild$event"} && return;

#eventually revert to the standard per-zone default.pl
defined &{"$zonesn$event"} && &{"$zonesn$event"} && return;

# we came here if there was no match (i.e. no specific routine
# for that event)
# do nothing then ? or ...
defined &{"default$event"} && &{"default$event"} && return;
}

#we very unlucky to get here
}


sub showvars{
my($pack, $filename, $line, $subr, $has_args, $want_array)=caller(1);
#get all variables in caller's scope
no strict 'refs';
my $package;
($package=$subr) =~ s/::\w+// ;
my $stash = *{$package . '::'}{HASH};
my $n;
foreach $n (sort keys %$stash) {
my $fullname = $package . '::' . $n;
if( defined $$fullname){
$$n=${$fullname};
#uncomment to get report of what is available
quest::say("$n -> $$n (eqiv to $fullname)");
}else{
#defined &$fullname && quest::say("function $fullname is defined");
if(defined @$fullname){
quest::say(" list \@$fullname : (". join(",",@$fullname) . ")");
}
if(defined %$fullname){
quest::say(" hash \%$fullname : (");
foreach $k ( keys %$fullname){
quest::say(" $k => ${fullname}->{$k} ");
}
quest::say(")");
}
}

}
}

sub showfuncs{
my($pack, $filename, $line, $subr, $has_args, $want_array)=caller(1);
#get all variables in caller's scope
no strict 'refs';
my $package;
($package=$subr) =~ s/::\w+// ;
my $stash = *{$package . '::'}{HASH};
my $n;
foreach $n (sort keys %$stash) {
my $fullname = $package . '::' . $n;
defined &$fullname && quest::say("function $fullname is defined");
}
}

#print "starting plugin for $SERVER\n";
This plugin.pl looks like it's made to call 4 categories (job,mrace,interest,guild). From the point of a perl-idiot, this looks like it could be the problem. If this plugin.pl is incorrect, could someone post the contents of theirs?
Reply With Quote
 


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 01:47 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3