# User:Juppie

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

## In-game bonus calculator

Using the equation found at the Skills, Stats and Bonuses website [1] and making use of Discworld's implementation of 'math pow(0,0)' = 1 (while math pow(0,x) = 0 for all other values):

calculate bonus alias (change the bold values into your stats in order C D I S W):

alias calcBONUS \$ifarg: math floor( ( log( pow(\$arg7:\13\$,\$2\$) * pow(\$arg8:\13\$,\$3\$) * pow(\$arg9:\13\$,\$4\$) * pow(\$arg10:\13\$,\$5\$) * pow(\$arg11:\13\$,\$6\$) )/9.8 - 0.25 ) * floor ( 5*\$1\$ - 2.5*pow(0,floor(20/\$1\$))*(\$1\$-20) - 1.5*pow(0,floor(40/\$1\$))*(\$1\$-40) - 0.5*pow(0,floor(60/\$1\$))*(\$1\$-60) ) ) \$else\$ frimble enter: <level> <stat dependency> <own stats> - stats in order C D I S W;

alias calcLEVEL \$ifarg: math ceil( \$1\$ / ( log( pow(\$arg7:\11\$,\$2\$) * pow(\$arg8:\9\$,\$3\$) * pow(\$arg9:\15\$,\$4\$) * pow(\$arg10:\12\$,\$5\$) * pow(\$arg11:\18\$,\$6\$) )/9.8 - 0.25 ) - 170)*2+60 \$else\$ frimble enter: <level> <stat dependency> <own stats> - stats in order C D I S W;

Usage:

What's my mace bonus at level 500?

'skills fi.me.mace stats' -> CCDSS

'calcBONUS 500 2 1 0 2 0' -> 412 (mace bonus result based on your fixed stats, all 13 in case shown above)

What if I rearrange to C=15 D=10 I=10 S=20 W=10?

'calcBONUS 500 2 1 0 2 0 15 10 10 20 10' -> 448 (mace bonus based on C=15 D=10 I=10 S=20 W=10)

What level do i need for a mace bonus of 500?

'calcLEVEL 500 2 1 0 2 0' -> 666 (mace level based on your fixed stats, all 13 in case shown above)

## Holy blade of Gapp damage

HP damage with rod bonus 437: 276 306 530 296 589 320 314 356 - avg=373

HP damage with rod bonus 323: 155 390 375 156 390 312 171 - avg=278

## Ice giant fun

Bolt of ice lightning: not sure if perfectly protected faith shield reduced damage not known if my temperature change (very cold to sick from hypothermia) has been caused by this attack

```Hp: 3910 (4721) Gp: 419 (617) Xp: 825466 Burden: 19%
Temp: very cold Align: good Combat: neutral, dodge
The ice giant makes a few strange hand movements, then suddenly a bolt of ice lightning erupts from his hands, and slams into you.
You're so cold you feel your energy being drained.
You shiver.
Hp: 3715 (4501) Gp: 419 (612) Xp: 825469 Burden: 19%
Temp: sick from hypothermia Align: good Combat: neutral, dodge
```

Cold air attack: not known what HP damage it does and if it drops your temperature

```The ice giant takes a deep breath, and blows some incredibly cold air at you.
You feel fold to your bones.
You shiver.
```

Room chats:

```The ice giant whaps you over the head.
```
```The ice giant strangles you violently, while screaming: Why you little...
```

## Sam Slager's research

With the same amount of meat:

You need about four handfuls (one hundred and seventy-eight seeds) of methi to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight pinches) of curry powder to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight pinches) of cardamom to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight pinches) of turmeric to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight buds)of cloves to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight pinches) of cinnamon to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight pinches) of ginger to flavour this much meat.

You need about four ounces (one hundred and seventy-eight drops) of honey to flavour this much meat.

You need about four handfuls (one hundred and seventy-eight pinches) of nutmeg to flavour this much meat.

## Walkthrough Genua

do4 has been aliased: 'alias 4 \$*\$;\$*\$;\$*\$;\$*\$;'

make sure to have your hand protected when climbing up in alias Genl (north end of Okra Avenua)

NOT INCLUDED

• School
• Musketeers Guild
• Mano Rossa Guild
• Complete casino
• Pizzaria
• Gapp's temple (it's splendor would hurt your eyes)

Gena: leave carriage; n; open doors; map text; s; w; s; e; s; se; n; map text; n; open doors; do4 n; open doors; map text; se; s; open doors; map text

Genb: n; e; e; n; s; s; s; open doors; map text; s; open doors; map text; up; open doors; map text; down; n; n; n; e; n; s; e; map text;

