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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-03-2019, 10:44 AM
ErikSigvard
Fire Beetle
 
Join Date: Jan 2019
Location: Cheyenne, WY
Posts: 11
Default Issue with self.CastSpell() and KEI, VOQ, +

Hi there.

I set up a buff bot in POK using LUA, and the script casts Clarity if the toon is 41 and under, Clarity 2 if they are 46 and under, and then KEI if they are over 46.

The script works perfect on Clarity and Clarity 2.

However, when casting KEI, you hear the casting sound but the spell never lands. When I change it to e.other:CastSpell(), it works perfect (but of course it's now the player casting the spell, not the NPC, and for some of us with OCD, a necro just can't cast KEI, dangit!). I tested also with VOQ in place of KEI and the same thing happens - you hear a spell being cast but nothing lands on the player. I waited for 5 minutes, so it definitely wasn't a spell cast and user-being-impatient issue.

I tried this with a level 60 character to ensure there wasn't a problem with the operator logic.

I also set my NPC to have 500,000 mana to ensure it wasn't an OOM issue.

Here is my code (and feel free to critique the code as well):

Code:
function event_say(e)
	if(e.message:findi("hail")) then
		e.self:Say("Hey there, newb! Need some mind candy [" .. eq.say_link('buffs', false, 'buffs') .. "]?");
	elseif(e.message:findi("buffs")) then
		if(e.other:GetLevel() < 42) then
			e.self:CastSpell(174, e.other:GetID(),0,0,0);
		elseif(e.other:GetLevel() < 46) then
			e.self:CastSpell(1693, e.other:GetID(),0,0,0);
		elseif(e.other:GetLevel() >= 46) then
			e.self:CastSpell(2570, e.other:GetID(),0,0,0);
		end
	end
end

Last edited by ErikSigvard; 01-03-2019 at 11:27 AM.. Reason: Minor typo
Reply With Quote
  #2  
Old 01-03-2019, 03:16 PM
ErikSigvard
Fire Beetle
 
Join Date: Jan 2019
Location: Cheyenne, WY
Posts: 11
Default

I got Perl working correctly on my server, and I find it to be easier to work with than LUA (JUST my personal opinion!), so I am converting my two little bots to Perl.

Although, I see the same issue occurs on the Perl side with KEI and VOQ - doing $npc->CastSpell with either of those spells causes them to never actually land. But doing quest::selfcast allows them to work.

As long as it doesn't show the character casting the spell, I am satisfied, from a roleplaying perspective.
Reply With Quote
  #3  
Old 01-03-2019, 07:20 PM
phate8908
Fire Beetle
 
Join Date: Dec 2018
Posts: 12
Default

short explination:
use 2970 instead of 2570...

long explination:
npcs behave odd with group spells, they can't use the mechanic target group buff so, any group buff will cast on the npc's "group"... you are not a part of the npc's "group" so... sorry, you can't do that... kinda makes sense tbh...
Reply With Quote
  #4  
Old 01-04-2019, 04:25 PM
ErikSigvard
Fire Beetle
 
Join Date: Jan 2019
Location: Cheyenne, WY
Posts: 11
Default

Sigh...I feel like a dumbass. Duh. It's a group spell. I didn't even think about that. Thank you.
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 02:06 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