View Single Post
  #4  
Old 04-05-2009, 08:13 AM
salesman salesman is offline
Finger lickin' good.
salesman's Avatar
Join Date: Nov 2008
Location: Colorado
Posts: 1,865
salesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud ofsalesman has much to be proud of
If you're trying to do what I think you're trying to do, I would probably do this:

In the class that is being joined via putnpc's
PHP Code:
//Store the NPC's name along with some way to indentify it in a database
function onCreated() {
  (@ 
"DBNPC_NAME").(@ this.level.name "_" this.id) = this.name;

In a weapon:
PHP Code:
function getNPCNPC_LEVELNPC_ID ) {
  
//Get the NPC's name
  
temp.npcname = (@ "DBNPC_NAME").(@ NPC_LEVEL "_" NPC_ID);
  
  
//Get the actual NPC object
  
temp.npc findNPCnpcname );

  
//Bam
  
npc.DoServerSideStuff();

Reply With Quote