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

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

Reply
 
Thread Tools Display Modes
  #1  
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
  #2  
Old 02-02-2015, 09:36 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

You guys realize there is a spell quest system? "<zone>/spells/<spellid>.ext" and "global/spells/<spellid>.ext"
Reply With Quote
  #3  
Old 02-02-2015, 10:59 PM
silvergrin46
Fire Beetle
 
Join Date: Jan 2015
Posts: 9
Default

I tried until my eyes bled to get the global/spells/spellid to do what I wanted but could not get it to work right. See my post in this section if you haven't yet. I am using global_player until I can figure it out.
Reply With Quote
Reply

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 10:09 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