Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Custom

Quests::Custom Custom Quests here

Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2012, 08:38 PM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

hi, i used your script to make a buff bot, with a couple changes...the only problem now is that for some reason..well let me show ya


sub EVENT_SAY {

my $cure = quest::saylink ("cure", 1);
my $bind = quest::saylink ("bind", 1);
my $advanced = quest::saylink ("advanced blessing");
my $Kimura = quest::saylink ("Kimura's Super Buff");

if ($text =~/Hail/i)
{ quest::say("Greetings $name. I have been sent to aid you on your journey! Would you like a [$cure], [$advanced], [$Kimura] or I can [$bind] you to this location."); }
if ($text=~/cure/i) { quest::selfcast(3299); }
if ($text=~/bind/i) { quest::selfcast(35); }

if ($text =~/advanced/i)
{
quest::say ("I charge 200pp for superior buffs.");
}

if ($text =~/Kimura/i)
{
quest::say ("I charge 20000pp for a buff so AWESOME!");
}
}

sub EVENT_ITEM
{

if($platinum == 20000)
{
quest::say ("Get ready for a breath from Kimura!");
quest::selfcast(6817);
}

if($platinum == 200)
{
quest::say ("Good, stand where you are while I cast");
quest::selfcast(527;
quest::selfcast(535;
quest::selfcast(317;
quest::selfcast(156;
quest::selfcast(2524);
}
}

for some reason that i cannot figure out, when i hail him he adds this line to the original text that is supposed to be the response from hailing only:

"I charge 20000pp for a buff so AWESOME"

will you tell me what im doing wrong please? Thank you

Last edited by kimura; 04-20-2012 at 08:41 PM.. Reason: messed up
Reply With Quote
  #2  
Old 05-01-2012, 05:28 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

How do I put scripts in that nifty little box thing? Anyone able to tell me how to fix the above script?
Reply With Quote
  #3  
Old 05-01-2012, 05:49 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

To use the code boxes, just click the little # sign button above the post window when you are typing.

Code:
Code
The problem with your script is probably that your character you are testing it on is named Kimura. The comparison you are doing in the if statement is looking for any string that contains that word /Kimura/. You will see the line as "You say blah blah blah", but I think the NPC will see it as "Kimura says blah blah blah". So, the NPC will see your name in the line of text and it will match you if statement. If you want to prevent that, you can do it in multiple ways, but the easiest is to just be more specific in the response you are looking for such as:

Code:
if ($text =~/Kimura's Super Buff/i)
{
quest::say ("I charge 20000pp for a buff so AWESOME!");
}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 05-01-2012, 06:35 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

Thanks for the response! I will try that when I get home, the only thing is that I'm not using a character with that name. Thanks for the # hint!
Reply With Quote
  #5  
Old 05-01-2012, 08:35 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Is the NPC named Kimura then?
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 05-01-2012, 09:56 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

NPC is named Kimura's_Buffer lol :P (real original, i know)
Reply With Quote
  #7  
Old 05-01-2012, 10:02 AM
kimura
Hill Giant
 
Join Date: Oct 2011
Posts: 132
Default

well, leave it to Trevius to fix another problem!! thanks a lot man, can always depend on you :P
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:56 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3