Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2011, 05:24 AM
rdurbin
Fire Beetle
 
Join Date: Jan 2006
Posts: 16
Default 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.");
	}
}
Reply With Quote
  #2  
Old 10-07-2011, 11:56 AM
Baruuk
Sarnak
 
Join Date: Aug 2005
Posts: 64
Default

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?
Reply With Quote
  #3  
Old 10-07-2011, 03:20 PM
rdurbin
Fire Beetle
 
Join Date: Jan 2006
Posts: 16
Default

Quote:
Originally Posted by Baruuk View Post
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
Reply With Quote
  #4  
Old 10-07-2011, 03:46 PM
BooPlumb
Fire Beetle
 
Join Date: Aug 2011
Posts: 13
Default

Ty for this. I like the idea behind it and will probably be using it
Reply With Quote
  #5  
Old 10-07-2011, 05:05 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

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
Reply With Quote
  #6  
Old 10-11-2011, 11:29 AM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

I am testing this guy on my server, if you say "yes" immediately, he still says I took too long to decide.
Reply With Quote
  #7  
Old 10-12-2011, 10:43 AM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

I dont see a time element in there anywhere? Anyone?
Reply With Quote
  #8  
Old 10-12-2011, 10:57 AM
sorvani
Dragon
 
Join Date: May 2010
Posts: 966
Default

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?
Reply With Quote
  #9  
Old 10-12-2011, 11:14 AM
bodi
Hill Giant
 
Join Date: May 2010
Posts: 105
Default

how do you do that?
Reply With Quote
  #10  
Old 10-12-2011, 04:49 PM
revloc02c's Avatar
revloc02c
Hill Giant
 
Join Date: Aug 2010
Location: UT
Posts: 215
Default

It is in the npc_types table, set the qglobal column to 1 for the NPC running the Perl script.
Reply With Quote
Reply


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 02:11 PM.


 

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