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-05-2020, 10:07 PM
Liontooth
Fire Beetle
 
Join Date: Dec 2020
Posts: 22
Default Broke a few quests

So this is my first attempt at coding anything in a couple years and it appears I have lost my touch a bit lol. Have broke 3 quests apparently, not working at all.
First one is a quest thats not getting any responses to anything said at all. 2nd and 3rd are in my global_player and dont appear to be working. Not quite sure what ive done wrong in these, ive tested and modified multiple times and just cant quite figure it out, any help would be great!

Code:
sub EVENT_SAY {
	if($text=~/hail/i) {
		if (defined $qglobals{"Odese"} && $qglobals{"Odese"} >= 3) {
			plugin::Whisper("How did you get here?! Begone!");
		quest::zone("freeporttemple");
		} elsif (defined $qglobals{"Odese"} && $qglobals{"Odese"} == 2) {
            plugin::Whisper("Are you " . quest::saylink("ready", 1) . " to start your adventure?");
		} else {
			plugin::Whisper("Thank the Gods you have awoke $name! We must be quick, we haven't much " . quest::saylink("time", 1) . " !");
		quest::setglobal("Odese", 1, 5, "F");
		}
	elsif(($text=~/time/i) {
	plugin::Whisper("Discord is rising! Norrath is being " . quest::saylink("exterminated", 1) . " . as we speak!");
	quest::setglobal("Hardmode", 1, 5, "F");
	}
	elsif(($text=~/exterminated/i) {
	plugin::Whisper("Many braves souls have been lost. Fortunately I was able to create a barrier to surround our great temple, giving Norrath one final chance! But alas, my " . quest::saylink("power", 1) . " is draining.");
	}
	elsif($text=~/power/i) {
	plugin::Whisper("I created this void to bring me the most powerful Norrath had to offer. You $name , are here by tasked with saving Norrath! Will you " . quest::saylink("accept", 1) . " ?");
	}
	elsif($text=~/accept/i) {
	plugin::Whisper("Fantastic! Hold still as I empower you!");
	quest::Setlevel(51);
	quest::setaa(50);
	quest::setglobal("Odese", 2, 5, "F");
	}
	elsif($text=~/ready/i) && (defined $qglobals{"Odese"} && $qglobals{"Odese"} == 2) {
	plugin::Whisper("Good Luck!");
quest::setglobal("Odese", 3, 5, "F");
quest::zone("freeporttemple");
	}
		}
	}
2nd
Code:
sub EVENT_LEVEL_UP {
    if (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 1) && ($ulevel <= 60) { {
		$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, 62, 70 .. 74, 76, 77 ) {
			next unless $client->CanHaveSkill($skill);
			my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
			next unless $maxSkill > $client->GetRawSkill($skill);
			$client->SetSkill( $skill, $maxSkill );
		}
				 elsif (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 4) && ($ulevel == 75) { {
		$client->Message( 15, "You have completed Hardmode! Congratulations here is your reward!" );
		quest::summonitem();
		quest::setglobal("Hardmode", 5, 5, "F");
				 }
}
	}
3rd
Code:
	sub EVENT_DEATH {
      my $CorpseCount = 0;
  my $charid = $client->CharacterID();
	if (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 4) && ($ulevel <= 69) { {
		quest::setlevel(51);
		$client->Message( 15, "Hardmode Enabled. Your level and skills have reset as punishment for your death!" );
		# set all available skills to maximum for race/class at current level
		foreach my $skill ( 0 .. 42, 48 .. 54, 62, 70 .. 74, 76, 77 ) {
			next unless $client->CanHaveSkill($skill);
			my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
			next unless $maxSkill > $client->GetRawSkill($skill);
			$client->SetSkill( $skill, $maxSkill );
		my $corpse = $entity_list->GetCorpseByOwner($client);
      $client->Message(15,"Your corpse has been removed.");
      $corpse->Delete();
		}
		 elsif (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 4) && ($ulevel >= 70) { {
		quest::setlevel(70);
		$client->Message( 15, "Hardmode Enabled. Your level and skills have reset as punishment for your death!" );
		# set all available skills to maximum for race/class at current level
		foreach my $skill ( 0 .. 42, 48 .. 54, 62, 70 .. 74, 76, 77 ) {
			next unless $client->CanHaveSkill($skill);
			my $maxSkill = $client->MaxSkill( $skill, $client->GetClass(), $ulevel );
			next unless $maxSkill > $client->GetRawSkill($skill);
			$client->SetSkill( $skill, $maxSkill );
				my $corpse = $entity_list->GetCorpseByOwner($client);
      $client->Message(15,"Your corpse has been removed.");
      $corpse->Delete();
		}
				 elsif (defined $qglobals{"Hardmode"} && $qglobals{"Hardmode"} == 5) && ($ulevel == 75) { {
		$client->Message( 15, "Hardmode Enabled. As a reward for completing Hardmode, your punishment is waved!" );
		}
}
	}
	sub COUNT_CORPSES {
  my @corpse_list = $entity_list->GetCorpseList();
  my $count = 0;
  foreach $corpse_found (@corpse_list) {
    if ($corpse_found->GetOwnerName() eq $client->GetName()) {
      $count++;
    }
  }
  $count;
}
 }
	}
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 10:01 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