View Single Post
  #7  
Old 04-05-2009, 08:33 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
You do not need to use findnpc or the (@ "var") syntax if the NPC or weapon name is standard.

Here is my implementation for the class, just showing how the NPC is registered:
PHP Code:
function onCreated() {
  
dbnpc_name.register(this);

In the dbnpc:
PHP Code:
public function register(npcobj) {
  
this.(@ "n" npcobj.id) = npcobj;

I think it is better to be using functions in this case.
__________________
Reply With Quote