Thread: Npc db
View Single Post
  #1  
Old 01-10-2009, 02:04 AM
Seich Seich is offline
Noctorious' NeoHunter
Seich's Avatar
Join Date: Jun 2008
Location: Honduras
Posts: 193
Seich will become famous soon enough
Send a message via MSN to Seich Send a message via Yahoo to Seich
Npc db

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
Reply With Quote