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

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

Reply
 
Thread Tools Display Modes
  #16  
Old 12-08-2020, 02:22 PM
Liontooth
Fire Beetle
 
Join Date: Dec 2020
Posts: 22
Default

Ah ok I see that now looking at yours. Yeah I've been putting lua off trying to get perl down first, but honestly probably should just start learning lua lol. Thanks for the help and the patience still self teaching myself thru this stuff lol
Reply With Quote
  #17  
Old 12-08-2020, 02:24 PM
Liontooth
Fire Beetle
 
Join Date: Dec 2020
Posts: 22
Default

Also is it 2 brackets due to 2 parenthesis?
Reply With Quote
  #18  
Old 12-08-2020, 07:30 PM
Sturm
Hill Giant
 
Join Date: Dec 2015
Posts: 116
Default

LUA sucks. Perl for LYFE!

~drops mic~
__________________
Developer of the Imperium Server.
https://imperium-eq.com/
Reply With Quote
  #19  
Old 12-09-2020, 12:03 AM
Liontooth
Fire Beetle
 
Join Date: Dec 2020
Posts: 22
Default

Unfortunately neither one of these will work. Going to just drop my whole global_player here, hopefully someone will see the issue as im having no luck. Not getting any skills up when leveling and not getting reset upon death when hardmode global is active.

The Level Up and Death Events are what im trying to get working, just for reference.


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");
    }
}


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 waived!" );
    }
}

	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;
}
 }
	
	
sub EVENT_ENTERZONE { #message only appears in Cities / Pok and wherever the Wayfarer Camps (LDON) is in.  This message won't appear in the player's home city.
  if($ulevel >= 76 && !defined($qglobals{Wayfarer})) {
    if($client->GetStartZone()!=$zoneid && ($zoneid == 1 || $zoneid == 2 || $zoneid == 3 || $zoneid == 8 || $zoneid == 9 || $zoneid == 10 || $zoneid == 19 || $zoneid == 22 || $zoneid == 23 || $zoneid == 24 || $zoneid == 29 || $zoneid == 30 || $zoneid == 34 || $zoneid == 35 || $zoneid == 40 || $zoneid == 41 || $zoneid == 42 || $zoneid == 45 || $zoneid == 49 || $zoneid == 52 || $zoneid == 54 || $zoneid == 55 || $zoneid == 60 || $zoneid == 61 || $zoneid == 62 || $zoneid == 67 || $zoneid == 68 || $zoneid == 75 || $zoneid == 82 || $zoneid == 106 || $zoneid == 155 || $zoneid == 202 || $zoneid == 382 || $zoneid == 383 || $zoneid == 392 || $zoneid == 393 || $zoneid == 408)) {
	  $client->Message(15,"A mysterious voice whispers to you, 'If you can feel me in your thoughts, know this -- something is changing in the world and I reckon you should be a part of it. I do not know much, but I do know that in every home city and the wilds there are agents of an organization called the Wayfarers Brotherhood. They are looking for recruits . . . If you can hear this message, you are one of the chosen. Rush to your home city, or search the West Karanas and Rathe Mountains for a contact if you have been exiled from your home for your deeds, and find out more. Adventure awaits you, my friend.'");
	}
  }
}

sub EVENT_COMBINE_VALIDATE {
	# $validate_type values = { "check_zone", "check_tradeskill" }
	# criteria exports:
	#	"check_zone"		=> zone_id
	#	"check_tradeskill"	=> tradeskill_id (not active)
	if ($recipe_id == 10344) {
		if ($validate_type =~/check_zone/i) {
			if ($zone_id != 289 && $zone_id != 290) {
				return 1;
			}
		}
	}
	
	return 0;
}

