Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-12-2015, 06:40 AM
AdrianD
Discordant
 
Join Date: Dec 2013
Posts: 297
Default Assistance: Target self to cast spell requiring self/group

I'm writing a custom .lua script which, I hope, will summon a corpse using the necro spell, id = 3 (summon corpse). The only piece I seem to be missing is something which will force the client/player to target himself.

I've grep searched the quest folder and google but could not find/understand what I am looking for. I've tried a couple dozen different variations on things including depopping the quest npc. I think I am simply missing the command/function to target self.

Below is what I have so far with <location of target code> to indicate where I think it should belong.

Code:
-- global\a_dungeon_necromancer.lua NPCID

function event_say(e)
	if(e.message:findi("hail")) then
		e.self:Say("I know the reason you come to see me, " .. e.other:GetName() .. ". Don't be afraid, the living do not concern me... You require my [services], you must ask for them. Only the willing are allowed when living.");
	elseif(e.message:findi("services")) then
		e.self:Say("" .. e.other:GetName() .. ", to perform the necessary incantation, you must hand me one platinum, three gold, three silver and seven copper pieces.");
	end
end

function event_trade(e)
	local item_lib = require("items");
	local leet_cash = 0;
	if(item_lib.check_turn_in(e.trade, {platinum = 1, gold = 3, silver = 3, copper = 7})) then

		leet_cash = 1;
	end

	if(leet_cash >= 1) then

--			<location of target code>
			
			eq.SelfCast(3);
			if(leet_cash == 1) then
				e.self:Say("Believe me when I say this exact amount represents the services offered.");
				leet_cash = 0;
		end

	end
	item_lib.return_items(e.self, e.other, e.trade)
end
Thanks
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 06:10 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3