Quote:
Originally Posted by Ronnie
Database NPC's (Also known as DB NPCs) Are pretty useful can store flags into them, and can only be reached serverside, good for like logging stuff such as say a tip char. Can also be used say if the player is not online tell the DB NPC that when the player is online to do blah and such.
|
I know what DBs ARE, just not how to use them. Like, do I just put flags on them and then use getters and setters? Like I could have a string as a flag called current and say in the flags
current = BlackHolst Level4 BlazianBandits Level5 Pelikano Level1
then have methods like
NPC Code:
function getCurrent()
{
return current;
}
function addCurrent(str)
{
current += " " + str;
}
function deleteFirst
{
str[] = current.tokenize();
current = "";
for (i = 2; i < current.length(); i++)
{
current += " " + str[i];
}
}
or do they work differently?
I guess I'm asking: how do you access the flags of a database to modify or obtain data?