View Single Post
  #7  
Old 07-07-2009, 02:56 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by [email protected] View Post
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

__________________
Quote:
Reply With Quote