View Single Post
  #4  
Old 07-06-2009, 06:34 PM
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
I tend to think of classes as "function packs" for existing npcs, but here's an example of how they work. ( I assume that what's you don't understand. )

Class: example
PHP Code:
function randomClassFunc() {
  echo(
"success!");

Then in your DB-NPC:

PHP Code:
function onCreated() {
  
join("example");
  
randomClassFunc(); // Would echo "success!" on NC.

__________________
Quote:
Reply With Quote