|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Thu Oct 17, 2002 10:35 pm
Equipment Database-Ark of the Covenant |
Ok..I've worked out capturing everything heres what i have
-Export to follow-
#CLASS {CID}
#ALIAS csayidweapon {say Name:@oname Wear bits:@wearbits Extra bits:@extrabits Weight:@weight Level:@level Cost: @cost WeaponType:@weapontype DamageDice:@damagedice Avg:@damageaverage DamageNoun:@damagenoun WeaponFlags:@weaponsflags Affects:Damroll:@damageaffect lvl @damageaflevel Hitroll @hitaffect lvl @Hitaffectlevel}
#ALIAS CReset {#VAR hitroll {} {_nodef};#VAR levelspell {} {_nodef};#VAR saves {} {_nodef};#VAR cost {} {_nodef};#VAR affectsdam {} {_nodef};#VAR affectshit {} {_nodef};#VAR damroll {} {_nodef};#VAR type {} {_nodef};#VAR weaponsflags {} {_nodef};#VAR oname {} {_nodef};#VAR wearbits {} {_nodef};#VAR extrabits {} {_nodef};#VAR weight {} {_nodef};#VAR level {} {_nodef};#VAR damagedice {} {_nodef};#VAR damageaverage {} {_nodef};#VAR damagenoun {} {_nodef};#VAR weapontype {} {_nodef};#VAR damageaflevel {} {_nodef};#VAR damageaffect {} {_nodef};#VAR hitaffect {} {_nodef};#VAR hitaffectlevel {} {_nodef};#VAR dexaffect {} {_nodef};#VAR dexlevel {} {_nodef};#VAR constitutionaffect {} {_nodef};#VAR constitutionaffectlevel {} {_nodef};#VAR spellsof {} {_nodef};#VAR saveslevel {} {_nodef};#VAR armorbash {} {_nodef};#VAR armormagic {} {_nodef};#VAR armorslash {} {_nodef};#VAR armorpierce {} {_nodef};#VAR hpaffect {} {_nodef};#VAR hpaffectlevel {} {_nodef};#VAR manaaffect {} {_nodef};#VAR manalevel {} {_nodef};#VAR haste {} {_nodef};#VAR sanctuaryaffect {1};#VAR detectmagicaffect {} {_nodef};#VAR detectevilaffect {} {_nodef};#VAR detectgoodaffect {} {_nodef};#VAR detectinvisaffect {} {_nodef};#VAR detecthiddenaffect {} {_nodef};#VAR iswand {} {_nodef};#VAR spellwands {} {_nodef};#VAR extradescriptionkeyword {} {_nodef};#VAR blind {} {_nodef};#VAR infrared {} {_nodef};#VAR curse {} {_nodef};#VAR afraid {} {_nodef};#VAR poison {} {_nodef};#VAR protectevil {} {_nodef};#VAR protectgood {} {_nodef};#VAR sneak {} {_nodef};#VAR hide {} {_nodef};#VAR sleep {} {_nodef};#VAR flying {} {_nodef};#VAR charm {} {_nodef};#VAR passdoor {} {_nodef};#VAR calm {} {_nodef};#VAR plague {} {_nodef};#VAR weaken {} {_nodef};#VAR darkvision {} {_nodef};#VAR berserk {} {_nodef};#VAR swim {} {_nodef};#VAR regeneration {} {_nodef};#VAR slow {} {_nodef};#VAR weightmultipl {} {_nodef};#VAR iscontainer {} {_nodef};#VAR capacity {} {_nodef};#VAR maxweight {} {_nodef};#VAR flags {} {_nodef};#VAR lvlspells {} {_nodef};#VAR spells {} {_nodef};#VAR isedible {} {_nodef}}
#VAR hitroll {}
#VAR levelspell {50}
#VAR saves {}
#VAR cost {0}
#VAR affectsdam {}
#VAR affectshit {}
#VAR damroll {}
#VAR type {}
#VAR weaponsflags {}
#VAR oname {a Tic Tac}
#VAR wearbits {take hold}
#VAR extrabits {glow hum}
#VAR weight {0}
#VAR level {50}
#VAR damagedice {}
#VAR damageaverage {}
#VAR damagenoun {}
#VAR weapontype {}
#VAR damageaflevel {}
#VAR damageaffect {}
#VAR hitaffect {}
#VAR hitaffectlevel {}
#VAR dexaffect {}
#VAR dexlevel {}
#VAR constitutionaffect {}
#VAR constitutionaffectlevel {}
#VAR spellsof {'sanctuary' 'bless' 'haste' 'reserved'}
#VAR saveslevel {}
#VAR armorbash {}
#VAR armormagic {}
#VAR armorslash {}
#VAR armorpierce {}
#VAR hpaffect {}
#VAR hpaffectlevel {}
#VAR manaaffect {}
#VAR manalevel {}
#VAR haste {}
#VAR sanctuaryaffect {1}
#VAR detectmagicaffect {}
#VAR detectevilaffect {}
#VAR detectgoodaffect {}
#VAR detectinvisaffect {}
#VAR detecthiddenaffect {}
#VAR iswand {}
#VAR spellwands {}
#VAR extradescriptionkeyword {}
#VAR blind {}
#VAR infrared {}
#VAR curse {}
#VAR afraid {}
#VAR poison {}
#VAR protectevil {}
#VAR protectgood {}
#VAR sneak {}
#VAR hide {}
#VAR sleep {}
#VAR flying {}
#VAR charm {}
#VAR passdoor {}
#VAR calm {}
#VAR plague {}
#VAR weaken {}
#VAR darkvision {}
#VAR berserk {}
#VAR swim {}
#VAR regeneration {}
#VAR slow {}
#VAR weightmultipl {}
#VAR iscontainer {}
#VAR capacity {}
#VAR maxweight {}
#VAR flags {}
#VAR lvlspells {}
#VAR spells {}
#VAR isedible {}
#TRIGGER {Name: (*)} {oname={%1}}
#TRIGGER {Level (%d) spells of: (*).} {levelspell={%1};spellsof={%2}}
#TRIGGER {Wear bits: (*)} {wearbits={%1}}
#TRIGGER {Extra bits: (*)} {extrabits={%1}}
#TRIGGER {Weight: (*)} {weight={%1}}
#TRIGGER {Level: (%d) Cost: (%d)} {level={%1};cost={%2}}
#TRIGGER {Weapon type is (*)} {weapontype={%1}}
#TRIGGER {Damage is (*) ~(average (*)~)} {damagedice={%1};damageaverage={%2}}
#TRIGGER {Damage noun is (%w).$} {damagenoun={%1}}
#TRIGGER {Affects damage roll by (%d), level (%d)} {damageaffect={%1};damageaflevel={%2}}
#TRIGGER {Affects hit roll by (%d), level (%d).} {hitaffect={%1};hitaffectlevel={%2}}
#TRIGGER {Weapons flags: (*)} {weaponsflags={%1}}
#TRIGGER {Affects dexterity by (*), level (*).} {dexaffect={%1};dexaflevel={%2}}
#TRIGGER {Affects saves by (%x), level (%d).} {saves={%1};saveslevel={%2}}
#TRIGGER {Affects constitution by (*), level (*).} {constitutionaffect={%1};constitutionaffectlevel={%2}}
#TRIGGER {Armor class is (*) pierce, (*) bash, (*) slash, and (*) vs. magic } {armorpeirce={%1};armorbash={%2};armorslash={%3};armormagic={%4}}
#TRIGGER {Affects hp by (*), level (*).} {hpaffect={%1};hpaffectlevel={%2}}
#TRIGGER {Affects mana by (*), level (*).} {manaaffect={%1};manalevel={%2}}
#TRIGGER {Affects strength by (*), level (*).} {strengthaffect={%1};strengthaffectlevel={%2}}
#TRIGGER {Adds detect_magic affect.} {detectmagicaffect={1}}
#TRIGGER {Adds detect_evil affect.} {detectevilaffect={1}}
#TRIGGER {Adds detect_good affect.} {detectgoodaffect={1}}
#TRIGGER {Adds detect_hidden affect.} {detecthiddenaffect={1}}
#TRIGGER {Adds detect_invis affect. } {detectinvisaffect={1}}
#TRIGGER {Adds sanctuary affect.} {sanctuaryaffect={1}}
#TRIGGER {Adds haste affect. } {haste={1}}
#TRIGGER {Has (*)~((*)~) charges of level (*) '(*)'.} {iswand={1};maxchargeswand={%1};levelwandcharges={%3};spellwands={%4}}
#TRIGGER {Extra description keywords: '*'} {extradescriptionkeywords={%1}}
#TRIGGER {Adds faerie_fire affect.} {faerie_fire={1}}
#TRIGGER {Adds infrared affect.} {infrared={1}}
#TRIGGER {Adds curse affect.} {curse={1}}
#TRIGGER {Adds afraid affect.} {afraid={1}}
#TRIGGER {Adds poison affect.} {poison={1}}
#TRIGGER {Adds protect_evil affect.} {protectevil={1}}
#TRIGGER {Adds protect_good affect.} {protectgood={1}}
#TRIGGER {Adds sneak affect.} {sneak={1}}
#TRIGGER {Adds hide affect.} {hide={1}}
#TRIGGER {Adds sleep affect.} {sleep={1}}
#TRIGGER {Adds charm affect.} {charm={1}}
#TRIGGER {Adds flying affect.} {flying={1}}
#TRIGGER {Adds pass_door affect.} {passdoor={1}}
#TRIGGER {Adds calm affect.} {calm={1}}
#TRIGGER {Adds plague affect.} {plague={1}}
#TRIGGER {Adds weaken affect.} {weaken={1}}
#TRIGGER {Adds dark_vision affect.} {darkvision={1}}
#TRIGGER {Adds affect berserk.} {berserk={1}}
#TRIGGER {Adds swim affect.} {swim={1}}
#TRIGGER {Adds regeneration affect.} {regeneration={1}}
#TRIGGER {Adds slow affect.} {slow={1}}
#TRIGGER {Capacity: (*)~# Maximum weight: (*)~# flags: (*)} {iscontainer={1};capacity={%1};maxweight={%2};flags={%3}}
#TRIGGER {Weight multiplier: (*)~%} {weightmultipl={%1}}
#TRIGGER {Level (*) spells of: '(*)'.} {lvlspells={%1};spells={%2};isedible={1}}
#CLASS 0
--I would like to know how I can convert this information into database entrys---
(Basicly..i figured out how to capture the whole thing..but i'm having problems figureing out how to add stuff to the db..) Also I'd like fields where i can add special notes which cant be automatically inserted-Area/Mob/VNum(for imm use)..and If Container-Key :)...Thanks in advance for helping a newbie like me debug this insane project
-Crell
-Zmud 6.16
-W95 P150 40mb ram 1.5gb hd
-Sage of Erets |
|
|
|
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Fri Oct 18, 2002 12:54 am |
When working with equipment databases, it's recommended you store the captured information to a database variable, also called a record varible. There two reasons for this: (1) Less variables to reset, create, or store in memory. (2) The #NEW command, which puts data into the database, is designed to work with record variables.
You assign information to a record variable three ways. In each example 'Item' is the record variable name, 'Name' is the key, and 'Orcbane' is the 'value'.
1. #ADDKEY Item Name Orcbane
2. #VARIABLE Item %addkey(Item, Name, Orcbane)
3. Item.Name = "Orcbane"
Adding other key-value pairs to the same variable could result in Item
being equal to {Name=Orcbane|Level=99|Damage=5}.
If Name, Level, and Damage are the names of fields in your Equipment database, then the command: #NEW All @Item would store "Orcbane" to Name, 99 to Level, and 5 to Damage in the database.
So what you need to do is rewrite this to employ one record variable, @Item, and fill it with keys and values. The keys must have the exact same name as your database fields.
Troubadour
(Win 98, Pentium III, 550 MHz) |
|
|
|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Fri Oct 18, 2002 6:57 pm |
Script Rewritten as follows
----
#CLASS {CID}
#ALIAS cidadd {#NEW All @Item}
#ALIAS creset {#var @item {} {_nodef}}
#TRIGGER {Name: (*)} {#ADDKEY Item oname {%1}}
#TRIGGER {Level (%d) spells of: (*).} {
#ADDKEY Item levelspell {%1}
#ADDKEY Item spellsof {%2}
}
#TRIGGER {Wear bits: (*)} {#ADDKEY Item wearbits {%1}}
#TRIGGER {Extra bits: (*)} {#ADDKEY Item extrabits {%1}}
#TRIGGER {Weight: (*)} {#ADDKEY Item weight {%1}}
#TRIGGER {Level: (%d) Cost: (%d)} {
#ADDKEY Item level {%1}
#ADDKEY Item cost {%2}
}
#TRIGGER {Weapon type is (*)} {#ADDKEY Item weapontype {%1}}
#TRIGGER {Damage is (*) ~(average (*)~)} {
#ADDKEY Item damagedice {%1}
#ADDKEY Item damageaverage {%2}
}
#TRIGGER {Damage noun is (%w).$} {#ADDKEY Item damagenoun {%1}}
#TRIGGER {Affects damage roll by (%d), level (%d)} {
#ADDKEY Item damageroll {%1}
#ADDKEY Item damagerolllevel {%2}
}
#TRIGGER {Affects hit roll by (%d), level (%d).} {
#ADDKEY Item hitaffect {%1}
#ADDKEY Item hitaffectlevel {%2}
}
#TRIGGER {Weapons flags: (*)} {#ADDKEY Item weaponsflags {%1}}
#TRIGGER {Affects dexterity by (*), level (*).} {
#ADDKEY Item dexaffect {%1}
#ADDKEY Item dexaflevel {%2}
}
#TRIGGER {Affects saves by (%d), level (%d).} {
#ADDKEY Item saves {%1}
#ADDKEY Item saveslevel {%2}
}
#TRIGGER {Affects constitution by (*), level (*).} {
#ADDKEY Item Constitution {%1}
#ADDKEY Item ConstitutionLvl {%2}
}
#TRIGGER {Armor class is (*) pierce, (*) bash, (*) slash, and (*) vs. magic} {
#ADDKEY Item armorpeirce {%1}
#ADDKEY Item armorbash {%2}
#ADDKEY Item armorslash {%3}
#ADDKEY Item armormagic {%4}
}
#TRIGGER {Affects hp by (*), level (*).} {
#ADDKEY Item hp {%1}
#ADDKEY Item hplevel {%2}
}
#TRIGGER {Affects mana by (*), level (*).} {
#ADDKEY Item mana {%1}
#ADDKEY Item manalevel {%2}
}
#TRIGGER {Affects strength by (*), level (*).} {
#ADDKEY Item Strength {%1}
#ADDKEY Item Strengthlevel {%2}
}
#TRIGGER {Adds detect_magic affect.} {#ADDKEY Item detectmagicaffect 1}
#TRIGGER {Adds detect_evil affect.} {#ADDKEY Item detectevilaffect 1}
#TRIGGER {Adds detect_good affect.} {#ADDKEY Item detectgoodaffect 1}
#TRIGGER {Adds detect_hidden affect.} {#ADDKEY Item detecthiddenaffect 1}
#TRIGGER {Adds detect_invis affect. } {#ADDKEY Item detectinvisaffect 1}
#TRIGGER {Adds sanctuary affect.} {#ADDKEY Item sanctuaryaffect 1}
#TRIGGER {Adds haste affect. } {#ADDKEY Item haste 1}
#TRIGGER {Has (*)~((*)~) charges of level (*) '(*)'.} {
#ADDKEY Item iswand 1
#ADDKEY Item maxchargeswand {%1}
#ADDKEY Item levelwandcharges {%3}
#ADDKEY Item spellwands {%4}
}
#TRIGGER {Extra description keywords: '*'} {#ADDKEY Item extradescriptionkeywords {%1}}
#TRIGGER {Adds faerie_fire affect.} {#ADDKEY Item faeriefire 1}
#TRIGGER {Adds infrared affect.} {#ADDKEY Item infrared 1}
#TRIGGER {Adds curse affect.} {#ADDKEY Item Curse 1}
#TRIGGER {Adds afraid affect.} {#ADDKEY Item afraid 1}
#TRIGGER {Adds poison affect.} {#ADDKEY Item poison 1}
#TRIGGER {Adds protect_evil affect.} {#ADDKEY Item protectevil 1}
#TRIGGER {Adds protect_good affect.} {#ADDKEY Item protectgood 1}
#TRIGGER {Adds sneak affect.} {#ADDKEY Item sneak 1}
#TRIGGER {Adds hide affect.} {#ADDKEY Item hide 1}
#TRIGGER {Adds sleep affect.} {#ADDKEY Item sleep 1}
#TRIGGER {Adds charm affect.} {#ADDKEY Item charm 1}
#TRIGGER {Adds flying affect.} {#ADDKEY Item flying 1}
#TRIGGER {Adds pass_door affect.} {#ADDKEY Item passdoor 1}
#TRIGGER {Adds calm affect.} {#ADDKEY Item calm 1}
#TRIGGER {Adds plague affect.} {#ADDKEY Item plague 1}
#TRIGGER {Adds weaken affect.} {#ADDKEY Item weaken 1}
#TRIGGER {Adds dark_vision affect.} {#ADDKEY Item darkvision 1}
#TRIGGER {Adds affect berserk.} {#ADDKEY Item berserk 1}
#TRIGGER {Adds swim affect.} {#ADDKEY Item swim 1}
#TRIGGER {Adds regeneration affect.} {#ADDKEY Item regeneration 1}
#TRIGGER {Adds slow affect.} {#ADDKEY Item slow 1}
#TRIGGER {Capacity: (*)~# Maximum weight: (*)~# flags: (*)} {
#ADDKEY Item iscontainer 1
#ADDKEY Item capacity {%1}
#ADDKEY Item maxweight {%2}
#ADDKEY Item flags {%3}
}
#TRIGGER {Weight multiplier: (*)~%} {#ADDKEY Item weightmultipl {%1}}
#TRIGGER {Affects wisdom by (*).} {#ADDKEY Item wisdom {%1}}
#CLASS 0
--Keeping this in mind..- Can you help me write an alias or so that does the following
-Searches for an item by 'Oname' ;)..
-Adds text to these fields of a Given item name (fields below)
-Area
-Vnum
-Mob
-Notes-Other Info
-Quotes out a given item ..in suitable form for Saying or otherwise communicating |
|
|
|
rwfrk Wanderer
Joined: 26 Feb 2002 Posts: 81 Location: USA
|
Posted: Sat Oct 19, 2002 3:29 pm |
While I know this is a different question..its related to the database..and since i'm still waiting for the response to my other questions..i was wondering..whats the easiest way to split the work between people. IE:I get all the items from zone A lored..they do B..etc ;)..we merge the db somehow..but how would this be easily done to avoid duplicate items? -Thanks in advance- 'You've all been very wonderful so far with your help in the past'
|
|
|
|
|
|
|
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
|
|