Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 05-11-2011, 06:42 PM
rdurbin
Fire Beetle
 
Join Date: Jan 2006
Posts: 16
Default deleveler npc question

here is a script i made for deleveling, but is there a way to get your current xp before deleveling? there two reasons I want this

1)if your halfway to say 20 and you delevel to 5, than go back you will start at the start of level 19...
2)I would like a way to add the xp you earned while deleveling and add it to your current real level when you go back to your level (probably with a penalty like they do in eq2)

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();
			quest::selfcast(1285);
			quest::selfcast(331);
			quest::selfcast(1792);
			quest::level($text);
			$client->Stack();
		}
		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});
			$originallevel=$qglobals{oldlevel};
			$client->Message(5,"Ok you are now restored to your old level of $originallevel");
			quest::delglobal("oldlevel");
		}
		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
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 05:42 AM.


 

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