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
  #5  
Old 04-26-2011, 11:59 AM
Packet's Avatar
Packet
Hill Giant
 
Join Date: Jun 2010
Location: Omicron Percei-8
Posts: 106
Default

SOLVED!


Used an old perl syntax checker ( http://ult-tex.net/tools/ultra/line_count.pl ) and found a few broken statements and typos. I do apologize for wasting you guys time but thanks again for the tips. If you have ANY criticism, that is exactly what I am looking for to broaden my undertanding of perl (which is why I am doing this in the first place). Also, if anyone is interested - $hasitem{} only checks masterslots such as cursor, equipped items and main item slots but it will not check bank or bag slots. Check out the link below if you want to do that... I am going to try it out, hopefully it works out.

http://www.eqemulator.org/forums/showthread.php?t=33018

Couple of things to point out. in the prior script, I used elsif instead of if on everything following } else { if($blah blah.. Didn't like that too much.

Here is the revised version:

Code:
sub EVENT_SPAWN {
        $x = $npc->GetX();
        $y = $npc->GetY();
	$range = 70;
        quest::set_proximity($x - $range, $x + $range, $y - $range, $y + $range);
}

sub EVENT_ENTER {
if($ulevel == 1) {
$n = $client->GetName();
quest::movepc(152, -200, 36, -55, -125);
$client->Message(15, "You have not become attuned yet. Speak with Gharj at the top of the platform.");
}
elsif($hasitem{1079} && $ulevel <= 10) {
$npc->SendAppearanceEffect(180);
quest::doanim(66);
quest::say("Hey, you! $name! Come over here... You cannot use the portal without a [shard]! Come over here!");
}
}


sub EVENT_SAY {
	my $fitem = 9991;
	my $qsitem = 9992;
	my $hitem = 9993;
	my $eitem = 9994;
	my $gitem = 1079;
	my $feitem = 9996;
	my $nitem = 9997;
	my $kitem = 9998;
	my $gritem = 9999;
	my $oitem = 10000;
	my $ritem = 10001;
	my $aitem = 10002;
	my $fvar = quest::saylink("Freeport");
	my $qvar = quest::saylink("Qeynos");
	my $hvar = quest::saylink("Halas");
	my $evar = quest::saylink("Erudin");
	my $gvar = quest::saylink("GreaterFaydark");
	my $fevar = quest::saylink("Felwithe");
	my $nvar = quest::saylink("Neriak");
	my $kvar = quest::saylink("Kaladim");
	my $grvar = quest::saylink("Grobb");
	my $ovar = quest::saylink("Oggok");
	my $rvar = quest::saylink("Rivervale");
	my $akvar = quest::saylink("Akanon");

#removed $text=~/hail/i && ()
if($hasitem{$fitem} || $hasitem{$qsitem} || $hasitem{$hitem} || $hasitem{$eitem} || $hasitem{$gitem} || $hasitem{$feitem} || $hasitem{$nitem} || $hasitem{$kitem} || $hasitem{$gritem} || $hasitem{$oitem} || $hasitem{$ritem} || $hasitem{$aitem})
{
quest::say("You already have a shard. Hand it back to me if you would like to change your destination.");
}
else
{
if($text=~/hail/i) 
{
quest::say("Greetings, $name! I am Thiddian and I have the [shards] necessary for you to travel back home. There are rifts throughout Norrath that only those whom have been attuned can see. Simply walk into one and you can return here.");
}
if($text=~/shard/i) {
quest::doanim(55);
quest::say("Ehhh.. ehm... The shards are what allow us to travel through these soul portals. The thing is, you can only have one. No one has ever stepped into the rift with two shards and I dont think we should try. Anyways, thats enough babbling from me... Please choose your land.");
$client->Message(15, "Select only ONE of the following:");
$client->Message(15, "[$fvar]-[$qvar]-[$hvar]-[$evar]-[$gvar]-[$fevar]-[$nvar]-[$kvar]-[$grvar]-[$ovar]-[$rvar]-[$akvar]");
}
if($text=~/Freeport/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($fitem);
}
if($text=~/Qeynos/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($qsitem);
}
if($text=~/Halas/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($hitem);
}
if($text=~/Erudin/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($eitem);
}
if($text=~/Greater/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($gitem);
}
if($text=~/Felwithe/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($feitem);
}
if($text=~/Neriak/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($nitem);
}
if($text=~/Kaladim/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($kitem);
}
if($text=~/Grobb/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($gritem);
}
if($text=~/Oggok/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($oitem);
}
if($text=~/Rivervale/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($ritem);
}
if($text=~/anon/i) {
##quest::say($hresp);
quest::doanim(67);
$npc->SendAppearanceEffect(180);
quest::summonitem($aitem);
}
}
}
__________________
Packet Loss
Current project:
Dark Horizons

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