PDA

View Full Version : Priestess (buffbot)(cure)(bind)


bodi
10-18-2011, 01:18 PM
this chick has cure, free starter buffs, level 50ish buffs for 100pp, and binds as well. Its not clean, but it works well.


#new Priestess script
sub EVENT_SAY {

my $cure = quest::saylink ("cure", 1);
my $buff = quest::saylink (" free buffs", 1);
my $bind = quest::saylink ("bind", 1);
my $advanced = quest::saylink ("advanced blessing");

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

if ($text=~/buff/i) {quest::selfcast(276);}
if ($text=~/buff/i) {quest::selfcast(278);}
if ($text=~/buff/i){ quest::selfcast(219);}
if ($text=~/buff/i) {quest::selfcast(368);}
if ($text=~/buff/i){quest::selfcast(146);}
if ($text=~/buff/i){quest::selfcast(148);}
if ($text=~/buff/i){quest::selfcast(279);}
if ($text=~/buff/i){quest::selfcast(129);}
if ($text=~/bind/i) { quest::selfcast(35); }

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


sub EVENT_ITEM
{

if($platinum == 100)
{
quest::say ("Good, stand where you are while I cast");
quest::selfcast(3692);
quest::selfcast(2505);
quest::selfcast(423);
quest::selfcast(356);
quest::selfcast(172);
quest::selfcast(64);
quest::selfcast(145);
quest::selfcast(1693);
quest::selfcast(15);
quest::selfcast(60);
quest::selfcast(61);
quest::selfcast(46);quest::selfcast(2524);
}
}

Caryatis
10-18-2011, 01:48 PM
Dear lord man, this is awesome. This is new and original, I for one look forward to any new material you create.

bodi
10-18-2011, 03:20 PM
Yeah, I just started a couple of weeks ago. Still, I have people starting new servers asking questions about it, so i put it on here so there are some more cut+paste npcs available. Feel free to post more advanced plug and play type NPCs. I don't think there is a limit.

revloc02c
10-18-2011, 07:46 PM
Feel free to post more advanced plug and play type NPCs. I don't think there is a limit.

ROFL...that was a good one

ChaosSlayerZ
10-18-2011, 08:22 PM
bodi wins :D

kimura
04-20-2012, 08:38 PM
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(5278);
quest::selfcast(5358);
quest::selfcast(3178);
quest::selfcast(1568);
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

kimura
05-01-2012, 05:28 AM
How do I put scripts in that nifty little box thing? Anyone able to tell me how to fix the above script?

trevius
05-01-2012, 05:49 AM
To use the code boxes, just click the little # sign button above the post window when you are typing.

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:

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

kimura
05-01-2012, 06:35 AM
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!

trevius
05-01-2012, 08:35 AM
Is the NPC named Kimura then?

kimura
05-01-2012, 09:56 AM
NPC is named Kimura's_Buffer lol :P (real original, i know)

kimura
05-01-2012, 10:02 AM
well, leave it to Trevius to fix another problem!! thanks a lot man, can always depend on you :P

Maze_EQ
06-06-2012, 12:26 PM
sub EVENT_SAY {

my $cure = quest::saylink ("cure", 1);
my $buff = quest::saylink ("blessings", 1);
my $bind = quest::saylink ("bind", 1);
my $advanced = quest::saylink ("enhanced");
my $heals = quest::saylink ("heal");

if ($text =~/Hail/i)

{
quest::say("Greetings $name. I have been sent to aid you on your journey! Would you like a [$cure], [$heals], [$buff], [$advanced] blessings, or I can [$bind] you to this location.");
}

if ($text=~/cure/i)

{
quest::selfcast(3297);
}

if($text =~/heal/i)

{
quest::selfcast(13);
quest::selfcast(13);
quest::selfcast(13);
}

if ($text=~/blessings/i)

{
quest::selfcast(276);
quest::selfcast(278);
quest::selfcast(219);
quest::selfcast(368);
quest::selfcast(146);
quest::selfcast(148);
quest::selfcast(279);
quest::selfcast(129);
}

if ($text=~/bind/i) { quest::selfcast(35); }

if ($text =~/enhanced/i)

{
quest::say ("I charge 100 platinum for advanced buffs.");}
}


sub EVENT_ITEM
{

if($platinum == 100)
{
quest::emote("casts a spell");
quest::selfcast(3692);
quest::selfcast(2505);
quest::selfcast(423);
quest::selfcast(356);
quest::selfcast(172);
quest::selfcast(64);
quest::selfcast(145);
quest::selfcast(1693);
quest::selfcast(15);
quest::selfcast(60);
quest::selfcast(61);
quest::selfcast(46);
quest::selfcast(2524);
}
}

Edited your script a tad bit, you don't need individual if ($text=~/buff/i) just separate the quest:: by semi colons.