Genc: n; ne; sw; nw; n; sw; ne; nw; n; n; sw; ne; ne; n; se; s; n; nw; e; open doors; map text; n; n; up; s; open doors; map text; n; down; w; s; e; e; w; s; w; s; sw; nw; n;

Gend: sw; g enter stall; s; g enter stall; sw; g enter stall; s; open doors; map text; n; ne; n; ne; n; ne; n; ne; n; s; ne; n; s; e; map text; alley;s; ne; alley; s; e; alley; s; ne; alley; s; e; ne; n; s; do3 e; open doors; map text

Gene: sw; w; w; e; sw; enter stall; out; s; enter stall; out; sw; s; n; w; enter tent; out; sw; enter stall;out; sw

Genf: do3 e; map text; s; wade s; map text; sw; w; l enter carousel; wade se; e; e; map text; ne; map text; w; up; down; e; e; map text; e; map text;

Geng: do4 sw; n; s; sw; w; s; s; map text; w; s; n; e; e; n; s; e; n; e; w; s; s; n; e; s; n; e; n; s; e; n; map text; s; do5 w

Genh: s; s; do3 se; e; open doors; map text; s; s; open doors; map text; n; n; se; n; s; se; 2 e; map text ;

Geni: 2 e; open doors; map text; ne; e; open doors; l booths; w; ne; n; s; e; s; n; climb oak; climb down; ne; w; e; ne; se; open doors; map text; nw; ne; e; w; 2 n

Genj: do5 w; map text; e; s; n; e; n; e; w; s; e; do3 s; out; ne; do3 n; e; e; s; n; e; nw; se; e; sw; ne; do3 w

Genk: do3 n; s; 2 nw; map text; nw; up; down; w; nw; open doors; map text; nw; w; w;

Genl: 2 s; open doors; map text; 2 s; map text; 9 n; e; w; n; n; e; w; n; e; w; n; climb up; down; up; road; e; e; map text

Genm: n; up; down; s; e; climb up; down; e; e; alley; s; do3 w; s; se; e; enter tent; out; se; s; sw; nw; map text; se; s; w; nw; map text; se; e; sw; map text; ne; e;

Genn: ne; open doors; map text; ne; map text; n; ne; e; open doors; map text; e; n; s; se; se; n; s; sw; map text; ne;

Geno: e; e; map text; se; e; up; down; se; n; do3 s;

Genp: les; w; les; w; les; w; les; nw; les; n; e; g s; g up; w; s; se; s

Genq: les; e; les; g e; s; les; sw; let; sw; map text; ne; n; les; w; open doors; map text; nw; w; n; s; w; w; open doors; map text; n; nw; w; e; se; s

Genr: s; sw; se; s; n; se; n; s; se; s; w; 2 e; 2 n; s; se; map text; sw; sw; down; n; s; up; e; se; map text

Gens: s; s; w; e; do3 se; open doors; map text; w; n; up; down; s; w; nw; ne; sw; nw; s; 2 n; s; nw; s; n; w; s; up; down; n; w; n; s; w; s; up; down; n

Gent: sw; s; e; w; w; n; s; sw; w; se; nw; s; s; nw; open doors; map text; se; open doors; map text; s; open doors; map text; se; open doors; map text; s; open doors; map text; se; open doors; map text; s; sw; s

Genu: e; e; ne; ne; open doors; map text; e; s; n; ne; s; n; ne; e; e; ne; down; w; e; up; ne; do3 n; 2 w; 2 nw; sw; do3 s; w; sw; w; nw; n; ne; open doors; g s; e; g s; se; s; e; se; s; s; sw; sw; w; sw; sw; 6 w; n; s

Genv: do4 w; n; g u; s; w; w; nw; w; nw; map text; w; map text; nw; w; nw; nw; e; w; n; open doors; map text; nw; w; up; down; e; e; w; n; nw; n; e; w; nw

Genw: n; e; e; se; ne; e; se; map text; s; up; g n; down; n; nw; s; w; e; s; sw; e; w; ne; e; se; se; n; s; se; s; w; e; s; w; w; enter stall; out; w; enter stall; out; s; booth; out; e; enter stall; out; n; e; e; se

Geny: n; n; e; e; map text; w; w; n; ne; ne; w; e; sw; sw; do3 s;

Genz: e; n; s; se; sw; ne; e; open doors; map text; e; s; n;se; sw; ne; e; n; n; w; e; do4 n; e; w; do3 n; w; e; n; n;

