View Single Post
  #2  
Old 06-28-2006, 10:43 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
If I understand you correctly, you can do something like...

NPC Code:

function onCreated()
{
putnpc2(x,y,"join(\"classname\");
this.master = player.account;
");
}



Then in a class npc...

NPC Code:

//#CLIENTSIDE
function onPlayerChats()
{
if ( player.chat == "/test" ) {
if ( this.master == player.account ) {
chat = "Hello, Master!";
} else {
chat = "You are not my master!";
}
}
}





It all depends on how you want to do it.
Reply With Quote