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 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
 

Thread Tools
Display Modes

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:51 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