new shop owner Discworld shop help new shop owner

## Shop owner manual

Congratulations on your new shop!

``` This guide will explain many features of your new shop and how to setup different sorts of
controls.  The book is designed to be a step-by-step guide, not a reference.  That means
that one section builds on the next and should be studied that way.

A player run shop is a shop in which you control the price things are sold for, and who can
use your shop.  You also control how many items can be listed by each player, how much
markup you put on items and just about any other shop related feature you can think of.

Unlike a normal craft shop players do not have control of the price of their items, they are
paid for the cost of the item upfront when the shop buys it and then the shop owner controls
the cost it is sold for.  The standard controls in the shop for changing of an item after it
is in the shop's inventory still work, but only for the shop owner, not for the previous
owner of the item.
```

Contents

``` 1  .... Contents and Introduction
2  .... Summary of commands
3  .... Money handling
4  .... Statistics
5  .... Working with the shop's stock
6  .... Working with the waiting list: Simple controls
7  .... Changing the status of things: Shop name and signs
8  .... Changing the status of things: Hiring players to work for you
9  .... Changing the status of things: Disallowing people from using the
shop
10 .... Changing the status of things: Setting up general criteria
11 .... Changing the status of things: Setting up people for automatic
acceptance
12 .... Changing the status of things: Setting up items for automatic
acceptance
13 .... Working with expressions:  Introduction
14 .... Expressions: Setting up people for automatic acceptance
15 .... Expressions: Setting up items for automatic acceptance
16 .... List and examples of controls used in expressions
17 .... User defined expressions
18 .... Leased properties and what it means for you
```

Quick start

``` You've probably already asked your best friend to come sell something at your brand new shop
and it's not working!  Why not!?

Well, the shop is geared to deny everybody except those you specifically add.  An easy way
to change that is: "buy expression true" and "use expression true"
```

Summary of the commands

```    Here is a quick list of all the commands available in the shop.  A more detailed
explanation of all these commands will follow in later sections.
```

Working with the shop itself:

```    status
status hints
expressions
expressions hints
functions
functions hints
```

Working with money:

```    pay deficit
royalties
royalties list
collect royalties
collect royalties of <amount>
```

Looking at statistics:

```    status room weekly
stats money
notifications
notifications weekly_status
```

Working with categories:

```    category list
category rename <category> to <category>
category default <category>
category add <category>
category remove <category>
```

Working with stock:

```    change price of <object> to <amount>
change name of <object> to <string>
change category of <object> to <category>
```

Working with the waiting list:

```    waiting
waiting unapproved
retrieve <id>
browse waiting <id>
approve <id>
reject <id>
reject <id> message <reject message>
reject <id> position <number>
reject <id> position <number> message <reject message>
checkin <object>
checkout <id>
```

Working with status:

```    name shop <shop name>
set sign <sign>
remove sign
allow list
allow <player>
deny <player>
add ignore to blacklist
add <player> to blacklist
remove <player> from blacklist
markup <percentage>
set max number <max sellable|disable>
set high queue cost <cost|disable>
set high deny cost <cost|disable>
set max number <max sellable|disable> for <player>
set high queue cost <cost|disable> for <player>
set high deny cost <cost|disable> for <player>
set low approve cost <cost|disable>
buy expression <expression|disable>
use expression <expression|disable>
```

Working with expressions:

```    functions help list
functions help <function name>
functions internal
auto add name <name> up to <value>
auto add name <name> up to <value> as <list name>
auto add name <name> up to <value> with markup <percentage>
auto add name <name> up to <value> as <list name> with markup
<percentage>
auto add name <name> with <expression>
auto add name <name> with <expression> as <list name>
auto add name <name> with <expression> and markup <percentage>
auto add name <name> with <expression> as <list name> and markup
<percentage>
auto remove name <name>
auto add object <object> up to <value>
auto add object <object> up to <value> as <list name>
auto add object <object> up to <value> with markup <percentage>
auto add object <object> up to <value> as <list name> with markup
<percentage>
auto add object <object> with <expression>
auto add object <object> with <expression> as <list name>
auto add object <object> with <expression> and markup <percentage>
auto add object <object> with <expression> as <list name> and markup
<percentage>
auto remove object <object>
auto add approve expression <condition> cost <value> as <list name>
auto add deny expression <condition>
auto remove expression <id>
value <object>
```

Working with functions:

```    add function <function> as <expression>
remove function <function>
```

Money Handling

