Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-19-2013, 02:02 PM
Riklin
Hill Giant
 
Join Date: May 2003
Location: Tacoma, WA
Posts: 225
Default Buffing NPC - Casting Several Spells

I have been working on making npc's in the guild lobby that buff players. The problem I have run into is dealing with casting spells with enough duration to be usable.

The following code works, but doesn't work well. The spells duration is only about 3 minutes, due to the way selfcast works (duration involves level, I know). In the case of a new character, I opted for not casting temperance, because that's too powerful, but cast 3 lower level cleric spells instead. symbol of transal, valor and guard. It works, but the durations are only like 3 minutes, because I can only get it to work with selfcast. I have tried using $npc->CastSpell(4053, $userid); with the 3 spells, but only the first one casts. I have looked for some kind of a delay in order to wait for the spell to be cast and recovery time, then cast another, but have not been successful in finding that kind of command.

How can I set this up to buff a new low level character, without dieing during the casting, with the duration being say 45 minutes, for 2 or more spells?

I've thought about temporarily upping the characters level to 70 so that the duration will increase, then reset the level after the spells are selfcast, that's the only thing I have considered. What other options are there?


Thanks,
Riklin


sub EVENT_SAY
{
if ($text=~/hail/i)
{
quest::say("Hello $name. I cast Cleric buffs. Which buff would you like? [HitPoints], [SpellHaste], [Healing] or [Curing]?");
}
elsif($text=~/hitpoints/i)
{
if ($ulevel >= 1 and $ulevel < 35)
{
quest::selfcast(312);
quest::selfcast(485);
quest::selfcast(1;
}
if ($ulevel > 34 and $ulevel < 61)
{
$npc->CastSpell(4053, $userid);
}
if ($ulevel > 60)
{
$npc->CastSpell(9811, $userid);
}
}
}
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:32 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