|
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Sat Jan 05, 2002 12:46 am
Eq Database |
Like all other subjects pertaining to zMUD, I'm an utter enwbie with databases. How would I start an Eq database, heres what the output looks like when I identify an item.
You finish the chant.
Your eyes flash at Paw of the Displacement Beast.
Name : Paw of the Displacement Beast
Special : There is nothing special about this object.
Class : About 1
Enchanted : No
Cursed : No
Value : 1520
Emits Light : No
Slots : left hand
Breakable : No
Chestable : Yes
Stat Bonuses :
wis : 4
int : 4
sp_regen : 8
Done.
You finish the chant.
Your eyes flash at Wizards' Wand.
Name : Wizards' Wand
Special : There is nothing special about this object.
Type : blunt
Class : About 9
Enchanted : No
Cursed : No
Value : 11460
Poisoned : No
Emits Light : No
Magical Damage : None
Handed : 1
Breakable : Yes
Chestable : Yes
Stat Bonuses :
wis : 8
sp_regen : 7
Done.
Ok, hope the spaces doesn't matter, because I'm too lazy to insert all the spaces on the weapon.
The possible stat bonuses are: str, dex, con, sta , int, wis, cha, hp_regen, sp_regen, ep_regen
So how would I do this?
|
|
|
|
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Sun Jan 06, 2002 6:53 am |
NObody knows? Or maybe it's just too far down to notice
|
|
|
|
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Sun Jan 06, 2002 8:08 am |
Here's some more, maybe they'll help:
You finish the chant.
Your eyes flash at Damien the protector.
Name : Damien the protector
Special : There is nothing special about this object.
Class : About 26
Enchanted : No
Cursed : No
Value : 7200
Emits Light : No
Slots : right hand, right finger and right arm
Breakable : No
Chestable : Yes
Stat Bonuses :
dex : 10
Skill Bonuses :
weapon parry : 4
dodge : 5
Done.
You finish the chant.
Your eyes flash at Hagworth's golden shield.
Name : Hagworth's golden shield
Special : There is nothing special about this object.
Type : shield
Class : About 19
Enchanted : No
Cursed : No
Value : 2620
Poisoned : No
Emits Light : No
Magical Damage : None
Handed : 1
Breakable : Yes
Chestable : Yes
Stat Bonuses :
con : 3
Done.
Dunno how you could do skill bonuses (theres probly spell bonuses also) Maybe just a comment for extra skill/spell bonuses
|
|
|
|
einar Wanderer
Joined: 06 Nov 2000 Posts: 80 Location: USA
|
Posted: Sun Jan 06, 2002 8:21 am |
[quote]
Here's some more, maybe they'll help:
You finish the chant.
Your eyes flash at Damien the protector.
Name : Damien the protector
Special : There is nothing special about this object.
Class : About 26
Enchanted : No
Cursed : No
Value : 7200
Emits Light : No
Slots : right hand, right finger and right arm
Breakable : No
Chestable : Yes
Stat Bonuses :
dex : 10
Skill Bonuses :
weapon parry : 4
dodge : 5
Done.
You finish the chant.
Your eyes flash at Hagworth's golden shield.
Name : Hagworth's golden shield
Special : There is nothing special about this object.
Type : shield
Class : About 19
Enchanted : No
Cursed : No
Value : 2620
Poisoned : No
Emits Light : No
Magical Damage : None
Handed : 1
Breakable : Yes
Chestable : Yes
Stat Bonuses :
con : 3
Done.
Dunno how you could do skill bonuses (theres probly spell bonuses also) Maybe just a comment for extra skill/spell bonuses
|
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sun Jan 06, 2002 4:24 pm |
Basically you create triggers for every line of information and one that knows when the information from the chant has stopped. Finally, you need an alias that will enable the class that contains the triggers and does the chant. The trigger that knows when the information from chant has stopped is the one that will add the item to the database. Here is an example script based on what you provided:
#ALIAS chant {#VAR Item "";#T+ db;cast chant %1}
#TRIGGER {Name : &Item.Name} {} "db"
#TRIGGER {Special : ({^There is nothing special about this object.})} {#ADDKEY Item {Special=%1}} "db"
#TRIGGER {Class : About &%dItem.Class} {} "db"
#TRIGGER {Enchanted : &%wItem.Enchanted} {} "db"
#TRIGGER {Cursed : &%wItem.Cursed} {} "db"
#TRIGGER {Value : &%dItem.Value} {} "db"
#TRIGGER {Emits Light : &%wItem.Light} {} "db"
#TRIGGER {Slots : &Item.Slots} {} "db"
#TRIGGER {Breakable : &%wItem.Breakable} {} "db"
#TRIGGER {Chestable : &%wItem.Chestable} {} "db"
#TRIGGER {str : &%dItem.Str} {} "db"
#TRIGGER {dex : &%dItem.Dex} {} "db"
#TRIGGER {con : &%dItem.Con} {} "db"
#TRIGGER {sta : &%dItem.Sta} {} "db"
#TRIGGER {int : &%dItem.Int} {} "db"
#TRIGGER {wis : &%dItem.Wis} {} "db"
#TRIGGER {cha : &%dItem.Cha} {} "db"
#TRIGGER {hp_regen : &%dItem.Hp_Regen} {} "db"
#TRIGGER {sp_regen : &%dItem.Sp_Regen} {} "db"
#TRIGGER {ep_regen : &%dItem.Ep_Regen} {} "db"
#TRIGGER {Type : &%wItem.Type} {} "db"
#TRIGGER {Poisoned : &%wItem.Poisoned} {} "db"
#TRIGGER {Magical Damage : ({^None})} {#ADDKEY Item {MDam=%1}} "db"
#TRIGGER {Handed : &%dItem.Handed) {} "db"
#TRIGGER {Done.} {#NEW View @Item;#T- db} "db"
So, this is the script, but first you need to have the database created. You need to create a filed for each piece of information that is gathered here (Name, Special, Class, Enchanted, etc) and each field should have the same name that is used in the script. If the script stores the name of the weapon/armor in Item.Name, then there must be a field Name.
You should also decide on which type each field will be. I think that the ones that are Yes/No should be boolean, the ones with numbers only (including Class - since it is stored as anumber) should be type *cough* number and the rest text.
The next step is creating views. Not every field is relevant for every item. For example, armor doesn't have magical damage and weapons don't have Slots. So you can create a view for weapons and one for armor (and as many more as you please) with each view containing only the relevant fields for that item.
Now, in the last trigger the script has:
#NEW View @Item
You need to specify that argument View. If you don't specify it the item will go to the all view. Since you want the database to be nice and organized, you need to figure out a way to determine to which view the item belongs and supply it there. I suggest checking to see if the Item to be added has key Slots defined or a key MDam defined (if Slots is defined it is armor, if MDam is defined it is weapon) and use that to know to which view it belongs.
I leave the skill and spell bonuses to you, but like you said, you could just grab them all, concat them into one big string and put it into one field. Also, you could get more elborate and define the Slots field as an Option List and parse what you get from chant so it will be entered here.
If you need to know anything about the triggers, syntax, or terms I'm using here, I suggest reading the help file and looking for them. If you are still confused, feel free to post here with your questions.
Kjata |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|