nadr man
06-11-2004, 11:14 AM
hey! just got perl installed and everything working, but i logged into my server to find that my quests don't work. Lemme explain my setup..
my everquest directory (my client) is located in D:\Everquest. My Server is at D:\Server-EqEmu. Within D:\Server-EqEmu i have 3 folders. One is D:\Server-EqEmu\Eqemu (this has the world.exe, zone.exe, ect. files). One is D:\Server-EqEmu\mysql (holds the db stuff). And the other is D:\Server-EqEmu\perl (holds perls stuff).
In D:\Server-EqEmu\Eqemu i put the perl58.pl file, but deleted it due to it crashing the zone.exe files. I also put a plugin.pl in this folder...i read this plugin.pl sends the quests to the server (not sure if the plugin.pl is causing a problem, it was sent to me...not sure if i need to edit more than the server name..).
Thing is the quests aren't working. Perl is installed. IO::Scaler is installed. and my quests are in D:\Sever-Eqemu\EQEmu\$EQEmuDir$\Quests. I was unsure why i needed to name the folder $EQEmuDir$, but was told to do so in another post describing the perl system. I have a quest called default.pl in my nexus folder to set the quest for the zone just to test it...
#default.pl
#test quest to make sure quests are working
sub EVENT_SAY {
if($text=~/Hail/i){quest::say("Shhh... I am trying to test out questing!");}
}
simple hail quest.
My zone window:
[Status] CURRENT_ZONE_VERSION: EQEMu 0.5.7-DR3
[Status] Loading Variables
[Status] Loading zone names
[Status] Loading items
[Status] EMuShareMem loaded
[Status] Loading npcs
[Status] Loading npc faction lists
[Status] Loading loot tables
[Status] Loading doors
[Status] Loading guilds
[Status] Loading factions
[Status] Loading corpse timers
[Status] Loading what ever is left
[Status] Loading commands
[Status] command_init(): Warning: Command 'help' defaulting to access level 0!
[Status] command_init(): Warning: Command 'version' defaulting to access level 0
!
[Status] command_init(): Warning: Command 'serversidename' defaulting to access
level 0!
[Status] command_init(): Warning: Command 'loc' defaulting to access level 0!
[Status] command_init(): Warning: Command 'flag' defaulting to access level 0!
[Status] command_init(): Warning: Command 'si' defaulting to access level 0!
[Status] 163 commands loaded
[Status] Loading embedded perl
[Status] Loading perlemb plugins.
[Status] Entering sleep mode
Connected to worldserver: 127.0.0.1:9000
Shows that perl is enabled...
Lastly, i put .pl after my quests (example: 183017.pl would be a filename), but the document itself stays as a text file. I would think it would be a perl file...but either there's something wrong with plugin.pl or there's something wrong with my file setup.
Any help would be great.
command promt:
i enter perl -MCPAN -e shell
i get this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Mark>perl -MCPAN -e shell
Terminal does not support AddHistory.
There seems to be running another CPAN process (pid 1612). Contacting...
Other job not responding. Shall I overwrite the lockfile? (Y/N) [y] y
cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')
cpan>
thinking that's suppose to happen, i enter install IO::Scaler, i get this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Mark>perl -MCPAN -e shell
Terminal does not support AddHistory.
There seems to be running another CPAN process (pid 3872). Contacting...
Other job not responding. Shall I overwrite the lockfile? (Y/N) [y]
cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')
cpan> install IO::Scalar
CPAN: Storable loaded ok
Going to read \.cpan\Metadata
Database was generated on Fri, 11 Jun 2004 19:35:49 GMT
IO::Scalar is up to date.
cpan>
plugin.pl:
$SERVER="Nads_test_area";
$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";
Thanks.
my everquest directory (my client) is located in D:\Everquest. My Server is at D:\Server-EqEmu. Within D:\Server-EqEmu i have 3 folders. One is D:\Server-EqEmu\Eqemu (this has the world.exe, zone.exe, ect. files). One is D:\Server-EqEmu\mysql (holds the db stuff). And the other is D:\Server-EqEmu\perl (holds perls stuff).
In D:\Server-EqEmu\Eqemu i put the perl58.pl file, but deleted it due to it crashing the zone.exe files. I also put a plugin.pl in this folder...i read this plugin.pl sends the quests to the server (not sure if the plugin.pl is causing a problem, it was sent to me...not sure if i need to edit more than the server name..).
Thing is the quests aren't working. Perl is installed. IO::Scaler is installed. and my quests are in D:\Sever-Eqemu\EQEmu\$EQEmuDir$\Quests. I was unsure why i needed to name the folder $EQEmuDir$, but was told to do so in another post describing the perl system. I have a quest called default.pl in my nexus folder to set the quest for the zone just to test it...
#default.pl
#test quest to make sure quests are working
sub EVENT_SAY {
if($text=~/Hail/i){quest::say("Shhh... I am trying to test out questing!");}
}
simple hail quest.
My zone window:
[Status] CURRENT_ZONE_VERSION: EQEMu 0.5.7-DR3
[Status] Loading Variables
[Status] Loading zone names
[Status] Loading items
[Status] EMuShareMem loaded
[Status] Loading npcs
[Status] Loading npc faction lists
[Status] Loading loot tables
[Status] Loading doors
[Status] Loading guilds
[Status] Loading factions
[Status] Loading corpse timers
[Status] Loading what ever is left
[Status] Loading commands
[Status] command_init(): Warning: Command 'help' defaulting to access level 0!
[Status] command_init(): Warning: Command 'version' defaulting to access level 0
!
[Status] command_init(): Warning: Command 'serversidename' defaulting to access
level 0!
[Status] command_init(): Warning: Command 'loc' defaulting to access level 0!
[Status] command_init(): Warning: Command 'flag' defaulting to access level 0!
[Status] command_init(): Warning: Command 'si' defaulting to access level 0!
[Status] 163 commands loaded
[Status] Loading embedded perl
[Status] Loading perlemb plugins.
[Status] Entering sleep mode
Connected to worldserver: 127.0.0.1:9000
Shows that perl is enabled...
Lastly, i put .pl after my quests (example: 183017.pl would be a filename), but the document itself stays as a text file. I would think it would be a perl file...but either there's something wrong with plugin.pl or there's something wrong with my file setup.
Any help would be great.
command promt:
i enter perl -MCPAN -e shell
i get this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Mark>perl -MCPAN -e shell
Terminal does not support AddHistory.
There seems to be running another CPAN process (pid 1612). Contacting...
Other job not responding. Shall I overwrite the lockfile? (Y/N) [y] y
cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')
cpan>
thinking that's suppose to happen, i enter install IO::Scaler, i get this:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Mark>perl -MCPAN -e shell
Terminal does not support AddHistory.
There seems to be running another CPAN process (pid 3872). Contacting...
Other job not responding. Shall I overwrite the lockfile? (Y/N) [y]
cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')
cpan> install IO::Scalar
CPAN: Storable loaded ok
Going to read \.cpan\Metadata
Database was generated on Fri, 11 Jun 2004 19:35:49 GMT
IO::Scalar is up to date.
cpan>
plugin.pl:
$SERVER="Nads_test_area";
$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";
Thanks.