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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2017, 03:34 AM
Baelu
Sarnak
 
Join Date: Jun 2017
Posts: 30
Default Little help please?

Really not sure what I did wrong here. Sorry if its something stupid lol, im still learning.

Npc isnt responding to anything.

Code:
sub EVENT_SAY {
    if($text=~/hail && $ulevel <= 50) {
        plugin::Whisper("Welcome $name! here is your  " . quest::saylink("reward", 1) . " !");
		quest::level(51);
		quest::scribespells(51, 1);
		quest::traindiscs(51, 1);
		$client->SetAAPoints(50);
    }elsif($text=~/hail && $ulevel >= 51) {
        plugin::Whisper("Hello $name! Need some  " . quest::saylink("information", 1) . " ?");
	} elsif($text=~/reward/i) {
        plugin::Whisper("This server is 51 / 50, plus much more! Would you like some  " . quest::saylink("information", 1) . "?");
    } elsif($text=~/information/i) {
        plugin::Whisper("Would you like info on   " . quest::saylink("files", 1) . " , " . quest::saylink("website", 1) . " , or the  " . quest::saylink("basics", 1) . " ?");
	} elsif($text=~/website/i) {
        plugin::Whisper("It is currently under cunstruction, patience please!");
	} elsif($text=~/files/i) {
        plugin::Whisper("All required files can be found on the server  " . quest::saylink("website", 1) . " !");
	} elsif($text=~/basics/i) {
        plugin::Whisper("Very well! Hmm lets see, right! I would say your first question would be where to get yourself 
		some  " . quest::saylink("equipment", 1) . " ?");
		} elsif($text=~/equipment/i) {
        plugin::Whisper("Well your not going to find much of use without craftsmenship! Items found on your adeventures will be standard and protective. The trick is to use 
		augmentation, you see! Most items you find can also be improved from their quality, such as from low to high. Now if you want to create truly powerful items, you my friend would 
		need to use  " . quest::saylink("tradeskills", 1) . " .");
		} elsif($text=~/tradeskills/i) {
        plugin::Whisper("Oh yes! You can take items that are low quality and improve them to fine! Or use materials to create something from scratch! Crafted items will surely prove better 
		than anything found on your adventures! Just make sure to save anything found along the way! Oh yes, there is plenty more! From making your own food and drinks, to making 
        great potions, or exquisite jewlery there is something for everyone! Now one last  " . quest::saylink("tip", 1) . " .");
		} elsif($text=~/tip/i) {
        plugin::Whisper("Explore! Talk to those you see, most items you need to survive can be found, for a price. Seek companionship, you will eventually need some assistance. And most importantly, have fun!");
	}
	}

sub EVENT_SPAWN {
    plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}

sub EVENT_ITEM {
  plugin::return_items(\%itemcount);
Reply With Quote
  #2  
Old 06-18-2017, 03:08 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

perl -c script_name.pl

Do the above to check your scripts (syntax).

On a phone at the moment, though first thing that sticks out is a missing curly (closed) at the end of your EVENT_ITEM subroutine.
Reply With Quote
  #3  
Old 06-18-2017, 08:41 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

I forgot to come back to this thread when I got home. Try this:

Code:
sub EVENT_SPAWN {
	plugin::SetMobColor(quest::ChooseRandom(0..255), quest::ChooseRandom(0..255), quest::ChooseRandom(0..255));
}

sub EVENT_SAY {
	if ($text=~/Hail/i) {
		if ($ulevel <= 50) {
			plugin::Whisper("Welcome $name! here is your  ".quest::saylink("reward", 1)." !");
			quest::level(51);
			quest::scribespells(51, 1);
			quest::traindiscs(51, 1);
			$client->SetAAPoints(50);
		} else {
			plugin::Whisper("Hello $name! Need some  ".quest::saylink("information", 1)." ?");
		}
	}
	elsif($text=~/reward/i) {
        plugin::Whisper("This server is 51 / 50, plus much more! Would you like some  ".quest::saylink("information", 1)."?");
	}
	elsif($text=~/information/i) {
        plugin::Whisper("Would you like info on   ".quest::saylink("files", 1)." , ".quest::saylink("website", 1)." , or the  ".quest::saylink("basics", 1)." ?");
	} 
	elsif($text=~/website/i) {
        plugin::Whisper("It is currently under cunstruction, patience please!");
	} 
	elsif($text=~/files/i) {
        plugin::Whisper("All required files can be found on the server  ".quest::saylink("website", 1)." !");
	} 
	elsif($text=~/basics/i) {
        plugin::Whisper ("Very well! Hmm lets see, right! I would say your first question would be where to get yourself some  ".quest::saylink("equipment", 1)." ?");
	} 
	elsif($text=~/equipment/i) {
        plugin::Whisper("Well your not going to find much of use without craftsmenship! Items found on your adeventures will be standard ".
						"and protective. The trick is to use augmentation, you see! Most items you find can also be improved from their quality, such as ".
						"from low to high. Now if you want to create truly powerful items, you my friend would need to use  ".quest::saylink("tradeskills", 1)." .");
	} 
	elsif($text=~/tradeskills/i) {
        plugin::Whisper("Oh yes! You can take items that are low quality and improve them to fine! Or use materials to create something from ".
						"scratch! Crafted items will surely prove better than anything found on your adventures! Just make sure to save anything found along ".
						"the way! Oh yes, there is plenty more! From making your own food and drinks, to making great potions, or exquisite jewlery there is ".
						"something for everyone! Now one last  ".quest::saylink("tip", 1)." .");
	} 
	elsif($text=~/tip/i) {
        plugin::Whisper("Explore! Talk to those you see, most items you need to survive can be found, for a price. Seek companionship, you will".
						"eventually need some assistance. And most importantly, have fun!");
	}
}

sub EVENT_ITEM {
	plugin::return_items(\%itemcount);
}
Untested because I'm lazy.
Reply With Quote
  #4  
Old 06-18-2017, 09:53 PM
Baelu
Sarnak
 
Join Date: Jun 2017
Posts: 30
Default

Works flawlessly, thank you!
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 02:38 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