View Single Post
  #26  
Old 09-13-2009, 05:40 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
simply finding the NPC on it's own in your script will not do anything.

You need to have a var point to it after returning it.

Also, you cannot read this.vars from server to client like that.

My suggestions are to move nearly everything out of the clientside, store the few things you want accessible by GUI into the DB NPC's attribute array, copy the attribute array to the level NPC (although a weapon would probably be better for guild GUI related things), then display on clientside.

Example -

PHP Code:
function onCreated()
{
  
this.cont findnpc("mydbnpc");
  
copyAttrs();
}

function 
copyAttrs()
{
  for(
temp.030i++)
  {
    
this.attr[i] = this.cont.attr[i];
  }
}
//#CLIENTSIDE
function onCreated()
{
  
//GUI stuff here, use attrs as you please to sort things out...

Reply With Quote