| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
		
   
   
      | Quests::Q&A This is the quest support section | 
    
    
   
   
   
   
   
   
   
   
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 02:03 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2004 
					
					
					
						Posts: 62
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				quest::givecash problem
			 
			 
			
		
		
		
		Hi there 
I just wrote the Rat quest of the exterminator in South Qeynos and I have a "display" problem with the quest::givecash(1,1,1,0); 
It works, cuz I give me the money but look :
  
what are those squares :/ ?! :(
 
Thanks
 
McFox  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 06:51 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Banned 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2004 
					Location: Lake Isabella 
					
					
						Posts: 90
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		btw what is the rat quest? can you post it on here? lol on a quest hunt lol 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 09:33 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jun 2004 
					Location: Heaven. 
					
					
						Posts: 1,260
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		try quest::givecash("1", "1", "1", "0"); ? 
		
	
		
		
		
		
		
		
			
				__________________ 
				namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); } 
C++ is wonderful.
			 
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				11-17-2004, 02:24 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2004 
					
					
					
						Posts: 62
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				
			 
			 
			
		
		
		
		
	Quote: 
	
	
		| 
			
				 
					Originally Posted by Cisyouc
					
				 
				try quest::givecash("1", "1", "1", "0"); ? 
			
		 | 
	 
	 
 Same problem :(
 
btw, the full quest :
 
	Code: 
	#################################
#                               #
#    PROJECT THE EMBASSY        #
#                               #
#################################
#    RAT QUEST            #
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#    McFox                      #
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-#
#     newbie Quest          #
#     at South Qeynos.           #
#################################
sub EVENT_SAY
{
    if ($text=~ /Hail/i)
        {
        quest::say("Hello $name, have you seen these pasky rodents? They are everywhere and I simpli cannot stand them! If you are willing to do a little cleaning up of the pests here I will reward you for every four Rat Whiskers you bring me.");
        }
}
sub EVENT_ITEM
{
    if ( ($item1=13071) && ($item2=13071) && ($item3=13071) && ($item4=13071) )
        {
        quest::say("I am very impressed $name, a few more cleaners like yourself and wa could have a rodent free Qeynos in no time!");
        quest::exp(200);
        quest::me("Your faction standing with Guards of Qeynos got better.");
        quest::me("Your faction standing with Antonius Bayle got better.");
        quest::me("Your faction standing with Merchant of Qeynos got better.");
        quest::me("Your faction standing with Corrupt Qeynos Guards got worse.");
        quest::me("Your faction standing with Circle of Unseen Hands got worse.");
        quest::faction(135,7);
        quest::faction(9,5);
        quest::faction(217,5);
        quest::faction(33,-5);
        quest::faction(53,-7);
        quest::givecash("1","1","1","0");
        }             
}
 And the quest::me work as a quest::say... :(
 
[EDIT]
 
Here is my  default.pl :
 
	Code: 
	sub EVENT_SAY{
	$plugin::debug && quest::say("[debug]in qstdefault::EVENT_SAY"); 
	#plugin::showvars();
	plugin::dispatch();
}
sub EVENT_ITEM{
	plugin::dispatch();
}
sub EVENT_DEATH{
	plugin::dispatch();
}
sub EVENT_ATTACK{
	plugin::dispatch();
}
sub EVENT_SPAWN{
	plugin::dispatch();
}
sub EVENT_TIMER{
	plugin::dispatch();
}
sub EVENT_SLAY{
	plugin::dispatch();
}
sub EVENT_WAYPOINT{
	plugin::dispatch();
}
 my plugin.pl :
 
	Code: 
	$SERVER="The Embassy";
$version="0.1";
#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 $n (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)\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();
		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"} && &{"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");
		}	
		
	}
}	
	
