|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Quests::Q&A This is the quest support section |
12-29-2014, 04:46 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
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.
|
12-29-2014, 06:49 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
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..
|
12-29-2014, 07:31 PM
|
|
Demi-God
|
|
Join Date: Nov 2007
Posts: 2,175
|
|
Know if there is a Lua way? I know people would have us do away with Perl altogether.
|
12-29-2014, 08:29 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
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);
|
|
|
|
12-30-2014, 10:39 AM
|
|
Hill Giant
|
|
Join Date: Dec 2013
Posts: 151
|
|
Quote:
Originally Posted by Kingly_Krab
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
|
12-30-2014, 06:12 PM
|
Administrator
|
|
Join Date: May 2013
Location: United States
Posts: 1,595
|
|
Well yeah, haha, but I meant with just Perl/Lua.
|
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:44 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|