Eq
Home zMUD stuff Areas Eq EQdb WellStuffs

 

Updated 980725, and has had visitors since 980807

This page

Here i hope to get some kind of eqpage going. With some luck it will be including a database of a lot of the more interesting eq, with searchable features. If everything goes as planned you ought to be able to find out what would be the ultimate ac setup for a certain type of combo etc. This is prolly a rather farfetched thing tho, so what we can do meanwhile is to drop some IDtriggers and perhaps an IDfile wich ya can load home to yer own machine, and use an alias to search. The IDfile i currently have is much to small to be worth downloading, but hopefully it will come soonish.

Hold down shift and click here for a small ID file to start ya out. (25th juli 98, 280ish items)

Hold down shift and click here for an example .mudfile wich has most of those triggers off at all times, but activates em when they see an ID and if name isen't in file, adds the item. This file is more accuarate than the triggers down on this side. But the text down here will still enable ya to understand what this file does and i didn't feel like updating them yet :) prolly more bugs will show up anyways.

The eq-triggers

The idea is to have a couple of triggers that catch an items stats, and if the item isen't in the eqfile, add the item to it. Then using the zMUD built in function %grep to search the file. All of this is of course rather basic, but it includes a bunch of triggs and it's not a very well tested thing, so dont be surpriced if U find bugs etc. One problem i do have is with grep and "," for instance. I am now limiting the triggers to only add things whoose name isen't currently in the file, and not whoose whole line isen't in the file, due to that problem. The file i use is a regular text file.

Lets start with making the text file work and making aliases for operating it. First we want to be able to add items to the current file:

#alias {addstat} {#file 1 eq.txt;#write 1 @ITEMSTATS;#close 1}

This alias of course requires the variable ITEMSTATS wich is supposed to contain the stats we want in one long line. If we have an eq.file already and want to try and find something in it we can use this alias:

#alias {getstats} {#file 1 eq.txt;#var GREPSTATS %grep(1,%0);#close 1;#forall @GREPSTATS {#show %i}}

The %grep feature adds every line wich has a matching pattern to %0 (all arguments to the alias as opposed to %1 beeing the first) to the variable GREPSTATS as a list. Each line of the textfile eq.txt will become one item in the list.

Now to dig the information from a regular ID to variables we need a bunch of triggers depending on the type of item etc. Certain data will always appear whatever itemtype it is, so lets start with those. The first one is rather ugly because i wanted weapons averagedamage in my file, and therefore needed to check if it was a weapon, and then used the same method to catch spells. What it does is basically initialize a new item and remember if it is a particular type (weapon or scroll/wand/staff/potion). The second one is also part of the initializing stuff and making sure itemstats is cleared. The third one adds all class minlevs, using * to get "-":s and the fourth gets flags. The %trim thing just removes blanks, and might not be needed.

#action {Object (*), Item type: (%w), Worn: (*)} {#var ItemStats {%3, %1, %2};#var ItemName {%1};#if (%2=WEAPON) {#var WeaponID 1};#if (%trim(%2)=STAFF OR %trim(%2)=SCROLL OR %trim(%2)=WAND OR %trim(%2)=POTION) {#var StaffID 1}}

#action {You feel informed:} {#var ItemStats { };#t+ IDstuff2;#var Charges {0}}

#action {%s{Magician|Priest|Rogue|Fighter|Warlock|Nightblade|Templar}: (*)} {#var ItemStats {@ItemStats , %1}}

#action {Item is: (*)} {#var ItemStats {@ItemStats , %1}}

Then we need to get the affects. Since affects tend to be added and i didn't have a full list of availble ones i decided to add them as they looked, the %s is just to show there is a number of spaces before, and not really necessary.

#action {%sAffects : (*)} {#var ItemStats {@ItemStats , %1}}

We also need AC-apply for armours:

#action {AC-apply is (*)} {#var ItemStats {@ItemStats , %1}}

Now for the weaponspecific stuff. To get the average damage i made an alias to calculate it since it is a tad messy catching .5:s. Basically if the two dieces multiplyed and with the first one added dosen't divide correctly into two (%mod) we need to add the text ",5". This one isen't pretty and i'm not sure the evaluate, [ ], stuff is needed, but it worked this way :)

#alias {snitt} {#math SnittMax ((%1*%2)+%1); #if (%mod(@Snittmax,2)) {#var Snitt [%concat(@Snittmax/2,",5")]} {#var Snitt [@Snittmax/2]}}

This gives us the trigger:

#action {Damage Dice is '(%d)D(%d)'} {snitt %1 %2;#var VapenSkada {%1d%2 (@Snitt)}}

Wich creates a new variable VapenSkada containg the weapons dam in format: 1d2 (avg). But we might also want to know what type of damage the weapon does, due to BS and vulnerabilities etc:

#action {Damage type is (*) ~((*)~)} {#var VapenSkada {@VapenSkada , %1 (%2)}}

Now we need to figure out how to catch spells and the wand/staff/scroll/potion attributes. Since the spells are added to the ID on a line by themselves we need to work with checking for a newline ($, last trigger) and adding everything from the line. To further complicate things there can be affects wich are shown after the spells on some staffs. This means we need to work with fulllinecatcher that is only activated at a certain time, like with autopeek.

#action {Level (%d) spell of:} {#var SpellStats {Lev%1:};#t+ IDspells}

#action {(*)} {#var SpellStats {@SpellStats %1}} IDspells

#action {Can affect you as :} {#t- IDspells}

Notice that sofar we only turned it off if it runs into affects, we also need to turn off catcher when we run into a newline wich is done by the last trigger. But since staffs and wands have charges we'll want the following trigger too:

#action {Has (%d) charges, with (%d) charges left.} {#var Charges {%1(%2)}}

Once the item is fully IDed we want to add the VapenSkada or SpellStats and Charges variables to ITEMSTATS wich i chose to do this way due to the need to catch spells and to check if we have this item in the file already:

#action {$} {#t- IDspells;#t- IDstuff2;#if (@WeaponID) {#var ItemStats {@itemstats, @VapenSkada}};#if (@StaffID) {#var Itemstats {@ItemStats , @SpellStats}};#var WeaponID 0;#var StaffID 0;#if (@Charges) {#var Itemstats {@Itemstats, @Charges}};kollaaddid} IDstuff2

On newline, turn off spellcatching, turn off mself, if i just IDed a weapon, add it's damage, if it was a spelltype, add what spells and if it had charges, add that. Quite messy, but seems to work. The one thing here thats needs clarifying is of course kollaaddid, wich is my alias for checking if this item should be added to the eqfile:

#alias {KollaAddId} {getstats @itemname;#if (@Grepstats="") {addstat}}

Since we took out the names of the current item i compare that to all the lines in the life. The problem i had was that the %grep function wouldn't take "," wich i want there for easy databaseimporting, so i settled with checking name only. This should be solvable, but i didn't feel like it when i made the triggs :)

To play around a little with those triggers once U have a file U might wanna add something like:

#action {^(%w) tells you 'ID: (*)'} {getstats %2;#forall @GREPSTATS {tell %1 %i}}

But make sure you have that "^" (only triggers on newline) or some1 could make you spam ppl by: gossip Lorgalis tells you 'ID: a' or something :)