Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 07-03-2010, 05:02 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default COMMITTED: $oncursor

Similar to $hasitem, $oncursor checks the front item on the cursor for a specific item id.

Code:
Index: embparser.cpp
===================================================================
--- embparser.cpp	(revision 1581)
+++ embparser.cpp	(working copy)
@@ -532,6 +532,19 @@
 		}
 	}
 
+	// $oncursor
+	if(mob && mob->IsClient()) {
+		string hashname = packagename + std::string("::oncursor");
+		perl->eval(std::string("%").append(hashname).append(" = ();").c_str());
+		char *hi_decl = NULL;
+		int itemid = mob->CastToClient()->GetItemIDAt(30);
+		if(!HASITEM_ISNULLITEM(itemid)) {
+			MakeAnyLenString(&hi_decl, "push (@{$%s{%d}},%d);",hashname.c_str(),itemid,30);
+			perl->eval(hi_decl);
+			safe_delete_array(hi_decl);
+		}
+	}
+
 	//do any event-specific stuff...
 	switch (event) {
 		case EVENT_SAY: {
Usage:
Code:
if ($oncursor{67415}) { #Stone of Entry
  quest::say("$name has the item on the cursor.");
}
else {
  quest::say("$name is not holding that item.");
}
Works great for situations like this: The keyholder must hold the Stone of Entry on his/her cursor and say, "I wish to enter."
Reply With Quote
  #2  
Old 07-03-2010, 09:35 AM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

Will come in handy for the qinimi trial
Reply With Quote
  #3  
Old 07-03-2010, 01:42 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

That's exactly what I am using it for! Helping out Jaekob with BIC 1.
Reply With Quote
  #4  
Old 07-05-2010, 01:58 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Committed in r1583
Reply With Quote
  #5  
Old 07-06-2010, 06:08 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Thanks for committing that, and GRATZ on SVN access
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
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 05:11 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3