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 04-16-2009, 02:29 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default What's wrong with this quest?

I just modified one of my old quests to work as a teleporter. The npc doesn't respond to hails or when you give him money. I did enable quest globals for him.
Code:
sub EVENT_SAY{
 if ($text=~/hail/i){
 quest::say("Greetings, $name. I have the ability to teleport you to a variety of [zones], but it will cost you 50 platinum for each teleport.");
 }
 if ($text=~/zones/i){
 quest::say("I can send you to [Cazic] Thule, [Cobalt] Scar, [Dawnshroud], [Iceclad], [Twilight] Sea, and [Wakening] Lands. You must have sufficient [credit].");
 }
 if ($text=~/credit/i){
 quest::say("For each platinum you give me, you will earn one credit for teleports. You can also see your current [balance].");
 }
 if ($text=~/balance/i){
 if ($porter >= 1) {
 quest::say("Your current credit is $porter");
 $porter = undef;
}
 else {
 quest::say("You have 0 credit.");
 $porter = undef;
}
}
 if ($text=~/cazic/i){
 if ($porter >= 50) {
 quest::setglobal("porter", $porter-50, 0, "Y9");
 quest::say("Farewell");
 quest::selfcast(1375)
 $porter = undef;
}
else {
quest::say("You need more credits!");
$porter = undef;
	}
}


if ($text=~/cobalt/i){
 if ($porter >= 50) {
 quest::setglobal("porter", $porter-50, 0, "Y9");
 quest::say("Farewell");
 quest::selfcast(2025)
 $porter = undef;
}
else {
quest::say("You need more credits!");
$porter = undef;
	}
}


if ($text=~/dawnshroud/i){
 if ($porter >= 50) {
 quest::setglobal("porter", $porter-50, 0, "Y9");
 quest::say("Farewell");
 quest::selfcast(2431)
 $porter = undef;
}
else {
quest::say("You need more credits!");
$porter = undef;
	}
}


if ($text=~/iceclad/i){
 if ($porter >= 50) {
 quest::setglobal("porter", $porter-50, 0, "Y9");
 quest::say("Farewell");
 quest::selfcast(2022)
 $porter = undef;
}
else {
quest::say("You need more credits!");
$porter = undef;
	}
}


if ($text=~/twilight/i){
 if ($porter >= 50) {
 quest::setglobal("porter", $porter-50, 0, "Y9");
 quest::say("Farewell");
 quest::selfcast(2426)
 $porter = undef;
}
else {
quest::say("You need more credits!");
$porter = undef;
	}
}


if ($text=~/wakening/i){
 if ($porter >= 50) {
 quest::setglobal("porter", $porter-50, 0, "Y9");
 quest::say("Farewell");
 quest::selfcast(2024)
 $porter = undef;
}
else {
quest::say("You need more credits!");
$porter = undef;
	}
}
}

sub EVENT_ITEM {
if($platinum >= 1){
  	quest::setglobal("porter", $porter+$platinum, 0, "Y9");
	quest::say("Your credit has risen.");
	$porter = undef;
	}
else {
	quest::say("I only take platinum.");
	$porter = undef;
    plugin::return_items(\%itemcount);
    }
}
Reply With Quote
  #2  
Old 04-16-2009, 03:09 PM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Did you reload the quests?
Reply With Quote
  #3  
Old 04-16-2009, 03:17 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default

You are missing a ; after each occurrence of quest::selfcast
Reply With Quote
  #4  
Old 04-16-2009, 04:35 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

thank you, that's what I get for copy/pasting.
Reply With Quote
  #5  
Old 04-16-2009, 08:03 PM
Justsomeguy
Fire Beetle
 
Join Date: Apr 2005
Posts: 7
Default

hashes are now used instead of the old $porter restricted vars. Consider using $qglobals{porter} as the old method is deprecated. Using the new way does not require you to use all of the $porter = undef; as there are many potential errors when using that.

example:

Code:
 if ($qglobals{porter} >= 50) {
Reply With Quote
  #6  
Old 04-17-2009, 12:55 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Ok, I have a new problem. I am trying to make a quest that checks the persons class. I have tried all formats I can think of and it will not check the class properly. Right now it is just an extremely simple quest because I am trying to figure out what's wrong with it. Knowing me, I probably just have something out of order.

Code:
sub EVENT_SAY{
 if ($text=~/hail/i){
  if ($class == "shadowknight"){
  quest::say("Hello.");
  }
 }
}
For the class I have also tried
if ($class = "shadowknight"){
if ($class = 'shadowknight'){
if ($class == 'shadowknight'){
if ($class eq "shadowknight"){
if ($class eq 'shadowknight'){
Reply With Quote
  #7  
Old 12-30-2009, 01:44 PM
Thovar
Sarnak
 
Join Date: Nov 2009
Posts: 41
Default

Quote:
Originally Posted by Derision View Post
You are missing a ; after each occurrence of quest::selfcast
Funny how this solved my problem and didn't realize this WAS the problem I was having. when I saw this posted I looked through my quest I was having an issue with and i as well was missing that silly little ; at the end of one of my many lines in this quest, and all along I thought I had a more complicated problem. ROFL... silly Monday details.
__________________
~Thovar
GM of http://www.beradingoldbeard.info/
Reply With Quote
Reply

Thread Tools
Display Modes

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:45 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