Ok, I was working on some random scripts, mainly for practice, and I have come to realize that I have never used a DB NPC, and I have a couple of questions I would love to get an answer to.
How can I use variables when using DB NPCs as flag holders
for example if i wanted to do something like:
PHP Code:
function onCreated(){
this.number = 1;
}
function onPlayerChats(){
if(player.chat == "/test"){
something = findNpc("Test");
something. [I want to use this.number in here].test = "This is a test";
}
}
How do I modify Flags on the DB NPC from itself? for example if i wanted to schedule something, like deleting flags or changing their values, how would I do this? or is there a better way for me to do this?
This might or might not be related to DB NPCs but I would like to know, what's the best way to work with comma separated values like for example in a variable.
something like:
PHP Code:
this.lol = "something, goes, in, here, lol";
Because I wanted to store multiple things on a flag separating them with commas...
I have some other questions, but I won't ask them until I am done organizing my ideas.
Thanks,
Seich