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 08-25-2008, 02:54 PM
warsonofrage
Fire Beetle
 
Join Date: Mar 2003
Posts: 22
Default translocator bot

this is a basic translocator bot quest i wrote with the help and some of the code from georges editor. problem is i assign it to an npc and it wont respond to hails. what did i miss?

sub EVENT_SAY
{

if ($text =~/Hail/i)
{
quest::say ("Well hello there $name. Do you want to run away with me? Oh well I bet you want to [go] to the Plane of Knowledge? If you wish it I can send you to [Butcherblock] or [North Ro] ");
}

if ($text =~/go/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(202, -118,-193,-156);
}

if ($text =~/butcherblock/i)
{
quest::say ("Very well $name, to Butcherblock you must go.");
quest::emote ("turns slightly to the left and winks.";
quest::movepc (68, 1355, 3252, 13);
}

if ($text =~/north ro/i)
{
quest::say ("Well if you must go to your death fine I'll not be to blame.");
quest::emote ("sighs as she summons a spinning vortex.";
quest::movepc (34, 790, -923, 2);
}
}
Reply With Quote
  #2  
Old 08-25-2008, 03:50 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

You almost had it - try this one;
Code:
sub EVENT_SAY{
if ($text =~/Hail/i)
{
quest::say ("Well hello there $name. Do you want to run away with me? Oh well I bet you want to [go] to the Plane of Knowledge? If you wish it I can send you to [Butcherblock] or [North Ro] ");
}

if ($text =~/go/i)
{
quest::say ("$name , stand close to me while I cast..");
quest::emote ("moves his hands as if chanting...");
quest::movepc(202, -118,-193,-156);
}

if ($text =~/butcherblock/i)
{
quest::say ("Very well $name, to Butcherblock you must go.");
quest::emote ("turns slightly to the left and winks.");
quest::movepc (68, 1355, 3252, 13);
}

if ($text =~/north ro/i)
{
quest::say ("Well if you must go to your death fine I'll not be to blame.");
quest::emote ("sighs as she summons a spinning vortex.");
quest::movepc (34, 790, -923, 2);
}
}
Reply With Quote
  #3  
Old 08-25-2008, 03:53 PM
warsonofrage
Fire Beetle
 
Join Date: Mar 2003
Posts: 22
Default

thank you very much. still trying to figure out what i missed. gonna cut n paste into notepad till my nose is touching the screen and figure it

ok think i see it....the missed bracket. after winks....would that cause the whole script to not fuction though?
Reply With Quote
  #4  
Old 08-25-2008, 04:11 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Yea, those are basic syntax errors - Try this out, its free and has helped me speed things up a lot. Works with Linux Wine too.
Reply With Quote
  #5  
Old 08-25-2008, 05:05 PM
warsonofrage
Fire Beetle
 
Join Date: Mar 2003
Posts: 22
Default

omfg your a life saver. thank you thank. ive got a quest thats been driving me nuts this will help a lot.
Reply With Quote
  #6  
Old 08-25-2008, 05:45 PM
warsonofrage
Fire Beetle
 
Join Date: Mar 2003
Posts: 22
Default

aight ive got a problem....this quest shows as running fine in georges editor as well as in engin but the problem is every time the mob is hailed she says the first bit (fine) but then proceeds to spit out a section from the third piece of text as well. when the prompts are given to her she works just fine and dandy but...this ones bugging me because as near as i can tell the code is fine. do i need to add subevents or what?

btw how do you guys get that paste box to work

sub EVENT_SAY {

if ( $text =~ /Hail/i ) {
quest::say(
"What do you want, $name. The [spirits] told me of you coming.");
}

if ( $text =~ /spirits/i ) {
quest::say(
"The spirits are all that is left in this land. So many have [fallen] to the blight that the void has brought."
);
}

if ( $text =~ /fallen/i ) {
quest::say(
"When the gods rose up against the lesser races the magic they used began a slow destruction of the veil that separates us from the [void]."
);
}

if ( $text =~ /void/i ) {
quest::say(
"The void is the place beyond the world of the gods. Long ago Veeshan arose from the void to create Norrath and the lesser gods folowed her. When Norrath was young the veil was fomed to protect Norrath from the [darkness] within the void."
);
}

if ( $text =~ /darkness/i ) {
quest::say(
"Within the darkness lies the primordial forces from which creation itself spawned. All things both good and evil came from the void in the beginning but now a new darkness is coming forth. Horrors the likes of which even [Veeshan] has never see now soil the void."
);
}

if ( $text =~ /veeshan/i ) {
quest::say(
"Veeshan has grown silent to me I fear she has fallen to the darkness. After the destruction of Luclin she attempted to bring together the lesser races but was thwarted over and over by the other gods. When she sensed the void flowing through into Norrath she returned to learn why. The last sign of her presence left this world when her followers began to [die]."
);
}

if ( $text =~ /die/i ) {
quest::say(
"Months ago the followers of Veeshan began dieing of a strange wasteing illness. Darkness spread over there bodies until they became void creatures and attacked those around them. Something horrible has happened within the void and now I fear that Norrath will soon fall prey to it as well. Fairwell $name, return to me if you have news from afar. My spirits see only so far before they fear to go further."
);
}
}
Reply With Quote
  #7  
Old 08-25-2008, 07:07 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default Like This?

You mean like this?

Code:
sub EVENT_SAY {
  if($text=~/hail/i) {
    quest::say("What do you want, $name. The [spirits] told me of you coming.");
  }
  if($text=~/spirits/i) {
    quest::say("The spirits are all that is left in this land. So many have [fallen] to the blight that the void has brought.");
  }
  if($text=~/fallen/i) {
    quest::say("When the gods rose up against the lesser races the magic they used began a slow destruction of the veil that separates us from the [void].");
  }
  if ($text=~/void/i) {
    quest::say("The void is the place beyond the world of the gods. Long ago Veeshan arose from the void to create Norrath and the lesser gods folowed her. When Norrath was young the veil was fomed to protect Norrath from the [darkness] within the void.");
  }
  if($text=~/darkness/i) {
    quest::say("Within the darkness lies the primordial forces from which creation itself spawned. All things both good and evil came from the void in the beginning but now a new darkness is coming forth. Horrors the likes of which even [Veeshan] has never see now soil the void.");
  }
  if($text=~/veeshan/i) {
    quest::say("Veeshan has grown silent to me I fear she has fallen to the darkness. After the destruction of Luclin she attempted to bring together the lesser races but was thwarted over and over by the other gods. When she sensed the void flowing through into Norrath she returned to learn why. The last sign of her presence left this world when her followers began to [die].");
  }
  if($text=~/die/i) {
    quest::say("Months ago the followers of Veeshan began dieing of a strange wasteing illness. Darkness spread over there bodies until they became void creatures and attacked those around them. Something horrible has happened within the void and now I fear that Norrath will soon fall prey to it as well. Fairwell $name, return to me if you have news from afar. My spirits see only so far before they fear to go further.");
  }
}
You would use code brackets. Without the spaces inside the brackets: [ code ]Code goes here [ /code ]
Reply With Quote
  #8  
Old 08-25-2008, 07:10 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

You're leaving a lot of chance for weird text characters to get in your script - you can look for strange characters with the engin editor These are invisible, usually get caught up with a copy/paste and will break the script).
Also, try elsif;

Code:
sub EVENT_SAY {
if ( $text =~ /Hail/i ) {
quest::say("What do you want, $name. The [spirits] told me of you coming.");
}
elsif ( $text =~ /spirits/i ) {quest::say("The spirits are all that is left in this land. So many have [fallen] to the blight that the void has brought.");
}
elsif ( $text =~ /fallen/i ) {
quest::say("When the gods rose up against the lesser races the magic they used began a slow destruction of the veil that separates us from the [void].");
}
elsif ( $text =~ /void/i ) {
quest::say("The void is the place beyond the world of the gods. Long ago Veeshan arose from the void to create Norrath and the lesser gods folowed her. When Norrath was young the veil was fomed to protect Norrath from the [darkness] within the void.");
}
elsif ( $text =~ /darkness/i ) {
quest::say("Within the darkness lies the primordial forces from which creation itself spawned. All things both good and evil came from the void in the beginning but now a new darkness is coming forth. Horrors the likes of which even [Veeshan] has never see now soil the void.");
}
elsif ( $text =~ /veeshan/i ) {quest::say("Veeshan has grown silent to me I fear she has fallen to the darkness. After the destruction of Luclin she attempted to bring together the lesser races but was thwarted over and over by the other gods. When she sensed the void flowing through into Norrath she returned to learn why. The last sign of her presence left this world when her followers began to [die].");
}
elsif ( $text =~ /die/i ) {
quest::say("Months ago the followers of Veeshan began dieing of a strange wasting illness. Darkness spread over there bodies until they became void creatures and attacked those around them. Something horrible has happened within the void and now I fear that Norrath will soon fall prey to it as well. Fairwell $name, return to me if you have news from afar. My spirits see only so far before they fear to go further.");
 }
}
if you look at you options in the post-edit window, the '#' will wrap CODE tags around the text you select.
Reply With Quote
  #9  
Old 08-25-2008, 07:50 PM
warsonofrage
Fire Beetle
 
Join Date: Mar 2003
Posts: 22
Default

thank you very much sorry to be such a bother right now.
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 03:35 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