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

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

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2008, 03:55 AM
egg
Fire Beetle
 
Join Date: Apr 2008
Posts: 4
Question How to identify Spell id?

I have been playing with the Event_Cast_On since 1108 release and it works out very nicely. Sadly, I don't know how to get the spell id the player cast, This is needed so I can set NPCs to react to a specific spell, not just any spell. I have tried may different quest objects, but will no results. Any ideas would be helpful?
Reply With Quote
  #2  
Old 05-19-2008, 01:48 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default

I have not upgraded my 1104 to 1108 yet, but if the code has been integrated as-is you should access the spell ID by the $spell_id variable when you are in the event handler function. Here is how I do it on my own version, where I wrote the CAST_ON thingie originally :

Code:
sub EVENT_CAST_ON
{
    if($spell_id == 202)  # Courage
    {
      quest::say("Bzzzzt !");
      quest::setglobal("A_Bit_of_Clericing", "Guard Buffed", 5, "F");
    }
}
Reply With Quote
  #3  
Old 05-19-2008, 10:43 PM
egg
Fire Beetle
 
Join Date: Apr 2008
Posts: 4
Question $spell_id does not work

Many thanks for the reply, But I have searched high and low on the forums, and found that as well.
http://www.eqemulator.net/forums/sho...ght=event+cast

it seems that $spell_id was not added to the current 1108 version, but EVENT_CAST_ON was. sadly, since I don't have a complier, I have to rely on the releases available. Unless you know of a free compiler that can compile the source files under windows xp for windows machine, I will be stuck to this.
but thanks for your reply
Reply With Quote
  #4  
Old 05-20-2008, 01:02 AM
egg
Fire Beetle
 
Join Date: Apr 2008
Posts: 4
Default

Nevermind, I found a very helpful wikki that points to a free compiler for windows that is not a gcc or cgywin.
http://www.eqemulator.net/wiki/wikka...a=DevVSExpress

I will add and compile to get $spell_id working
Reply With Quote
  #5  
Old 05-20-2008, 01:31 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Quote:
Originally Posted by egg View Post
I will add and compile to get $spell_id working
Not sure if you've already started on this, but the variables are exported in zone/embparser.cpp:
Code:
  509 		case EVENT_CAST_ON:
It should be as simple as changing it to this:
Code:
		case EVENT_CAST_ON:
			ExportVar(packagename.c_str(), "spell_id", function);
However, I'm not sure what exactly function will have to be, since I wasn't able to find any useful functions to do it.

In any case, I hope this helps
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 05-20-2008, 04:16 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Lightbulb

What is in my embparser.cpp file :
Code:
		case EVENT_ZONE:{
			ExportVar(packagename.c_str(), "target_zone_id", data);
			break;
		}

		case EVENT_CAST_ON:{
			ExportVar(packagename.c_str(), "spell_id", data);
			break;
		}
Indeed the lines for EVENT_CAST_ON are not in the 1108 source code. This part must have been forgotten when the event was added to the Emu code.
I will open a bug for that so the job can be completed for a future release.
Reply With Quote
  #7  
Old 05-20-2008, 04:22 PM
Bulle
Hill Giant
 
Join Date: Jan 2008
Posts: 102
Default

You also need to remove the already present "case EVENT_CAST_ON:", as it would not be very clean to keep both (it could even warrant you a warning from the compiler). Only the first one will be taken into account anyway.
Reply With Quote
  #8  
Old 05-22-2008, 05:40 PM
egg
Fire Beetle
 
Join Date: Apr 2008
Posts: 4
Default

Many thanks for the info, I have it working now. Btw, I was not sure if can compile on the new 2008 express , so found the 2005 express on ms web site. http://msdn.microsoft.com/en-us/express/aa975050.aspx
Reply With Quote
  #9  
Old 05-23-2008, 10:57 AM
Andrew80k
Dragon
 
Join Date: Feb 2007
Posts: 659
Default

Yep, 2008 does work.
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:33 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