|
Enathe Novice
Joined: 17 Nov 2001 Posts: 34 Location: USA
|
Posted: Mon Sep 27, 2004 3:22 pm
Equipment Database using Identify |
I have browsed the forums and am having trouble putting together an EQ database. Here are some sample outputs:
You recite a scroll of identify which dissolves.
You feel informed:
Object 'a Shiny Silver Shield', Item type: ARMOR
Item will give you following abilities: PROT-EVIL
Item is: NOBITS
Weight: 10, Value: 5000, Rent: 10, Min Level: 0:29,
AC-apply is 5
Can affect you as :
Affects: HITROLL By 2
Affects: CHA By 4
Affects: DAMROLL By 1
You recite a scroll of identify which dissolves.
You feel informed:
Object 'a Crystal Longsword', Item type: WEAPON
Item will give you following abilities: LIGHT
Item is: GLOW HUM INVISIBLE MAGIC BLESS !EVIL !CLERIC !THIEF !BARD !APALADIN !MONK
Weight: 8, Value: 5000, Rent: 0, Min Level: 0:36,
Damage Dice is '8D7' for an average per-round damage of 32.0.
Can affect you as :
Affects: HITROLL By 2
Affects: DAMROLL By 2
You recite a scroll of identify which dissolves.
You feel informed:
Object 'Scarlet's tooth', Item type: WORN
Item is: MAGIC
Weight: 1, Value: 100, Rent: 0, Min Level: 0:35,
Can affect you as :
Affects: DAMROLL By 2
Affects: HITROLL By 2
What I would like it to be able to categorize by level (which as you notice lists as 0:35, the first number being the remort level and the second being the actual level), then by type (weapon, armor, other) and finally if possible by class restriction. Any suggestions to get me started would be most helpful.
Thanks and happy mudding! |
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
|
|
|
Enathe Novice
Joined: 17 Nov 2001 Posts: 34 Location: USA
|
Posted: Mon Sep 27, 2004 5:17 pm |
Took a look at the silverbridge.org tutorial on how to auto add in a database. Can't get even the name of the item to load into the database. I copied exactly what they had into my settings with one change which was this:
#CLASS {identify}
#TRIGGER {Object '${item.name}', Item type: ${item.kind}
} {}
#TRIGGER {$} {
#if (%find( @item.name) = "") {#new "" @item}
#t- identify
}
#CLASS 0
I followed instructions on the screen exactly and can't get the even the item name to go into the database. Any suggestions? |
|
|
|
Rorso Wizard
Joined: 14 Oct 2000 Posts: 1368
|
Posted: Mon Sep 27, 2004 5:26 pm |
Enathe wrote: |
Took a look at the silverbridge.org tutorial on how to auto add in a database. Can't get even the name of the item to load into the database. I copied exactly what they had into my settings with one change which was this:
#CLASS {identify}
#TRIGGER {Object '${item.name}', Item type: ${item.kind}
} {}
#TRIGGER {$} {
#if (%find( @item.name) = "") {#new "" @item}
#t- identify
}
#CLASS 0
I followed instructions on the screen exactly and can't get the even the item name to go into the database. Any suggestions? |
${item.name} should be &{item.name}
${item.kind} should be &{item.kind}.
The $ character means "Match beginning of line", and the &var syntax means "store the stuff here into variable var". |
|
|
|
Enathe Novice
Joined: 17 Nov 2001 Posts: 34 Location: USA
|
Posted: Mon Sep 27, 2004 6:15 pm |
Ok remade and started with simple capture. Then created another trigger to place into database. Looks like this so far.
#VAR type {WEAPON} {_nodef} "Identify"
#VAR name {a Crystal Longsword} {_nodef} "Identify"
#VAR abilities {LIGHT} {_nodef} "Identify"
#VAR restriction {GLOW HUM INVISIBLE MAGIC BLESS !EVIL !CLERIC !THIEF !BARD !APALADIN !MONK} {_nodef} "Identify"
#VAR remort {0} {_nodef} "Identify"
#VAR level {36} {_nodef} "Identify"
#VAR damroll {2} {_nodef} "Identify"
#VAR hitroll {2} {_nodef} "Identify"
#TRIGGER {Object '(%*)', Item type: (%w)} {#var item {%1};#var type {%2}} "Identify"
#TRIGGER {HITROLL By (%n)} {#var Hitroll %1} "Identify"
#TRIGGER {Item will give you following abilities: (%*)} {#var Abilities {%1}} "Identify"
#TRIGGER {Item is: (%*)} {#var restriction {%1}} "Identify"
#TRIGGER {Weight: (%n), Value: (%n), Rent: (%n), Min Level: (%n):(%n),} {#var remort %4;#var level %5} "Identify"
#TRIGGER {DAMROLL By (%n)} {#var Damroll %1} "Identify"
#TRIGGER {$} {#if (%find( @item) = "") {#new "" @name @type @remort @level @damroll @hitrol @abilities @restriction};#t- identify} "Identify"
Ok so next questions is. I would like a question box to pop-up and ask me what class I prefer to use this gear with. After answering the question I would like my answer to be a field in the database on that piece of gear which I can sort by. And thanks again for the help to start with I am on my way
Oh and one more thing. Is there a way I can get my trigger to capture only specific words? Sometimes an item has a description like this:
Item is: GLOW HUM INVISIBLE MAGIC BLESS !EVIL !CLERIC !THIEF !BARD !APALADIN !MONK
I would like to capture the !evil and make that @alignment, and then !thief and make it @restriction. Any way to do that?
Thanks |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Sep 27, 2004 8:52 pm |
Add either of these to your final trigger, before the #NEW command. Add the variable to the items input by the #NEW command.
#PROMPT class {What class do you prefer to use this gear with?}
#PICK {p:Pick a class} {o:1} {Cleric:#VAR class cleric} {Thief:#VAR class thief} {Bard:#VAR class bard} {Paladin:#VAR class paladin} {Antipaladin:#VAR class apaladin}
Make specific triggers.
#TR {Item is:* !EVIL} {#VAR alignment NoEvil}
#TR {Item is:* !Thief} {#VAR restriction NoThief} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
Enathe Novice
Joined: 17 Nov 2001 Posts: 34 Location: USA
|
Posted: Mon Oct 04, 2004 5:10 pm |
That worked very well with single entries, but how do I capture multiples such as an item that has 2 or more anti-classes?
Also, is there a way I can capture from a word document. A friend sent me a huge list of EQ in a word doc and the layout is straight from the mud and looks like this:
Object 'Armor of Shadows', Item type: ARMOR
Item is: GLOW HUM INVISIBLE MAGIC !DROP !EVIL !MONK
Weight: 25, Value: 101469, Rent: 0, Min Level: 0:99,
AC-apply is 75
Can affect you as :
Affects: DAMROLL By 5
Affects: SAVING_SPELL By -25
Affects: STR By 5
Affects: DEX By 3
How can I copy and paste this into the mud without causing a bunch of "Huh?"'s and errors? Or is there a way to import directly into the database?
Thanks again all for the wonderful help. I am cruising right along with a very nice EQ database! Happy Mudding!
Enathe |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Oct 06, 2004 5:42 am |
To answer the easy question first:
Quote: |
How can I copy and paste this into the mud without causing a bunch of "Huh?"'s and errors? Or is there a way to import directly into the database? |
Do it offline. Also, make sure you have Parsing disabled (computer icon by the command line).
Quote: |
how do I capture multiples such as an item that has 2 or more anti-classes? |
That depends on the field-type you use for restrictions. For a text-field, just add each restriction to the existing variable.
#TR {Item is:* !Thief} {#IF (@restriction) {#VAR restriction {@restriction NoThief}} {#VAR restriction NoThief}}
P.S. Don't forget to clear ALL the variables you use between identifies. You don't want the results of one identify to carry over to the next one.
#VAR restriction {} |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
|
|