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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 12-29-2014, 04:46 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default Making an NPC give off a spell aura

When I say "aura" I mean a spell effect, but not actually casting the spell on the player. It does not look as classy when you see the NPC casting the spell. Is there a way of doing this in lua or perl, to have the NPC give off an aura of a spell like levitate when you get in their area?

I know how to do proximity and such, that is easy. I may be over-thinking the problem but let's say you have an invisible man and you want the players to have an effect like levitate when are 250 units from it, normally you would see "so and so cast levitate on Xalmat", I am trying to just get the effect to the player without them seeing the casting.
Reply With Quote
  #2  
Old 12-29-2014, 06:49 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

If it's an invisible man you won't be able to see it anyway, haha, kidding. But you can just use $npc->SpellFinished(#, $client) in sub EVENT_ENTER.

EDIT: I'm not sure of how to stop the client form actually getting a message like a spell was cast on them, but at least this way it doesn't show, "NPC casts spell on client," you just get the spell message.

Last edited by Kingly_Krab; 12-29-2014 at 06:54 PM..
Reply With Quote
  #3  
Old 12-29-2014, 07:31 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

Know if there is a Lua way? I know people would have us do away with Perl altogether.
Reply With Quote
  #4  
Old 12-29-2014, 08:29 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Yeah, Lua has CastSpell. Reference: https://github.com/EQEmu/Server/wiki/Lua-Mob

Different types:
Code:
Boolean CastSpell(Integer spell_id, Integer target_id);
Boolean CastSpell(Integer spell_id, Integer target_id, Integer slot);
Boolean CastSpell(Integer spell_id, Integer target_id, Integer slot, Integer cast_time);
Boolean CastSpell(Integer spell_id, Integer target_id, Integer slot, Integer cast_time, Integer mana_cost);
Boolean CastSpell(Integer spell_id, Integer target_id, Integer slot, Integer cast_time, Integer mana_cost, Integer item_slot);
Boolean CastSpell(Integer spell_id, Integer target_id, Integer slot, Integer cast_time, Integer mana_cost, Integer item_slot, Integer timer, Integer timer_duration);
Boolean CastSpell(Integer spell_id, Integer target_id, Integer slot, Integer cast_time, Integer mana_cost, Integer item_slot, Integer timer, Integer timer_duration, Integer resist_adjust);
Reply With Quote
  #5  
Old 12-30-2014, 10:39 AM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

Quote:
Originally Posted by Kingly_Krab View Post
If it's an invisible man you won't be able to see it anyway, haha, kidding. But you can just use $npc->SpellFinished(#, $client) in sub EVENT_ENTER.

EDIT: I'm not sure of how to stop the client form actually getting a message like a spell was cast on them, but at least this way it doesn't show, "NPC casts spell on client," you just get the spell message.
Emptying cast_on (etc.) fields in spells_new
Reply With Quote
  #6  
Old 12-30-2014, 06:12 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,595
Default

Well yeah, haha, but I meant with just Perl/Lua.
Reply With Quote
Reply


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 06:44 AM.


 

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