| 
   | 
   | 
  
 
    | 
    | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
    | 
   | 
    | 
  
 
   | 
  
	
		
   
   
      | Quests::Q&A This is the quest support section | 
    
    
   
   
   
   
   
   
   
   
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				09-20-2009, 01:54 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2006 
					Location: USA 
					
					
						Posts: 5,946
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				
			 
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  nightsta69
					 
				 
				so basically what your saying is, for this to work, I have to go through every zone and place my level up script in each player.pl? that'll completely defeat the purpose of what i'm tryin to do. i'm tryin to make something similar to the achievement styles of wow. including leveling, mob slaying, and several other things, which requires the use of quest globals and things such as this. if I have to put my scripts into each and every zone player.pl, that'll be WAY to much work. is there any way of changing the source to read from both? or what is stopping it from using both scripts? 
			
		 | 
	 
	 
 No, as long as there isn't already a file named player.pl in your zone folders, they will use the one put in the templates folder.  But, again, I think you may need to restart the server for changes to the quest files in the template folder to take effect.  You might want to do a search in your quest folder for any files named player.pl to see if there are any in certain zones you might want to use your system in.  If so, you either need to remove them, or add your script pieces to the existing files there.  
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-20-2009, 02:11 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Legendary Member 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2002 
					Location: Seattle, WA 
					
					
						Posts: 506
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Couldn't you also take the templates/player.pl file and add conditions in each event on the player's location, and if their location match up paste in the /zone/player.pl code? 
  
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-20-2009, 07:07 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  Shin Noir
					 
				 
				Some quest coder should help me out here.. I'm not very familiar with it. :/ but! 
