Wlselloff

==Description==
WLselloff is designed to start from [Town Square, Small Park] in Wehnimmer's Landing and run around town selling off all of your goods that you acquired from hunting. It will check the (1 or 2) containers you identified for boxes and have them opened at Larton's. It will proceed from there to the pawnshop selling off a variety of goods, including a check for the ability to duplicate wands (but no other duplicable items) for wizards. It will go to the alchemist shop and sell a variety of alchemy items (more items needed here). Finally it will stop by the Gem shop and sell off all your gems before heading to the bank to deposit it all.
This is not meant to make you rich by any means, Larton is pretty damn expensive. I use this primarily because finding a locksmith in platinum can be a serious pain. That entire section could very easily be skipped over, and I may create one like that in the future as well.
==Syntax==
The proper syntax for this requires either no variables or the use of three complete variable as describe below:
.wlselloff [Character name] [Container 1] [Container 2]
Using .wlselloff by itself will check the status of the previously used variable, and continue from there.
==The Script==
# Wehnimmer's Landing Inventory Sell-off script!
# Created by: Athias
# Version 1.0.0
# 13 March 2011
#
# Description:
# WLselloff is designed to start from [Town Square, Small Park]
# in Wehnimmer's Landing and run around town selling off all of
# your goods that you acquired from hunting.
#
# Syntax:
# .wlselloff [Character name] [Container 1] [Container 2]
#
IF_3 GOTO variableset3
IF_2 GOTO variableset2
IF_1 GOTO syntax
GOTO variablecheck
Syntax:
ECHO ************************************************************
ECHO * *
ECHO * The proper syntax for this requires either no variables *
ECHO * or the use of three complete variable as describe below: *
ECHO * *
ECHO * .wlselloff [Character name] [Container 1] [Container 2] *
ECHO * *
ECHO * Using .wlselloff by itself will check the status of the *
ECHO * previously used variable, and continue from there *
ECHO * *
ECHO ************************************************************
EXIT
variableset3:
SETVARIABLE charname %1
SETVARIABLE container1 %2
SETVARIABLE container2 %3
SETVARIABLE containers 2
GOTO variablecheck
variableset2:
SETVARIABLE charname %1
SETVARIABLE container1 %2
SETVARIABLE Container2 "NO 2nd Container"
SETVARIABLE containers 1
GOTO variablecheck
variablecheck:
ECHO ***********************************************
ECHO
ECHO You have %containers container(s) listed:
ECHO your %container1
ECHO your %container2
ECHO
ECHO Type YES to continue, or REDO to start over
ECHO 
ECHO ***********************************************
MATCH main A good positive attitude never hurts.
MATCH syntax redo
MATCHWAIT
main:
put look
match Park [Town Square, Small Park]
match wrongplace Obvious paths:
match wrongplace Obvious exits:
matchwait
wrongplace:
ECHO ***********************************************
ECHO * *
ECHO * You are in the wrong place! go to the Park! *
ECHO * *
ECHO ***********************************************
EXIT
Park:
put stow left
put stow right
pause 1
put unhide
put stand
match standgood You are already standing.
match standgood stand up
match standgood stand back up.
match standbad you struggle
matchwait
standbad:
ECHO **********************************************
ECHO * *
ECHO * Stand up on your own, it's easier that way *
ECHO * *
ECHO **********************************************
EXIT
standgood:
pause 2
move n
move n
MOVE go bank
put go arch
put withdraw 10000 silver
put go arch
move out
move e
move e
move e
move e
move n
move e
move n
move n
move e
put go door
put go doorway
ECHO
ECHO ***** You are now at Larton's - Getting boxes opened now *****
ECHO
GOTO Larton
Larton:
pause 1
goto larton%containers
#
# Starting of Larton for Container 2
#
larton2:
pause 1
counter set 1
setvariable lartoncontainer chest
goto larton2open
larton2nomore:
counter add 1
goto larton2container%c
larton2container2:
setvariable lartoncontainer Coffer
goto larton2open
larton2container3:
setvariable lartoncontainer trunk
goto larton2open
larton2container4:
setvariable lartoncontainer Strongbox
goto larton2open
larton2container5:
setvariable lartoncontainer box
goto larton2open
larton2container6:
goto larton1
larton2open:
put get my %lartoncontainer from my %container2
match larton2nomore Get what?
match larton2openup You remove
matchwait
larton2openup:
put put my %lartoncontainer on counter
pause 1
put ring bell
put pay
pause 1
put get %lartoncontainer2 from counter
put open my %lartoncontainer
pause 1
put get silver coin
pause 2
put empty my %lartoncontainer in my %container2
pause 2
put put my %lartoncontainer in casket
goto larton2open
#
# Starting of Larton for Container 1
#
larton1:
pause 1
counter set 1
setvariable lartoncontainer chest
goto larton1open
larton1nomore:
counter add 1
goto larton1container%c
larton1container2:
setvariable lartoncontainer Coffer
goto larton1open
larton1container3:
setvariable lartoncontainer trunk
goto larton1open
larton1container4:
setvariable lartoncontainer Strongbox
goto larton1open
larton1container5:
setvariable lartoncontainer box
goto larton1open
larton1container6:
goto larton0
larton1open:
put get my %lartoncontainer from my %container1
match larton1nomore Get what?
match larton1openup You remove
matchwait
larton1openup:
put put my %lartoncontainer on counter
pause 1
put ring bell
put pay
pause 1
put get %lartoncontainer from counter
put open my %lartoncontainer
pause 1
put get silver coin
pause 2
put empty my %lartoncontainer in my %container1
pause 2
put put my %lartoncontainer in casket
goto larton1open
#
# Starting of Larton for floating disks (container 0)
#
larton0:
pause 1
put tap %charname disk
match nodisk You tap yourself on the chest.
match diskgood You tap the
matchwait
diskgood:
put open %charname disk
counter set 1
setvariable lartoncontainer chest
goto larton0open
larton0nomore:
counter add 1
goto larton0container%c
larton0container2:
setvariable lartoncontainer Coffer
goto larton0open
larton0container3:
setvariable lartoncontainer trunk
goto larton0open
larton0container4:
setvariable lartoncontainer Strongbox
goto larton0open
larton0container5:
setvariable lartoncontainer box
goto larton0open
larton0container6:
goto lartonfinish
larton0open:
put get %lartoncontainer from %charname disk
match larton0nomore Get what?
match larton0openup You remove
matchwait
larton0openup:
put put my %lartoncontainer on counter
pause 1
put ring bell
put pay
pause 1
put get %lartoncontainer from counter
put open my %lartoncontainer
pause 1
put get silver coin
pause 2
put empty my %lartoncontainer in my %container1
pause 2
put put my %lartoncontainer in casket
goto larton0open
nodisk:
lartonfinish:
Echo 
Echo ***** Finished with boxes, onto the pawnshop *****
Echo
goto pawnstart
#
# Travel to Pawnshop
#
pawnstart:
put go door
move out
move e
move s
move e
move n
put go pawn
goto pawnshop
pawnshop:
pause 1
counter set 1
setvariable pawnitem crystal amulet
goto pawnshopsell%containers
pawnshopsell2:
put get my %pawnitem from my %container2
match pawnshopsell1 Get what?
match pawnshopsellitem2 You remove
matchwait
pawnshopsellitem2:
put sell my %pawnitem
pause 1
goto pawnshopsell2
pawnshopsell1:
put get my %pawnitem from my %container1
match pawnshop%c Get what?
match pawnshopsellitem1 You remove
matchwait
pawnshopsellitem1:
put sell my %pawnitem
pause 1
goto pawnshopsell1
#
# Lists items to be sold at the pawnshop
# To add new ones, just follow the outline
#
pawnshop1:
counter add 1
setvariable pawnitem quartz orb
goto pawnshopsell%containers
pawnshop2:
counter add 1
setvariable pawnitem moonstone cube
goto pawnshopsell%containers
pawnshop3:
counter add 1
setvariable pawnitem small statue
goto pawnshopsell%containers
pawnshop4:
counter add 1
setvariable pawnitem white crystal
goto pawnshopsell%containers
pawnshop5:
counter add 1
setvariable pawnitem blue crystal
goto pawnshopsell%containers
pawnshop6:
counter add 1
setvariable pawnitem scroll
goto pawnshopsell%containers
pawnshop7:
counter add 1
setvariable pawnitem vellum
goto pawnshopsell%containers
pawnshop8:
counter add 1
setvariable pawnitem paper
goto pawnshopsell%containers
pawnshop9:
counter add 1
setvariable pawnitem papyrus
goto pawnshopsell%containers
pawnshop10:
counter add 1
setvariable pawnitem palimpsest
goto pawnshopsell%containers
pawnshop11:
counter add 1
setvariable pawnitem lockpick
goto pawnshopsell%containers
pawnshop12:
counter add 1
setvariable pawnitem gold ring
goto pawnshopsell%containers
pawnshop13:
counter add 1
setvariable pawnitem narrow ring
goto pawnshopsell%containers
pawnshop14:
counter add 1
setvariable pawnitem wand
goto dupewandcheck
pawnshop15:
goto pawnfinish
#
# Dupewand for Container 2
#
dupewandcheck:
pause 1
put spell
matchre candupewand /Wizard Base.......[1][0-9][0-9]/
matchre candupewand /Wizard Base.......[2-9][0-9]/
matchre candupewand /Wizard Base.......[1][8-9]/
matchre pawnshopsell2 /Wizard Base.......[1][0-7]/
matchre pawnshopsell2 /Wizard Base.......[0-9]/
matchre pawnshopsell2 /You can view your spells/
matchwait
candupewand:
goto dupewand%containers
dupewand2:
matchre manaok2 /Remaining: [1-9][0-9][0-9]/
matchre manaok2 /Remaining: [2-9][0-9]/
matchre manaok2 /Remaining: [1][8-9]/
matchre pawnshopsell2 /Remaining: [1][0-7]/
matchre pawnshopsell2 /Remaining: [0-9]/
put mana
matchwait
manaok2:
put get my wand from my %container2
match havewand2 You remove
match dupewand1 get what?
matchwait
havewand2:
put prep 918
put cast at my wand
pause 1
put sell my wand
put sell my wand
goto dupewand2
#
# dupewand for Container 1
#
dupewand1:
matchre manaok1 /Remaining: [1-9][0-9][0-9]/
matchre manaok1 /Remaining: [2-9][0-9]/
matchre manaok1 /Remaining: [1][8-9]/
matchre pawnshopsell1 /Remaining: [1][0-7]/
matchre pawnshopsell1 /Remaining: [0-9]/
put mana
matchwait
manaok1:
put get my wand from my %container1
match havewand1 You remove
match pawnshop%c get what?
matchwait
havewand1:
put prep 918
put cast at my wand
pause 1
put sell my wand
put sell my wand
pause 1
goto dupewand1
pawnfinish:
Echo
echo ***** Finished at the pawnshop, off to the alchemist *****
echo
pause 1
goto alchemist
#
# Beginning of Alchemist
#
alchemist:
move out
move e
move s
move s
move e
move se
move s
put go bridge
move e
move e
move e
move n
move n
move n
move go house
move e
pause 1
counter set 1
setvariable pawnitem crimson dust
goto alchemistsell%containers
alchemistsell2:
put get my %pawnitem from my %container2
match alchemistsell1 Get what?
match alchemistsellitem2 You remove
matchwait
alchemistsellitem2:
put sell my %pawnitem
pause 1
goto alchemistsell2
alchemistsell1:
put get my %pawnitem from my %container1
match alchemist%c Get what?
match alchemistsellitem1 You remove
matchwait
alchemistsellitem1:
put sell my %pawnitem
pause 1
goto alchemistsell1
#
# Lists items to be sold at the alchemist
# To add new ones, just follow the outline
#
alchemist1:
counter add 1
setvariable pawnitem crimson essence
goto alchemistsell%containers
alchemist2:
counter add 1
setvariable pawnitem golden seed
goto alchemistsell%containers
alchemist3:
counter add 1
setvariable pawnitem necrotic core
goto alchemistsell%containers
alchemist4:
counter add 1
setvariable pawnitem ayanad crystal
goto alchemistsell%containers
alchemist5:
goto alchemistfinish
alchemistfinish:
echo
echo ***** Finished with the Alchemist shop, going to the Gem Shop! *****
echo
goto gemshop
#
# Beginning of Gemshop
#
gemshop:
move w
move o
move s
move s
move s
move w
move w
put go bridge
move w
move s
move s
move s
move w
move w
move w
move w
move w
move w
move w
move w
put go shop
pause 1
goto gemshop%containers
gemshop2:
put remove my %container2
pause 1
put sell my %container2
put wear my %container2
pause 1
goto gemshop1
gemshop1:
put remove my %container1
pause 1
put sell my %container1
put wear my %container1
pause 1
goto gemshopfinish
gemshopfinish:
echo
echo ***** Finished with the Gem shop, going to the Bank! *****
echo
goto bank
#
# Beginning of Bank
#
bank:
move o
move w
move nw
move n
move n
move e
move e
move go bank
put go arch
pause 1
put deposit all
pause 2
put go arch
move out
move s
move s
echo
echo ***** Finished selling everything off, money in the bank! *****
echo
exit
Category:Town Scripts