Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-02-2008, 07:24 AM
Fuergrissa
Fire Beetle
 
Join Date: Feb 2008
Posts: 12
Default 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
Reply With Quote
 


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 11:24 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