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 02-22-2005, 08:10 AM
solid11's Avatar
solid11
Discordant
 
Join Date: Dec 2004
Posts: 266
Default My first .pl

Starting my questing tradeskill out on something easy, I thought, on a soulbinder in gfay. I used Soulbinder Oakstout. Here is two texts I used off the boards and both brought on a reply to "Hail", but when I said bind my soul, nothing happens on either of the two pl's I tried.

sub EVENT_SAY {
if ($text=~/Hail/i){quest::say("Greetings $name . When a hero of our world is slain. their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity. it is my duty to [bind your soul] to this location if that is your wish."); }
if ($text=~/bind my soul/i)
{
quest::say("Very well. You will return to this spot when you die.");
quest::selfcast(2049); }
}
#END OF FILE ZONE:GFAYDARK NPCID:54179 SOULBINDER_OAKSTOUT

"and the other one"


sub EVENT_SAY
{
if($text=~/Hail/i){quest::say("Greetings $name. When a hero of our world is slain their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity it is my duty to [bind your soul] to this location if that is your wish.");}
if($text=~/bind my soul/i)
{
quest::say("Binding your soul. You will return here when you die.");
quest::castspell($userid,2049);
}
}

Notice I tried both ways to cast and it didnt work.
Thanks.
Reply With Quote
  #2  
Old 02-22-2005, 08:46 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

Does he say anything in response to [bind my soul]?
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #3  
Old 02-22-2005, 09:01 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Try
Code:
if($text=~/bind/i)
for the second if in the EVENT_SAY.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #4  
Old 02-22-2005, 09:14 AM
solid11's Avatar
solid11
Discordant
 
Join Date: Dec 2004
Posts: 266
Default

doesn't say anything to bind my soul, just looks at me.
Reply With Quote
  #5  
Old 02-22-2005, 09:46 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Originally Posted by solid11
doesn't say anything to bind my soul, just looks at me.
Even after doing my suggestion?
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #6  
Old 02-22-2005, 09:48 AM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

When you change the text to read as Cisyouc says, don't forget to reboot your server entirely to make sure your change takes. The server tends to cache perl files it's already ran once.
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #7  
Old 02-22-2005, 02:39 PM
solid11's Avatar
solid11
Discordant
 
Join Date: Dec 2004
Posts: 266
Default

Well the fix Cisyouc suggested worked, but I don't even have to say anything to get bound. When I hail him he just jumps to next line of text and auto binds me. Guess that would be ok, but wonder why he binds automatically?

Also, if I have a default.pl in the /quests folder he soulbinder won't respond to hails. I have to remove default.pl before the soulbinder will work. I have file labeled as Soulbinder_Oakstout.pl, which is what it was named as when I downloaded the quest pack. Just wish the default.pl could stay in the quest folder for all the other npcs.

BTW here is default.pl.......

sub EVENT_SAY
{
if($text=~/Hail/i)
{quest::say("Hello $name");}
}

sub EVENT_DEATH{
quest::me("falls to the ground.");
}

sub EVENT_ATTACK{
quest::me("charges at $name ready to attack.");
}

----------------------------------------------
and here is the soulbinder pl after cisyouc's suggested fix.....

sub EVENT_SAY {
if ($text=~/Hail/i){quest::say("Greetings $name . When a hero of our world is slain. their soul returns to the place it was last bound and the body is reincarnated. As a member of the Order of Eternity. it is my duty to [bind your soul] to this location if that is your wish."); }
if($text=~/bind/i)
{
quest::say("Very well. You will return to this spot when you die.");
quest::selfcast(2049); }
}
#END OF FILE ZONE:GFAYDARK NPCID:54179 SOULBINDER_OAKSTOUT

Last edited by solid11; 02-22-2005 at 10:42 PM..
Reply With Quote
  #8  
Old 02-22-2005, 02:45 PM
mattmeck
Guest
 
Posts: n/a
Default

the NPC says "bind" and you have that for the second trigger so the NPC triggers it and the second line happens,

Yeasy fix have the NPC ask if they want there soul bound, then have that trigger as Yes, that way the yes isnt part of the text and he wont trigger it.
Reply With Quote
  #9  
Old 02-22-2005, 04:51 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

Quote:
Originally Posted by mattmeck
the NPC says "bind" and you have that for the second trigger so the NPC triggers it and the second line happens,

Yeasy fix have the NPC ask if they want there soul bound, then have that trigger as Yes, that way the yes isnt part of the text and he wont trigger it.
Nice catch, Mattmeck. It wouldve taken me a while to realize that. Yes that is the problem. Make it so on hail the NPC doesnt say the word 'bind' or make the response to get bound something else, like 'yes'.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #10  
Old 02-22-2005, 05:34 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

That or use elsif to process the Bind line.
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote
  #11  
Old 02-22-2005, 05:43 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

I dont think elsif would help here....
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #12  
Old 02-23-2005, 02:32 AM
solid11's Avatar
solid11
Discordant
 
Join Date: Dec 2004
Posts: 266
Default

So just change-

if($text=~/bind/i)

TO
if($text=~/yes/i)

?
Reply With Quote
  #13  
Old 02-23-2005, 03:18 AM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

yes. And people will have to reply 'yes' to get bound.
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #14  
Old 02-24-2005, 12:23 PM
knightz
Fire Beetle
 
Join Date: Jun 2004
Location: Canada
Posts: 24
Default

Actually the reason hes doing both is because HAIL, SoulBINDer blah...

both hail and bind are in the test the players send the NPC.

So, elsif would fix it.
__________________
~ bUri
Reply With Quote
  #15  
Old 02-24-2005, 03:43 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

That's the reason on eqlive you have to say the phrase "bind my soul". But Perl will misinterpret it if you just try to put the phrase in there with spaces.

Try to put backslashes in front of the spaces in the regex.
Code:
if($text=~/bind\ my\ soul/i)
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
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 04:42 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