Zorprime Newbie
Joined: 01 Feb 2003 Posts: 4 Location: USA
|
Posted: Thu Apr 15, 2004 1:18 pm
Eq Script to database |
Hi...
I have a script that displays lore info about a weapon or armour when i examine my inventory. When i type inventory this is what I see:
# Item
-- -------------------------------------------------------------
1 *Strike Team Battle Suit (worn).
1 *Crimson Boots (worn on feet).
1 Orb of light.
1 *Crimson Helmet (worn on head).
1 *Cloak of the Bugbear (worn).
1 *Crimson Shield.
1 *Gloves of the Bugbear (worn).
1 A suit of VERY dense armor.
1 *Cell's Tail (wielded) (enchanted).
1 *An auction line.
1 A gold wedding ring (worn)
1342 coins (weightless)
I found a script in the forums and modified it so i can get the lore info about the item. Thus:
# Item
-- -------------------------------------------------------------
1 *Strike Team Battle Suit (E/B: 7/7 (28))(worn).
1 *Crimson Boots (E/B: 3/3 (20))(worn on feet).
1 Orb of light.
1 *Crimson Helmet (E/B: 3/3 (21))(worn on head).
1 *Cloak of the Bugbear (E/B: 2/3 (35))(worn).
1 *Crimson Shield.
1 *Gloves of the Bugbear (worn).
1 A suit of VERY dense armor.
1 *Cell's Tail (wielded) (enchanted).
1 *An auction line.
1 A gold wedding ring (worn).
1342 coins (weightless)
This is the script that I am using:
#CLASS {EquipmentInfo}
#VAR EQechoColor {brown}
#VAR EQlist {Icodileies' Armour|Strike Team Battle Suit|Crimson Boots|Crimson Helmet|Cloak of the Bugbear}
#VAR EQattributes {E/B: 7/7 (37)|E/B: 7/7 (28)|E/B: 3/3 (20)|E/B: 3/3 (21)|E/B 2/3 (35)}
#TRIGGER {({@EQlist})} {#Sub {%1 ~(%ansi( %eval( @EQechoColor))%item( @EQattributes, %ismember( "%1", @EQlist))%ansi( def)~)}} "" {notrig}
#CLASS 0
The script has worked well in the past but now i have reached over 250 items in the strings EQlist and EQattributes. On occasion I have experienced crashes and errors. So I figure it is time to move all of this over to a database which would be more flexible and I could add and update items.
After reading through forums and help files I still am clueless about how to do this. Each record in the database would have as fields:
EQname, Slashing, Crushing, EQprotection
Thus:
Strike Team Battle Suit,7,7,37
Can anyone point me in the right direction to display this info the same way I did in the previous script? Any assistance is greatly appreciated.
ZorPrime |
|