Quote:
|
What im asking is how do you make a level npc have the same function as the db-npc. Its a bank system, and when you update the level the bank account money n your account resets, thats why i want to use a db npc. How do I make the npc in the level use the script thats in a db npc?
|
Oh well there's public functions.
In your DB-NPC (named Example in this case):
PHP Code:
public function onRandFunc() {
echo("success!");
}
Then in your level npc:
PHP Code:
function onCreated() {
findnpc("Example").onRandFunc(); // Would echo success! on RC
}