```    The very important bit of the shop, how do you get paid?  Well, it's easy!  You come into
the shop and use the command 'royalties' to check your royalty pool.  You can also
'collect royalties' or 'collect royalties of <amount>' to collect your royalties or parts
of it.  The same goes for people who are selling items in your shop.  Once an item is
approved into the stock of the shop, the money goes into their royalty pool.

If your royalties go below zero you need to use 'pay deficit' to pay off your deficit
before you can do any other manipulations on the shop.

You can view all of the royalty pools (and when they expire) with the command "royalties
list".  You should note that all of the monies in these pools has already been paid, so
you have no incentive whatsoever to block people from entering your shop when they have
large royalties pending!

You can set the percentage that is added onto any item the player sells to the shop (your
profit) using the 'markup <percentage>' command.  There is also a way that you can
override this default percentage for items that are auto accepted if you want to do that.
See page 12 and 15 for details.  You can also change individual prices once items have
been accepted.  See page 5 for details.

You can tell what your current markup percentage (and all kinds of other stuff) is from
using the command 'status' or 'status hints'.
```

Example

```    collect royalties of \$1
> You collect A\$1 in royalties.

collect royalties
> You collect A\$200 in royalties.

pay deficit
> You pay off A\$20 in deficit.

markup 30
> You set the percentage to add to the sale price to 30%.
```

Statistics

```    The shop keeps track of the amount of money you made and the amount which you spent on
the upkeep of your shop.  This allows you to tell if you are making a profit or a loss.

'stats money' gives you statistics on moneys made, spent, current inventory value and
your royalty pool or deficit.

Your shop will also generate a weekly profit/loss report.  You can view the current
status of this report at any time with "status room weekly".  If you want to get the
reports sent to you in mail, you need to enable the mail with "notifications
weekly_status".  There may be other notifications available in your shop, check to see
what is available with "syntax notifications".  You can also check your current
notification subscriptions with "notifications".
```

Examples

```    > stats money
Current money spent A\$4196.50 and money made A\$5115.54.
The current stock value is A\$1514.97.

The owner current has a cash float (royalties) of A\$7091.10.

> notificiations
You have the following notifications set: weekly_status.
```

Working with the shop's stock

```    You can change the name and the category of an object in the shop's stock using the
'change name of <object> to <string>', 'change category of <object> to <string>' and
'change price of <object> to <currency>'.

The owner of the shop can control the categories of the shop. They can add, remove and
rename categories as they wish (except you cannot remove a non-empty category).

'category add <name>' adds a category to the current list of categories in the shop.

'category remove <name>' removes a category from the current list of categories in the
shop.

'category rename <category> to <category>' renames a category to another name.  This will
move all the items currently in the old category to the new name as well.

'category list' will show you the list of current categories.

'category default <name>' sets the current default category to use for all operations
that require a default category.
```

Examples

```    > category add Healing Tea
You add a new category.

> category remove Healing Tea
Removed the shop category Healing Tea.

> category list
The current categories are:
Weapons
General (default)

> category rename Healing Tea to Tea
You rename category Healing Tea to Tea.

> change name of dl to sarilak
You change the name of Sarilar to sarilak.

> change price of dm to \$800
You change the value of Sarilak to A\$800.

> change category of dm to weapons
You change the category of Sarilak to Weapons.
```

Working with the waiting list: Simple controls

```    The default setup of the shop will put any item that is attempted to be sold to the shop
into an approval list.  This list can be seen using the 'waiting' and 'waiting
unapproved' commands.

The items in the waiting list are all given ids and they must be used to reference these
items.  Please note these ids are totally separate to the ids used in the shop itself.

The items in the two different waiting lists are referenced seperately, so the items in
the unapproved list all have '-' in front of their name while the ones in the approved
list do not.  You must include the '-' when rejecting and approving items.

The items can be approved with the command 'approve <id>' and rejected with the command
'reject <id>' or 'reject <id> message <reject message>'.  When players sell items in a
group, you can use the 'reject <id> position <number>' or 'reject <id> position <number>
message <reject message>' to reject only some of the items.

When you approve an item the shop will try and take the money it will cost to approve it
from your inventory.  If you do not have enough money either in your inventory or in your
royalties to approve the item, the shop will refuse to put the item into the shops
inventory.

Before approve an item you may wish to check to see if it is really what they say it is.
There a few commands that allow you to do this.  The first one is 'browse waiting <id>'
which allows you to look at the short and long descriptions and the read message of an
item. The base cost mentioned when you browse an item is what their value is without
taking in account enchantment, condition, etc.  The scaled cost is the opposite.

The other method of checking items is using the 'checkout <id>' and 'checkin <object>'
commands.  These allow an object to be taken out of the approval list and checked over
without actually buying the object.  If you loose the object in some way after you have
checked it out (burying it or whatever) then the person who sold the item will be
credited with the money for actually selling it to the shop.  So be careful not to
destroy the object.  Once you have finished examining it you can check it back in for
approval/rejection.

Players can retrieve their items while they are still waiting for approval by using
'retrieve <id>'.
```

