|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Wed Jan 28, 2015 10:40 pm
database questions |
Hi I am new to using databases but I would like to make 2 databases 1 for NPC (mobs) and the other for Quests.
I want the npc database to contain the fields Name Type and Location
for example one such entry would be wise man Healer 43067
where wise man is the name, healer is the type and 43067 is the location of the npc on the map i use
I would like to be able to query the database from the command line and have the results shown. should I use the
old database or sql database for queries. Which is faster and does it matter |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Wed Jan 28, 2015 10:52 pm |
You might want to consider a database variable instead.
They are quicker to access i believe, and easier (for me at least) to manipulate.
$thisMob=wise man
#ADDKEY mobs.${thisMob} Type Healer
#ADDKEY mobs.${thisMob} Location 43067 |
|
_________________ Discord: Shalimarwildcat |
|
|
|
teion Wanderer
Joined: 03 May 2005 Posts: 72
|
Posted: Wed Jan 28, 2015 11:00 pm |
am I limited on the number of keys I can add to a database? Additionally for the database Quests I will have three fields - the last field will be the notes field which will contain a fairly large amount of data.
Would a database variable suffice for something like this |
|
Last edited by teion on Wed Jan 28, 2015 11:03 pm; edited 1 time in total |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Wed Jan 28, 2015 11:02 pm |
I am sure there is some practical limit... but i have had databases several layers deep, and thousands wide.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Sun Mar 01, 2015 10:28 pm |
Say I have:
#ADDITEM People.Scarn Race=edain
#ADDITEM People.Scarn Profession=warrior
#ADDITEM People.Scarn PvP=on
#ADDITEM People.Scarn AFK=no
How can I replace items within the variable, I have tried %replaceitem but to no avail.
#CALL %replaceitem(wizard, @People.Scarn.Profession)
Any ideas? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4715 Location: Pensacola, FL, USA
|
Posted: Sun Mar 01, 2015 11:10 pm |
#ADDKEY not #ADDITEM, and it overwrites.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Scarn Apprentice
Joined: 24 Jul 2005 Posts: 137
|
Posted: Mon Mar 02, 2015 3:46 am |
Super, thank you.
|
|
|
|
|
|