Elanthipedia Shops (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
No edit summary
No edit summary
 
(39 intermediate revisions by the same user not shown)
Line 7: Line 7:
This script creates Elanthipedia forms for shops (that use the {{com|shop}} verb). The results are logged to the Shop file in Genie's Logs folder.<br>
This script creates Elanthipedia forms for shops (that use the {{com|shop}} verb). The results are logged to the Shop file in Genie's Logs folder.<br>
<br>
<br>
This script is intended for experience Elanthipedia contributors only. The forms that are created by this script require some manual editing. (See below for details.) Please check for errors before posting them to Elanthipedia.
This script is intended for experienced Elanthipedia contributors only. The forms that are created by this script require some manual editing. (See below for details.) Please check for errors before posting them to Elanthipedia.


==Instructions==
==Instructions==
Line 13: Line 13:
===Syntax===
===Syntax===


{{tt|.eshop [item noun] (yes)}}: Type yes if you want the script to create the ''Store At A Glance'' and ''ShopDescription'' sections. Otherwise, just type the item noun. (''Store At A Glance'' is used once per shop. ''ShopDescription'' is used once per room.
{{tt|.eshop (yes)}}: Type yes if you want the script to create the ''Store At A Glance'' and ''ShopDescription'' sections. (''Store At A Glance'' is used once per shop. ''ShopDescription'' is used once per room.


A menu will prompt you to select the type of item you're adding:
A menu will prompt you to select the type of item you're adding:
Line 19: Line 19:
#Weapon
#Weapon
#Shield
#Shield
#Armor
#Armor/Barding
#Item: Clothing
#Item: Jewelry
#Item: Housing
#Item: Food/Drink
#Item: Other
#Item: Other
<br>
<br>
Line 31: Line 27:
You must install and use this alias to set the shop surface variable.
You must install and use this alias to set the shop surface variable.


<pre>#alias {shopv} {#var shop $0}</pre>
<pre>#alias {aps} {appraise $0 $preposition $shop quick}
#alias {sh} {shop $0 on $shop}
#alias {sha} {shop $0 on $shop;appraise $0 on $shop careful}
#alias {shs} {shop;shop $shop}
#alias {sv} {#var shop $0}</pre>
<br>
<br>
The "shop surface" is the thing on which the item is placed (for example, ''table'', ''second rack'', or '' oak shelf'').
The "shop surface" is the thing on which the item is placed (for example, ''table'', ''second rack'', or '' oak shelf''). Every time you change shop surfaces (via the '''sv''' alias), you need to use the '''shs''' alias to set the preposition.



----
----
Line 42: Line 41:
#trigger {^You .+ worth .+ kronars} {#var currency Kronars}
#trigger {^You .+ worth .+ kronars} {#var currency Kronars}
#trigger {^You .+ worth .+ lirums} {#var currency Lirums}</pre>
#trigger {^You .+ worth .+ lirums} {#var currency Lirums}</pre>



----
----
You must install these triggers to set the preposition variable. (Appraise something once to set it.)
You must install these triggers to set the preposition variable. (Use the '''shs''' alias to set it every time you change shop surfaces.)


<pre>#trigger {^In .+, you see:$} {#var preposition in}
<pre>#trigger {^Behind .+, you see:$} {#var preposition behind}
#trigger {^In .+, you see:$} {#var preposition in}
#trigger {^On .+, you see:$} {#var preposition on}
#trigger {^On .+, you see:$} {#var preposition on}
#trigger {^Under .+, you see:$} {#var preposition under}</pre>
#trigger {^Under .+, you see:$} {#var preposition under}</pre>

===Sample Usage (Walkthrough)===

====Running the Script====

You want to add inventory for [[Misenseor Goods (4)]], so you go to a room in that shop. (For the purpose of this walkthrough, I will assume that nothing has been posted on this shop's page.)

<pre>> shop
The following items contain goods for sale:

an iron hook
a birch pedestal
a huge cedar rack
an antique fretwork table

[Type SHOP [ITEM] to see what's on it.]</pre>

The first surface with items to buy is the antique fretwork table, so you type '''sv fretwork table''' to set the shop surface variable. (You won't see anything when you do this.)<br>
<br>
Then you type '''shs''' to set the preposition variable (so the script knows whether to look on, in, or under the table).

<pre>> shs
On the fretwork table, you see:

a mammoth Botolf war icon set atop a bloodstained haft of hickory for 902000 copper Dokoras
a mammoth Be'ort war icon set atop a haft of weeping willow for 902000 copper Dokoras
a mammoth Asketi war icon set atop a haft of blighted mikkhalbamar for 902000 copper Dokoras
a mammoth Huldah war icon set atop a haft of silver-green mistwood for 902000 copper Dokoras
a mammoth Dergati war icon set atop a haft of black walnut for 902000 copper Dokoras
a mammoth Trothfang war icon set atop a haft of veiny copperwood for 902000 copper Dokoras
a mammoth Harawep war icon set atop a haft of burrowed oak for 902000 copper Dokoras

The inventory of an antique fretwork table rotates.

[Type SHOP [GOOD] to see some details about it.]</pre>

To run the script, you type '''.eshop yes'''. (Typing "yes" causes the script to generate a "Store At A Glance" and a "ShopDescription." If you already had that, you'd just type '''.eshop'''.)

<pre>ITEM TYPE:

1: Weapon

2: Shield

3: Armor/Barding

4: Item: Other

Enter Type Number:</pre>

The war icon is a weapon, so you enter '''1'''.<br>
<br>
The script then generates a ShopHeader section with item links and prices.<br>
<br>
Once it's done, you move on to the ''huge cedar rack''. (Type '''sv cedar rack''' and then '''shs'''.)

<pre>> shs
On the cedar rack, you see:

some silver-blue scythewing moth handwraps for 72160 copper Dokoras
a holy water sprinkler studded with stony basilisk fangs for 99220 copper Dokoras
a steel jambiya with a hilt wrapped in membranous kartais wing for 36080 copper Dokoras
a serrated bone-white scythe hung with a pair of sluagh claws for 63140 copper Dokoras
a twisted black horn for 8118 copper Dokoras
a dark crimson sword etched with spidery lightning for 8118 copper Dokoras
a golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather for 13530 copper Dokoras
an oaken impalement stake branded with viperous coils for 9020 copper Dokoras
a granite mace sculpted like a gaunt greenish fist for 4510 copper Dokoras
a morning star studded with Adan'f tail barbs for 10824 copper Dokoras
a silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather for 13530 copper Dokoras

[Type SHOP [GOOD] to see some details about it.]</pre>

Start by typing '''.eshop'''. (You don't type ''yes'' this time, because you already have the Store At A Glance and a ShopDescription.)<br>
<br>
Repeat this process for every shop surface in the room. When you're done with the room, move on to the next room (if there is one) or open your Shop log (if that was the last room). Every time you move to a new room, include "yes" to generate the room's ShopDescription.

====Editing the Shop Form====

See Required Manual Editing ([[Elanthipedia_Shops_(script)#Required_Manual_Editing|below]]) for details about how to edit shop forms.<br>
<br>
When you're done with the fretwork table and the cedar rack, your Shop log should look like this:

<pre>{{Store At A Glance
|Store Name =Misenseor Goods, Zealous Destruction
|Province =
|Town =
|MapNumber =
|Owner =n
|NumRooms =
|restrict =
|levelres =
|Store Type =[Guild],[Race],Alchemy,Armor,Barber,Boat,Cambrinth,Casino,Clothing,Container,Cosmetics,Crafting,Drink,Dye,Embroidery,Engraving,Estate Holder,Face Painting,Festival,Fishing Supply,Fletching,Florist,Food,Forging Supply,Furrier,Game,Gem,General,Heraldry,Herb,Hider,Horse,Housing,Jewelry,Juggling,Locksmithing,Magic,MAMAS,Map,Miscellaneous,Music,Origami,Pawn,Perfume,Pet,Rare Materials,Repair,Shield,Spellbook,Tack,Tanning,Tattoo,Tobacco,Toy,Trinket,Vault Furniture,Weapon,Wedding
|Fest =
|Coin =Dokoras
}}
{{ShopDescription
|roomname=Misenseor Goods, Zealous Destruction
|desc=The pinewood walls enclosing this side of the shop are equipped with implements of battle for the use of warrior monks. Large twin bowls, filled with red liquid, flank a stylized thirteen-pointed star burnt into the wall between the room's two egresses.<br />
You also see an iron hook with a strap of braided mey mosshair on it, a birch pedestal with several things on it, a huge cedar rack with several things on it and an antique fretwork table with several things on it.<br />
Obvious exits: southwest, northwest.
}}
{{ShopHeader|title=On the fretwork table}}
{{ShopItem|t= w | mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood | 902000 }}
{{ShopItem|t= w | mammoth Zachriedek war icon set atop a haft of sickly aspen | 902000 }}
{{ShopItem|t= w | mammoth Botolf war icon set atop a bloodstained haft of hickory | 902000 }}
{{ShopItem|t= w | mammoth Be'ort war icon set atop a haft of weeping willow | 902000 }}
{{ShopItem|t= w | mammoth Asketi war icon set atop a haft of blighted mikkhalbamar | 902000 }}
{{ShopItem|t= w | mammoth Huldah war icon set atop a haft of silver-green mistwood | 902000 }}
{{ShopItem|t= w | mammoth Trothfang war icon set atop a haft of veiny copperwood | 902000 }}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t= w | silver-blue scythewing moth handwraps | 72160 }}
{{ShopItem|t= w | holy water sprinkler studded with stony basilisk fangs | 99220 }}
{{ShopItem|t= w | steel jambiya with a hilt wrapped in membranous kartais wing | 36080 }}
{{ShopItem|t= w | serrated bone-white scythe hung with a pair of sluagh claws | 63140 }}
{{ShopItem|t= w | twisted black horn | 8118 }}
{{ShopItem|t= w | dark crimson sword etched with spidery lightning | 8118 }}
{{ShopItem|t= w | golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather | 13530 }}
{{ShopItem|t= w | oaken impalement stake branded with viperous coils | 9020 }}
{{ShopItem|t= w | granite mace sculpted like a gaunt greenish fist | 4510 }}
{{ShopItem|t= w | morning star studded with Adan'f tail barbs | 10824 }}
{{ShopItem|t= w | silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather | 13530 }}
|}</pre>

#Most of the Store At A Glance table can't be filled out by the script, so the form leaves space for you to fill it out. Make sure the Store Name is the official name of the store. (The store name usually stops at the comma.)
#This is a festival shop, so Province, Town, and MapNumber are excluded. (Map numbers are Ranik map numbers from Elanthipedia.)
#If this shop has an obvious owner, fill out that person's first name. If not, leave it as n (for none).
#Fill out NumRooms.
#If there are no restrictions or circle requirements, you can delete those lines.
#Store Types: Delete whatever types don't apply. If this shop has items that are for a particular guild or race, fill those out.
#Fest: This is Hollow Eve Festival 410.

<pre>{{Store At A Glance
|Store Name =Misenseor Goods
|Owner =n
|NumRooms =5
|Store Type =Cleric,Paladin,Clothing,Container,Jewelry,Magic,Weapon
|Fest =Hollow Eve Festival 410
|Coin =Dokoras
}}</pre>

If the prices were written in something other than coppers, there will be underscores. Delete the underscores.

Add commas to prices that are 1,000 or greater. I left tabs between each field of the inventory table. This allows you to copy and paste the ShopItem lines into Excel to automatically add commas to the prices that are 1,000 or greater. If you would prefer to manually add the commas, I've included a version without tabs.

Delete the tabs.

<pre>{{ShopHeader|title=On the fretwork table}}
{{ShopItem|t=w|mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood|902,000}}
{{ShopItem|t=w|mammoth Zachriedek war icon set atop a haft of sickly aspen|902,000}}
{{ShopItem|t=w|mammoth Botolf war icon set atop a bloodstained haft of hickory|902,000}}
{{ShopItem|t=w|mammoth Be'ort war icon set atop a haft of weeping willow|902,000}}
{{ShopItem|t=w|mammoth Asketi war icon set atop a haft of blighted mikkhalbamar|902,000}}
{{ShopItem|t=w|mammoth Huldah war icon set atop a haft of silver-green mistwood|902,000}}
{{ShopItem|t=w|mammoth Trothfang war icon set atop a haft of veiny copperwood|902,000}}
|}

{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|silver-blue scythewing moth handwraps|72,160}}
{{ShopItem|t=w|holy water sprinkler studded with stony basilisk fangs|99,220}}
{{ShopItem|t=w|steel jambiya with a hilt wrapped in membranous kartais wing|36,080}}
{{ShopItem|t=w|serrated bone-white scythe hung with a pair of sluagh claws|63,140}}
{{ShopItem|t=w|twisted black horn|8,118}}
{{ShopItem|t=w|dark crimson sword etched with spidery lightning|8,118}}
{{ShopItem|t=w|golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather|13,530}}
{{ShopItem|t=w|oaken impalement stake branded with viperous coils|9,020}}
{{ShopItem|t=w|granite mace sculpted like a gaunt greenish fist|4,510}}
{{ShopItem|t=w|morning star studded with Adan'f tail barbs|10,824}}
{{ShopItem|t=w|silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather|13,530}}
|}</pre>


==Required Manual Editing==
==Required Manual Editing==
Line 63: Line 233:


If there is not a "You also see" line in the room, the script will print a line that is only one line break (<nowiki><br></nowiki>). Delete that.
If there is not a "You also see" line in the room, the script will print a line that is only one line break (<nowiki><br></nowiki>). Delete that.

===Item Types===

If your table contains more than one type of item, you need to manually change some of the item types in the t= field. The options are:

*Weapon: w
*Shield: s
*Armor: a
*Clothing: c
*Jewelry: j
*Housing: h
*Food/Drink: f
*Items (all other): i

===Prices===

If the prices were written in something other than coppers, there will be underscores. Delete the underscores.

Add commas to prices that are 1,000 or greater. I left tabs between each field of the inventory table. This allows you to copy and paste the ShopItem lines into Excel to automatically add commas to the prices that are 1,000 or greater. If you would prefer to manually add the commas, I've included a version without tabs.

Delete the tabs.

====Ticket Prices====

If the price is in tickets, you need to add the word "Tickets" after the price. For example:

<pre>{{ShopItem|t=w|throwing dagger with a buzzard hilt|2 Tickets}}</pre>


==Changelog==
==Changelog==


'''2/26/2016'''
*Added support for bloodscrip|kernels?
'''5/23/2015'''
*Removed menu support for unused item type flags
'''11/4/2013'''
*Brand new version that greatly reduces the amount of time it takes to log inventory. Please read the documentation before posting these forms to Elanthipedia.
*Added "rotating stock" footnote
'''9/25/2013'''
*Added racial item class to combat/rp class toggles.
'''11/10/2012'''
*Shortened pauses by half a second.
'''11/4/2012'''
*Added "Hider" as a shop type.
'''5/16/2012'''
*Fixed bug that prevented taps from being set on items "atop several" surfaces.
'''4/28/2012'''
*Added support for items on "two" surfaces. (This was preventing certain taps from being read.)
'''11/14/2011'''
*Added support for items on '''the''' surface. (This was preventing certain taps from being read.)
'''11/9/2011'''
*Added support for items that are ''behind'' a shop surface.
'''11/4/2011'''
*Added more shop type options to the list; fixed "Store At A Glance" section so that it's not specific to [[Hollow Eve Festival 403]].
*Added partial support for ticket prices.
'''11/2/2011'''
*Added barding (horse armor) to the menu.
'''05/23/2011'''
'''05/23/2011'''
*The script now uses triggers to set the currency and preposition variables.
*The script now uses triggers to set the currency and preposition variables.
Line 75: Line 298:
*Added store types to "Store At A Glance." (Erase the ones that don't apply to the shop that you're editing.)
*Added store types to "Store At A Glance." (Erase the ones that don't apply to the shop that you're editing.)


==Script==
==Script (With Tabs for Excel)==


<pre>put #class rp on
<pre>put #class rp on
put #class arrive off
put #class combat off
put #class combat off
put #class joust off
put #class racial off
put #class shop off

var source $roomname
action goto end when ^I could not find what (you|you were) referring to\.$
var numbers first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh
var numbers.index 0

action setvariable shopheader $1 when ^(.+), you see:$
action setvariable tap $2 when ^You tap (a|an|some|the) (.+) (atop|behind|inside|under) (an?|several|\bsome\b|\bthe\b|\btwo\b)
action setvariable short $2 when ^Short: (a|an|some|the) (.+)
action setvariable costi $1 when ^Cost:\s+(\d+) (Kronars?|Lirums?|Dokoras?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)

send shop $shop
waitforre ^(Behind|In|On|Under).+, you see:$

if_1 goto ShopDesc
goto StartShop

ShopDesc:
put #log >Shop.txt {{Store At A Glance
put #log >Shop.txt |Store Name =$roomname
put #log >Shop.txt |Province =
put #log >Shop.txt |Town =$zonename
put #log >Shop.txt |MapNumber =$zoneid
put #log >Shop.txt |Owner =-
put #log >Shop.txt |NumRooms =
put #log >Shop.txt |restrict =
put #log >Shop.txt |levelres =
put #log >Shop.txt |Store Type =[Guild], [Race], Alchemy, Alteration, Armor, Barber, Boat, Book, Cambrinth, Casino, Clothing, Container, Cosmetics, Crafting, Drink, Dye, Embroidery, Engineering, Engraving, Estate Holder, Face paint, Festival, Fletching, Florist, Food, Forging, Furrier, Games, Gem, General, Heraldry, Herb, Hider, Horse, Housing, Jewelry, Juggling, Light, Locksmithing, Magic, MAMAS, Map, Miscellaneous, Music, Origami, Outfitting, Pawn, Perfume, Pet, Rare Materials, Repair, Shield, Siegery, Smoking, Spellbook, Tack, Tanning, Tattoo, Tobacco, Toy, Trinket, Vault Furniture, Weapon, Wedding, Writing
put #log >Shop.txt |Fest =
put #log >Shop.txt |Coin =$currency
put #log >Shop.txt }}
put #log >Shop.txt
put #log >Shop.txt {{ShopDescription
put #log >Shop.txt |roomname=$roomname
put #log >Shop.txt |desc=$roomdesc<br />
put #log >Shop.txt $roomobjs<br />
put #log >Shop.txt $roomexits
put #log >Shop.txt }}
put #log >Shop.txt

StartShop:
put #log >Shop.txt "{{ShopHeader|title=%shopheader}}"
put #echo
put #echo ITEM TYPE:
put #echo
put #echo 1: Weapon
put #echo
put #echo 2: Shield
put #echo
put #echo 3: Armor/Barding
put #echo
put #echo 4: Item: Other
put #echo
put #echo Enter Type Number:

matchre Weapon ^1$
matchre Shield ^2$
matchre Armor ^3$
matchre Item ^4$
matchwait

Weapon:
var type w
goto Shop1
Shield:
var type s
goto Shop1
Armor:
var type a
goto Shop1
Item:
var type i
goto Shop1

Shop1:
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+) ([Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+) copper (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_0 when ^\s+(an?|some|the) (.+) for (\d+) bronze (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) bronze (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_00 when ^\s+(an?|some|the) (.+) for (\d+) silver (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_0 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) silver (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_000 when ^\s+(an?|some|the) (.+) for (\d+) gold (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_00 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) gold (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_0000 when ^\s+(an?|some|the) (.+) for (\d+) platinum (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_000 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) platinum (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action put #log >Shop.txt "{{ShopItem|t= %type | %tap | %price }}" when for (\S+) (copper|bronze|silver|gold|platinum) (Kronars?|Dokoras?|Lirums?)$
action put #log >Shop.txt "{{ShopItem|t= %type | %tap | %price }}" when for (\S+) ([Tt]ickets?|bloodscrip|kernels?|[Ff]ame)
action put #log >Shop.txt "{{ShopFootnote|rotating stock}}" when ^The inventory of.+rotates\.$
send shop $shop
waitfor [Type SHOP [GOOD] to see some details about it.]
pause 1
goto end

end:
put #log >Shop.txt |}
send shop
put #class racial on
exit</pre>

==Script (Without Tabs)==

<pre>put #class rp on
put #class arrive off
put #class arrive off
put #class combat off
put #class joust off
put #class racial off
put #class shop off

var source $roomname
var source $roomname
action goto end when ^I could not find what (you|you were) referring to\.$
action goto end when ^I could not find what (you|you were) referring to\.$
var numbers first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh
var numbers first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh
var numbers.index 0
var numbers.index 0

action setvariable tap $2 when ^You tap (a|an|some|the) (.+) (atop|inside|under) (an?|some)
action setvariable shopheader $1 when ^(.+), you see:$
action setvariable tap $2 when ^You tap (a|an|some|the) (.+) (atop|behind|inside|under) (an?|several|\bsome\b|\bthe\b|\btwo\b)
action setvariable short $2 when ^Short: (a|an|some|the) (.+)
action setvariable short $2 when ^Short: (a|an|some|the) (.+)
action setvariable look $1 when ^Look: (.+)
action setvariable costi $1 when ^Cost:\s+(\d+) (Kronars?|Lirums?|Dokoras?|Tickets?|bloodscrip|kernels?)

action setvariable look - when ^Look: You see nothing unusual\.$
send shop $shop
action setvariable read $1 when ^Read:\s+(.+)$
waitforre ^(Behind|In|On|Under).+, you see:$
action setvariable type2 container when ^The .+ (are|is) a container, and can be opened and closed\.$

action setvariable type2 container when ^The .+ (are|is) a container\.$
if_2 goto ShopDesc
action setvariable type2 container when ^The .+ (are|is) pocketed, and can be opened and closed\.$
goto StartShop
action setvariable type2 container when ^The .+ (are|is) pocketed\.$

action setvariable type2 container when ^The gem pouch is made for easy storage of gems
ShopDesc:
action setvariable wearloc $2 when ^It appears that .+ can be worn (around|in|on) the (.+)\.$
put #log >Shop.txt {{Store At A Glance
action setvariable wearloc $1 when ^It appears that .+ can be draped over the (.+)\.$
put #log >Shop.txt |Store Name =$roomname
action setvariable wearloc generic when ^It appears that .+ can be worn\.$
put #log >Shop.txt |Province =
action setvariable wearloc belt when ^It appears that .+ can be worn attached to a belt\.$
put #log >Shop.txt |Town =$zonename
action setvariable wearloc belt when ^The gem pouch is made for easy storage of gems
put #log >Shop.txt |MapNumber =$zoneid
action setvariable wearloc ear when ^It appears that .+ can be worn in one ear
put #log >Shop.txt |Owner =-
action setvariable wearloc ears when ^It appears that .+ can be worn in both ears
put #log >Shop.txt |NumRooms =
action setvariable wearloc hair (placed) when ^It appears that .+ can be worn in the hair\.$
put #log >Shop.txt |restrict =
action setvariable wearloc pants when ^It appears that .+ can be worn like pants or a skirt\.$
put #log >Shop.txt |levelres =
action setvariable wearloc shirt+ when ^It appears that .+ can be worn as a shirt or robe, even with armor\.$
put #log >Shop.txt |Store Type =[Guild], [Race], Alchemy, Alteration, Armor, Barber, Boat, Book, Cambrinth, Casino, Clothing, Container, Cosmetics, Crafting, Drink, Dye, Embroidery, Engineering, Engraving, Estate Holder, Face paint, Festival, Fletching, Florist, Food, Forging, Furrier, Games, Gem, General, Heraldry, Herb, Hider, Horse, Housing, Jewelry, Juggling, Light, Locksmithing, Magic, MAMAS, Map, Miscellaneous, Music, Origami, Outfitting, Pawn, Perfume, Pet, Rare Materials, Repair, Shield, Siegery, Smoking, Spellbook, Tack, Tanning, Tattoo, Tobacco, Toy, Trinket, Vault Furniture, Weapon, Wedding, Writing
action setvariable wearloc shirt- when ^It appears that .+ can be worn like a shirt or robe\.$
put #log >Shop.txt |Fest =
action setvariable wearloc shoulder when ^It appears that .+ can be slung over one shoulder\.$
put #log >Shop.txt |Coin =$currency
action setvariable weight $1 when ^You are certain that .+ weighs exactly (\d+) (stones?)\.$
put #log >Shop.txt }}
action setvariable appcosti $2 when ^You are certain that .+ (is|are) worth exactly (\d+) kronars\.$
put #log >Shop.txt
action setvariable appcosti 1 when ^You are certain that .+ (is|are) worth exactly 1 kronar\.$
put #log >Shop.txt {{ShopDescription
action setvariable appcosti 0 when ^You are certain that .+ (is|are) worth exactly nothing\.$
put #log >Shop.txt |roomname=$roomname
action setvariable appcosti 0 when ^There doesn't appear to be anything in the gem pouch\.$
put #log >Shop.txt |desc=$roomdesc<br />
action setvariable costi $1 when ^Cost: (\d+)
put #log >Shop.txt $roomobjs<br />
action setvariable maxcharge $1 when ^You are certain that the .+ holds? exactly (\d+) mana\.$
put #log >Shop.txt $roomexits
action setvariable metal yes when ^The .+ (is|are) made with metal\.$
put #log >Shop.txt }}
action setvariable wtype1 LE when (is a|are a|and) light edged .+ weapon
put #log >Shop.txt
action setvariable wtype1 ME when (is a|are a|and) medium edged .+ weapon

action setvariable wtype1 HE when (is a|are a|and) heavy edged .+ weapon
StartShop:
action setvariable wtype1 2HE when (is a|are a|and) two-handed edged .+ weapon
put #log >Shop.txt "{{ShopHeader|title=%shopheader}}"
action setvariable wtype1 LB when (is a|are a|and) light blunt .+ weapon
put #echo
action setvariable wtype1 MB when (is a|are a|and) medium blunt .+ weapon
put #echo ITEM TYPE:
action setvariable wtype1 HB when (is a|are a|and) heavy blunt .+ weapon
put #echo
action setvariable wtype1 2HB when (is a|are a|and) two-handed blunt .+ weapon
put #echo 1: Weapon
action setvariable wtype1 2HB when (is a|are a|and) two-handed blunt .+ weapon
put #echo
action setvariable wtype1 SL when (is|are) a sling .+ weapon
put #echo 2: Shield
action setvariable wtype1 StS when (is|are) a staff sling .+ weapon
put #echo
action setvariable wtype1 SB when (is|are) a short bow .+ weapon
put #echo 3: Armor/Barding
action setvariable wtype1 LoB when (is|are) a long bow .+ weapon
put #echo
action setvariable wtype1 CB when (is|are) a composite bow .+ weapon
put #echo 4: Item: Other
action setvariable wtype1 LX when (is|are) a light crossbow .+ weapon
put #echo
action setvariable wtype1 HX when (is|are) a heavy crossbow .+ weapon
put #echo Enter Type Number:
action setvariable wtype1 SS when (is a|are a|and) short staff .+ weapon

action setvariable wtype1 QS when (is a|are a|and) quarter staff .+ weapon
matchre Weapon ^1$
action setvariable wtype1 PI when (is a|are a|and) pike .+ weapon
matchre Shield ^2$
action setvariable wtype1 HAL when (is a|are a|and) halberd .+ weapon
matchre Armor ^3$
action setvariable wtype2 LT when (is|are) a light thrown and .+ weapon
matchre Item ^4$
action setvariable wtype2 HT when (is|are) a heavy thrown and .+ weapon
action setvariable range melee when melee-ranged weapon
action setvariable range pole when pole-ranged weapon
action setvariable puncture $1 when ^\s+(.*) puncture damage
action setvariable slice $1 when ^\s+(.*) slice damage
action setvariable impact $1 when ^\s+(.*) impact damage
action setvariable puncturetype Yes when ^\s+(.*) puncture damage increase
action setvariable slicetype Yes when ^\s+(.*) slice damage increase
action setvariable impacttype Yes when ^\s+(.*) impact damage increase
action setvariable balance $1 when .+ is (.*) balanced
action setvariable power $1 when .+ is (.*) suited
action setvariable stype lsh when is large in size\.$
action setvariable stype msh when is medium in size\.$
action setvariable stype ssh when is small in size\.$
action setvariable sprotection $1 when .+ offers (.*) protection
action setvariable smin $1 when ^You are certain that .+ offers (.*) to .+ protection\.
action setvariable smax $1 when ^You are certain that .+ offers .+ to (.*) protection\.
action setvariable shindrance $1 when .+ it imposes? an? (.*) maneuvering hinde?rance
action setvariable atype cloth armor when (is|are) cloth armor\.$|cloth\.$
action setvariable atype leather armor when (is|are) leather armor\.$
action setvariable atype bone armor when (is|are) bone armor\.$
action setvariable atype light chain when (is|are) light chain\.$
action setvariable atype heavy chain when (is|are) heavy chain\.$
action setvariable atype light plate when (is|are) light plate\.$
action setvariable atype heavy plate when (is|are) heavy plate\.$
action setvariable abpuncture $1 when .+ \s(.*) for puncture attacks
action setvariable abslice $1 when .+ \s(.*) for slice attacks
action setvariable abimpact $1 when .+ \s(.*) for impact attacks
action setvariable abfire $1 when .+ \s(.*) for fire attacks
action setvariable abcold $1 when .+ \s(.*) for cold attacks
action setvariable abelectrical $1 when .+ \s(.*) for electrical attacks
action setvariable appuncture $1 when .+ \s(.*) protection and .+ damage absorption for puncture attacks
action setvariable apslice $1 when .+ \s(.*) protection and .+ damage absorption for slice attacks
action setvariable apimpact $1 when .+ \s(.*) protection and .+ damage absorption for impact attacks
action setvariable apfire $1 when .+ \s(.*) protection and .+ damage absorption for fire attacks
action setvariable apcold $1 when .+ \s(.*) protection and .+ damage absorption for cold attacks
action setvariable apelectrical $1 when .+ \s(.*) protection and .+ damage absorption for electrical attacks
action setvariable aapuncture $1 when .+ protection and (.*) damage absorption for puncture attacks
action setvariable aaslice $1 when .+ protection and (.*) damage absorption for slice attacks
action setvariable aaimpact $1 when .+ protection and (.*) damage absorption for impact attacks
action setvariable aafire $1 when .+ protection and (.*) damage absorption for fire attacks
action setvariable aacold $1 when .+ protection and (.*) damage absorption for cold attacks
action setvariable aaelectrical $1 when .+ protection and (.*) damage absorption for electrical attacks
action setvariable ahindrance $1 when .+ appears? to impose (.*), offering
action setvariable mhindrance $1 when .+ appears? to impose (.*) maneuvering hindrance and
action setvariable shindrance $1 when .+ appears? to impose .+ maneuvering hindrance and (.*) stealth hindrance
action setvariable ahead head when ^\s+head$
action setvariable aeyes eyes when ^\s+right eye$
action setvariable aneck neck when ^\s+neck$
action setvariable achest chest when ^\s+chest$
action setvariable aback back when ^\s+back$
action setvariable aabdomen abdomen when ^\s+abdomen$
action setvariable aarms arms when ^\s+right arm$
action setvariable alegs legs when ^\s+right leg$
action setvariable ahands hands when ^\s+right hand$
action setvariable construction $2 when ^You are certain that the .+ (is|are) (.*) (against|to) damage, and
action setvariable construction extremely weak when ^You are certain that the .+ (is|are) extremely weak, and
action setvariable construction very delicate when ^You are certain that the .+ (is|are) very delicate, and
action setvariable construction quite fragile when ^You are certain that the .+ (is|are) quite fragile, and
action setvariable construction rather flimsy when ^You are certain that the .+ (is|are) rather flimsy, and
action setvariable construction particularly weak when ^You are certain that the .+ (is|are) particularly weak, and
action setvariable construction average construction when ^You are certain that the .+ (is|are) of average construction, and
action setvariable construction very strong when ^You are certain that the .+ (is|are) very strong, and
echo
echo ITEM TYPE:
echo
echo 1: Weapon: Melee/Thrown
echo
echo 2: Weapon: Ranged
echo
echo 3: Weapon: Ammunition
echo
echo 4: Weapon: Brawling
echo
echo 5: Weapon: Parry Stick
echo
echo 6: Shield
echo
echo 7: Armor
echo
echo 8: Item
echo
echo Enter Type Number:
matchre WeaponApp1 ^1
matchre WeaponApp2 ^2
matchre WeaponApp3 ^3
matchre WeaponApp4 ^4
matchre WeaponApp5 ^5
matchre ShieldApp ^6
matchre ArmorApp ^7
matchre ItemApp ^8
matchwait
matchwait

WeaponApp1:
Weapon:
var type w
goto Shop1
Shield:
var type s
goto Shop1
Armor:
var type a
goto Shop1
Item:
var type i
goto Shop1

Shop1:
var number %numbers(%numbers.index)
var number %numbers(%numbers.index)
gosub AppraiseWeapon1
gosub Shop2
math numbers.index add 1
math numbers.index add 1
if %numbers.index > 11 then goto end
if %numbers.index > 11 then goto end
goto WeaponApp1
goto Shop1

WeaponApp2:
var number %numbers(%numbers.index)
gosub AppraiseWeapon2
math numbers.index add 1
if %numbers.index > 11 then goto end
goto WeaponApp2
WeaponApp3:
var number %numbers(%numbers.index)
gosub AppraiseWeapon3
math numbers.index add 1
if %numbers.index > 11 then goto end
goto WeaponApp3
WeaponApp4:
var number %numbers(%numbers.index)
gosub AppraiseWeapon4
math numbers.index add 1
if %numbers.index > 11 then goto end
goto WeaponApp4
WeaponApp5:
var number %numbers(%numbers.index)
gosub AppraiseWeapon5
math numbers.index add 1
if %numbers.index > 11 then goto end
goto WeaponApp5
ShieldApp:
var number %numbers(%numbers.index)
gosub AppraiseShield
math numbers.index add 1
if %numbers.index > 11 then goto end
goto ShieldApp
ArmorApp:
var number %numbers(%numbers.index)
gosub AppraiseArmor
math numbers.index add 1
if %numbers.index > 11 then goto end
goto ArmorApp
ItemApp:
var number %numbers(%numbers.index)
gosub AppraiseItem
math numbers.index add 1
if %numbers.index > 11 then goto end
goto ItemApp
number1:
number1:
var number first
var number first
Line 308: Line 527:
var number eleventh
var number eleventh
return
return

AppraiseWeapon1:
Shop2:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
send tap %number %1 $preposition $shop
waitforre ^You
waitforre ^You
send shop %number %1 $preposition $shop
send shop %number %1 $preposition $shop
waitforre ^Short
waitforre ^Short
pause .5
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
gosub CommaCost
put #log >Shop.txt "{{ShopItem|t=%type|%tap|%cost}}"
gosub Tagset
put #log >Shop.txt
gosub Specialset
echo http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
echo
echo {{Weapon
echo |name=%tap
echo |newapp=Yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |range=%range
echo |type=%wtype1
echo |type2=%wtype2
echo |puncture=%puncture
echo |slice=%slice
echo |impact=%impact
echo |balance=%balance
echo |suitedness=%power
echo |construction=%construction
echo |metal=%metal
echo |weight=%weight
echo |appcost=%appcost
echo |wearloc=%wearloc
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
put #log >Appraisal.txt {{Weapon
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |range=%range
put #log >Appraisal.txt |type=%wtype1
put #log >Appraisal.txt |type2=%wtype2
put #log >Appraisal.txt |puncture=%puncture
put #log >Appraisal.txt |slice=%slice
put #log >Appraisal.txt |impact=%impact
put #log >Appraisal.txt |balance=%balance
put #log >Appraisal.txt |suitedness=%power
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |wearloc=%wearloc
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
return

AppraiseWeapon2:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
if (matchre ("%wtype1", "(SB|LoB|CB)")) then var ammo arrow
if (matchre ("%wtype1", "(LX|HX)")) then var ammo bolt
if (matchre ("%wtype1", "(SL|StS)")) then var ammo rock
if (matchre ("%wtype1", "(LT|HT)")) then var ammo thrown
gosub Tagset
gosub Specialset
echo http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
echo
echo {{Weapon
echo |name=%tap
echo |newapp=Yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |range=ranged
echo |ammo=%ammo
echo |ammocap=
echo |rangedRT=
echo |type=%wtype1
echo |puncture=-
echo |balance=%balance
echo |suitedness=%power
echo |construction=%construction
echo |metal=%metal
echo |weight=%weight
echo |appcost=%appcost
echo |wearloc=%wearloc
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
put #log >Appraisal.txt {{Weapon
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |range=ranged
put #log >Appraisal.txt |ammo=%ammo
put #log >Appraisal.txt |ammocap=
put #log >Appraisal.txt |rangedRT=
put #log >Appraisal.txt |type=%wtype1
put #log >Appraisal.txt |puncture=-
put #log >Appraisal.txt |balance=%balance
put #log >Appraisal.txt |suitedness=%power
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |wearloc=%wearloc
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
AppraiseWeapon3:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
if (matchre ("%1", "(arrows?)")) then var wtype1 arrow
if (matchre ("%1", "(bolts?|quadrellos?|quarrels?|pulzones?)")) then var wtype1 bolt
if (matchre ("%1", "(bullets?|clumps?|lumps?|rocks?)")) then var wtype1 rock
gosub Tagset
gosub Specialset
echo http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
echo
echo {{Weapon
echo |name=%tap
echo |newapp=Yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |type=%wtype1
echo |puncture=%puncture
echo |slice=%slice
echo |impact=%impact
echo |balance=-
echo |construction=%construction
echo |metal=%metal
echo |weight=%weight
echo |appcost=%appcost
echo |wearloc=%wearloc
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
put #log >Appraisal.txt {{Weapon
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |type=%wtype1
put #log >Appraisal.txt |puncture=%puncture
put #log >Appraisal.txt |slice=%slice
put #log >Appraisal.txt |impact=%impact
put #log >Appraisal.txt |balance=-
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |wearloc=%wearloc
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
AppraiseWeapon4:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
if (matchre ("%1", "(handwraps?|knuckleguards?|knuckles?)")) then var wtype1 hands
if (matchre ("%tap", "(elbow)")) then var wtype1 elbows
if (matchre ("%tap", "(knee)")) then var wtype1 knees
if (matchre ("%1", "(footwraps?)")) then var wtype1 feet
gosub Tagset
gosub Specialset
echo http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
echo
echo {{Weapon
echo |name=%tap
echo |newapp=Yes
echo |brawl=yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |type=%wtype1
echo |puncture=%puncture
echo |puncturetype=Yes
echo |slice=%slice
echo |slicetype=Yes
echo |impact=%impact
echo |impacttype=Yes
echo |balance=-
echo |construction=%construction
echo |metal=%metal
echo |weight=%weight
echo |appcost=%appcost
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
put #log >Appraisal.txt {{Weapon
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |brawl=yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |type=%wtype1
put #log >Appraisal.txt |puncture=%puncture
put #log >Appraisal.txt |puncturetype=Yes
put #log >Appraisal.txt |slice=%slice
put #log >Appraisal.txt |slicetype=Yes
put #log >Appraisal.txt |impact=%impact
put #log >Appraisal.txt |impacttype=Yes
put #log >Appraisal.txt |balance=-
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |wearloc=%wearloc
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
AppraiseWeapon5:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
gosub Tagset
gosub Specialset
echo http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
echo
echo {{Weapon
echo |brawl=yes
echo |name=%tap
echo |newapp=Yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |type=parry
echo |puncture=-
echo |puncturetype=No
echo |slicetype=No
echo |impacttype=No
echo |balance=%balance
echo |suitedness=%power
echo |construction=%construction
echo |metal=%metal
echo |weight=%weight
echo |appcost=%appcost
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Weapon:%tap&action=edit
put #log >Appraisal.txt {{Weapon
put #log >Appraisal.txt |brawl=yes
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |type=parry
put #log >Appraisal.txt |puncture=-
put #log >Appraisal.txt |puncturetype=No
put #log >Appraisal.txt |slicetype=No
put #log >Appraisal.txt |impacttype=No
put #log >Appraisal.txt |balance=%balance
put #log >Appraisal.txt |suitedness=%power
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |wearloc=%wearloc
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
AppraiseShield:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
gosub Tagset
gosub Specialset
echo http://www.elanthipedia.com/wiki/Shield:%tap&action=edit
echo
echo {{Shield
echo |name=%tap
echo |newapp=Yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |type=%stype
echo |hindrance=%shindrance
echo |minprotection=%smin
echo |maxprotection=%smax
echo |paladinapp=Yes
echo |puncture=%puncture
echo |slice=%slice
echo |impact=%impact
echo |balance=%balance
echo |suitedness=%power
echo |construction=%construction
echo |metal=%metal
echo |weight=%weight
echo |appcost=%appcost
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Shield:%tap&action=edit
put #log >Appraisal.txt {{Shield
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |type=%stype
put #log >Appraisal.txt |hindrance=%shindrance
put #log >Appraisal.txt |minprotection=%smin
put #log >Appraisal.txt |maxprotection=%smax
put #log >Appraisal.txt |paladinapp=Yes
put #log >Appraisal.txt |puncture=%puncture
put #log >Appraisal.txt |slice=%slice
put #log >Appraisal.txt |impact=%impact
put #log >Appraisal.txt |balance=%balance
put #log >Appraisal.txt |suitedness=%power
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
AppraiseArmor:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
if %aapuncture = %aaslice = %aaimpact = %aafire = %aacold = %aaelectrical then var absorbance %aapuncture
gosub Tagset
gosub Specialset
echo http://www.elanthipedia.com/wiki/Armor:%tap&action=edit
echo
echo {{Armor
echo |name=%tap
echo |newapp=Yes
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |type=%atype
echo |area=%ahead,%aeyes,%aneck,%achest,%aback,%aabdomen,%aarms,%alegs,%ahands
echo |hindrance=%mhindrance
echo |stealth=%shindrance
echo |puncture=%appuncture
echo |slice=%apslice
echo |impact=%apimpact
echo |fire=%apfire
echo |cold=%apcold
echo |electric=%apelectrical
echo |absorbance=%absorbance
echo |punctureab=%aapuncture
echo |sliceab=%aaslice
echo |impactab=%aaimpact
echo |fireab=%aafire
echo |coldab=%aacold
echo |electricab=%aaelectrical
echo |construction=%construction
echo |metal=%metal
echo |appcost=%appcost
echo |weight=%weight
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |special=%special
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Armor:%tap&action=edit
put #log >Appraisal.txt {{Armor
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |newapp=Yes
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |type=%atype
put #log >Appraisal.txt |area=%ahead,%aeyes,%aneck,%achest,%aback,%aabdomen,%aarms,%alegs,%ahands
put #log >Appraisal.txt |hindrance=%mhindrance
put #log >Appraisal.txt |stealth=%shindrance
put #log >Appraisal.txt |puncture=%appuncture
put #log >Appraisal.txt |slice=%apslice
put #log >Appraisal.txt |impact=%apimpact
put #log >Appraisal.txt |fire=%apfire
put #log >Appraisal.txt |cold=%apcold
put #log >Appraisal.txt |electric=%apelectrical
put #log >Appraisal.txt |absorbance=%absorbance
put #log >Appraisal.txt |punctureab=%aapuncture
put #log >Appraisal.txt |sliceab=%aaslice
put #log >Appraisal.txt |impactab=%aaimpact
put #log >Appraisal.txt |fireab=%aafire
put #log >Appraisal.txt |coldab=%aacold
put #log >Appraisal.txt |electricab=%aaelectrical
put #log >Appraisal.txt |construction=%construction
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |special=%special
put #log >Appraisal.txt }}
return
AppraiseItem:
gosub VarBlank
pause 1
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
send appraise %number %1 $preposition $shop careful
wait
pause
gosub CommaAppcost
gosub CommaCost
gosub Tagset
gosub Typeset
echo http://www.elanthipedia.com/wiki/Item:%tap&action=edit
echo
echo {{Item
echo |name=%tap
echo |noun=%1
echo |look=%look
echo <br>'''Read''': %read
echo |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
echo |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
echo |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
echo |type=%type1
echo |type2=%type2
echo |type3=%type3
echo |type4=%type4
echo |wearloc=%wearloc
echo |weight=%weight
echo |appcost=%appcost
echo |sourcetype=sold by
echo |source=%source
echo |cost=%cost $currency
echo |maxcharge=%maxcharge
echo |metal=%metal
echo }}
put #log >Appraisal.txt http://www.elanthipedia.com/wiki/Item:%tap&action=edit
put #log >Appraisal.txt {{Item
put #log >Appraisal.txt |name=%tap
put #log >Appraisal.txt |noun=%1
put #log >Appraisal.txt |look=%look
put #log >Appraisal.txt <br>'''Read''': %read
put #log >Appraisal.txt |MTag=%mtags,%mtagg,%mtagm,%mtagw,%mtagf
put #log >Appraisal.txt |CTag=%ctagr,%ctago,%ctagy,%ctagg,%ctagb,%ctagv,%ctagn,%ctagm
put #log >Appraisal.txt |STag=%stagp,%stagg,%staga,%stagh,%stage,%stagr,%stagl
put #log >Appraisal.txt |type=%type1
put #log >Appraisal.txt |type2=%type2
put #log >Appraisal.txt |type3=%type3
put #log >Appraisal.txt |type4=%type4
put #log >Appraisal.txt |wearloc=%wearloc
put #log >Appraisal.txt |weight=%weight
put #log >Appraisal.txt |appcost=%appcost
put #log >Appraisal.txt |sourcetype=sold by
put #log >Appraisal.txt |source=%source
put #log >Appraisal.txt |cost=%cost $currency
put #log >Appraisal.txt |maxcharge=%maxcharge
put #log >Appraisal.txt |metal=%metal
put #log >Appraisal.txt }}
return
VarBlank:
var metal no
var maxcharge DELETE THIS LINE
var wearloc -
var appcost NOT SET
var mtags DELETE
var mtagg DELETE
var mtagm DELETE
var mtagw DELETE
var mtagf DELETE
var ctagr DELETE
var ctago DELETE
var ctagy DELETE
var ctagg DELETE
var ctagb DELETE
var ctagv DELETE
var ctagn DELETE
var ctagm DELETE
var stagp DELETE
var stagg DELETE
var staga DELETE
var stagh DELETE
var stage DELETE
var stagr DELETE
var stagl DELETE
var wtype2 NOT SET
var puncturetype No
var slicetype No
var impacttype No
var absorbance VALUES NOT EQUAL
var ahead DELETE
var aeyes DELETE
var aneck DELETE
var achest DELETE
var aback DELETE
var aabdomen DELETE
var aarms DELETE
var alegs DELETE
var ahands DELETE
var construction NOT SET
var type1 -
var type2 NOT SET
var type3 NOT SET
var type4 NOT SET
var special NOT SET
return
Tagset:
if (matchre ("%look", "(avaes|imnera|sraeth|dhhresh|hafaltu|indakar|ithridu|keismin|xibaryl|asketine|celstite|lemicule|negnetha|zengalmi|iheaneu'a|chakrel|soulstone)")) then var mtags $1
if (matchre ("%look", "(\bbones?\b|\bcoal\b|\bjade\b|onyx|\bopals?\b|\bruby\b|\bagate\b|\bamber\b|beryl|chalk|coral|flint|\bglass\b|ivory|lapis|nacre|pearl|shale|slate|topaz|arkose|basalt|garnet|gneiss|iolite|jasper|\bmarble\b|pumice|pyrite|quartz|rubies|schist|spinel|svelae|zircon|anloral|axinite|azurite|ceramic|citrine|crystal|diamond|diorite|dwalgim|elbaite|eldring|emerald|granite|jadeite|kunzite|kyanite|larimar|lasmodi|olivine|peridot|sjatmal|amethyst|cinnabar|diopside|dolomite|feldspar|grazhite|hematite|ilmenite|ismenite|mudstone|neitrice|obsidian|porphyry|sapphire|selenite|sky opal|sodalite|sunstone|szeldite|verenite|waermodi|xibarite|yavasite|alabaster|ambergris|amlothite|carnelian|claystone|dawgolite|elanthite|erythrite|glowstone|kaolinite|katambite|limestone|malachite|mistglass|moonstone|morganite|penhetite|rhodonite|runestone|sandstone|scheelite|scrimshaw|snow opal|star ruby|tanzanite|tsavorite|turquoise|wulfenite|yoakenite|aevanstone|andalusite|anthracite|aquamarine|blood ruby|bloodstone|chalcedony|cloud ruby|estrildite|fang pearl|fire pearl|flame opal|frost opal|gloamstone|heartstone|lantholite|moon pearl|morleenite|nightstone|seordstone|smoke ruby|star-stone|thealstone|tourmaline|water opal|alexandrite|aurora opal|cherry opal|chrysoberyl|chrysoprase|durgauldite|er'?qutrite|fool's gold|geshi pearl|merewaldite|pitch pearl|smoky topaz|star rubies|sunset opal|talan pearl|Xibar topaz|blood rubies|blue diamond|chalcedonies|cloud rubies|dafora pearl|idopun pearl|lapis lazuli|mystic topaz|ocean jasper|pink diamond|smoke rubies|autumn jasper|black diamond|calav[ae]rite|damaryn pearl|damilyo pearl|draconic opal|firesilk opal|haze sapphire|imperial ruby|lilac diamond|midnight ruby|moonspun ruby|night diamond|nimbus garnet|saffron topaz|smoky diamond|star sapphire|white diamond|zenith spinel|frostfire opal|Ilithi emerald|imperial topaz|nightfire opal|starfire topaz|starlight ruby|Taisidon pearl|winter emerald|frostflare opal|glacier emerald|imperial rubies|midnight rubies|moonspun rubies|sana'?ati heart|crimson sapphire|dragon fire opal|dragonfire amber|katamba'?s spire|phantom sapphire|spiderweb jasper|starlight rubies|Taisidon emerald|tempest sapphire|aurora tourmaline|champagne diamond|dalterein diamond|fire maiden topaz|imperial sapphire|twilight sapphire|wild horse jasper|dragon'?s eye ruby|eventide moonstone|orchid alexandrite|Teiro'?s hate ruby|lion'?s heart topaz|molten-core diamond|royal zoluren topaz|dragon'?s blood ruby|dragon'?s eye rubies|dragon'?s heart ruby|Teiro'?s hate rubies|Hav'?roth'?s ambrosia|jackal'?s heart pearl|lotus flower sapphire|ocean'?s deep emerald|serpent'?s heart ruby|vela'?tohr tourmaline|dragon'?s blood rubies|dragon'?s heart rubies|forest'?s heart garnet|Musparan gold sapphire|shrike'?s eye sapphire|white Zoluren sapphire|Crystalline dragon tear|Eluned'?s tear sapphire|serpent'?s heart rubies|dragon'?s scale sapphire|mermaid'?s tear sapphire|nature'?s canopy emerald|summer'?s heart sapphire|violet'?s heart amethyst|volcano'?s heart citrine)")) then var mtagg $1
if (matchre ("%look", "(\btin\b|gold|\biron\b|\blead\b|zinc|brass|glaes|steel|bronze|copper|damite|kertig|lumium|nickel|niello|niniam|oravir|pewter|silver|tyrium|animite|haralun|iridium|aluminum|audrualm|electrum|platinum|red gold|spangold|tantalum|titanium|blue gold|darkstone|grey gold|hepatizon|palladium|pink gold|rose gold|black gold|crown gold|green gold|orichalcum|white gold|purple gold|anlora[- ]avtoma)")) then var mtagm $1
if (matchre ("%look", "(\bash\b|\belm\b|\bfir\b|\boak\b|\byew\b|haon|\bpine\b|\bteak\b|\balder\b|aspen|balsa|beech|birch|cedar|ebony|lunat|maple|rowan|shaal|acanth|bamboo|deobar|halmik|huljik|modwir|poplar|spruce|vellum|walnut|willow|cypress|dogwood|hickory|papyrus|redwood|chestnut|ebonwood|gethwood|goldbark|ironwood|mahogany|mistwood|plumwood|sana'?ati|wiirwood|wormwood|adderwood|bloodwood|e'?erdream|flamewood|gloomwood|goldenoak|khor-?vela|parchment|satinwood|smokewood|taborwood|witchclaw|wyndewood|cherrywood|copperleaf|copperwood|cottonwood|dragonwood|eucalyptus|flamethorn|sandalwood|silverwood|whitethorn|aganylosh'?a|diamondwood|bricklebranch|hhr'?lav'?geluhh)")) then var mtagw $1
if (matchre ("%look", "(\bfur\b|\bfelt\b|\bhemp\b|\blace\b|\bsilk\b|\bwool\b|khaki|linen|satin|sinew|\bstraw\b|suede|tweed|\btwine\b|angora|burlap|canvas|cotton|muslin|velvet|brocade|\bfeathers?\b|flannel|gingham|khiynit|leather|rawhide|worsted|shagreen|grosgrain|haircloth|longcloth|broadclothlava samite|(ice|fire|moon|blood|Elven|night|shade|steel|storm|water|marble|shadow|spider|duchess|bluefire|Elothean|Musparan|fae woven|oceanmist|starlight|nightreaver|nightweaver|nightstalker) ?(lace|silk|satin|velvet|snowlace))")) then var mtagf $1
if (matchre ("%look", "(\bred\b|\bpink\b|gules|auburn|cerise|maroon|murrey|carmine|crimson|magenta|reddish|scarlet|burgundy|cardinal|chestnut|sanguine|blood-red|carnelian|vermilion|orange-red)")) then var ctagr $1
if (matchre ("%look", "(orange|\btan\b|brown|fiery|sepia|tawny|tenne|\bumber\b|russet|persimmon|red-orange)")) then var ctago $1
if (matchre ("%look", "(yellow|\becru\b|gold|amber|lemon|saffron|green-yellow|canary[- ]yellow)")) then var ctagy $1
if (matchre ("%look", "(green|\blime\b|\bvert\b|clover|celadon|viridian|asparagus|chartreuse|sea[- ]green|yellow-green|olive[- ]drab|olive[- ]green|forest[- ]green|hunter[- ]green)")) then var ctagg $1
if (matchre ("%look", "(\bblue\b|\bceil\b|\bcyan\b|\bteal\b|azure|cobalt|indigo|cerulean|turquoise|sky[- ]blue|ultramarine|baby[- ]blue|navy[- ]blue|royal[- ]blue|cobalt[- ]blue|blue[- ]celeste)")) then var ctagb $1
if (matchre ("%look", "(violet|lilac|mauve|orchid|purple|fuchsia|purpure|thistle|eggplant|lavender|periwinkle|red-violet)")) then var ctagv $1
if (matchre ("%look", "(\bgr[ae]y\b|ashen|beige|\bblack\b|cream|eisen|ivory|\bsable\b|taupe|white|argent|silver|arsenic|eggshell|feldgrau|glaucous|platinum|cinereous|colorless|ash[- ]gray|slate[- ]gray|midnight[- ]black)")) then var ctagn $1
if (matchre ("%look", "(rainbow|multi-?hued|multi-?colored)")) then var ctagm $1
if (matchre ("%look", "(Bard|\bheroe?s?\b|\bmages?\b|\bmonks?\b|\bpoets?\b|\bsages?\b|\bseers?\b|felon|judge|\bmedics?\b|nurse|rogue|Thief|amazon|bandit|beggar|Cleric|doctor|Empath|farmer|fencer|healer|herald|hunter|knight|martyr|mystic|pastor|pirate|priest|Ranger|sailor|Trader|weaver|wizard|acolyte|brigand|burglar|captain|citizen|convict|diviner|duelist|marshal|Paladin|peddler|pilgrim|prophet|psychic|scholar|soldier|surgeon|Thieves|villain|warrior|assassin|champion|commoner|criminal|engineer|merchant|minister|minstrel|preacher|prisoner|shepherd|smuggler|villager|alchemist|Barbarian|buccaneer|celebrant|combatant|elemancer|gladiator|historian|justiciar|locksmith|messenger|Moon Mage|navigator|physician|sham[ae]n|apothecary|armorsmith|blacksmith|hangm[ae]n|hierophant|Inquisitor|mastermind|researcher|executioner|Necromancer|philosopher|weaponsmith|woodsm[ae]n|ecclesiastic|elementalist|spiritualist|swashbuckler|Warrior Mage|highwaym[ae]n|clergy(man|woman)|medicine (m[ae]n|wom[ae]n))")) then var stagp $1
if (matchre ("%look", "(\bgods?\b|Immortal|\bEu\b|\bIdon\b|Mrod|Aniek|Elide|Aliesa|Asketi|Botolf|Drogor|Eerayn|Eimeuz|Eluned|Enelne|Faiyka|Firulf|Glacis|Huldah|Iladza|Kuniyo|Meraud|Merion|Orisas|Phelim|Sieben|Sildua|Tieheq|Alamhif|Albreda|Aldauth|Be'?ort|Coshivi|Damaris|Demrris|Dergati|Everild|Eylhaar|Harawep|Lemicus|Murrula|Rutilor|Saemaus|Shariza|Sraxaec|Tamsine|Ushnish|Chadatru|Divyaush|Faenella|Gizzbolf|Hodierna|Issendar|Kertigen|Kirmhara|Krigglin|Misiumos|Peri'?el|Tenemlor|Thirteen|Glythtide|Hav'?roth|Spangklud|Triquetra|Trothfang|Truffenyi|Xosiurion|Berengaria|Zachriedek|Urrem'?tier|Kerenhappuch|World Dragon)")) then var stagg $1
if (matchre ("%look", "(animal|\bbeasts?\b|insect|\boxe?n?\b|\bapes?\b|\bass\b|\bbats?\b|\bbees?\b|\bcats?\b|\bcows?\b|\bdoes?\b|\bdogs?\b|\beels?\b|\belk\b|\bewes?\b|\bfly\b|\bfox\b|\bhogs?\b|\bimps?\b|\bowls?\b|\bpigs?\b|\brams?\b|\brats?\b|\byaks?\b|\bbears?\b|bird|\bboars?\b|\bbucks?\b|\bbulls?\b|\bclams?\b|\bcocks?\b|\bcrabs?\b|\bcrows?\b|\bdeers?\b|\bdoves?\b|duck|\bfauns?\b|fish|frog|goat|\bhares?\b|\bhawks?\b|ibex|\blambs?\b|\blarks?\b|\blions?\b|lynx|mink|\bmoths?\b|\bmules?\b|nyad|pika|puma|\bstags?\b|\bswans?\b|toad|\bvoles?\b|wasp|\bwings?\b|wolf|\bwrens?\b|yale|adder|alfar|bison|burro|camel|civet|cobra|coney|crane|\bdemons?\b|\bdevils?\b|dingo|dryad|eagle|fairy|\bfiends?\b|finch|gecko|genie|\bghosts?\b|\bghouls?\b|goose|harpy|heron|hinny|horse|hound|hydra|hyena|kirin|lemur|llama|moose|mouse|otter|prawn|puppy|quail|raven|robin|satyr|shark|sheep|shrew|skull|snail|snake|stoat|stork|swine|tiger|troll|trout|viper|whale|zebra|alpaca|alphyn|antler|badger|bagwyn|beaver|beetle|canary|cattle|cicada|collie|condor|cougar|coyote|curlew|donkey|\bdragons?\b|ermines?|falcon|ferret|gerbil|goblin|gopher|grouse|hornet|iguana|impala|jackal|jaguar|kelpie|kitten|kobold|lizard|locust|magpie|mantis|marmot|marten|merman|minnow|monkey|muskox|ocelot|onager|osprey|oyster|parrot|pigeon|possum|python|rabbit|remora|salmon|scarab|selkie|shrike|shrimp|sphinx|spider|\bspirits?\b|sprite|talbot|thrush|toucan|turkey|turtle|undead|walrus|weasel|welkin|wraith|wyvern|yeehar|zombie|anchovy|aurochs|banshee|boggart|boobrie|buffalo|bustard|buzzard|calopus|caracal|centaur|cheetah|chimera|cricket|dolphin|echidna|gazelle|giraffe|gorilla|goshawk|griffin|griffon|gryphon|hamster|herring|katydid|lemming|leopard|lioness|lobster|mammoth|manatee|martlet|mastiff|meerkat|merelew|mermaid|mouflon|musimon|opossum|ostrich|panther|peacock|pegasus|pelican|phoenix|polecat|primate|raccoon|rooster|sardine|seagull|serpent|sparrow|specter|swallow|termite|tityrus|unicorn|vulture|wildcat|aardvark|antelope|arachnid|barnacle|basilisk|behemoth|capybara|cardinal|chipmunk|elephant|flounder|hedgehog|inkhorne|kangaroo|minotaur|mongoose|mosquito|parakeet|pheasant|platypus|popinjay|reindeer|scorpion|skeleton|squirrel|starling|sturgeon|terrapin|tortoise|werewolf|albatross|alligator|armadillo|blackbird|blue ?jay|butterfly|centipede|chameleon|cockroach|crocodile|damselfly|dragonfly|greyhound|groundhog|hippocamp|manticore|partridge|porcupine|springbok|swordfish|tarantula|wolverine|woodchuck|apparition|camelopard|chimpanzee|chinchilla|cockatrice|cottontail|guinea pig|hippogriff|honey ?bee|kingfisher|rhinoceros|salamander|black widow|bumble ?bee|grasshopper|king ?snake|mockingbird|nightingale|prairie ?dog|winged horse|mountain lion)")) then var staga $1
if (matchre ("%look", "(\bquns?\b|aloe|\bcebi\b|herb|hisan|hulij|ithor|nilos|nuloe|sufil|aevaes|blocil|Datura|eghmok|genich|georin|hulnik|jadice|muljin|nemoih|plovik|riolur|yelith|hemlock|junliar|ojhenik|foxglove|glaysker|lujeakave|belladonna|draconeaia|nightshade)")) then var stagh $1
if (matchre ("%look", "(\belement\b|\bair|\bice|fire|wind|earth|\bflame\b|water|\ba?ether\b|inferno|thunder|lightning|electricity)")) then var stage $1
if (matchre ("%look", "(\bElfs?\b|\bOlvis?\b|Dwarf|\bElves\b|Gnome|Human|Kaldar|Ocular|Rakash|Dwarves|Gorbesh|Prydaen|Elothean|Gor'?Tog|Halfling|S'?Kra ?Mur)")) then var stagr $1
if (matchre ("%look", "(\bplanets?\b|constellation|\bbogs?\b|\bfens?\b|\bseas?\b|\bsuns?\b|\blakes?\b|\bmoons?\b|\bstars?\b|\bislands?\b|\bdeserts?\b|\bforests?\b|\brivers?\b|\bAesry\b|bayou|comet|Dirge|marsh|\boceans?\b|\bRatha\b|\bShard\b|swamp|taiga|\bXibar\b|canyon|Ilithi|jungle|morass|\bReshal\b|steppe|tundra|Velaka|Verena|Yavash|Amlothi|Faldesu|Grazhir|Ismenia|\bKatamba\b|M'?Riss|prairie|savanna|volcano|Szeldia|wetland|Yoakena|Zoluren|Elanthia|Estrilda|Fornsted|Hekemhhg|Kermoria|Morleena|mountain|Penhetia|quagmire|Reshalia|Sawstwar|Segoltha|Shamilho|Siksraja|Taisgath|woodland|Zaulfung|Zhamikhh|Boar Clan|Dawgolesh|Durgaulda|Er'?qutra|grassland|Gwenalion|Irasushen|Jantspyre|Merewalda|Muspar'?i|Pi'?Qanah|Ratamipak|shrubland|Surlaenis|Therengia|Wolf Clan|Ain Ghazal|Arthe Dale|Forfedhdar|Hara'?jaal|Knife Clan|Mer'?Kresh|Oxenwaithe|rainforest|Riverhaven|Sarasunath|Stone Clan|Tiger Clan|Belarritaco|El'?Bain'?s|Ilaya Taipa|Langenfirth|Leth Deriel|Nenav Dalar|Throne City|Hibarnhvidar|Qi'?Reshalia|The Crossing|Therenborough|Fayrin'?s Rest|Kaerna Village|Raven'?s Point|Steelclaw Clan|Chyolvea Tayeu'?a|Aesry Surlaenis'?a|Rossman'?s Landing)")) then var stagl $1
if (matchre ("%tap", "(avaes|imnera|sraeth|dhhresh|hafaltu|indakar|ithridu|keismin|xibaryl|asketine|celstite|lemicule|negnetha|zengalmi|iheaneu'a|chakrel|soulstone)")) then var mtags $1
if (matchre ("%tap", "(\bbones?\b|\bcoal\b|\bjade\b|onyx|\bopals?\b|\bruby\b|\bagate\b|\bamber\b|beryl|chalk|coral|flint|\bglass\b|ivory|lapis|nacre|pearl|shale|slate|topaz|arkose|basalt|garnet|gneiss|iolite|jasper|\bmarble\b|pumice|pyrite|quartz|rubies|schist|spinel|svelae|zircon|anloral|axinite|azurite|ceramic|citrine|crystal|diamond|diorite|dwalgim|elbaite|eldring|emerald|granite|jadeite|kunzite|kyanite|larimar|lasmodi|olivine|peridot|sjatmal|amethyst|cinnabar|diopside|dolomite|feldspar|grazhite|hematite|ilmenite|ismenite|mudstone|neitrice|obsidian|porphyry|sapphire|selenite|sky opal|sodalite|sunstone|szeldite|verenite|waermodi|xibarite|yavasite|alabaster|ambergris|amlothite|carnelian|claystone|dawgolite|elanthite|erythrite|glowstone|kaolinite|katambite|limestone|malachite|mistglass|moonstone|morganite|penhetite|rhodonite|runestone|sandstone|scheelite|scrimshaw|snow opal|star ruby|tanzanite|tsavorite|turquoise|wulfenite|yoakenite|aevanstone|andalusite|anthracite|aquamarine|blood ruby|bloodstone|chalcedony|cloud ruby|estrildite|fang pearl|fire pearl|flame opal|frost opal|gloamstone|heartstone|lantholite|moon pearl|morleenite|nightstone|seordstone|smoke ruby|star-stone|thealstone|tourmaline|water opal|alexandrite|aurora opal|cherry opal|chrysoberyl|chrysoprase|durgauldite|er'?qutrite|fool's gold|geshi pearl|merewaldite|pitch pearl|smoky topaz|star rubies|sunset opal|talan pearl|Xibar topaz|blood rubies|blue diamond|chalcedonies|cloud rubies|dafora pearl|idopun pearl|lapis lazuli|mystic topaz|ocean jasper|pink diamond|smoke rubies|autumn jasper|black diamond|calav[ae]rite|damaryn pearl|damilyo pearl|draconic opal|firesilk opal|haze sapphire|imperial ruby|lilac diamond|midnight ruby|moonspun ruby|night diamond|nimbus garnet|saffron topaz|smoky diamond|star sapphire|white diamond|zenith spinel|frostfire opal|Ilithi emerald|imperial topaz|nightfire opal|starfire topaz|starlight ruby|Taisidon pearl|winter emerald|frostflare opal|glacier emerald|imperial rubies|midnight rubies|moonspun rubies|sana'?ati heart|crimson sapphire|dragon fire opal|dragonfire amber|katamba'?s spire|phantom sapphire|spiderweb jasper|starlight rubies|Taisidon emerald|tempest sapphire|aurora tourmaline|champagne diamond|dalterein diamond|fire maiden topaz|imperial sapphire|twilight sapphire|wild horse jasper|dragon'?s eye ruby|eventide moonstone|orchid alexandrite|Teiro'?s hate ruby|lion'?s heart topaz|molten-core diamond|royal zoluren topaz|dragon'?s blood ruby|dragon'?s eye rubies|dragon'?s heart ruby|Teiro'?s hate rubies|Hav'?roth'?s ambrosia|jackal'?s heart pearl|lotus flower sapphire|ocean'?s deep emerald|serpent'?s heart ruby|vela'?tohr tourmaline|dragon'?s blood rubies|dragon'?s heart rubies|forest'?s heart garnet|Musparan gold sapphire|shrike'?s eye sapphire|white Zoluren sapphire|Crystalline dragon tear|Eluned'?s tear sapphire|serpent'?s heart rubies|dragon'?s scale sapphire|mermaid'?s tear sapphire|nature'?s canopy emerald|summer'?s heart sapphire|violet'?s heart amethyst|volcano'?s heart citrine)")) then var mtagg $1
if (matchre ("%tap", "(\btin\b|gold|\biron\b|\blead\b|zinc|brass|glaes|steel|bronze|copper|damite|kertig|lumium|nickel|niello|niniam|oravir|pewter|silver|tyrium|animite|haralun|iridium|aluminum|audrualm|electrum|platinum|red gold|spangold|tantalum|titanium|blue gold|darkstone|grey gold|hepatizon|palladium|pink gold|rose gold|black gold|crown gold|green gold|orichalcum|white gold|purple gold|anlora[- ]avtoma)")) then var mtagm $1
if (matchre ("%tap", "(\bash\b|\belm\b|\bfir\b|\boak\b|\byew\b|haon|\bpine\b|\bteak\b|\balder\b|aspen|balsa|beech|birch|cedar|ebony|lunat|maple|rowan|shaal|acanth|bamboo|deobar|halmik|huljik|modwir|poplar|spruce|vellum|walnut|willow|cypress|dogwood|hickory|papyrus|redwood|chestnut|ebonwood|gethwood|goldbark|ironwood|mahogany|mistwood|plumwood|sana'?ati|wiirwood|wormwood|adderwood|bloodwood|e'?erdream|flamewood|gloomwood|goldenoak|khor-?vela|parchment|satinwood|smokewood|taborwood|witchclaw|wyndewood|cherrywood|copperleaf|copperwood|cottonwood|dragonwood|eucalyptus|flamethorn|sandalwood|silverwood|whitethorn|aganylosh'?a|diamondwood|bricklebranch|hhr'?lav'?geluhh)")) then var mtagw $1
if (matchre ("%tap", "(\bfur\b|\bfelt\b|\bhemp\b|\blace\b|\bsilk\b|\bwool\b|khaki|linen|satin|sinew|\bstraw\b|suede|tweed|\btwine\b|angora|burlap|canvas|cotton|muslin|velvet|brocade|\bfeathers?\b|flannel|gingham|khiynit|leather|rawhide|worsted|shagreen|grosgrain|haircloth|longcloth|broadclothlava samite|(ice|fire|moon|blood|Elven|night|shade|steel|storm|water|marble|shadow|spider|duchess|bluefire|Elothean|Musparan|fae woven|oceanmist|starlight|nightreaver|nightweaver|nightstalker) ?(lace|silk|satin|velvet|snowlace))")) then var mtagf $1
if (matchre ("%tap", "(\bred\b|\bpink\b|gules|auburn|cerise|maroon|murrey|carmine|crimson|magenta|reddish|scarlet|burgundy|cardinal|chestnut|sanguine|blood-red|carnelian|vermilion|orange-red)")) then var ctagr $1
if (matchre ("%tap", "(orange|\btan\b|brown|fiery|sepia|tawny|tenne|\bumber\b|russet|persimmon|red-orange)")) then var ctago $1
if (matchre ("%tap", "(yellow|\becru\b|gold|amber|lemon|saffron|green-yellow|canary[- ]yellow)")) then var ctagy $1
if (matchre ("%tap", "(green|\blime\b|\bvert\b|clover|celadon|viridian|asparagus|chartreuse|sea[- ]green|yellow-green|olive[- ]drab|olive[- ]green|forest[- ]green|hunter[- ]green)")) then var ctagg $1
if (matchre ("%tap", "(\bblue\b|\bceil\b|\bcyan\b|\bteal\b|azure|cobalt|indigo|cerulean|turquoise|sky[- ]blue|ultramarine|baby[- ]blue|navy[- ]blue|royal[- ]blue|cobalt[- ]blue|blue[- ]celeste)")) then var ctagb $1
if (matchre ("%tap", "(violet|lilac|mauve|orchid|purple|fuchsia|purpure|thistle|eggplant|lavender|periwinkle|red-violet)")) then var ctagv $1
if (matchre ("%tap", "(\bgr[ae]y\b|ashen|beige|\bblack\b|cream|eisen|ivory|\bsable\b|taupe|white|argent|silver|arsenic|eggshell|feldgrau|glaucous|platinum|cinereous|colorless|ash[- ]gray|slate[- ]gray|midnight[- ]black)")) then var ctagn $1
if (matchre ("%tap", "(rainbow|multi-?hued|multi-?colored)")) then var ctagm $1
if (matchre ("%tap", "(Bard|\bheroe?s?\b|\bmages?\b|\bmonks?\b|\bpoets?\b|\bsages?\b|\bseers?\b|felon|judge|\bmedics?\b|nurse|rogue|Thief|amazon|bandit|beggar|Cleric|doctor|Empath|farmer|fencer|healer|herald|hunter|knight|martyr|mystic|pastor|pirate|priest|Ranger|sailor|Trader|weaver|wizard|acolyte|brigand|burglar|captain|citizen|convict|diviner|duelist|marshal|Paladin|peddler|pilgrim|prophet|psychic|scholar|soldier|surgeon|Thieves|villain|warrior|assassin|champion|commoner|criminal|engineer|merchant|minister|minstrel|preacher|prisoner|shepherd|smuggler|villager|alchemist|Barbarian|buccaneer|celebrant|combatant|elemancer|gladiator|historian|justiciar|locksmith|messenger|Moon Mage|navigator|physician|sham[ae]n|apothecary|armorsmith|blacksmith|hangm[ae]n|hierophant|Inquisitor|mastermind|researcher|executioner|Necromancer|philosopher|weaponsmith|woodsm[ae]n|ecclesiastic|elementalist|spiritualist|swashbuckler|Warrior Mage|highwaym[ae]n|clergy(man|woman)|medicine (m[ae]n|wom[ae]n))")) then var stagp $1
if (matchre ("%tap", "(\bgods?\b|Immortal|\bEu\b|\bIdon\b|Mrod|Aniek|Elide|Aliesa|Asketi|Botolf|Drogor|Eerayn|Eimeuz|Eluned|Enelne|Faiyka|Firulf|Glacis|Huldah|Iladza|Kuniyo|Meraud|Merion|Orisas|Phelim|Sieben|Sildua|Tieheq|Alamhif|Albreda|Aldauth|Be'?ort|Coshivi|Damaris|Demrris|Dergati|Everild|Eylhaar|Harawep|Lemicus|Murrula|Rutilor|Saemaus|Shariza|Sraxaec|Tamsine|Ushnish|Chadatru|Divyaush|Faenella|Gizzbolf|Hodierna|Issendar|Kertigen|Kirmhara|Krigglin|Misiumos|Peri'?el|Tenemlor|Thirteen|Glythtide|Hav'?roth|Spangklud|Triquetra|Trothfang|Truffenyi|Xosiurion|Berengaria|Zachriedek|Urrem'?tier|Kerenhappuch|World Dragon)")) then var stagg $1
if (matchre ("%tap", "(animal|\bbeasts?\b|insect|\boxe?n?\b|\bapes?\b|\bass\b|\bbats?\b|\bbees?\b|\bcats?\b|\bcows?\b|\bdoes?\b|\bdogs?\b|\beels?\b|\belk\b|\bewes?\b|\bfly\b|\bfox\b|\bhogs?\b|\bimps?\b|\bowls?\b|\bpigs?\b|\brams?\b|\brats?\b|\byaks?\b|\bbears?\b|bird|\bboars?\b|\bbucks?\b|\bbulls?\b|\bclams?\b|\bcocks?\b|\bcrabs?\b|\bcrows?\b|\bdeers?\b|\bdoves?\b|duck|\bfauns?\b|fish|\bfleas?\b|frog|goat|\bhares?\b|\bhawks?\b|ibex|\blambs?\b|\blarks?\b|\blions?\b|lynx|mink|\bmoths?\b|\bmules?\b|nyad|pika|puma|\bstags?\b|\bswans?\b|toad|\bvoles?\b|wasp|\bwings?\b|wolf|\bwrens?\b|yale|adder|alfar|bison|burro|camel|civet|cobra|coney|crane|\bdemons?\b|\bdevils?\b|dingo|dryad|eagle|fairy|\bfiends?\b|finch|gecko|genie|\bghosts?\b|\bghouls?\b|goose|harpy|heron|hinny|horse|hound|hydra|hyena|kirin|leech|lemur|llama|moose|mouse|otter|prawn|puppy|quail|raven|robin|satyr|shark|sheep|shrew|skull|snail|snake|stoat|stork|swine|tiger|troll|trout|viper|whale|zebra|alpaca|alphyn|antler|badger|bagwyn|beaver|beetle|canary|cattle|cicada|collie|condor|cougar|coyote|curlew|donkey|\bdragons?\b|ermine|falcon|ferret|gerbil|goblin|gopher|grouse|hornet|iguana|impala|jackal|jaguar|kelpie|kitten|kobold|lizard|locust|maggot|magpie|mantis|marmot|marten|merman|minnow|monkey|muskox|ocelot|onager|osprey|oyster|parrot|pigeon|possum|python|rabbit|remora|salmon|scarab|selkie|shrike|shrimp|sphinx|spider|\bspirits?\b|sprite|talbot|thrush|toucan|turkey|turtle|undead|walrus|weasel|welkin|wraith|wyvern|yeehar|zombie|anchovy|aurochs|banshee|boggart|boobrie|buffalo|bustard|buzzard|calopus|caracal|centaur|cheetah|chimera|cricket|dolphin|echidna|gazelle|giraffe|gorilla|goshawk|griffin|griffon|gryphon|hamster|herring|katydid|kestrel|ladybug|lemming|leopard|lioness|lobster|mammoth|manatee|martlet|mastiff|meerkat|merelew|mermaid|mouflon|musimon|opossum|ostrich|panther|peacock|pegasus|pelican|phoenix|polecat|primate|raccoon|rooster|sardine|seagull|serpent|sparrow|specter|swallow|termite|tityrus|unicorn|vulture|wildcat|aardvark|antelope|arachnid|barnacle|basilisk|behemoth|capybara|cardinal|chipmunk|elephant|flounder|hedgehog|inkhorne|kangaroo|minotaur|mongoose|mosquito|parakeet|pheasant|platypus|popinjay|reindeer|scorpion|skeleton|squirrel|starling|sturgeon|terrapin|tortoise|werewolf|albatross|alligator|armadillo|blackbird|bloodworm|blue ?jay|butterfly|centipede|chameleon|cockroach|crocodile|damselfly|dragonfly|greyhound|groundhog|hippocamp|manticore|partridge|porcupine|springbok|swordfish|tarantula|wolverine|woodchuck|apparition|camelopard|chimpanzee|chinchilla|cockatrice|cottontail|guinea pig|hippogriff|honey ?bee|kingfisher|rhinoceros|salamander|black widow|bumble ?bee|caterpillar|grasshopper|king ?snake|mockingbird|nightingale|prairie ?dog|winged horse|mountain lion)")) then var staga $1
if (matchre ("%tap", "(\bquns?\b|aloe|\bcebi\b|herb|hisan|hulij|ithor|nilos|nuloe|sufil|aevaes|blocil|Datura|eghmok|genich|georin|hulnik|jadice|muljin|nemoih|plovik|riolur|yelith|hemlock|junliar|ojhenik|foxglove|glaysker|lujeakave|belladonna|draconeaia|nightshade)")) then var stagh $1
if (matchre ("%tap", "(\belement\b|\bair|\bice|fire|wind|earth|\bflame\b|water|a?ether|inferno|thunder|lightning|electricity)")) then var stage $1
if (matchre ("%tap", "(\bElfs?\b|\bOlvis?\b|Dwarf|\bElves\b|Gnome|Human|Kaldar|Ocular|Rakash|Dwarves|Gorbesh|Prydaen|Elothean|Gor'?Tog|Halfling|S'?Kra ?Mur)")) then var stagr $1
if (matchre ("%tap", "(\bplanets?\b|constellation|\bbogs?\b|\bfens?\b|\bseas?\b|\bsuns?\b|\blakes?\b|\bmoons?\b|\bstars?\b|\bislands?\b|\bdeserts?\b|\bforests?\b|\brivers?\b|\bAesry\b|bayou|comet|Dirge|marsh|\boceans?\b|\bRatha\b|\bShard\b|swamp|taiga|\bXibar\b|canyon|Ilithi|jungle|morass|\bReshal\b|steppe|tundra|Velaka|Verena|Yavash|Amlothi|Faldesu|Grazhir|Ismenia|\bKatamba\b|M'?Riss|prairie|savanna|volcano|Szeldia|wetland|Yoakena|Zoluren|Elanthia|Estrilda|Fornsted|Hekemhhg|Kermoria|Morleena|mountain|Penhetia|quagmire|Reshalia|Sawstwar|Segoltha|Shamilho|Siksraja|Taisgath|woodland|Zaulfung|Zhamikhh|Boar Clan|Dawgolesh|Durgaulda|Er'?qutra|grassland|Gwenalion|Irasushen|Jantspyre|Merewalda|Muspar'?i|Pi'?Qanah|Ratamipak|shrubland|Surlaenis|Therengia|Wolf Clan|Ain Ghazal|Arthe Dale|Forfedhdar|Hara'?jaal|Knife Clan|Mer'?Kresh|Oxenwaithe|rainforest|Riverhaven|Sarasunath|Stone Clan|Tiger Clan|Belarritaco|El'?Bain'?s|Ilaya Taipa|Langenfirth|Leth Deriel|Nenav Dalar|Throne City|Hibarnhvidar|Qi'?Reshalia|The Crossing|Therenborough|Fayrin'?s Rest|Kaerna Village|Raven'?s Point|Steelclaw Clan|Chyolvea Tayeu'?a|Aesry Surlaenis'?a|Rossman'?s Landing)")) then var stagl $1
return
Specialset:
if (matchre ("%look", "(Barbarian|chakrel|warpaint)")) then var special barbarian style
if (matchre ("%look", "(Bard|Bardic|neithrel)")) then var special bard style
if (matchre ("%look", "(cambrinth)")) then var special cambrinth
if (matchre ("%look", "(Cleric|benediction|acolyte|clergy|clerical|devotional|ecclesiastic|Inquisition|Inquisitor|libation|minister|monastic|monk|\bnun\b|pastor|prayer|preach|priest|pulpit|sham[ae]n|vestment)")) then var special cleric style
if (matchre ("%look", "(Dwarf|Dwarve[ns]|Haakish)")) then var special dwarf style
if (matchre ("%look", "(Elf|Elve[ns]|Elvish|Ilithic|sana'ati dyaus)")) then var special elf style
if (matchre ("%look", "(Eloth|Gerenshuge)")) then var special elothean style
if (matchre ("%look", "(Empath|alfar|apothecaries|apothecary|colepexies|colepexy|dirnel|doctor|empathic|foraging|healer|healing|herbs?|medicine|medic|narmorbreth|nurse|physician|surgeon|woodwisp)")) then var special empath style
if (matchre ("%look", "(gaethzen)")) then var special gaethzen
if (matchre ("%look", "(Gnome|Gnomic|Gnomish|Gizzbolf|Krigglin|Spangklud)")) then var special gnome style
if (matchre ("%look", "(Gor'Tog|Toggish|Toggler)")) then var special gortog style
if (matchre ("%look", "(Halfling|Olvi)")) then var special halfling style
if (matchre ("%look", "(Human|Gamgweth)")) then var special human style
if (matchre ("%look", "(Kaldar|Gorbesh|Aliesa|Aniek|Eimeuz|Merion|Misiumos|Orisas|Sieben|Sraxaec|Tieheq|Xosiurion)")) then var special kaldar style
if (matchre ("%look", "(Moon Mage|Arid Steppe|astrologer|astrology|Celestial Compact|constellation|Crystal Hand|divination|Fortune's Path|G'nar Pethian|Heritage House|lunar|planet|Progeny|telescope|Tezirah|Tokka)")) then var special moon mage style
if (matchre ("%look", "(Paladin|soulstone)")) then var special paladin style
if (matchre ("%look", "(Prydaen|Demrris|\bEu\b|Faiyka|Iladza|Shariza|Tenemlor)")) then var special prydaen style
if (matchre ("%look", "(Rakash|Moonskin|Coshivi|Enelne|Mrod)")) then var special rakash style
if (matchre ("%look", "(Ranger)")) then var special ranger style
if (matchre ("%look", "(S'?Kra|Eth'ral'khh|ama'hhrsk|Hav'roth|Indakar|Irhhnth|Malk|mehath|Mhhg|Nehgris|Peri'el|Rasha|ru'at|sharmiit'mhhg|Smolg|Sraan|tail drape|T'Lar Venda)")) then var special skra mur style
if (matchre ("%look", "(Thief|Thieves|brigand|burglar|highwaym[ae]n|pirate|robber|smuggler)")) then var special thief style
if (matchre ("%look", "(Trader|auction|bazaar|caravan|contract|merchant)")) then var special trader style
if (matchre ("%look", "(Warrior Mage|\ba?ether\b|element|talisman)")) then var special warrior mage style
if (matchre ("%tap", "(Barbarian|chakrel|warpaint)")) then var special barbarian style
if (matchre ("%tap", "(Bard|Bardic|neithrel)")) then var special bard style
if (matchre ("%tap", "(cambrinth)")) then var special cambrinth
if (matchre ("%tap", "(Cleric|benediction|acolyte|clergy|clerical|devotional|ecclesiastic|Inquisition|Inquisitor|libation|minister|monastic|monk|\bnun\b|pastor|prayer|preach|priest|pulpit|sham[ae]n|vestment)")) then var special cleric style
if (matchre ("%tap", "(Dwarf|Dwarve[ns]|Haakish)")) then var special dwarf style
if (matchre ("%tap", "(Elf|Elve[ns]|Elvish|Ilithic|sana'ati dyaus)")) then var special elf style
if (matchre ("%tap", "(Eloth|Gerenshuge)")) then var special elothean style
if (matchre ("%tap", "(Empath|alfar|apothecaries|apothecary|colepexies|colepexy|dirnel|doctor|empathic|foraging|healer|healing|herbs?|medicine|medic|narmorbreth|nurse|physician|surgeon|woodwisp)")) then var special empath style
if (matchre ("%tap", "(gaethzen)")) then var special gaethzen
if (matchre ("%tap", "(Gnome|Gnomic|Gnomish|Gizzbolf|Krigglin|Spangklud)")) then var special gnome style
if (matchre ("%tap", "(Gor'Tog|Toggish|Toggler)")) then var special gortog style
if (matchre ("%tap", "(Halfling|Olvi)")) then var special halfling style
if (matchre ("%tap", "(Human|Gamgweth)")) then var special human style
if (matchre ("%tap", "(Kaldar|Gorbesh|Aliesa|Aniek|Eimeuz|Merion|Misiumos|Orisas|Sieben|Sraxaec|Tieheq|Xosiurion)")) then var special kaldar style
if (matchre ("%tap", "(Moon Mage|Arid Steppe|astrologer|astrology|Celestial Compact|constellation|Crystal Hand|divination|Fortune's Path|G'nar Pethian|Heritage House|lunar|planet|Progeny|telescope|Tezirah|Tokka)")) then var special moon mage style
if (matchre ("%tap", "(Paladin|soulstone)")) then var special paladin style
if (matchre ("%tap", "(Prydaen|Demrris|\bEu\b|Faiyka|Iladza|Shariza|Tenemlor)")) then var special prydaen style
if (matchre ("%tap", "(Rakash|Moonskin|Coshivi|Enelne|Mrod)")) then var special rakash style
if (matchre ("%tap", "(Ranger)")) then var special ranger style
if (matchre ("%tap", "(S'?Kra|Eth'ral'khh|ama'hhrsk|Hav'roth|Indakar|Irhhnth|Malk|mehath|Mhhg|Nehgris|Peri'el|Rasha|ru'at|sharmiit'mhhg|Smolg|Sraan|tail drape|T'Lar Venda)")) then var special skra mur style
if (matchre ("%tap", "(Thief|Thieves|brigand|burglar|highwaym[ae]n|pirate|robber|smuggler)")) then var special thief style
if (matchre ("%tap", "(Trader|auction|bazaar|caravan|contract|merchant)")) then var special trader style
if (matchre ("%tap", "(Warrior Mage|\ba?ether\b|element|talisman)")) then var special warrior mage style
return
Typeset:
if (matchre ("%1", "(aggahhpel|amulet|anklet|armband|armlet|badge|band|bangle|barrette|bead|boutonniere|bracelet|bracer|brooch|button|chain|charm|choker|circlet|clasp|claw|crown|cuff|earcuff|earring|feather|fetish|haircomb|hairnet|hairpin|locket|medal|medallion|necklace|pendant|periapt|pilonu|pin|por'nidrel|ring|stud|sur'nidrel|tailband|torque|trinket|venda|wristband|wristcuff|wristlet)")) then var type1 jewelry
if (matchre ("%1", "(aggahhpel|gamantang|pel'hhsmur|pilonu|por'nidrel|rasha'hhsograth|sur'nidrel|uaro's'sugi)")) then var type3 skra mur style
if (matchre ("%1", "(alb|apron|bandeau|belt|beret|blouse|bodice|bonnet|boots|breeches|caftan|cape|cassock|chemise|cloak|clogs|coat|corset|dirndl|doublet|drape|dress|eyepatch|fabric|fedora|fillet|frock|gamantang|gloves|gown|hat|hood|hose|jacket|jerkin|josta|kilt|kimono|krekls|leggings|loincloth|mantle|mask|moccasins|mra'sin|nauda|odaj|overalls|pall|pants|pelt|ribbon|robe|safros|sandals|sarong|sarrak|sash|scarf|shawl|shirt|shoes|skirt|skullcap|slippers|smock|snood|sochi|socks|stockings|stole|tabard|tam|tights|toga|trousers|tunic|turban|uaro's'sugi|veil|vest|vikses|vluze|wimple|wing|wrap)")) then var type1 clothing
if (matchre ("%1", "(arrowhead|bobbin|bodkin|burin|flights|instructions|keyblank|mold|mortar|pattern|primer|shears|thread)")) then var type1 creation
if (matchre ("%1", "(bagpipes|bassoon|cane flute|clarin|cornet|didjeridu|fife|flute|gemshorn|hichiriki|horn|minjayrah|mirliton|mitbiq|oboe|ocarina|physalis|recorder|sackbut|serpent|shakuhachi|shawm|syrinx|txistu|whistle|yarghul|zurna)")) then var type1 wind instrument
if (matchre ("%1", "(banjo|cistre|cittern|faenellica|fiddle|gittern|guti'adar|harp|khurmary|kithara|lute|lyre|mandolin|psaltery|rebec|sarangi|sitar|sra'ajahh|tambura|violin|zither)")) then var type1 string instrument
if (matchre ("%1", "(bodhran|bones|castanets|cymbals|damaru|darje|doumbec|frottoir|gansa-gambang|guiro|naqqara|spoons|tabla|tambourine|tapani|zills)")) then var type1 percussion instrument
if (matchre ("%1", "(cassock|censer)")) then var type3 cleric style
if (matchre ("%1", "(doll|puppet)")) then var type1 toy
if (matchre ("%1", "(feedbag)")) then var type1 trader style
if (matchre ("%1", "(kimono)")) then var type3 elothean style
if (matchre ("%1", "(mra'sin|josta|krekls|rugursora|safros|sarrak|sega|sochi|vikses|vluze)")) then var type3 prydaen style
if (matchre ("%1", "(nauda|odaj)")) then var type3 rakash style
if (matchre ("%1", "(sigilbook|starchart|telescope)")) then var type1 moon mage style
if (matchre ("%1", "(warhorn)")) then var type1 barbarian style
if (matchre ("%1", "(warhorn)")) then var type2 bard style
if (matchre ("%look", "(cambrinth)")) then var type4 cambrinth
if (matchre ("%look", "(Curiously, no cord, chain or other binding links the small trinkets together)")) then var type1 jewelry
if (matchre ("%look", "(gaethzen)")) then var type4 gaethzen
if (matchre ("%look", "(This customization can be used with any normal.+home)")) then var type1 housing
if (matchre ("%tap", "((belt|carving|skinning) knife|flight glue|hide scraper|Wayerd pyramid|wood shaper)")) then var type1 creation
if (matchre ("%tap", "(acolyte|clergy|clerical|Cleric|devotional|ecclesiastic|Inquisition|Inquisitor|libation|minister|monastic|monk|\bnun\b|pastor|prayer|preach|priest|pulpit|sham[ae]n|vestment)")) then var type3 cleric style
if (matchre ("%tap", "(anatomy chart)")) then var type1 anatomy chart
if (matchre ("%tap", "(anatomy chart)")) then var type2 empath style
if (matchre ("%tap", "(anloral|pilgrim's badge)")) then var type2 cleric style
if (matchre ("%tap", "(anloral|pilgrim's badge)")) then var type3 paladin style
if (matchre ("%tap", "(Barbarian|chakrel|warpaint)")) then var type3 barbarian style
if (matchre ("%tap", "(Bard|Bardic|neithrel)")) then var type3 bard style
if (matchre ("%tap", "(cambrinth)")) then var type4 cambrinth
if (matchre ("%tap", "(Dwarf|Dwarve[ns]|Haakish)")) then var type3 dwarf style
if (matchre ("%tap", "(Elf|Elve[ns]|Elvish|Ilithic|sana'ati dyaus)")) then var type3 elf style
if (matchre ("%tap", "(Eloth|Gerenshuge)")) then var type3 elothean style
if (matchre ("%tap", "(Empath|apothecaries|apothecary|doctor|empathic|foraging|healer|healing|medicine|medic|nurse|physician|surgeon)")) then var type3 empath style
if (matchre ("%tap", "(gaethzen)")) then var type4 gaethzen
if (matchre ("%tap", "(Gnome|Gnomic|Gnomish|Gizzbolf|Krigglin|Spangklud)")) then var type3 gnome style
if (matchre ("%tap", "(Gor'Tog|Toggish|Toggler)")) then var type3 gortog style
if (matchre ("%tap", "(Halfling|Olvi)")) then var halfling race style
if (matchre ("%tap", "(Human|Gamgweth)")) then var human race style
if (matchre ("%tap", "(Kaldar|Gorbesh|Aliesa|Aniek|Eimeuz|Merion|Misiumos|Orisas|Sieben|Sraxaec|Tieheq|Xosiurion)")) then var type3 kaldar style
if (matchre ("%tap", "(Moon Mage|Arid Steppe|astrologer|astrology|Celestial Compact|constellation|Crystal Hand|divination|Fortune's Path|G'nar Pethian|Heritage House|lunar|planet|Progeny|sigilbook|telescope|Tezirah|Tokka)")) then var type3 moon mage style
if (matchre ("%tap", "(Paladin|soulstone)")) then var type3 paladin style
if (matchre ("%tap", "(Prydaen|Demrris|\bEu\b|Faiyka|Iladza|Shariza|Tenemlor)")) then var type3 prydaen style
if (matchre ("%tap", "(Rakash|Moonskin|Coshivi|Enelne|Mrod)")) then var type3 rakash style
if (matchre ("%tap", "(Ranger)")) then var type3 ranger style
if (matchre ("%tap", "(S'?Kra|Eth'ral'khh|ama'hhrsk|Hav'roth|Indakar|Irhhnth|Malk|mehath|Mhhg|Nehgris|Peri'el|Rasha|ru'at|sharmiit'mhhg|Smolg|Sraan|tail drape|T'Lar Venda)")) then var type3 skra mur style
if (matchre ("%tap", "(Thief|Thieves|brigand|burglar|highwaym[ae]n|pirate|robber|smuggler)")) then var type3 thief style
if (matchre ("%tap", "(Trader|auction|bazaar|caravan|contract|merchant)")) then var type3 trader style
if (matchre ("%tap", "(trail map)")) then var type1 ranger style
if (matchre ("%tap", "(Warrior Mage|\ba?ether\b|element|talisman)")) then var type3 warrior mage style
return
CommaAppcost:
var commanumber %appcosti
eval length len(%commanumber)
var appcost %commanumber
if %length < 4 then goto return
evalmath length %length - 3
eval temp substr(%commanumber, %length, 3)
var appcost %temp
topapp:
if %length < 3 then goto lastapp
evalmath length %length - 3
eval temp substr(%commanumber, %length, 3)
var appcost %temp,%appcost
goto topapp
lastapp:
if %length > 0 then
{
eval temp substr(%commanumber, 0, %length)
var appcost %temp,%appcost
}
goto return
CommaCost:
CommaCost:
var commanumber %costi
var commanumber %costi
Line 1,139: Line 560:
}
}
goto return
goto return

return:
return:
return
return

end:
end:
put #log >Shop.txt |}
send shop
send shop
waitfor [Type SHOP [ITEM] to see what's on it.]
waitforre ^\[Type SHOP \[ITEM\] to see what's on it|^There is nothing to buy here
send shop $shop
send shop $shop
waitfor [Type SHOP [GOOD] to see some details about it.]
waitforre ^\[Type SHOP \[GOOD\] to see some details about it|^There is nothing to buy here
echo Last noun: %1 ($preposition $shop)
put #echo Last noun: %1 ($preposition $shop)
put #class racial on
exit</pre>
exit</pre>

Latest revision as of 18:22, 11 November 2019

Elanthipedia Shops (script)
Category information
Front-end Genie
Author Isharon


This script creates Elanthipedia forms for shops (that use the SHOP verb). The results are logged to the Shop file in Genie's Logs folder.

This script is intended for experienced Elanthipedia contributors only. The forms that are created by this script require some manual editing. (See below for details.) Please check for errors before posting them to Elanthipedia.

Instructions

Syntax

.ESHOP (YES): Type yes if you want the script to create the Store At A Glance and ShopDescription sections. (Store At A Glance is used once per shop. ShopDescription is used once per room.

A menu will prompt you to select the type of item you're adding:

  1. Weapon
  2. Shield
  3. Armor/Barding
  4. Item: Other


Required Genie Settings

You must install and use this alias to set the shop surface variable.

#alias {aps} {appraise $0 $preposition $shop quick}
#alias {sh} {shop $0 on $shop}
#alias {sha} {shop $0 on $shop;appraise $0 on $shop careful}
#alias {shs} {shop;shop $shop}
#alias {sv} {#var shop $0}


The "shop surface" is the thing on which the item is placed (for example, table, second rack, or oak shelf). Every time you change shop surfaces (via the sv alias), you need to use the shs alias to set the preposition.


You must install these triggers to set the currency variable. (Appraise something once to set it.)

#trigger {^You .+ worth .+ dokoras} {#var currency Dokoras}
#trigger {^You .+ worth .+ kronars} {#var currency Kronars}
#trigger {^You .+ worth .+ lirums} {#var currency Lirums}

You must install these triggers to set the preposition variable. (Use the shs alias to set it every time you change shop surfaces.)

#trigger {^Behind .+, you see:$} {#var preposition behind}
#trigger {^In .+, you see:$} {#var preposition in}
#trigger {^On .+, you see:$} {#var preposition on}
#trigger {^Under .+, you see:$} {#var preposition under}

Sample Usage (Walkthrough)

Running the Script

You want to add inventory for Misenseor Goods (4), so you go to a room in that shop. (For the purpose of this walkthrough, I will assume that nothing has been posted on this shop's page.)

> shop
The following items contain goods for sale:

  an iron hook
  a birch pedestal
  a huge cedar rack
  an antique fretwork table

[Type SHOP [ITEM] to see what's on it.]

The first surface with items to buy is the antique fretwork table, so you type sv fretwork table to set the shop surface variable. (You won't see anything when you do this.)

Then you type shs to set the preposition variable (so the script knows whether to look on, in, or under the table).

> shs
On the fretwork table, you see:

  a mammoth Botolf war icon set atop a bloodstained haft of hickory for 902000 copper Dokoras
  a mammoth Be'ort war icon set atop a haft of weeping willow for 902000 copper Dokoras
  a mammoth Asketi war icon set atop a haft of blighted mikkhalbamar for 902000 copper Dokoras
  a mammoth Huldah war icon set atop a haft of silver-green mistwood for 902000 copper Dokoras
  a mammoth Dergati war icon set atop a haft of black walnut for 902000 copper Dokoras
  a mammoth Trothfang war icon set atop a haft of veiny copperwood for 902000 copper Dokoras
  a mammoth Harawep war icon set atop a haft of burrowed oak for 902000 copper Dokoras

The inventory of an antique fretwork table rotates.

[Type SHOP [GOOD] to see some details about it.]

To run the script, you type .eshop yes. (Typing "yes" causes the script to generate a "Store At A Glance" and a "ShopDescription." If you already had that, you'd just type .eshop.)

ITEM TYPE:

1:	Weapon

2:	Shield

3:	Armor/Barding

4:	Item: Other

Enter Type Number:

The war icon is a weapon, so you enter 1.

The script then generates a ShopHeader section with item links and prices.

Once it's done, you move on to the huge cedar rack. (Type sv cedar rack and then shs.)

> shs
On the cedar rack, you see:

  some silver-blue scythewing moth handwraps for 72160 copper Dokoras
  a holy water sprinkler studded with stony basilisk fangs for 99220 copper Dokoras
  a steel jambiya with a hilt wrapped in membranous kartais wing for 36080 copper Dokoras
  a serrated bone-white scythe hung with a pair of sluagh claws for 63140 copper Dokoras
  a twisted black horn for 8118 copper Dokoras
  a dark crimson sword etched with spidery lightning for 8118 copper Dokoras
  a golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather for 13530 copper Dokoras
  an oaken impalement stake branded with viperous coils for 9020 copper Dokoras
  a granite mace sculpted like a gaunt greenish fist for 4510 copper Dokoras
  a morning star studded with Adan'f tail barbs for 10824 copper Dokoras
  a silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather for 13530 copper Dokoras

[Type SHOP [GOOD] to see some details about it.]

Start by typing .eshop. (You don't type yes this time, because you already have the Store At A Glance and a ShopDescription.)

Repeat this process for every shop surface in the room. When you're done with the room, move on to the next room (if there is one) or open your Shop log (if that was the last room). Every time you move to a new room, include "yes" to generate the room's ShopDescription.

Editing the Shop Form

See Required Manual Editing (below) for details about how to edit shop forms.

When you're done with the fretwork table and the cedar rack, your Shop log should look like this:

{{Store At A Glance
|Store Name =Misenseor Goods, Zealous Destruction
|Province =
|Town =
|MapNumber =
|Owner =n
|NumRooms =
|restrict =
|levelres =
|Store Type =[Guild],[Race],Alchemy,Armor,Barber,Boat,Cambrinth,Casino,Clothing,Container,Cosmetics,Crafting,Drink,Dye,Embroidery,Engraving,Estate Holder,Face Painting,Festival,Fishing Supply,Fletching,Florist,Food,Forging Supply,Furrier,Game,Gem,General,Heraldry,Herb,Hider,Horse,Housing,Jewelry,Juggling,Locksmithing,Magic,MAMAS,Map,Miscellaneous,Music,Origami,Pawn,Perfume,Pet,Rare Materials,Repair,Shield,Spellbook,Tack,Tanning,Tattoo,Tobacco,Toy,Trinket,Vault Furniture,Weapon,Wedding
|Fest =
|Coin =Dokoras
}}
{{ShopDescription
|roomname=Misenseor Goods, Zealous Destruction
|desc=The pinewood walls enclosing this side of the shop are equipped with implements of battle for the use of warrior monks. Large twin bowls, filled with red liquid, flank a stylized thirteen-pointed star burnt into the wall between the room's two egresses.<br />
You also see an iron hook with a strap of braided mey mosshair on it, a birch pedestal with several things on it, a huge cedar rack with several things on it and an antique fretwork table with several things on it.<br />
Obvious exits: southwest, northwest.
}}
{{ShopHeader|title=On the fretwork table}}
{{ShopItem|t=	w	|	mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood	|	902000	}}
{{ShopItem|t=	w	|	mammoth Zachriedek war icon set atop a haft of sickly aspen	|	902000	}}
{{ShopItem|t=	w	|	mammoth Botolf war icon set atop a bloodstained haft of hickory	|	902000	}}
{{ShopItem|t=	w	|	mammoth Be'ort war icon set atop a haft of weeping willow	|	902000	}}
{{ShopItem|t=	w	|	mammoth Asketi war icon set atop a haft of blighted mikkhalbamar	|	902000	}}
{{ShopItem|t=	w	|	mammoth Huldah war icon set atop a haft of silver-green mistwood	|	902000	}}
{{ShopItem|t=	w	|	mammoth Trothfang war icon set atop a haft of veiny copperwood	|	902000	}}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=	w	|	silver-blue scythewing moth handwraps	|	72160	}}
{{ShopItem|t=	w	|	holy water sprinkler studded with stony basilisk fangs	|	99220	}}
{{ShopItem|t=	w	|	steel jambiya with a hilt wrapped in membranous kartais wing	|	36080	}}
{{ShopItem|t=	w	|	serrated bone-white scythe hung with a pair of sluagh claws	|	63140	}}
{{ShopItem|t=	w	|	twisted black horn	|	8118	}}
{{ShopItem|t=	w	|	dark crimson sword etched with spidery lightning	|	8118	}}
{{ShopItem|t=	w	|	golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather	|	13530	}}
{{ShopItem|t=	w	|	oaken impalement stake branded with viperous coils	|	9020	}}
{{ShopItem|t=	w	|	granite mace sculpted like a gaunt greenish fist	|	4510	}}
{{ShopItem|t=	w	|	morning star studded with Adan'f tail barbs	|	10824	}}
{{ShopItem|t=	w	|	silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather	|	13530	}}
|}
  1. Most of the Store At A Glance table can't be filled out by the script, so the form leaves space for you to fill it out. Make sure the Store Name is the official name of the store. (The store name usually stops at the comma.)
  2. This is a festival shop, so Province, Town, and MapNumber are excluded. (Map numbers are Ranik map numbers from Elanthipedia.)
  3. If this shop has an obvious owner, fill out that person's first name. If not, leave it as n (for none).
  4. Fill out NumRooms.
  5. If there are no restrictions or circle requirements, you can delete those lines.
  6. Store Types: Delete whatever types don't apply. If this shop has items that are for a particular guild or race, fill those out.
  7. Fest: This is Hollow Eve Festival 410.
{{Store At A Glance
|Store Name =Misenseor Goods
|Owner =n
|NumRooms =5
|Store Type =Cleric,Paladin,Clothing,Container,Jewelry,Magic,Weapon
|Fest =Hollow Eve Festival 410
|Coin =Dokoras
}}

If the prices were written in something other than coppers, there will be underscores. Delete the underscores.

Add commas to prices that are 1,000 or greater. I left tabs between each field of the inventory table. This allows you to copy and paste the ShopItem lines into Excel to automatically add commas to the prices that are 1,000 or greater. If you would prefer to manually add the commas, I've included a version without tabs.

Delete the tabs.

{{ShopHeader|title=On the fretwork table}}
{{ShopItem|t=w|mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood|902,000}}
{{ShopItem|t=w|mammoth Zachriedek war icon set atop a haft of sickly aspen|902,000}}
{{ShopItem|t=w|mammoth Botolf war icon set atop a bloodstained haft of hickory|902,000}}
{{ShopItem|t=w|mammoth Be'ort war icon set atop a haft of weeping willow|902,000}}
{{ShopItem|t=w|mammoth Asketi war icon set atop a haft of blighted mikkhalbamar|902,000}}
{{ShopItem|t=w|mammoth Huldah war icon set atop a haft of silver-green mistwood|902,000}}
{{ShopItem|t=w|mammoth Trothfang war icon set atop a haft of veiny copperwood|902,000}}
|}

{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|silver-blue scythewing moth handwraps|72,160}}
{{ShopItem|t=w|holy water sprinkler studded with stony basilisk fangs|99,220}}
{{ShopItem|t=w|steel jambiya with a hilt wrapped in membranous kartais wing|36,080}}
{{ShopItem|t=w|serrated bone-white scythe hung with a pair of sluagh claws|63,140}}
{{ShopItem|t=w|twisted black horn|8,118}}
{{ShopItem|t=w|dark crimson sword etched with spidery lightning|8,118}}
{{ShopItem|t=w|golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather|13,530}}
{{ShopItem|t=w|oaken impalement stake branded with viperous coils|9,020}}
{{ShopItem|t=w|granite mace sculpted like a gaunt greenish fist|4,510}}
{{ShopItem|t=w|morning star studded with Adan'f tail barbs|10,824}}
{{ShopItem|t=w|silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather|13,530}}
|}

Required Manual Editing

Store At A Glance and ShopDescription

The script will add "Store At A Glance" and "ShopDescription" every time you run it. Delete all but the first ones.

Store Name: You'll probably need to edit this, as most room names have extra text. For example, if the room is "Gersvinda's Natural Studies, Studio," it should be changed to just "Gersvinda's Natural Studies."

ShopDescription

If there is not a "You also see" line in the room, the script will print a line that is only one line break (<br>). Delete that.

Item Types

If your table contains more than one type of item, you need to manually change some of the item types in the t= field. The options are:

  • Weapon: w
  • Shield: s
  • Armor: a
  • Clothing: c
  • Jewelry: j
  • Housing: h
  • Food/Drink: f
  • Items (all other): i

Prices

If the prices were written in something other than coppers, there will be underscores. Delete the underscores.

Add commas to prices that are 1,000 or greater. I left tabs between each field of the inventory table. This allows you to copy and paste the ShopItem lines into Excel to automatically add commas to the prices that are 1,000 or greater. If you would prefer to manually add the commas, I've included a version without tabs.

Delete the tabs.

Ticket Prices

If the price is in tickets, you need to add the word "Tickets" after the price. For example:

{{ShopItem|t=w|throwing dagger with a buzzard hilt|2 Tickets}}

Changelog

2/26/2016

  • Added support for bloodscrip|kernels?

5/23/2015

  • Removed menu support for unused item type flags

11/4/2013

  • Brand new version that greatly reduces the amount of time it takes to log inventory. Please read the documentation before posting these forms to Elanthipedia.
  • Added "rotating stock" footnote

9/25/2013

  • Added racial item class to combat/rp class toggles.

11/10/2012

  • Shortened pauses by half a second.

11/4/2012

  • Added "Hider" as a shop type.

5/16/2012

  • Fixed bug that prevented taps from being set on items "atop several" surfaces.

4/28/2012

  • Added support for items on "two" surfaces. (This was preventing certain taps from being read.)

11/14/2011

  • Added support for items on the surface. (This was preventing certain taps from being read.)

11/9/2011

  • Added support for items that are behind a shop surface.

11/4/2011

  • Added more shop type options to the list; fixed "Store At A Glance" section so that it's not specific to Hollow Eve Festival 403.
  • Added partial support for ticket prices.

11/2/2011

  • Added barding (horse armor) to the menu.

05/23/2011

  • The script now uses triggers to set the currency and preposition variables.

05/13/2011

  • The script now adds the room objects and room exits to the ShopDescription.
  • Fixed a bug that caused the script to list the last item twice.
  • The "Store At A Glance" and "ShopDescription" sections are now optional.

05/14/2011

  • Added store types to "Store At A Glance." (Erase the ones that don't apply to the shop that you're editing.)

Script (With Tabs for Excel)

put #class rp on
put #class arrive off
put #class combat off
put #class joust off
put #class racial off
put #class shop off

var source $roomname
action goto end when ^I could not find what (you|you were) referring to\.$
var numbers first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh
var numbers.index 0

action setvariable shopheader $1 when ^(.+), you see:$
action setvariable tap $2 when ^You tap (a|an|some|the) (.+) (atop|behind|inside|under) (an?|several|\bsome\b|\bthe\b|\btwo\b)
action setvariable short $2 when ^Short: (a|an|some|the) (.+)
action setvariable costi $1 when ^Cost:\s+(\d+) (Kronars?|Lirums?|Dokoras?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)

send shop $shop
waitforre ^(Behind|In|On|Under).+, you see:$

if_1 goto ShopDesc
goto StartShop

ShopDesc:
put #log >Shop.txt {{Store At A Glance
put #log >Shop.txt |Store Name       =$roomname
put #log >Shop.txt |Province         =
put #log >Shop.txt |Town             =$zonename
put #log >Shop.txt |MapNumber        =$zoneid
put #log >Shop.txt |Owner            =-
put #log >Shop.txt |NumRooms         =
put #log >Shop.txt |restrict         =
put #log >Shop.txt |levelres         =
put #log >Shop.txt |Store Type       =[Guild], [Race], Alchemy, Alteration, Armor, Barber, Boat, Book, Cambrinth, Casino, Clothing, Container, Cosmetics, Crafting, Drink, Dye, Embroidery, Engineering, Engraving, Estate Holder, Face paint, Festival, Fletching, Florist, Food, Forging, Furrier, Games, Gem, General, Heraldry, Herb, Hider, Horse, Housing, Jewelry, Juggling, Light, Locksmithing, Magic, MAMAS, Map, Miscellaneous, Music, Origami, Outfitting, Pawn, Perfume, Pet, Rare Materials, Repair, Shield, Siegery, Smoking, Spellbook, Tack, Tanning, Tattoo, Tobacco, Toy, Trinket, Vault Furniture, Weapon, Wedding, Writing
put #log >Shop.txt |Fest             =
put #log >Shop.txt |Coin             =$currency
put #log >Shop.txt }}
put #log >Shop.txt
put #log >Shop.txt {{ShopDescription
put #log >Shop.txt |roomname=$roomname
put #log >Shop.txt |desc=$roomdesc<br />
put #log >Shop.txt $roomobjs<br />
put #log >Shop.txt $roomexits
put #log >Shop.txt }}
put #log >Shop.txt

StartShop:
put #log >Shop.txt "{{ShopHeader|title=%shopheader}}"
put #echo
put #echo ITEM TYPE:
put #echo
put #echo 1:	Weapon
put #echo
put #echo 2:	Shield
put #echo
put #echo 3:	Armor/Barding
put #echo
put #echo 4:	Item: Other
put #echo
put #echo Enter Type Number:

matchre Weapon ^1$
matchre Shield ^2$
matchre Armor ^3$
matchre Item ^4$
matchwait

Weapon:
var type w
goto Shop1
Shield:
var type s
goto Shop1
Armor:
var type a
goto Shop1
Item:
var type i
goto Shop1

Shop1:
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+) ([Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+) copper (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_0 when ^\s+(an?|some|the) (.+) for (\d+) bronze (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) bronze (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_00 when ^\s+(an?|some|the) (.+) for (\d+) silver (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_0 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) silver (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_000 when ^\s+(an?|some|the) (.+) for (\d+) gold (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_00 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) gold (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_0000 when ^\s+(an?|some|the) (.+) for (\d+) platinum (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action setvariable tap $2;setvariable price $3_000 when ^\s+(an?|some|the) (.+) for (\d+\.\d+) platinum (Kronars?|Dokoras?|Lirums?|[Tt]ickets?|bloodscrip|kernels?|[Ff]ame)$
action put #log >Shop.txt "{{ShopItem|t=	%type	|	%tap	|	%price	}}" when for (\S+) (copper|bronze|silver|gold|platinum) (Kronars?|Dokoras?|Lirums?)$
action put #log >Shop.txt "{{ShopItem|t=	%type	|	%tap	|	%price	}}" when for (\S+) ([Tt]ickets?|bloodscrip|kernels?|[Ff]ame)
action put #log >Shop.txt "{{ShopFootnote|rotating stock}}" when ^The inventory of.+rotates\.$
send shop $shop
waitfor [Type SHOP [GOOD] to see some details about it.]
pause 1
goto end

end:
put #log >Shop.txt |}
send shop
put #class racial on
exit

Script (Without Tabs)

put #class rp on
put #class arrive off
put #class combat off
put #class joust off
put #class racial off
put #class shop off

var source $roomname
action goto end when ^I could not find what (you|you were) referring to\.$
var numbers first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|eleventh
var numbers.index 0

action setvariable shopheader $1 when ^(.+), you see:$
action setvariable tap $2 when ^You tap (a|an|some|the) (.+) (atop|behind|inside|under) (an?|several|\bsome\b|\bthe\b|\btwo\b)
action setvariable short $2 when ^Short: (a|an|some|the) (.+)
action setvariable costi $1 when ^Cost:\s+(\d+) (Kronars?|Lirums?|Dokoras?|Tickets?|bloodscrip|kernels?)

send shop $shop
waitforre ^(Behind|In|On|Under).+, you see:$

if_2 goto ShopDesc
goto StartShop

ShopDesc:
put #log >Shop.txt {{Store At A Glance
put #log >Shop.txt |Store Name       =$roomname
put #log >Shop.txt |Province         =
put #log >Shop.txt |Town             =$zonename
put #log >Shop.txt |MapNumber        =$zoneid
put #log >Shop.txt |Owner            =-
put #log >Shop.txt |NumRooms         =
put #log >Shop.txt |restrict         =
put #log >Shop.txt |levelres         =
put #log >Shop.txt |Store Type       =[Guild], [Race], Alchemy, Alteration, Armor, Barber, Boat, Book, Cambrinth, Casino, Clothing, Container, Cosmetics, Crafting, Drink, Dye, Embroidery, Engineering, Engraving, Estate Holder, Face paint, Festival, Fletching, Florist, Food, Forging, Furrier, Games, Gem, General, Heraldry, Herb, Hider, Horse, Housing, Jewelry, Juggling, Light, Locksmithing, Magic, MAMAS, Map, Miscellaneous, Music, Origami, Outfitting, Pawn, Perfume, Pet, Rare Materials, Repair, Shield, Siegery, Smoking, Spellbook, Tack, Tanning, Tattoo, Tobacco, Toy, Trinket, Vault Furniture, Weapon, Wedding, Writing
put #log >Shop.txt |Fest             =
put #log >Shop.txt |Coin             =$currency
put #log >Shop.txt }}
put #log >Shop.txt
put #log >Shop.txt {{ShopDescription
put #log >Shop.txt |roomname=$roomname
put #log >Shop.txt |desc=$roomdesc<br />
put #log >Shop.txt $roomobjs<br />
put #log >Shop.txt $roomexits
put #log >Shop.txt }}
put #log >Shop.txt

StartShop:
put #log >Shop.txt "{{ShopHeader|title=%shopheader}}"
put #echo
put #echo ITEM TYPE:
put #echo
put #echo 1:	Weapon
put #echo
put #echo 2:	Shield
put #echo
put #echo 3:	Armor/Barding
put #echo
put #echo 4:	Item: Other
put #echo
put #echo Enter Type Number:

matchre Weapon ^1$
matchre Shield ^2$
matchre Armor ^3$
matchre Item ^4$
matchwait

Weapon:
var type w
goto Shop1
Shield:
var type s
goto Shop1
Armor:
var type a
goto Shop1
Item:
var type i
goto Shop1

Shop1:
var number %numbers(%numbers.index)
gosub Shop2
math numbers.index add 1
if %numbers.index > 11 then goto end
goto Shop1

number1:
var number first
return
number2:
var number second
return
number3:
var number third
return
number4:
var number fourth
return
number5:
var number fifth
return
number6:
var number sixth
return
number7:
var number seventh
return
number8:
var number eighth
return
number9:
var number ninth
return
number10:
var number tenth
return
number11:
var number eleventh
return

Shop2:
send tap %number %1 $preposition $shop
waitforre ^You
send shop %number %1 $preposition $shop
waitforre ^Short
pause .5
gosub CommaCost
put #log >Shop.txt "{{ShopItem|t=%type|%tap|%cost}}"
put #log >Shop.txt
return

CommaCost:
var commanumber %costi
eval length len(%commanumber)
var cost %commanumber
if %length < 4 then goto return
evalmath length %length - 3
eval temp substr(%commanumber, %length, 3)
var cost %temp
topcost:
if %length < 3 then goto lastcost
evalmath length %length - 3
eval temp substr(%commanumber, %length, 3)
var cost %temp,%cost
goto topcost
lastcost:
if %length > 0 then
{
eval temp substr(%commanumber, 0, %length)
var cost %temp,%cost
}
goto return

return:
return

end:
put #log >Shop.txt |}
send shop
waitforre ^\[Type SHOP \[ITEM\] to see what's on it|^There is nothing to buy here
send shop $shop
waitforre ^\[Type SHOP \[GOOD\] to see some details about it|^There is nothing to buy here
put #echo Last noun: %1 ($preposition $shop)
put #class racial on
exit