Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-31-2007, 06:58 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Database objects

I don't know if this, or anything akin to this, is already possible... so excuse this post if it is. I propose a new type of object, database objects. These would be much like a spreadsheet, where you create a database, and can add/remove rows and columns.

NPC Code:

items = new TstaticDB(); // sorry, I dunno how you initialize new variables

items.createrow("Image"); // Creates a row named 'Image'
items.createrow("Weaponname"); // Creates a row 'Weaponname'
items.createrow("Weight"); // Creates a row 'Weight'
items.addcolumn("Bow"["Image"="wbowi1.png","Weaponname"="-Bow","Weight"=6]]); // Adds a named Bow, specifying the rows for the Image,Weaponname, and Weight

items.deleterow("Weaponname") // Removes the row 'Weaponname'



and to access the database object:

NPC Code:

temp.test=items.column("Bow"); // would return {wbowi1.png,-Bow,6}
temp.test=items.row("Image"["Bow"]); // would return wbowi1.png
temp.test=items.row("Image"); // would return an array of all items in the Image row



I was posting this as I went, so things might be disorganized, and it might not be the best design of commands and such, but I think you get the idea. If anyone has suggestions on what to add to this, go ahead.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:27 PM.


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