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


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