Examples

```    > waiting
The current approval items are:
AA) Balwog's sparkling ruby for A\$3 in General, 1 objects (a sparkling
ruby) 5 in stock.

> browse waiting aa
The sparkling ruby: (Base cost A\$20; scaled cost A\$20
This is a large, sparkling ruby.  Although it looks pretty, the
cloudiness in it suggests that it could well be a fake.

> reject aa message It's a fake!
Sending to: Balwog
Sending to: Balwog

> approve af
You approve a nodachi to be sold as nodachi in Weapons for A\$100.
> checkout af
Moved a coat of jazerant armour into your inventory for you to check.
You check out one of the coats of jazerant armour.

> checkin jazerant armour
You check the coat of jazerant armour back in.
```

Changing the status of things: Shop name and signs Shop name

```    You can set the name of your shop to be whatever you wish.  The name of the shop will be
used for messages inside the shop and will also be displayed on a sign outside the shop.
```

Examples

```    > name shop Lanfear's house of fun
You set the shop name to 'Lanfear's house of fun'.
```

Shop signs

```    You can set a sign to be placed outside your shop (you can buy them at the sign shop).
The sign will be displayed to people who are on the street.

When a sign is removed it will be placed back into your inventory.  If you set a sign
when a sign is already set then the existing sign will be removed first.
```

Examples

```    > set sign blue sign
You set the large sign as your shop sign.

> remove sign
You remove the large sign from Lanfear's Shop.
```

Hiring players to work for you

```    There are two different levels of access you can grant to another player: helper and
partner.  If your shop is small the distinction may be small, but as your shop gets
larger the partner gains much more power of the helper.
```

Helpers

```    Helpers can be hired and fired via the "helper" command if you have a shop counter.  A
helper can approve and reject waiting items, as well as change the name, price or
category of any item already in stock.
```
```    Helpers are your employees, and as such they maintain independant royalty pools from the
shop.  A helper cannot directly touch the shop's float;  neither to put money in nor to
take money out.  However, a sufficiently clever helper can bankrupt you nonetheless, and
cackle off into the night with loads of embezzled funds; so make sure you trust them.

```

Partners

```    Partners have nearly-full control over the operation of your shop.  They can operate any
piece of shop equipment with as much control as you, the owner.  They can deposit into
the float, they can withdraw from the float, they can paint the walls, lay carpet, trash
your expensive equipment and even order new equipment.  Partners are, well, partners.
They aren't working in your shop for royalties, they're in for profit-sharing.  When a
partner sells an item to the shop no money is gained or lost, it all stays in the shop
float (which is listed as your name).  A partner doesn't even have to be clever to leave
you destitute; so once again you need to trust them.

You can promote someone to a partner with the "allow" command; "allow list" shows all of
the current partners.  You can also fire a partner with the "deny" command.
```

Shop Owner

```    This is you (well, the owners are the target audience, at least).  Just as a helper can
do anything a customer can (plus some), and a partner can do anything a helper can (plus
some), you can do anything a partner can...  plus some!

Only the current shop owner (first line of "status room") can change who the owner is;
either by terminating or transferring the lease.  And only the  shop owner can hire and
fire partners.  Your new partner cannot pull someone else into the partnership, only you
can.  (Of course, they can still hire a  helper.).  These are your only two unique powers
if you gain a partner, so  treasure them dearly.
```

Helpful hints

```    The shop keeps records for you, for about a week.  If you don't have sole control over
your shop you probably want to get copies of these records by mail.  Take a look at the
notifications section under Statistics again.
```

Disallowing people from using the shop

```    You can deny individual people complete access to your shop if you want to, so they have
no ability to either buy or sell items.  To do this you use the black list control in the
shop.  Black listing is checked before everything else and overrides everything.

To add someone to your black list go 'add <player> to blacklist' and to remove someone
from your black list go 'remove <player> from blacklist'.  You can also add all the
people from your ignore list to the black list if you wish by typing 'add ignore to
blacklist'.

You can see the current people in your black list using the 'status' command.

(The owner can also control who uses the shop on a broader level.  Overall, you can
restrict the use of the shop based on guild, level, memberships of club, family names
etc., by using the buy or use expressions.  Please see page 14 for more details.)
```

Example

```    > add brighid to blacklist
You add brighid to the black list.

> remove brighid from blacklist
You remove brighid from the black list.

> add ignore to blacklist
You add cold, eben and soxy to the black list.
```

Changing the status of things: Setting up general criteria

``` You can setup limits and prices at which things will be automatically accepted, denied or
queued, as well as how many objects a player can have for sale at the shop at any time.  You
can also set up these limits and prices individually for specific players.  In later
sections you'll learn how to automatically approve/deny things based on custom criteria.

'set high deny cost <cost|disable>' sets up the maximum cost that anything at all can be
sold to the shop at.  If an item exceeds this cost then it will not be allowed to be sold at
all.  It will be denied and not moved into the acceptance list.  If this is unset, or set to
0, then there is no upper limit on the cost of something allowed to be sold in the shop.

'set high queue cost <cost|disable>' sets up the value at which items will enter the
approval list even if they were set up to be automatically approved.

'set max number <max sellable|disable>' sets the maximum number of items than can be listed
by the player in both the shop and in their approval list.  This is to stop the shop owner
from being deluged in items for approval from one player.

'set low approve cost <cost|disable>' sets up the maximum cost that an item will
automatically be accepted into the shop for.  If this is set to a non-zero value then
anything which sells for less than this will be added to the shop's inventory without going
through the normal acceptance process.

'status' and 'status hints' can be used to view the status of all the current auto approval
limits specified in the shop.

The order for checking for things for automatic approval is this: first the seller is
checked for any hard limits on their sale price, then the item itself is checked for any
limits, then the expressions are evaluated and checked and lastly the low level limits for
automatic approval are checked on the player.  When the seller is checked for hard limits
and for the limit at which items can be sold automatically their limits specified
specifically for the player are checked, and if they do not exist then the default limits
are checked.
```

Examples

```    > set high deny cost \$2000
You set the shop to automatically deny any item costing more than A\$2000.

> set high queue cost \$1000
You set the shop to automatically put any item costing more than A\$1000
into the approve list.

> set max number 20
You set the default number of sold items per person to 20.

> set low approve cost \$0.50\$
You set the shop to automatically accept any item costing less than 50p.
```

Setting up people for automatic acceptance

``` You can setup people so that items they sell have different limits to the defaults.  This
applies to the deny limit, the approve limit and the number of items the shop will stock.

'set high deny cost <cost|disable> for <player>' sets the deny limit for the player.  If
they try and sell an item for more than this it will be denied.  This can be higher or lower
than the default limit.  If this is disabled then the default limit will be used.

'set high queue cost <cost|disable> for <player>' sets the approve limit for the player.  If
they try and sell an item for more than this it will be automatically queued in the waiting
list.  This can be higher or lower than the default limit.  If this is disabled then the
default limit will be used.

'set max number <max sellable|disable> for <player>' sets the number of items the shop will
stock for the player.  It will deny them from selling more than this to the shop, this
includes both the inventory and anything they have waiting for acceptance.  This can be
higher or lower than the default limit.  If the number is set to 0 then this will be
disabled and the default limit will be used.

'status' and 'status hints' will show you the current status of all the players approval
limits.

```

Examples

```    set high deny cost \$500\$ for silvara
> You set the maximum cost of items accepted by silvara to A\$500.

set high queue cost \$400\$ for silvara
> You set the maximum cost of items automatically approved by silvara to A\$400.

set max number 50 for silvara
> You set the maximum number of items sellable by silvara to 50.

set high deny cost disable for silvara
> You disable the maximum cost of items to be sold by silvara.
```

Setting up items for automatic acceptance

```    You can set individual limits on how much a shop will pay for specified items.  The shop
will approve the item sold for less than the specified amount and put anything that is
sold for more in the waiting list.

There are two basic ways (and then some variations) with which you can set your shop up
to accept items automatically:
1) Short descriptions and selling price are the criteria against which items are matched
to determine the eligibility for automatic acceptance.
2) Short descriptions, selling price and/or other attributes (like object condition) will
be evaluated. This method makes use of expressions which will be discussed later.  For
now, just remember that there are more sophisticated ways of testing items than what is
discussed in this section.

With both the above-mentioned methods you can either enter the name for an item or an
identifier for an object to be tested for eligibility.  "Eek! What is that?" I hear you
ask.  Well, for the purposes of your shop, items are things _you_ have to describe to the
shop.  As for objects, as long as you have it in your inventory, the shop will take its
description from the object itself. (This is great for when you want to match up hard to
enter descriptions, like the ones with colours in them.).  Clear as mud, right? Syntaxes
then examples to follow!

```

