frimble comments marked with frimble frimble example use of player-shop functions frimble originally written by Sined for Fruitcakes frimble see sections 14 through 19 of http://sined.servebeer.com/sined/fc/book.htm frimble don't ask me for help, it was a long time ago and I don't remember frimble file designed to be loaded as a single command file, so first: frimble removing old crud from last time file was loaded auto remove name chocolate sword auto remove name Holy Blade of Soyin auto remove name Holy Blade of Soyin scabbard auto remove name moose antler auto remove name ornate warhammer auto remove name Retribution auto remove name Sarilak auto remove name Sarilak scabbard auto remove name Wyrm Sword auto remove name Wyrm Sword scabbard auto remove name crystal ball auto remove name metal helm auto remove name bronze helm auto remove name buffered analgesic auto remove name flat cap auto remove name hunter's pack auto remove name jagged sparkly knife auto remove name lamp auto remove name medium sized swirling white bottle auto remove name pair of black leather gloves auto remove name pair of iron gauntlets auto remove name purple mineral nugget auto remove name small compact auto remove name sweetie shaker auto remove name thief's dagger auto remove name thief's dagger scabbard auto remove name title changer auto remove name small waxed paper packet auto remove name medium waxed paper packet auto remove name large waxed paper packet auto remove name huge waxed paper packet auto remove name waxed paper packet auto remove name waxed papyrus packet auto remove name woollen cloth auto remove name yellow stone ring auto remove name blue sliver of octiron auto remove name green sliver of octiron auto remove name indigo sliver of octiron auto remove name orange sliver of octiron auto remove name red sliver of octiron auto remove name violet sliver of octiron auto remove name yellow sliver of octiron auto remove name Al Khali white glass nugget auto remove name amethyst purple glass nugget auto remove name aquamarine glass nugget auto remove name azure glass nugget auto remove name black glass nugget auto remove name bright orange glass nugget auto remove name brown glass nugget auto remove name canary yellow glass nugget auto remove name chock pink glass nugget auto remove name cinnabar red glass nugget auto remove name cobalt blue glass nugget auto remove name crimson glass nugget auto remove name dark blue glass nugget auto remove name dark green glass nugget auto remove name dark grey glass nugget auto remove name deep blue glass nugget auto remove name deep indigo glass nugget auto remove name dull orange glass nugget auto remove name ebony black glass nugget auto remove name emerald green glass nugget auto remove name forest green glass nugget auto remove name garnet red glass nugget auto remove name golden brown glass nugget auto remove name golden yellow glass nugget auto remove name grass green glass nugget auto remove name green glass nugget auto remove name grey glass nugget auto remove name indigo blue glass nugget auto remove name ivory white glass nugget auto remove name jade green glass nugget auto remove name lavender glass nugget auto remove name light blue glass nugget auto remove name light green glass nugget auto remove name light grey glass nugget auto remove name light indigo glass nugget auto remove name lilac glass nugget auto remove name magenta glass nugget auto remove name mauve glass nugget auto remove name Muntab red glass nugget auto remove name onyx black glass nugget auto remove name pale blue glass nugget auto remove name pale green glass nugget auto remove name pale yellow glass nugget auto remove name pea green glass nugget auto remove name purple glass nugget auto remove name ruby red glass nugget auto remove name tomato red glass nugget auto remove name topaz yellow glass nugget auto remove name turquoise glass nugget auto remove name vermilion glass nugget auto remove name violet glass nugget auto remove name yellow glass nugget auto remove name saffron glass nugget auto remove name cerulean glass nugget auto remove name dark yellow glass nugget auto remove name sapphire blue glass nugget auto remove name blue glass nugget auto remove name wine red glass nugget auto remove name deep red glass nugget auto remove name indigo glass nugget auto remove name warrior's brain cell auto remove name orange glass nugget remove room function badfamily remove room function badguild remove room function badperson remove shop function csccs remove shop function cs remove shop function c remove shop function s remove shop function cvgc remove shop function cvgc2 remove shop function vgc remove shop function vgc2 remove shop function iscontentvgc remove shop function isitemvgc remove shop function isnotstolen remove shop function isnotstolenc remove shop function isonecontent remove shop function isoneitem remove shop function portpack frimble identifying bad people add room function badfamily() as (family = "bai hui" or family = "is tougher 'n u") add room function badguild() as (guild = "dishonoured") add room function badperson() as (badguild() or badfamily()) frimble basic condition, container contents amounts and stolen checking add shop function iscontentvgc() as (objectcondition(contents(objects[0])) > 90) add shop function isitemvgc() as (objectcondition(objects) > 90) add shop function isnotstolen() as sizeof(objectstolen(objects)) = 0 add shop function isnotstolenc() as sizeof(objectstolen(contents(objects[0]))) = 0 add shop function isonecontent() as (sizeof(contents(objects[0])) = 1) add shop function isoneitem() as (sizeof(objects) = 1) frimble combining some of the above add shop function c(money ok) as if isoneitem() and isitemvgc() then ok else $0$ endif add shop function s(money ok, money stln) as if isnotstolen() then ok else stln endif frimble one container containing one item, all vgc, not stolen add shop function cvgc(money amount) as if isoneitem() and isitemvgc() and isnotstolen() and iscontentvgc() and isonecontent() and isnotstolenc() then amount else $0$ endif frimble one container containing one item, all vgc, possibly stolen add shop function cvgc2(money amount) as if isoneitem() and isitemvgc() and iscontentvgc() and isonecontent() then amount else $0$ endif frimble non container vgc not stolen add shop function vgc(money amount) as if isoneitem() and isitemvgc() and isnotstolen() then amount else $0$ endif frimble non container vgc possibly stolen add shop function vgc2(money amount) as if isoneitem() and isitemvgc() then amount else $0$ endif frimble check stolen check content stolen for eg t-dags in scabbards add shop function csccs(money ok, money sstln, money wstln, money swstln) as if isoneitem() and isitemvgc() and iscontentvgc() and isonecontent() then if isnotstolen() and isnotstolenc() then ok else if isnotstolen() then wstln else if isnotstolenc() then sstln else swstln endif endif endif else $0$ endif add shop function cs(money ok, money stln) as if isoneitem() and isitemvgc() then if isnotstolen() then ok else stln endif else $0$ endif frimble banning bad people set use expression for buy as not badperson() set use expression for pickler as not badperson() set use expression for poll add as (playername = "sined") set use expression for poll vote as not badperson() set use expression for use as not badperson() frimble portal scrolls frimble approval prices for 4 ($13.60), 3 ($10.20) or 2 ($6.80) in a pack frimble these give $15 / 4 pack after 10% shop markup added frimble bloody important warning frimble unload this function before removing any wizard from shop helper / manager list frimble load it again afterwards add shop function portpack() as if sizeof(objects) = 1 then if sizeof(containsspell(contents(objects[0]), "jogloran's portal of cheaper travel")) = 4 then $13.60$ else if sizeof(containsspell(contents(objects[0]), "jogloran's portal of cheaper travel")) = 3 then $10.20$ else if sizeof(containsspell(contents(objects[0]), "jogloran's portal of cheaper travel")) = 2 then $6.80$ else $0$ endif endif endif else $0$ endif frimble pre-approval of items frimble these allow players to check the price to sell things to the shop at. They also validate the sold item against the price. They do not move the stock into the sale or pay the seller, you still need to approve the items to do that. auto add name bronze helm with cs($170$,$60$) as Bronze Helm (+3 int, +2 wis, -3 con) and markup 10 auto add name flat cap with cs($170$,$60$) as Flat Cap (+3 wis, +2 int, -3 str) and markup 10 auto add name hunter's pack with c($25$) as Hunter's Pack and markup 10 auto add name jagged sparkly knife with cs($55$,$20$) as Jagged Sparkly Knife and markup 10 auto add name pair of black leather gloves with cs($250$,$90$) as Black Leather Gloves (dex gloves) and markup 10 auto add name pair of iron gauntlets with cs($350$,$120$) as Iron Gauntlets (str gaunts) and markup 10 auto add name sweetie shaker with s($90$,$35$) as Sweetie Shaker and markup 10 auto add name thief's dagger scabbard with csccs($377.50$,$373$,$162.50$,$158$) as Thief's dagger + Scabbard and markup 10 auto add name thief's dagger with cs($370$,$155$) as Thief's Dagger and markup 10 auto add name woollen cloth with cs($60$,$25$) as Woollen Cloth (removes sss, ahsb effects) and markup 10 auto add name buffered analgesic with s($90$,$35$) as Buffered Analgesic and markup 10 auto add name lamp with s($1150$,$400$) as Lamp (replace t-shop or lost quest items) and markup 10 auto add name purple mineral nugget up to $40 as Purple Mineral Nugget with markup 10 auto add name small compact with s($20$,$10$) as Small Compact and markup 10 auto add name title changer with s($85$,$30$) as Title Changer and markup 10 auto add name yellow stone ring with s($7$,$2.50$) as Yellow stone ring (light source) and markup 10 auto add item grflx scale with cs($800$,$350$) as Grflx Scale and markup 10 frimble don't enable this helm unless you are going to carefully check whether the helm that was sold was a real perm light helm from the t-shop, or a cheap helm from an armoury or npc loot frimble auto add name metal helm with cs($500$,$150$) as Metal Helm (permanent light source) and markup 10 frimble portal packets frimble due to constraints of the shop code, we can only handle one scroll type frimble we choose portal as it's the most common and comes in the biggest batches frimble we need to list every possible packet type auto add name waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name waxed papyrus packet with portpack() as Portal Scrolls and markup 10 auto add name waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name small waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name medium waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name large waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name huge waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name small grey waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name tiny waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name tiny grey waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name medium grey waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name large grey waxed paper packet with portpack() as Portal Scrolls and markup 10 auto add name huge grey waxed paper packet with portpack() as Portal Scrolls and markup 10 frimble slivers in multiple colours auto add name blue sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 auto add name green sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 auto add name indigo sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 auto add name orange sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 auto add name red sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 auto add name violet sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 auto add name yellow sliver of octiron with s($70$,$40$) as Octiron Sliver and markup 10 frimble nuggets in even more colours auto add name Al Khali white glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name amethyst purple glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name aquamarine glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name azure glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name black glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name bright orange glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name brown glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name canary yellow glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name chock pink glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name cinnabar red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name cobalt blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name crimson glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name dark blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name dark green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name dark grey glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name deep blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name deep indigo glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name dull orange glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name ebony black glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name emerald green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name forest green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name garnet red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name golden brown glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name golden yellow glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name grass green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name grey glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name indigo blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name ivory white glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name jade green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name lavender glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name light blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name light green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name light grey glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name light indigo glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name lilac glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name magenta glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name mauve glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name Muntab red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name onyx black glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name pale blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name pale green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name pale yellow glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name pea green glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name purple glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name ruby red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name tomato red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name topaz yellow glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name turquoise glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name vermilion glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name violet glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name yellow glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name saffron glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name cerulean glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name dark yellow glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name sapphire blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name blue glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name wine red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name deep red glass nugget up to $60 as Shimmering Glass Nugget with markup 10 auto add name indigo glass nugget up to $60 as Shimmering Glass Nugget with markup 10 frimble the text for the scrolls category category information Scrolls "%^BOLD%^%^RED%^ * Scrolls Kill! %^CYAN%^* Scrolls except Portal are packs of 4 unless stated otherwise. %^GREEN%^* Portal may be packs of 2, 3 or 4 scrolls, price depends on quantity in packet. %^MAGENTA%^* It is your responsibility to have the ma.sp.sp to handle your scrolls. %^BLUE%^It's not our fault if you try and carry too many scrolls and die!%^RESET%^"