EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   My buffer need help (https://www.eqemulator.org/forums/showthread.php?t=29682)

JDeverkrack 09-29-2009 12:06 PM

My buffer need help
 
I'm new at this, so can anyone lend a hand please. I can't seem to get it to work.
Code:

sub EVENT_SAY
{
if(($text=~/Hail/i)&&($ulevel<=59)){quest::say("Greetings $name. Would you like me to cast some [buffs] on you.");}
elsif(($text=~/buffs/i)&&($ulevel>=1)&&($ulevel<=45))
  {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(3692);
  quest::selfcast(11545);
  quest::selfcast(159);
  }
elsif(($text=~/buffs/i)&&($ulevel>=46)&&($ulevel<=59))
  {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(3467);
  quest::selfcast(11545);
  quest::selfcast(457);
  quest::selfcast(430);
  }
  {
elsif(($text=~/Hail/i)&&($ulevel<=75)){quest::say("Greetings $name. I believe you are tough enough I will give you my [blessing].");}
elsif(($text=~/blessing/i)&&($ulevel>=60)&&($ulevel<=69))
  {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(5257);
  quest::selfcast(11545);
  quest::selfcast(457);
  quest::selfcast(5350);
  }
elsif(($text=~/blessing/i)&&($ulevel>=70)&&($ulevel<=75))
  {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(9732);
  quest::selfcast(11545);
  quest::selfcast(457);
  quest::selfcast(9859);
  }
}


So_1337 09-29-2009 12:23 PM

Try this one:

Code:

sub EVENT_SAY {
 if(($text=~/Hail/i)&&($ulevel<=59)) {
  quest::say("Greetings $name. Would you like me to cast some [buffs] on you?");
 }
 elsif(($text=~/buffs/i)&&($ulevel>=1)&&($ulevel<=45)) {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(3692);
  quest::selfcast(11545);
  quest::selfcast(159);
  }
 elsif(($text=~/buffs/i)&&($ulevel>=46)&&($ulevel<=59)) {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(3467);
  quest::selfcast(11545);
  quest::selfcast(457);
  quest::selfcast(430);
  }
 elsif(($text=~/Hail/i)&&($ulevel<=75)) {
  quest::say("Greetings $name. I believe you are tough enough, I will give you my [blessing].");
 }
 elsif(($text=~/blessing/i)&&($ulevel>=60)&&($ulevel<=69)) {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(5257);
  quest::selfcast(11545);
  quest::selfcast(457);
  quest::selfcast(5350);
 }
 elsif(($text=~/blessing/i)&&($ulevel>=70)&&($ulevel<=75)) {
  quest::say("There you go $name, now off with you.");
  quest::selfcast(9732);
  quest::selfcast(11545);
  quest::selfcast(457);
  quest::selfcast(9859);
 }
}

In class, so I can't test, but that should work. You had an extra { above the "Greetings $name. I believe you are tough enough, I will give you my [blessing]" line.

Hope you don't mind that I changed your formatting a bit, but it made it easier for me to check through.

JDeverkrack 09-29-2009 05:05 PM

Thank you So_1337
 
It worked great :D and again I'm new at this.


All times are GMT -4. The time now is 08:26 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.