Syntax

```    - 'auto add name <name> up to <value>'
- 'auto remove name <name>'
- 'auto add object <object> up to <value>'
- 'auto remove object <object>'
- 'value <object>'
```

Examples

```    auto add name small turquoise vial up to \$5\$
> You set the shop to automatically accept any item with a short of
small turquoise vial up to a cost of A\$5.

auto remove name small turquoise vial
> You remove the item small turquoise vial from the list of
automatically accepted items.

(For the following examples please assume that I have a 'small turquoise
vial' in my inventory.)

auto add object vial up to \$5\$
> You set the shop to automatically accept any of small turquoise vial
up to a cost of A\$5.

value vial
> The item the small turquoise vial can be sold if it costs less than A\$5 (small turquoise
vial).

auto remove object vial
> You remove the small turquoise vial from the list of automatically
accepted items.
```

Variations

```    Ok, I hope that wasn't too bad.  Earlier I said that there are two methods (and some
variations) to automatically accept items into the shop.  For the variations, the first
bit of the syntax stays the same ('auto add name/object <name/object> up to <value>'),
but them we add some stuff (examples to follow):
- as <list name>
When you want the things being accepted to have a specific name.
- with markup <percentage>
Used to override the default markup up specified by "markup <percentage>", as seen in
'status'.
- value <amount>
This overrides the amount the item will be sold for.  This allows you to accept it for
any value you wish but sell it at a fixed cost (so you do not have any pence involved
for instance).
- as <list name> with markup <percentage>
Both

```

Examples

```    auto add object vial up to \$5\$ as amazing healing potion!
> You set the shop to automatically accept any of small turquoise vial
up to a cost of A\$5 as "amazing healing potion!".

auto add object vial up to \$5\$ as amazing healing potion! with markup 10
> You set the shop to automatically accept any of small turquoise vial
up to a cost of A\$5 as "amazing healing potion!" with a markup of 10%.
```

Next Section

```    Ok!  Now we're off to the next section which is an introduction to expressions.  I know
it's a bit boring but it's not too long and it's stuff you really, really need to know or
you'll ask silly questions and people will laugh at you! ... So read on :)
```

Introduction to Expressions

```    Before we look at where you can use expressions and a list of controls (functions and
variables) which can be used, let's look at a short explanation of the different
components used in expressions.

The expressions are setup free form using the operators 'and', 'or', 'not' '+', '-', '*',
'/', '>', '>=', '<', '<=', '=', '<>' '[', ']',  '{', '}', 'sizeof', 'contents' or 'if'.
The main operators behave like you would expect and you can manipulate numbers and money
as you wish.

There are three types of constants you can specify.  Money constants are defined by a
string with \$'s around it, i.e.: \$5 dollars\$ or \$4 lancre pennies\$ or \$4.00\$.  Use of
\$4.00\$ will work with Ankh-Morpork money but will not work in other parts of the country.
String constants are defined with '"'s, i.e.: "frog", "blue".  Integer constants are just
numbers, i.e.: 12, 14, 100.  Easy, right?  Ok.

The 'if' operator is a special case and can be used as a flow control construct.  The
syntax of an if is: 'if <condition> then <expression> else <expression> endif'  (Don't
forget the endif!)

Arrays are always of a uniform type, so you will have an array of objects, or strings or
numbers.  An array is ordered series of things.  The ordered bit means that array[0] will
always be the same as array[0] and it comes before array[1].  If you think of an array
like a set of drawers in a cabinet, the bottom draw is number 0, the next one up is 1 and
so on.  So draw 1 is the contents of the draw second from the bottom.  Which would be
draw[1] in an expression.

There are two things you can do with an array, you can get specific elements out of the
array and you can turn something back into an array.  To get a specific element of an
array you use the '[]' operator.  For example 'objects[0]' is the first element of the
objects array.  You can recreate arrays using the '{}' operator.  For example:
{objects[0]} makes an array of size 1.

Arrays can be added and subtracted.  They cannot be used with any of the other operators.

'sizeof' returns the size of the array.  So sizeof({objects[0]})  would be 1, and
sizeof({12,13,14}) would be 3.

Next section we go to cover a bit more how to control players who are allowed to buy and
use the shop.

```

Setting up people for automatic acceptance

