Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-11-2009, 09:23 PM
Ronnie Ronnie is offline
Registered User
Join Date: Jun 2008
Location: Nj, USA
Posts: 48
Ronnie is on a distinguished road
Send a message via AIM to 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.
Reply With Quote
  #2  
Old 01-11-2009, 11:01 PM
Spikedude Spikedude is offline
Senator Amsel Zephlyn
Spikedude's Avatar
Join Date: Jul 2006
Posts: 283
Spikedude will become famous soon enough
Quote:
Originally Posted by Ronnie View Post
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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.