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

Quests::Custom Custom Quests here

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 04-17-2008, 10:38 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Here is an example of my experience and leveling quests. The leveling portion uses quest globals to keep track of player levels. IMO, that is a good way to do it and be able to keep track of player levels. Otherwise if you have issues with leveling later, you can always check to see what level the player is supposed to be by checking the quest global. You should be able to reference this quest to find out anything you need for leveling and exp quests.

Code:
sub EVENT_SAY {
if($text=~/hail/i)
{
quest::say("Hello, $name.  I am a card collector and am willing to trade my personal experience for cards.  If you have [minor], [godly] or the normal [card] of experience, I may be able to make a trade with you. I can also [return] your level if you have the correct status with me.");
}
if (($text =~/minor/i)&&($ulevel <= 44))
{
quest::say ("You must gain more experience before you can turn in this type of card to me.  I hear they are attained in the Plane of Earth B.");
}
if (($text =~/minor/i)&&($ulevel >= 45))
{
quest::say ("If you happen to come across any Cards of Minor Experience, please bring them to me and I will kindly reward you. I am creating a collection and can always use more.  Make sure to hand them to me unstacked.  I hear they are attained in the Plane of Earth B.");
}

if (($text =~/card/i)&&($ulevel <= 64))
{
quest::say ("You must gain more experience before you can turn in this type of card to me.  I hear they are attained in the Plane of Valor.");
}
if (($text =~/card/i)&&($ulevel >= 65))
{
quest::say ("If you happen to come across any Cards of Experience, please bring them to me and I will kindly reward you. I am creating a collection and can always use more.  Make sure to hand them to me unstacked.  You must be 65+ for me to reward you for these cards.");
}

if (($text =~/godly/i)&&($ulevel <= 69))
{
quest::say ("You must gain more experience before you can turn in this type of card to me.  I hear they are attained in the Tower of Solusek Ro.");
}
if (($text =~/godly/i)&&($ulevel >= 70))
{
quest::say ("If you happen to come across any Cards of Godly Experience, please give 4 of them to me at once and I will kindly reward you. I hear they are attained in the Tower of Solusek Ro. Make sure to hand them to me unstacked.");
}
if (($text =~/return/i)&&($ulevel <= 69))
{
quest::say ("You must be at least level 70 for me to provide this service to you!  Return when you have gained more experience.");
}

if (($text =~/return/i)&&($ulevel >= 70)) {

if ($max_level == undef){
    quest::say("You are already at your current maximum level."); }

elsif ($max_level == 71) {
    quest::say("You are now set back to your previous maximum level.");
    quest::level(71);
    $max_level=undef; }

elsif ($max_level == 72) {
    quest::say("You are now set back to your previous maximum level.");
    quest::level(72);
    $max_level=undef; }

elsif ($max_level == 73) {
    quest::say("You are now set back to your previous maximum level.");
    quest::level(73);
    $max_level=undef; }

elsif ($max_level == 74) {
    quest::say("You are now set back to your previous maximum level.");
    quest::level(74);
    $max_level=undef; }

elsif ($max_level == 75) {
    quest::say("You are now set back to your previous maximum level.");
    quest::level(75);
    $max_level=undef; }
    
  }

}

sub EVENT_ITEM {
if ((plugin::check_handin(\%itemcount, 2275=>1))&&($ulevel >= 65)){
    quest::say("I am always looking for more for my collection.");
$client->Message(6, "Maximus Serilious rewards you with experience." );
    quest::exp(9999999); }
    
if ((plugin::check_handin(\%itemcount, 2834=>1))&&($ulevel >= 45)){
    quest::say("I am always looking for more for my collection.");
$client->Message(6, "Maximus Serilious rewards you with experience." );
    quest::exp(2000000); }
  
if (plugin::check_handin(\%itemcount, 2835=>4)) {
    
if ($max_level == undef) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 71, 5, "F");
    quest::level(71);
    $max_level=undef; }
    
elsif ($max_level == 71) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 72, 5, "F");
    quest::level(72);
    $max_level=undef; }
    
elsif ($max_level == 72) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 73, 5, "F");
    quest::level(73);
    $max_level=undef; }
    
elsif ($max_level == 73) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 74, 5, "F");
    quest::level(74);
    $max_level=undef; }
    
elsif ($max_level == 74) {
    quest::say("These are in excellent shape!  They will be trophies in my collection!");
$client->Message(6, "Maximus Serilious rewards you with a new level!" );
$client->Message(15, "You have reached the max level!  Repeating this quest will give no further rewards!" );
    quest::exp(9999999);
    quest::setglobal("max_level", 75, 5, "F");
    quest::level(75);
    $max_level=undef; }

elsif ($max_level == 75) {
    quest::say("You have already reached the max level.  I can no longer reward you for the Cards of Godly Experience.  But if you want to give them to me anyway, I will take them for free. Ha ha ha!");
    quest::level(75);
    $max_level=undef; }
 	
    {
    $max_level=undef;
    }
    
}
   
else {
 	 plugin::return_items(\%itemcount);
	 }
	
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
 


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