```    The owner can control who can use the shop.  This makes everyone effectively black listed
and only allows specified people to use the shop, rather than letting anyone except those
who are black listed use the shop.

'buy expression <expression|disable>' sets up an expression which must be matched for the
person to be able to buy from the shop.  It defaults to 'true' which means the shop can
always be bought from.

'use expression <expression|disable>' sets up an expression which must be matched for the
person to be able to use the shop.  It defaults to 'true' which means the shop can always
be used.

```

Example

```    buy expression (((guild = "warriors") and (level < 100)) or (guild =
"wizards") or (guild = "thieves") or (guild = "assassins") or (guild =
"witches") or (guild = "priests")) and not clubmember ("shadowlisters")
> You set the expression to use when checking to see if someone can buy
from the shop to (((guild = "warriors") and (level < 100)) or (guild =
"wizards") or (guild = "thieves") or (guild = "assassins") or (guild =
"witches") or (guild = "priests")) and ( not clubmember("shadowlisters")).

```

Notes

```    On page 16 there will be a bunch of examples.  To find help on specific functions you
need to use the help functions described previously and on page 16.
```

Setting up items for automatic acceptance

```    To see all expressions regulating auto acceptance of items in your shop, use
'expressions' or 'expressions hints'.

Remember on page 12 we talked about items and objects?  If not, have a quick look at that
again please, because the same principle counts here.  I will wait.

Back?  Ok.  There are two ways in which you can check for different things concerning
items being sold to you, both using expressions (and this does not include the difference
between an item and an object, I'm not counting that):
1) Short descriptions, selling price and other attributes. I.e. accept a jet black rod if
it is 95% charged for \$5).
2) Selling price and other attributes. (Yes! We're cutting out the descriptions). I.e.
accept/deny whatever item if it contains the imbue 'resurrect' for the price of the
object + \$20.

Wow!

On to the first method.. (Keep in mind that the expressions must always return a money
value.) The syntaxes follow (remember the next section has a list of aaaaaaall functions
and variables you can use in expressions, as well as examples for each, although there
are some examples at the end of this section as well):

- 'auto add name <name> with <expression>'
- 'auto add object <object> with <expression>'

Remember that you have the same variations for these syntaxes as you had earlier on page
12, i.e. 'auto add object <object> with <expression> as <list name> with markup
<percentage>'.  You also remove them in the same way.

Right, now we get to the second method with which we can setup the automatic
acceptance/denial of items with expressions.  This method is independent of objects and
items since they test only selling price and attributes of the item being sold, i.e.
accept any item with resurrect imbued on for the objectvalue + \$10, or deny any item with
object condition less than 50.  The syntaxes are as follows:
- 'auto add approve expression <condition> cost <value> as <list name>
- 'auto add deny expression <condition>'
- 'auto remove expression <id>'
```

Examples

```    auto add name small silver needle with if objectcondition(objects) > 50 then \$2\$
else \$1\$ endif
> You set the shop to automatically accept any item with a short of
"small silver needle" with an expression of if objectcondition(objects) > 50
then A\$2 else A\$1 endif.

auto add item object needle with if objectcondition(objects) > 50 then \$2\$
else \$1\$ endif
> You set the shop to automatically accept any of the small silver
needle with an expression of if objectcondition(objects) > 50 then A\$2 else A\$1
endif.

auto add deny expression sizeof(objectmatch (objects, "small silver needle")) > 0
> You set the shop to automatically deny any item matching the expression
objectmatch(objects, "small silver needle").

auto add approve expression containsimbue(objects,"resurrect") cost
objectbasevalue + \$100\$ as resurrect imbue
> You set the shop to automatically accept any item matching the
expression containsimbue(objects, "resurrect") with a cost of objectbasevalue(objects) +
A\$100.
```

Function and Variable help

```    For help on the specific functions and variables you can look at the help available from
inside the shop.  There are a few useful commands for determining the available functions
and the help.

You can get a list of all the internally defined functions with the command 'functions
internal'.  You can get a look at all the available help files with 'functions help list'
and you can get help on a specific function with 'functions help <name>'.

A complete description of the functions will not be done in here, we will just show you a
few examples of how they can be used.
```

Examples

```    > functions help list
> functions help objectmatch
> functions internal
> auto add name red mace with if (inventorynumber("red mace") < 10) and (charges > 90) then
\$8\$ else if (inventorynumber("red mace") < 10) and (charges > 75) then \$6\$ else the brilliant
```

vermilion book endif

```    endif
> auto add name ruby ring with if imbued("pt find") and (inventorynumber("restore") < 15) then
objectbasevalue(objects) + \$5\$ else the brilliant vermilion book endif as Restore
```