LoadPlayerScript() function in embparser.cpp  
it does this whole..  
	Code: 
	string filename= "quests/";
	filename += zone;
	filename += "/player.pl";
	string packagename = "player";
	packagename += "_";
	packagename += zone; 
  build of the quests\zone\player.pl directory.. tries to eval it 
 
	Code: 
	try {
		perl->eval_file(packagename.c_str(), filename.c_str());
	}
 then if it doesn't load,  
	Code: 
	if(!isloaded(packagename.c_str()))
	{
		filename = "quests/";
		filename += QUEST_TEMPLATES_DIRECTORY;
		filename += "/player.pl";
 try templates. So if I'm not corrected, if a /<zone>/player.pl exists, it stops the parser from loading /templates/player.pl?  
			
		 | 
	 
	 
 curiousity question, if I were to just take this code, and make it so it loads both player.pl, what would be wrong with that?  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-21-2009, 03:16 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		anyone have a solution for this that doesn't involve copying and pasting into the 20 somethin odd player.pl's in the quest folder? and i'm still wondering what would happen if the source was changed to allow to load both, the player.pl's that are in the zone folders, as well as the templates one. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				09-21-2009, 07:31 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Legendary Member 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2002 
					Location: Seattle, WA 
					
					
						Posts: 506
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		I would think modifying the source to incorporate this is going to be more involved than it'd take for ya to just go into..  
acrylia 
airplane 
akanon 
bothunder 
cabeast 
cabwest 
charasis 
dreadlands 
erudnext 
erudnint 
felwithea 
felwitheb 
freporte 
freportn 
gfaydark 
greatdivide 
grobb 
halas 
hatesfury 
kaladima 
kaladimb 
neriakb 
neriakc 
nexus 
northkarana 
oggok 
paineel 
poair 
poinnovation 
pojustice 
potimea 
potimeb 
powater 
qcat 
qey2hh1 
qeynos 
qeynos2 
qrg 
rathemtn 
rivervale 
sharvahl 
skyfire 
solrotower 
templates 
thurgadinb 
tox 
tutorialb 
unrest 
veeshan 
 
and write conditions checking if the player is in the zone for each event, though it's going to take a while.. I dunno. That is a lot of files, heh. 
 
Technically could edit your source to do this non-quest style, but, that's kind of complicated too. As is you're hitting a block with that limitation of player.pl not being ran on templates\ and each zone.. Don't really have an easy solution. It's going to probably be work no matter what. 
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-21-2009, 08:30 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		ok I know that this might seem kinda stupid. but I took this code 
	Code: 
	if(!isloaded(packagename.c_str()))
	{
		filename = "quests/";
		filename += QUEST_TEMPLATES_DIRECTORY;
		filename += "/player.pl";
 and just added this one line
 
	Code: 
	if(!isloaded(packagename.c_str()) || isloaded(packagename.c_str()))
	{
		filename = "quests/";
		filename += QUEST_TEMPLATES_DIRECTORY;
		filename += "/player.pl";
 and compiled and now it reads from both files, and it does what I want it to do now lol. I know thats probably a hack and a half, but it works. i've done some testing with it, and have yet to see anything wrong with it. /shrug.    
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-21-2009, 08:54 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Developer 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Mar 2003 
					
					
					
						Posts: 1,500
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		To test, have both player.pl files have an enter zone event. Have the templates file do some emote "A" and the zone file do some emote "B" and see if both run. That's the only conflict I could think of.. both files having the same event. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-21-2009, 09:07 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		k tried using both sub EVENT_LEVEL_UP and it does the level up from the templates, but NOT from the zone file. so i'm assuming you can't have 2 of the same events, or the one from templates will override the other from the zone. but other then that, I didn't find any other issues. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-21-2009, 09:24 AM
			
			
			
		  
	 | 
 
	
		
		
		
			  | 
			
			
				
				
				 Legendary Member 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Apr 2002 
					Location: Seattle, WA 
					
					
						Posts: 506
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		Also your code above will always return true. 
if(!isloaded(packagename.c_str()) || isloaded(packagename.c_str())) 
 
It's like putting if(1), since you're covering the two possible returns of isloaded(), it can either return 1 (which is on the second half) or 0 (which is on the left half). 
 
But yeah. If you do what you just did, you essentially screw all zone-based player.pl files if it's only working off templates. 
 
I may have to peek and see if I can solve the event handling to execute the two different player files. *shrugs*.. 
		
	
		
		
		
		
		
		
			
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
 
    | 
   | 
    | 
  
 
	
		
		
		
			
			 
			
				09-21-2009, 09:56 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
				 
				
			 
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  Shin Noir
					 
				 
				Also your code above will always return true. 
if(!isloaded(packagename.c_str()) || isloaded(packagename.c_str())) 
 
It's like putting if(1), since you're covering the two possible returns of isloaded(), it can either return 1 (which is on the second half) or 0 (which is on the left half). 
 
But yeah. If you do what you just did, you essentially screw all zone-based player.pl files if it's only working off templates. 
 
I may have to peek and see if I can solve the event handling to execute the two different player files. *shrugs*.. 
			
		 | 
	 
	 
 its still using the zone based files, IE for doors, creating instances, etc etc. only problem is if BOTH the zone, AND the template player.pl has the same event.(IE if both had sub EVENT_LEVEL_UP) then the template will override the zone pl. other then that, the zone pl works as intended. and yea I know i'm basically making it a true statement regardless, my C+ isn't all that great, I was just looking for a work around, and to see if it was even possible.  
		
	
		
		
		
		
		
		
		
		
		
	
		
			
			
			
			
				 
			
			
			
			
			
			
				
			
			
			
		 
		
	
	
	 | 
 
 
 
    | 
   | 
    | 
  
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-22-2009, 11:32 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Fire Beetle 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: Aug 2009 
					Location: LA 
					
					
						Posts: 12
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Quote: 
	
	
		
			
				
					Originally Posted by  nightsta69
					 
				 
				does $client->Message() broadcast worldwide, or just to the client that triggered the event? 
			
		 | 
	 
	 
 The client that triggered.
 
quest::we(type, "message"); should work.  This is world emote.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-22-2009, 11:44 AM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		ah there we go, thats what i've been lookin for, thanx alot. 
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
	
	
		
	
	
	
		
		
		
			
			 
			
				09-22-2009, 01:06 PM
			
			
			
		  
	 | 
 
	
		
		
		
			
			| 
			
				
				
				 Hill Giant 
				
				
				
			 | 
			  | 
			
				
				
					Join Date: May 2005 
					
					
					
						Posts: 134
					 
					
					
					
					     
				 
				
			 | 
		 
		 
		
	 | 
 
	
	
	
		
		
		
			
			
			 
			
		
		
		
		
	Code: 
	sub EVENT_LEVEL_UP {
	my $maxlvl = 75;
	my @classlist = ("Warrior", "Cleric", "Paladin", "Ranger", "ShadowKnight", "Druid", "Monk", "Bard", "Rogue", "Shaman", "Necromancer", "Wizard", "Magician", "Enchanter", "Beastlord", "Berserker");
	foreach my $curclass (@classlist) {
       if(!defined($qglobals{$curclass."maxlvl"}) && $ulevel == $maxlvl && $curclass eq $class) {
			quest::setglobal($curclass."maxlvl",$name,2,"F");
            quest::we(5,"$name has made the server first level $ulevel $class!");
            return;
	   }
	}
}
 here is the completed code for announcments of server first lvl ups. if anyone wants it, have fun! thanks to shin nor and several others in this thread for helping me weed it out, and learn a thing or two!    I plan on adding more custom stuff, as I delve deeper into the learning curve of perl, and C++. thanks again everyone.  
		
	
		
		
		
		
		
		
		
		
		
	
		
		
	
	
	 | 
 
 
	 
	
		 
	 
 
 
	
		
	
	
	
	
	
		
	
		 
		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 08:37 PM. 
 
		 
	 
 
 
     | 
     | 
    
   
      | 
     | 
      | 
    
   
     | 
      | 
     | 
    
   
       | 
      | 
       | 
     
    
    
  | 
   |