Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::LUA

Quests::LUA Section regarding LUA scripts, help, questions, answers

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 02-02-2015, 09:26 PM
silvergrin46
Fire Beetle
 
Join Date: Jan 2015
Posts: 9
Default

This is what i am using in my global_player.lua

Just a snippet from a rather long set of spell checks, can post more of the code if need be.


Code:
function event_cast(e) 

	local PLVL = e.self:GetLevel();
	
	local Mana = e.self:GetMana();
	local ManaCost = (PLVL*5);
	local NewMana = (Mana - ManaCost);
	
	
	local Spell_ID = e.spell:ID();
	local Spell_Name = e.spell:Name();
	
	local Target = e.self:GetTarget();
	local Target_ID = Target:GetNPCTypeID();
	
			
	

	if(Spell_ID == 12000) then --spell id check ------------------------------------------------
	
		e.self:Message(5, "I CASTED SPELL: " ..Spell_ID);
                e.self:Message(5, "I CASTED SPELL: " ..Spell_Name);

    end
end
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 09:35 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3