#print "starting plugin for $SERVER\n";
 and my commands.pl :
 
	Code: 
	sub commands_init {
        command_add("bank", "- spawn a temporary banker", 200);
        command_add("giveitem", " (itemid) [charges] - give an item to a mob", 200);
}
sub bank {
        #spawn Banker_Javen
        quest::spawn(45054, 0, 0, $client->GetX()+10, $client->GetY(), $client->GetZ());
}
sub giveitem {
        my $item = shift;
        my $charges = 0;
        if(defined($_[0])) {
                $charges = shift;
        }
        my $target = $client->GetTarget();
        if(!$target) {
                $client->Message(13, "Error: You need a target!");
                return;
        } elsif(!$target->IsNPC()) {
                $client->Message(13, "Error: your target must be an NPC!");
                return;
        }
        my $n = $target->CastToNPC();
        $client->Message(0, "Giving item $item to ".$n->GetName());
        $n->AddItem($item, $charges);
}
 The plugin.pl, commands.pl and default.pl have been get on eqemu website/forum  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 02:35 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Discordant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Sep 2004 
					Location: Camp Hill,PA 
					
					
						Posts: 370
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I think the things below for faction are unnecessary: 
	Code: 
	        quest::me("Your faction standing with Guards of Qeynos got better."); 
        quest::me("Your faction standing with Antonius Bayle got better."); 
        quest::me("Your faction standing with Merchant of Qeynos got better."); 
        quest::me("Your faction standing with Corrupt Qeynos Guards got worse."); 
        quest::me("Your faction standing with Circle of Unseen Hands got worse.");
 not entirely sure though, i bet Cisyouc could help  
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 02:38 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2004 
					
					
					
						Posts: 62
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		| 
			
				 
					Originally Posted by mrea
					
				 
				I think the things below for faction are unnecessary: 
	Code: 
	        quest::me("Your faction standing with Guards of Qeynos got better."); 
        quest::me("Your faction standing with Antonius Bayle got better."); 
        quest::me("Your faction standing with Merchant of Qeynos got better."); 
        quest::me("Your faction standing with Corrupt Qeynos Guards got worse."); 
        quest::me("Your faction standing with Circle of Unseen Hands got worse.");
 not entirely sure though, i bet Cisyouc could help  
			
		 | 
	 
	 
 they don't display without :/  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 04:08 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Demi-God 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jun 2004 
					Location: Heaven. 
					
					
						Posts: 1,260
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		| 
			
				 
					Originally Posted by McFox666
					
				 
				
	Quote: 
	
	
		| 
			
				 
					Originally Posted by mrea
					
				 
				I think the things below for faction are unnecessary: 
	Code: 
	        quest::me("Your faction standing with Guards of Qeynos got better."); 
        quest::me("Your faction standing with Antonius Bayle got better."); 
        quest::me("Your faction standing with Merchant of Qeynos got better."); 
        quest::me("Your faction standing with Corrupt Qeynos Guards got worse."); 
        quest::me("Your faction standing with Circle of Unseen Hands got worse.");
 not entirely sure though, i bet Cisyouc could help  
			
		 | 
	 
	 
 they don't display without :/  
			
		 | 
	 
	 
 They should.  
		
	
		
		
		
		
		
		
			
				__________________ 
				namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); } 
C++ is wonderful.
			 
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 04:21 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2004 
					
					
					
						Posts: 62
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		| 
			
				 
					Originally Posted by Cisyouc
					
				 
				
	Quote: 
	
	
		| 
			
				 
					Originally Posted by McFox666
					
				 
				
	Quote: 
	
	
		| 
			
				 
					Originally Posted by mrea
					
				 
				I think the things below for faction are unnecessary: 
	Code: 
	        quest::me("Your faction standing with Guards of Qeynos got better."); 
        quest::me("Your faction standing with Antonius Bayle got better."); 
        quest::me("Your faction standing with Merchant of Qeynos got better."); 
        quest::me("Your faction standing with Corrupt Qeynos Guards got worse."); 
        quest::me("Your faction standing with Circle of Unseen Hands got worse.");
 not entirely sure though, i bet Cisyouc could help  
			
		 | 
	 
	 
 they don't display without :/  
			
		 | 
	 
	 
 They should.  
			
		 | 
	 
	 
 they don't :|  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-17-2004, 10:48 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Old-EQEmu Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Oct 2002 
					Location: Spain 
					
					
						Posts: 323
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		probably argument are not given correctly or the function does not take them correctly. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-18-2004, 04:48 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Sarnak 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Nov 2004 
					
					
					
						Posts: 62
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		| 
			
				 
					Originally Posted by cofruben
					
				 
				probably argument are not given correctly or the function does not take them correctly. 
			
		 | 
	 
	 
 ...?     
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				11-18-2004, 08:27 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Jul 2004 
					
					
					
						Posts: 773
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		the code that prints that stuff out was rewritten a while back (not by me), and was never tested, and obviously dosent work.... 
 
so it will get fixed when one of the devs gets annoyed enough by it to fix it... if somebody were to fix that method in questmgr.cpp and post the fix, it would be much more likely to get fixed faster... 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	
		
	
		 
		Posting Rules
	 | 
 
	
		
		You may not post new threads 
		You may not post replies 
		You may not post attachments 
		You may not edit your posts 
		 
		
		
		
		
		HTML code is Off 
		 
		
	  | 
 
 
	 | 
	
		
	 | 
 
 
All times are GMT -4. The time now is 09:53 AM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |