Elanthipedia Shops (script): Difference between revisions

From Elanthipedia
Jump to navigation Jump to search
No edit summary
No edit summary
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. Otherwise, just type the item noun. (''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 64: Line 64:
The following items contain goods for sale:
The following items contain goods for sale:


an antique fretwork table
an iron hook
a huge cedar rack
a birch pedestal
a birch pedestal
a huge cedar rack
an iron hook</pre>
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>
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>
Line 76: Line 78:
On the fretwork table, you see:
On the fretwork table, you see:


a mammoth Dergati war icon set atop a haft of black walnut for 902000 copper Dokoras
a mammoth Botolf war icon set atop a bloodstained haft of hickory for 902000 copper Dokoras
a mammoth Trothfang war icon set atop a haft of veiny copperwood for 902000 copper Dokoras
a mammoth Be'ort war icon set atop a haft of weeping willow for 902000 copper Dokoras
a mammoth Idon war icon set atop a sculpted haft of satinwood for 902000 copper Dokoras
a mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood for 902000 copper Dokoras
a mammoth Asketi war icon set atop a haft of blighted mikkhalbamar 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 Huldah war icon set atop a haft of silver-green mistwood for 902000 copper Dokoras
a mammoth Drogor war icon set atop a sea-worn haft of teak for 902000 copper Dokoras</pre>
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 icon 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 icon'''.)
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:
<pre>ITEM TYPE:
Line 108: Line 114:
The war icon is a weapon, so you enter '''1'''.<br>
The war icon is a weapon, so you enter '''1'''.<br>
<br>
<br>
The script "shops" each of the war icons and then generates a ShopHeader section with item links and prices.<br>
The script then generates a ShopHeader section with item links and prices.<br>
<br>
<br>
Once it's done, you move on to the ''huge cedar rack''. (Type '''sv cedar rack''' and then '''shs'''.)
Once it's done, you move on to the ''huge cedar rack''. (Type '''sv cedar rack''' and then '''shs'''.)
Line 115: Line 121:
On the cedar rack, you see:
On the cedar rack, you see:


a silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather for 13530 copper Dokoras
some silver-blue scythewing moth handwraps for 72160 copper Dokoras
a morning star studded with Adan'f tail barbs for 10824 copper Dokoras
a granite mace sculpted like a gaunt greenish fist for 4510 copper Dokoras
an oaken impalement stake branded with viperous coils for 9020 copper Dokoras
a golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather for 13530 copper Dokoras
a dark crimson sword etched with spidery lightning for 8118 copper Dokoras
a twisted black horn for 8118 copper Dokoras
a serrated bone-white scythe hung with a pair of sluagh claws for 63140 copper Dokoras
a steel jambiya with a hilt wrapped in membranous kartais wing for 36080 copper Dokoras
a holy water sprinkler studded with stony basilisk fangs for 99220 copper Dokoras
a holy water sprinkler studded with stony basilisk fangs for 99220 copper Dokoras
some silver-blue scythewing moth handwraps for 72160 copper Dokoras</pre>
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>
The scimitar is the first item listed, so start with that by typing '''.eshop scimitar'''. (You don't type ''yes'' this time, because you already have the Store At A Glance and a ShopDescription.)<br>

<br>
Wait for the script to finish, and then type '''.eshop star'''. Keep doing this until you have done all of the items on the cedar rack.<br>
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>
<br>
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.
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====
====Editing the Shop Form====
Line 148: Line 154:
|restrict =
|restrict =
|levelres =
|levelres =
|Store Type =[Guild],[Race],Alchemy,Armor,Barber,Casino,Clothing,Container,Cosmetics,Drink,Dye,Embroidery,Engraving,Face Painting,Fishing Supply,Fletching,Florist,Food,Forging Supply,Gem,General,Heraldry,Herb,Horse,Housing,Jewelry,Locksmithing,Magic,MAMAS,Map,Miscellaneous,Music,Origami,Perfume,Pet,Repair,Shield,Tack,Tanning,Tattoo,Tobacco,Toy,Trinket,Weapon,Wedding
|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 =
|Fest =
|Coin =Dokoras
|Coin =Dokoras
Line 154: Line 160:
{{ShopDescription
{{ShopDescription
|roomname=Misenseor Goods, Zealous Destruction
|roomname=Misenseor Goods, Zealous Destruction
|desc=The pinewood walls enclosing this side of the wagon 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>
|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 antique fretwork table with several things on it, a huge cedar rack with several things on it, a birch pedestal with several things on it and an iron hook with a strap of braided mey mosshair on it.<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.
Obvious exits: southwest, northwest.
}}
}}
{{ShopHeader|title=On the fretwork table}}
{{ShopHeader|title=On the fretwork table}}
{{ShopItem|t=w|mammoth Dergati war icon set atop a haft of black walnut|902,000}}
{{ShopItem|t= w | mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood | 902000 }}
{{ShopItem|t=w|mammoth Trothfang war icon set atop a haft of veiny copperwood|902,000}}
{{ShopItem|t= w | mammoth Zachriedek war icon set atop a haft of sickly aspen | 902000 }}
{{ShopItem|t=w|mammoth Idon war icon set atop a sculpted haft of satinwood|902,000}}
{{ShopItem|t= w | mammoth Botolf war icon set atop a bloodstained haft of hickory | 902000 }}
{{ShopItem|t=w|mammoth Kerenhappuch war icon set atop a red-gold haft of rosewood|902,000}}
{{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|902,000}}
{{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|902,000}}
{{ShopItem|t= w | mammoth Huldah war icon set atop a haft of silver-green mistwood | 902000 }}
{{ShopItem|t=w|mammoth Drogor war icon set atop a sea-worn haft of teak|902,000}}
{{ShopItem|t= w | mammoth Trothfang war icon set atop a haft of veiny copperwood | 902000 }}
|}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather|13,530}}
{{ShopItem|t= w | silver-blue scythewing moth handwraps | 72160 }}
{{ShopItem|t=w|golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather|13,530}}
{{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 }}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|morning star studded with Adan'f tail barbs|10,824}}
{{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 }}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|granite mace sculpted like a gaunt greenish fist|4,510}}
{{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 }}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|oaken impalement stake branded with viperous coils|9,020}}
{{ShopItem|t= w | silver-bladed scimitar with a hilt wrapped in midnight-blue scaled leather | 13530 }}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|dark crimson sword etched with spidery lightning|8,118}}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|twisted black horn|8,118}}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|serrated bone-white scythe hung with a pair of sluagh claws|63,140}}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|steel jambiya with a hilt wrapped in membranous kartais wing|36,080}}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|holy water sprinkler studded with stony basilisk fangs|99,220}}
|}
{{ShopHeader|title=On the cedar rack}}
{{ShopItem|t=w|silver-blue scythewing moth handwraps|72,160}}
|}</pre>
|}</pre>


Line 205: Line 193:
#If there are no restrictions or circle requirements, you can delete those lines.
#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.
#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 403.
#Fest: This is Hollow Eve Festival 410.


<pre>{{Store At A Glance
<pre>{{Store At A Glance
Line 212: Line 200:
|NumRooms =5
|NumRooms =5
|Store Type =Cleric,Paladin,Clothing,Container,Jewelry,Magic,Weapon
|Store Type =Cleric,Paladin,Clothing,Container,Jewelry,Magic,Weapon
|Fest =Hollow Eve Festival 403
|Fest =Hollow Eve Festival 410
|Coin =Dokoras
|Coin =Dokoras
}}</pre>
}}</pre>


If the prices were written in something other than coppers, there will be underscores. Delete the underscores.
If you have more than one Store At A Glance table, delete the others. (You'll have more than one Store At A Glance table if the shop has more than one room.) ShopDescription should not need editing.<br>

<br>
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.
If you had to run the script more than once per surface, as you did with the cedar rack, you'll need to merge those ShopHeader tables into one table.

Delete the tabs.


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

The last step is to make sure those items are listed in the right order. (They might be out of order if you had more than one item of the same type.) In this case, only the ''golden-bladed scimitar with a hilt wrapped in metallic-red scaled leather'' is out of place.

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


Line 263: Line 247:
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.


===Ticket Prices===
===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:
If the price is in tickets, you need to add the word "Tickets" after the price. For example:
Line 271: Line 263:
==Changelog==
==Changelog==


'''11/4/2013'''
*Brand new version that greatly reduces the amount of time it takes to log inventory.
'''9/25/2013'''
'''9/25/2013'''
*Added racial item class to combat/rp class toggles.
*Added racial item class to combat/rp class toggles.
Line 299: Line 293:
*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
Line 319: Line 313:
waitforre ^(Behind|In|On|Under).+, you see:$
waitforre ^(Behind|In|On|Under).+, you see:$


if_2 goto ShopDesc
if_1 goto ShopDesc
goto StartShop
goto StartShop


Line 333: Line 327:
put #log >Shop.txt |levelres =
put #log >Shop.txt |levelres =
put #log >Shop.txt |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
put #log >Shop.txt |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
put #log >Shop.txt |Fest =
put #log >Shop.txt |Fest =Hollow Eve Festival 410
put #log >Shop.txt |Coin =$currency
put #log >Shop.txt |Coin =Dokoras
put #log >Shop.txt }}
put #log >Shop.txt }}
put #log >Shop.txt
put #log >Shop.txt
Line 404: Line 398:


Shop1:
Shop1:
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+) copper (Kronars?|Dokoras?|Lirums?)$
var number %numbers(%numbers.index)
action setvariable tap $2;setvariable price $3_0 when ^\s+(an?|some|the) (.+) for (\d+) bronze (Kronars?|Dokoras?|Lirums?)$
gosub Shop2
action setvariable tap $2;setvariable price $3_00 when ^\s+(an?|some|the) (.+) for (\d+) silver (Kronars?|Dokoras?|Lirums?)$
math numbers.index add 1
action setvariable tap $2;setvariable price $3_000 when ^\s+(an?|some|the) (.+) for (\d+) gold (Kronars?|Dokoras?|Lirums?)$
if %numbers.index > 11 then goto end
action setvariable tap $2;setvariable price $3_0000 when ^\s+(an?|some|the) (.+) for (\d+) platinum (Kronars?|Dokoras?|Lirums?)$
goto Shop1
action put #log >Shop.txt "{{ShopItem|t= %type | %tap | %price }}" when for (\d+) (copper|bronze|silver|gold|platinum) (Kronars?|Dokoras?|Lirums?)$
send shop $shop
waitfor [Type SHOP [GOOD] to see some details about it.]
pause 2
goto end


end:
number1:
put #log >Shop.txt |}
var number first
put #class racial on
return
exit</pre>
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


==Script (Without Tabs)==
Shop2:

send tap %number %1 $preposition $shop
<pre>put #class rp on
waitforre ^You
put #class racial off
send shop %number %1 $preposition $shop
put #class combat off
waitforre ^Short
put #class arrive off
pause .5

gosub CommaCost
var source $roomname
put #log >Shop.txt "{{ShopItem|t=%type|%tap|%cost}}"
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)

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 =
put #log >Shop.txt |MapNumber =
put #log >Shop.txt |Owner =n
put #log >Shop.txt |NumRooms =
put #log >Shop.txt |restrict =
put #log >Shop.txt |levelres =
put #log >Shop.txt |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
put #log >Shop.txt |Fest =Hollow Eve Festival 410
put #log >Shop.txt |Coin =Dokoras
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
put #log >Shop.txt
return


StartShop:
CommaCost:
put #log >Shop.txt "{{ShopHeader|title=%shopheader}}"
var commanumber %costi
echo
eval length len(%commanumber)
echo ITEM TYPE:
var cost %commanumber
echo
if %length < 4 then goto return
echo 1: Weapon
evalmath length %length - 3
echo
eval temp substr(%commanumber, %length, 3)
echo 2: Shield
var cost %temp
echo
topcost:
echo 3: Armor/Barding
if %length < 3 then goto lastcost
echo
evalmath length %length - 3
echo 4: Item: Clothing
eval temp substr(%commanumber, %length, 3)
echo
var cost %temp,%cost
echo 5: Item: Jewelry
goto topcost
echo
lastcost:
echo 6: Item: Housing
if %length > 0 then
echo
{
echo 7: Item: Food/Drink
eval temp substr(%commanumber, 0, %length)
echo
var cost %temp,%cost
echo 8: Item: Other
}
echo
goto return
echo Enter Type Number:


matchre Weapon ^1
return:
matchre Shield ^2
return
matchre Armor ^3
matchre Clothing ^4
matchre Jewelry ^5
matchre Housing ^6
matchre Food ^7
matchre Item ^8
matchwait


Weapon:
end:
var type w
put #log >Shop.txt |}
goto Shop1
send shop
Shield:
waitfor [Type SHOP [ITEM] to see what's on it.]
var type s
goto Shop1
Armor:
var type a
goto Shop1
Clothing:
var type c
goto Shop1
Jewelry:
var type j
goto Shop1
Housing:
var type h
goto Shop1
Food:
var type f
goto Shop1
Item:
var type i
goto Shop1

Shop1:
action setvariable tap $2;setvariable price $3 when ^\s+(an?|some|the) (.+) for (\d+) copper (Kronars?|Dokoras?|Lirums?)$
action setvariable tap $2;setvariable price $3_0 when ^\s+(an?|some|the) (.+) for (\d+) bronze (Kronars?|Dokoras?|Lirums?)$
action setvariable tap $2;setvariable price $3_00 when ^\s+(an?|some|the) (.+) for (\d+) silver (Kronars?|Dokoras?|Lirums?)$
action setvariable tap $2;setvariable price $3_000 when ^\s+(an?|some|the) (.+) for (\d+) gold (Kronars?|Dokoras?|Lirums?)$
action setvariable tap $2;setvariable price $3_0000 when ^\s+(an?|some|the) (.+) for (\d+) platinum (Kronars?|Dokoras?|Lirums?)$
action put #log >Shop.txt "{{ShopItem|t=%type|%tap|%price}}" when for (\d+) (copper|bronze|silver|gold|platinum) (Kronars?|Dokoras?|Lirums?)$
send shop $shop
send shop $shop
waitfor [Type SHOP [GOOD] to see some details about it.]
waitfor [Type SHOP [GOOD] to see some details about it.]
pause 2
echo Last noun: %1 ($preposition $shop)
goto end

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

Revision as of 17:01, 4 November 2013

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. Otherwise, just type the item noun. (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: Clothing
  5. Item: Jewelry
  6. Item: Housing
  7. Item: Food/Drink
  8. 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 {es} {.eshop $0}
#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: Clothing

5:	Item: Jewelry

6:	Item: Housing

7:	Item: Food/Drink

8:	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.

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

11/4/2013

  • Brand new version that greatly reduces the amount of time it takes to log inventory.

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 racial off
put #class combat off
put #class arrive 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)

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             =
put #log >Shop.txt |MapNumber        =
put #log >Shop.txt |Owner            =n
put #log >Shop.txt |NumRooms         =
put #log >Shop.txt |restrict         =
put #log >Shop.txt |levelres         =
put #log >Shop.txt |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
put #log >Shop.txt |Fest             =Hollow Eve Festival 410
put #log >Shop.txt |Coin             =Dokoras
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}}"
echo
echo ITEM TYPE:
echo
echo 1:	Weapon
echo
echo 2:	Shield
echo
echo 3:	Armor/Barding
echo
echo 4:	Item: Clothing
echo
echo 5:	Item: Jewelry
echo
echo 6:	Item: Housing
echo
echo 7:	Item: Food/Drink
echo
echo 8:	Item: Other
echo
echo Enter Type Number:

matchre Weapon ^1
matchre Shield ^2
matchre Armor ^3
matchre Clothing ^4
matchre Jewelry ^5
matchre Housing ^6
matchre Food ^7
matchre Item ^8
matchwait

Weapon:
var type w
goto Shop1
Shield:
var type s
goto Shop1
Armor:
var type a
goto Shop1
Clothing:
var type c
goto Shop1
Jewelry:
var type j
goto Shop1
Housing:
var type h
goto Shop1
Food:
var type f
goto Shop1
Item:
var type i
goto Shop1

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

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

Script (Without Tabs)

put #class rp on
put #class racial off
put #class combat off
put #class arrive 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)

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             =
put #log >Shop.txt |MapNumber        =
put #log >Shop.txt |Owner            =n
put #log >Shop.txt |NumRooms         =
put #log >Shop.txt |restrict         =
put #log >Shop.txt |levelres         =
put #log >Shop.txt |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
put #log >Shop.txt |Fest             =Hollow Eve Festival 410
put #log >Shop.txt |Coin             =Dokoras
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}}"
echo
echo ITEM TYPE:
echo
echo 1:	Weapon
echo
echo 2:	Shield
echo
echo 3:	Armor/Barding
echo
echo 4:	Item: Clothing
echo
echo 5:	Item: Jewelry
echo
echo 6:	Item: Housing
echo
echo 7:	Item: Food/Drink
echo
echo 8:	Item: Other
echo
echo Enter Type Number:

matchre Weapon ^1
matchre Shield ^2
matchre Armor ^3
matchre Clothing ^4
matchre Jewelry ^5
matchre Housing ^6
matchre Food ^7
matchre Item ^8
matchwait

Weapon:
var type w
goto Shop1
Shield:
var type s
goto Shop1
Armor:
var type a
goto Shop1
Clothing:
var type c
goto Shop1
Jewelry:
var type j
goto Shop1
Housing:
var type h
goto Shop1
Food:
var type f
goto Shop1
Item:
var type i
goto Shop1

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

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