View Single Post
  #11  
Old 03-13-2008, 06:33 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Well, I had a chance to dig through some of the source, and this is what I've come up with:

zone/embparser.cpp
Code:
  435 		case EVENT_ITEM: {
  436 			npcmob->FaceTarget(mob);
  437 			//this is such a hack... why arnt these just set directly..
  438 			ExportVar(packagename.c_str(), "item1", GetVar("item1", npcid).c_str());
  439 			ExportVar(packagename.c_str(), "item2", GetVar("item2", npcid).c_str());
  440 			ExportVar(packagename.c_str(), "item3", GetVar("item3", npcid).c_str());
  441 			ExportVar(packagename.c_str(), "item4", GetVar("item4", npcid).c_str());
  442 			ExportVar(packagename.c_str(), "copper", GetVar("copper", npcid).c_str());
  443 			ExportVar(packagename.c_str(), "silver", GetVar("silver", npcid).c_str());
  444 			ExportVar(packagename.c_str(), "gold", GetVar("gold", npcid).c_str());
  445 			ExportVar(packagename.c_str(), "platinum", GetVar("platinum", npcid).c_str());
  446 			string hashname = packagename + std::string("::itemcount");
  447 			perl->eval(std::string("%").append(hashname).append(" = ();").c_str());
  448 			perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item1};").c_str());
  449 			perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item2};").c_str());
  450 			perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item3};").c_str());
  451 			perl->eval(std::string("++$").append(hashname).append("{$").append(packagename).append("::item4};").c_str());
  452 			break;
  453 		}
Which basically translates to this:

Code:
%itemcount = ();
++$itemcount{$item1};
++$itemcount{$item2};
++$itemcount{$item3};
++$itemcount{$item4};
I tried to find the packet structure of the handin, so I could then see what is referenced, but I didn't have much luck.

Anyways, 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