sub EVENT_COMBINE_SUCCESS {
    if ($recipe_id =~ /^1090[4-7]$/) {
        $client->Message(1,
            "The gem resonates with power as the shards placed within glow unlocking some of the stone's power. ".
            "You were successful in assembling most of the stone but there are four slots left to fill, ".
            "where could those four pieces be?"
        );
    }
    elsif ($recipe_id =~ /^10(903|346|334)$/) {
        my %reward = (
            melee  => {
                10903 => 67665,
                10346 => 67660,
                10334 => 67653
            },
            hybrid => {
                10903 => 67666,
                10346 => 67661,
                10334 => 67654
            },
            priest => {
                10903 => 67667,
                10346 => 67662,
                10334 => 67655
            },
            caster => {
                10903 => 67668,
                10346 => 67663,
                10334 => 67656
            }
        );
        my $type = plugin::ClassType($class);
        quest::summonitem($reward{$type}{$recipe_id});
        quest::summonitem(67704); # Item: Vaifan's Clockwork Gemcutter Tools
        $client->Message(1,"Success");
    }
}

sub EVENT_CONNECT {
    # the main key is the ID of the AA
    # the first set is the age required in seconds
    # the second is if to ignore the age and grant anyways live test server style
    # the third is enabled
    my %vet_aa = (
        481 => [31536000, 1, 1], ## Lesson of the Devote 1 yr
        482 => [63072000, 1, 1], ## Infusion of the Faithful 2 yr
        483 => [94608000, 1, 1], ## Chaotic Jester 3 yr
        484 => [126144000, 1, 1], ## Expedient Recovery 4 yr
        485 => [157680000, 1, 1], ## Steadfast Servant 5 yr
        486 => [189216000, 1, 1], ## Staunch Recovery 6 yr
        487 => [220752000, 1, 1], ## Intensity of the Resolute 7 yr
        511 => [252288000, 1, 1], ## Throne of Heroes 8 yr
        2000 => [283824000, 1, 1], ## Armor of Experience 9 yr
        8081 => [315360000, 1, 1], ## Summon Resupply Agent 10 yr
        8130 => [346896000, 1, 1], ## Summon Clockwork Banker 11 yr
        453 => [378432000, 1, 1], ## Summon Permutation Peddler 12 yr
        182 => [409968000, 1, 1], ## Summon Personal Tribute Master 13 yr
        600 => [441504000, 1, 1] ## Blessing of the Devoted 14 yr
    );
    my $age = $client->GetAccountAge();
    for (my ($aa, $v) = each %vet_aa) {
        if ($v[2] && ($v[1] || $age >= $v[0])) {
            $client->GrantAlternateAdvancementAbility($aa, 1);
        }
    }
}
Reply With Quote
  #20  
Old 10-01-2021, 05:01 PM
jamemaldonado83
Fire Beetle
 
Join Date: Oct 2021
Posts: 1
Default

Quote:
Where was the missing parenthesis? Whisper and say links work fine and zone working fine. Just the globals,lvl and AA parts dont work, will check the extra bracket and see if that changes anything
Rather than quest::setlvl(51); quest::setaa(50);

Try quest::level(51); $client->AddAAPoints(50);
__________________
Ecologica Medical Spa
Reply With Quote
  #21  
Old 03-08-2022, 04:17 PM
ervinjason12
Fire Beetle
 
Join Date: Mar 2022
Posts: 1
Default

Works all the way up to where he sets level and AA, after that you get the "Awakened" message as if globals didnt set.

And if by some chance you do get him to say "ready" text he will just repeat it everytime you click ready, not sure why it stopped porting.

As far as the "ready" text it seems you can only get him to fire that text if you click a saylink you previously clicked, no clue whats going on here lol.

Code:
sub EVENT_SAY {
	if($text=~/hail/i) {
			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 (defined $qglobals{"Odese"} && $qglobals{"Odese"} == 2) {
            plugin::Whisper("Are you " . quest::saylink("ready", 1) . " to start your adventure?");
		} elsif (defined $qglobals{"Odese"} && $qglobals{"Odese"} >= 3) {
			plugin::Whisper("How did you get here?! Begone!");
			quest::zone("freeporttemple");
		}
	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 surrond 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::setglobal("Odese", 2, 5, "F");
	quest::level(51);
	$client->AddAAPoints(50);
	}
	elsif($text=~/ready/i) {
	plugin::Whisper("Good Luck!");
quest::setglobal("Odese", 3, 5, "F");
quest::zone("freeporttemple");
	}
		}
__________________
Alight Motion APK
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 01:21 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