|  |  | 
 
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  |  |  |  
  |  | 
	
		
   
   
      | Quests::Custom Custom Quests here |  
	
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				05-18-2011, 05:24 AM
			
			
			
		 |  
	| 
		
			
			| Fire Beetle |  | 
					Join Date: Jan 2006 
						Posts: 16
					      |  |  
	| 
				 delevel quest 
 here is a deleveler quest i made that I put on on my server, thought I would share it incase people wanted it.  It saves your exact xp so when you return to your old level, you be right where you were, instead of at start of that level.  it also records the xp you start at when you delevel so as you gain xp the difference is recorded and than when you go back to your original level, that difference will be added to your real exp 
the npc doesnt exactly tell you what to say but its pretty obvious, when she asks a question just say yes, than when she asks for a level, type the level # for example 10, if you want to delevel to 10.
 
I have also included delay variables that delete themselves, this is incase you hailed but didnt want to delevel, if you dont answer yes or a level # in a certain period of time you have to hail her again, there is no limit to how long you can stay deleveled tho
 
	Code: sub EVENT_SAY
{
	if($status>=0)
	{
		if($text=~/yes/i && defined($qglobals{oldlevel}) && $qglobals{oldlevel} eq "hailed")
		{
			quest::setglobal("oldlevel","Said Yes",4,"S30");
			$client->Message(13,"ok please note that any pets or buffs you currently have will be
			removed but you can recast them after your level goes down");
			$client->Message(5,"you can change your mind if you want, if your ready to proceed just
			tell me what level you want to be set to");
		}
		elsif($text>0 && $text<$ulevel && $qglobals{oldlevel} eq "Said Yes")
		{
			quest::setglobal("oldlevel",$ulevel,4,"F");
			$client->Duck();
			#$client->Message(13,$client->GetEXP());
			quest::setglobal("oldexp",$client->GetEXP(),4,"F");
			quest::selfcast(1285);
			quest::selfcast(331);
			quest::selfcast(1792);
			quest::level($text);
			quest::setglobal("earnedexp",$client->GetEXP(),4,"F");
			$client->Stand();
		}
		elsif($qglobals{oldlevel} eq "Said Yes" && ($text<1 || $text>$ulevel) && !($text=~/hail/i))
		{
			$client->Message(13,"sorry that is not possible");
			quest::delglobal("oldlevel");
		}
		elsif(defined($qglobals{oldlevel}) && $ulevel<$qglobals{oldlevel} && $text=~/hail/i)
		{
			$originallevel=$qglobals{oldlevel};
			$client->Message(5,"Do you wish to restore your level back to $originallevel ?");
		}
		elsif(defined($qglobals{oldlevel}) && $ulevel<$qglobals{oldlevel} && $text=~/yes/i)
		{
			#quest::level($qglobals{oldlevel});
			$addedexp=$client->GetEXP()-$qglobals{earnedexp};
			$client->SetEXP($qglobals{oldexp},0,0);
			$originallevel=$qglobals{oldlevel};
			$client->Message(15,"You earned $addedexp XP while deleveled, I will add this to your real level");
			$client->AddEXP($addedexp);
			quest::delglobal("oldlevel");
			quest::delglobal("oldexp");
		}
		elsif($text=~/hail/i)
		{
			$client->Message(5,"Greetings $name, would you like to de-level yourself so you can
			play with your friends that may be a lower level than you?  You can return
			to your original level at any time");
			quest::setglobal("oldlevel","hailed",4,"S10");
		}
		elsif(!defined($qglobals{oldlevel}))
		{
			$client->Message(13,"if you where talking to me, You took to long to decide");
			$client->Message(13,"You will need to hail me again if you want to delevel");
		} 
	}
	else
	{
		$client->Message(10,"currently this function is in testing, you must be a GM to use it.");
	}
}
			
			
			
			
				  |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				10-07-2011, 11:56 AM
			
			
			
		 |  
	| 
		
			
			| Sarnak |  | 
					Join Date: Aug 2005 
						Posts: 64
					      |  |  
	| 
 Is the point of a de-level NPC to allow you to "mentor" those you're grouping with of low level?  What happens to attuned armor that has a recc lvl on it? |  
	
		
	
	
 
  |  |  |  |  
	| 
			
			 
			
				10-07-2011, 03:20 PM
			
			
			
		 |  
	| 
		
			
			| Fire Beetle |  | 
					Join Date: Jan 2006 
						Posts: 16
					      |  |  
	| 
 
	Quote: 
	
		| 
					Originally Posted by Baruuk  Is the point of a de-level NPC to allow you to "mentor" those you're grouping with of low level?  What happens to attuned armor that has a recc lvl on it? |  yes its basically used to group with lower levels, but you could just use it for yourself so you can fight weaker enemies, the xp you earn is added to your real xp when you return to your real level without any penalties,  for example in EverQuest 2, which i based this "mentor" script you will earn xp at your mentored level but only a % of it depending of how far you lower your level, since its easier to fight weaker enemies than stronger ones, even if your level is lowered.  I made this quite a while ago and have not really made any changed to it but I am thinking of adding a % penalty like they do in everquest 2
 
I am not sure what happens to armor or weapons that have recommended/required level on them, havent really tested it with those types of items |  
 
  |  |  |  |  
	
		
	
	
	| 
			
			 
			
				10-07-2011, 03:46 PM
			
			
			
		 |  
	| 
		
			
			| Fire Beetle |  | 
					Join Date: Aug 2011 
						Posts: 13
					      |  |  
	| 
 Ty for this. I like the idea behind it and will probably be using it   |  
	
		
	
	
	| 
			
			 
			
				10-07-2011, 05:05 PM
			
			
			
		 |  
	| 
		
			|  | Demi-God |  | 
					Join Date: Mar 2009 Location: Umm 
						Posts: 1,492
					      |  |  
	| 
 when your lev goes down, item with req level from above, simply stop contributing to your char. In case of weapons, you will start receiving message like "you unable to hit your target", until you unequip that weapon |  
	
		
	
	
	| 
			
			 
			
				10-11-2011, 11:29 AM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: May 2010 
						Posts: 105
					      |  |  
	| 
 I am testing this guy on my server, if you say "yes" immediately, he still says  I took too long to decide. |  
	
		
	
	
	| 
			
			 
			
				10-12-2011, 10:43 AM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: May 2010 
						Posts: 105
					      |  |  
	| 
 I dont see a time element in there anywhere? Anyone? |  
	
		
	
	
	| 
			
			 
			
				10-12-2011, 10:57 AM
			
			
			
		 |  
	| 
		
			
			| Dragon |  | 
					Join Date: May 2010 
						Posts: 965
					      |  |  
	| 
 when you do the initial hail and he asks you if you want to delevel is sets a a variable for 10 seconds
 quest::setglobal("oldlevel","hailed",4,"S10");
 
 did you remember to turn on qglobals for the NPC?
 |  
	
		
	
	
	| 
			
			 
			
				10-12-2011, 11:14 AM
			
			
			
		 |  
	| 
		
			
			| Hill Giant |  | 
					Join Date: May 2010 
						Posts: 105
					      |  |  
	| 
 how do you do that? |  
	
		
	
	
	| 
			
			 
			
				10-12-2011, 04:49 PM
			
			
			
		 |  
	| 
		
			|  | Hill Giant |  | 
					Join Date: Aug 2010 Location: UT 
						Posts: 215
					      |  |  
	| 
 It is in the npc_types table, set the qglobal column to 1 for the NPC running the Perl script. |  
	
		
	
	
	
	
	| 
	|  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 06:19 PM.
 
 |  |  
    |  |  |  |  
    |  |  |  |  
     |  |  |  |  
 |  |