|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Quests::Q&A This is the quest support section |
 |
|
 |

03-02-2008, 07:24 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 12
|
|
My Buff Bot, Works but needs a little help please.
HI,
here is my modified buff bot code
Code:
#zone:PoKnowledge
#Original by Angelox. Modified by Fuergrissa
sub EVENT_SAY {
if ($text =~/Hail/i)
{ quest::say("Greetings $name. If you are interested in my buffs, please say so and I will give you my[list]. If you require me to [heal] you, please ask."); }
if ($text=~/list/i)
{ quest::say("I can cast the following spells : Spirit of Wolf [SOW] - Dead Man Floating [DMF] - Clarity II [C2] - Temperance [TEMP] - Virtue [VIRT] & KEI [KEI]");}
if ($text=~/heal/i) {
$npc->SetAppearance(0);
$npc->CastSpell(13,$userid);
quest::say("Healing $name, please be more careful in future!");
}
if ($text=~/sow/i) {
$npc->SetAppearance(0);
$npc->CastSpell(278,$userid);
quest::say("Casting -< Spirit Of The Wolf >- on $name, enjoy!");
}
if ($text=~/dmf/i) {
$npc->SetAppearance(0);
$npc->CastSpell(457,$userid);
quest::say("Casting -< Dead Man Floating >- on $name, enjoy!");
}
if ($text=~/c2/i) {
$npc->SetAppearance(0);
$npc->CastSpell(1693,$userid);
quest::say("Casting -< Clarity II >- on $name, enjoy!");
}
if ($text=~/temp/i) {
$npc->SetAppearance(0);
$npc->CastSpell(3692,$userid);
quest::say("Casting -< Temperance >- on $name, enjoy!");
}
if ($text=~/virt/i) {
$npc->SetAppearance(0);
$npc->CastSpell(3467,$userid);
quest::say("Casting -< Virtue >- on $name, enjoy!");
}
if ($text=~/kei/i) {
$npc->SetAppearance(0);
$npc->CastSpell(2570,$userid);
quest::say("Casting -< Koadic's Endless Intellect >- on $name, enjoy!");
}
}
sub EVENT_SPAWN
{
$x = $npc->GetX();
$y = $npc->GetY();
quest::set_proximity($x - 90, $x + 90, $y - 90, $y + 90);
}
sub EVENT_ENTER
{
$npc->SetAppearance(1);
my $random_result = int(rand(100));
if ($random_result<=15){
quest::shout("Casting Buff Spells behind the main bank!");
}else{
#Do Nothing
}
}
I am looking to convert the kei section to only cast kei if you are 46 or higher, i have tried "else" and "elseif" but cannot get it to work , i am sure its real easy, could anyone give me a few pointers please, alo sometimes after the very first successful cast the buffer will cast kei on himself instead of me ? any ideas please.
Also i am open to any constructive advice to shorten the code or make it more effective.
Thank you in advance for any and all help
Fuer
|
 |
|
 |

03-02-2008, 07:47 AM
|
Accomplished Programmer
|
|
Join Date: Nov 2006
Location: Honolulu, HI
Posts: 91
|
|
I didn't test it, but something like this would probably work:
Code:
if ($text=~/kei/i) {
if ($ulevel > 45) {
$npc->SetAppearance(0);
$npc->CastSpell(2570,$userid);
quest::say("Casting -< Koadic's Endless Intellect >- on $name, enjoy!");
}
else {
quest::say("Ahh, so young and trying for the hard stuff. You should probably just go get a breeze, come back when you're older.");
}
}
P.S. You might want to use elseif's in there for your words. Your NPC is going to spaz if someone says "I want kei, sow, dmf, etc"
|

03-02-2008, 07:58 AM
|
Discordant
|
|
Join Date: Sep 2006
Location: Green Bay, WI
Posts: 436
|
|
Quote:
alo sometimes after the very first successful cast the buffer will cast kei on himself instead of me
|
use this quest::selfcast(2570); in place of this $npc->CastSpell(2570,$userid);
should work
|

03-02-2008, 08:30 AM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 12
|
|
thank you both very much.
|

03-02-2008, 11:24 AM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Quote:
Originally Posted by Knightly
P.S. You might want to use elseif's in there for your words. Your NPC is going to spaz if someone says "I want kei, sow, dmf, etc"
|
You don't need to use elseif's. You can just setup the input so it only accepts the exact phrase.
This is an explanation of what I mean from the Perl system guide:
$text =~/^me$/i - Would only match if me is the only text said. The "^" tells it it must be the first thing said and the "$" tells it it must be the last thing.
And here is an example of how you would use it in your code:
Code:
if ($text=~/^heal$/i) {
$npc->SetAppearance(0);
quest::selfcast(13);
quest::say("Healing $name, please be more careful in future!");
}
So, if someone says "heal me" or "heal kei sow", they will get no response. The only way to get the correct response and buffs would be to only say "Heal" or "heal" or any variation of the words with CAPs.
|
 |
|
 |

03-03-2008, 10:31 PM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 12
|
|
Thank you, the buff bot works perfectly now thank you, very much, the trouble i have is its been so long since i played EQ i cant remember the good buffs people would want. I seem to remember:
Alacrity, Temp, DMF, Sow, Clarity for under 45
Virtue, Sow, Kei, DMF for 46
I am sure im missing tons, any input would be great.
|

03-04-2008, 09:28 AM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Harnessing of Spirit (below 46) & Focus of Spirit/ Focus of Soul (46+) were really nice Shaman buffs that stack with the Aego line of spells, and possibly with the Druid Protection of the Glades line of spells, which is also a good one for HP.
I know, at least until a certain point, that you could even stack HoS/FoS with regular STR/DEX buffs if the stat buffs were cast first, but I think that was removed on live at some point, especially since +130 str & +87 dex @ level 46 from 3 buffs, then +135 str & +120 dex @ level 60 with 3 buffs was a little unbalanced, especially since you could cast them on most noobs.
|

03-04-2008, 07:51 PM
|
Fire Beetle
|
|
Join Date: Feb 2008
Posts: 12
|
|
thats the one i was thinking of , i can remember asking for a hos hehehe, thank you again very much
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 06:03 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |