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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-24-2021, 11:04 AM
Jorin
Sarnak
 
Join Date: Aug 2018
Posts: 48
Default Custom globalplayer issues, please help

So I have these in my globalplayer.pl And made sure to remove the lua version.

The level up event does the autotrain up to lvl 51 no issues. My problem is its only scribing a few spells not lvl 1 to 51, which is probably pretty simple fix its just frustrated me. But the big issue im having with it is the 2nd part, I made a npc to set my global to Hardmode 1 but when I level up to 70 im not getting the message saying I completed.

Code:
sub EVENT_LEVEL_UP {
    if ($ulevel <= 51) {
		$client->Message( 15, "Your experiences across the realm have infused you with increased power and knowledge..." );
		# set all available skills to maximum for race/class at current level
		foreach my $skill ( 0 .. 42, 48 .. 54, 70 .. 74 ) {
			next unless $client->CanHaveSkill($skill);
			my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
			next unless $maxSkill > $client->GetRawSkill($skill);
			$client->SetSkill( $skill, $maxSkill );
		}
		# scribe all spells for current level
		quest::scribespells( $ulevel, $ulevel - 1 );
		# train all discs for current level
		quest::traindiscs( $ulevel, $ulevel - 1 );
	}
	elsif((defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 1) && ($ulevel == 70)) {
        $client->Message( 15, "You have completed Hardmode! Congratulations here is your reward!" );
        quest::summonitem();
        quest::setglobal("Hardmode", 2, 5, "F");
     } 
	}


The 2nd one im trying to make it reset your level when you die and delete your corpses if Hardmode = 1. It doesnt appear to work at all for some reason.

Code:
sub EVENT_DEATH {
    if((defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 1) && ($ulevel <= 69)) {
        quest::setlevel(51);
        $client->Message( 15, "Hardmode Enabled. Your level and skills have reset as punishment for your death!" );
                my $CorpseCount = 0;
                my $charid = $client->CharacterID();
			my $corpse = $entity_list->GetCorpseByOwner($client);
            $client->Message(15,"Your corpse has been removed.");
            $corpse->Delete();
        }
    elsif((defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 1) && ($ulevel >= 70)) {
        quest::setlevel(70);
          $client->Message( 15, "Hardmode Enabled. Your level and skills have reset as punishment for your death!" );
                my $CorpseCount = 0;
                my $charid = $client->CharacterID();
			my $corpse = $entity_list->GetCorpseByOwner($client);
            $client->Message(15,"Your corpse has been removed.");
            $corpse->Delete();
        }
    elsif((defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 2) && ($ulevel == 75)) {
        $client->Message( 15, "Hardmode Enabled. As a reward for completing Hardmode, your punishment is waved!" );
    }
}

Any insight would be awesome as Ive been messing with these for days and am getting nowhere.
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 06:29 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