View Single Post
  #6  
Old 05-24-2011, 07:20 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by cbk1994 View Post
Create a DB NPC named Test.

PHP Code:
Test.foo "bar";
echo(
Test.foo); // echoes bar 
you can right-click the DBNPC and choose "Edit Flags" to see what data is stored in it.

If you're having trouble with DBNPC flags resetting or rolling back (I haven't experienced this in the past few years, but I seldom use DBNPCs for data storage anymore), use:

PHP Code:
Test.trigger("update"); 
This should force it to save.

Keep in mind that you can only access DBNPC data from serverside.
findNPC( str NPCname ) please (since there could also be a weapon named "Test" with public functions...)
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote