10a11,12
> # Modified by Heinzi
> 
187c189,190
<              "quit" => "logout.php", "use" => "inv_use.php", "halloween" => "trickortreat.php");
---
>              "quit" => "logout.php", "use" => "inv_use.php", "halloween" => "trickortreat.php",
>              "mallsell" => "managestore.php");
222c225,226
<                 "use" => "use <item> [<n>]: Use <item> <n> times.");
---
>                 "use" => "use <item> [<n>]: Use <item> <n> times.",
>                 "mallsell" => "mallsell <item> <price>: Sell all but one of <item> for <price>.");
710a715,720
> my %mallsellobjs = ("enchantedbean" => 186,
>                     "drynoodles" => 304);
> 
> my %nicenames = ("enchantedbean" => "enchanted bean", 
>                  "drynoodles" => "dry noodles");
> 
1688a1699,1719
> # Sell at the mall.
> # This sells all but one of the specified item at the mall for the given price.
> 
> sub sell_mall($$) {
>     my $item = shift;
>     my $price = shift;
>     if (!$mallsellobjs{$item}) {
>         print "Error in sell_mall: Unknown item $item\n";
>     }
>     my $itemid = $mallsellobjs{$item};
>     &get_page("-d \"action=additem&pwd=PASSWORDHASH&whichitem=$itemid&sellprice=$price&limit=0&addtype=allbutone&quantity=\" $site/managestore.php");
>     if ($response =~ /(Item placed in store\.)/) { print $1, "\n"; }
>     if ($response =~ /(That doesn.t make any sense\.)/) { print $1, "\n"; }
> 
>     if ($nicenames{$item}) {
>         my $nicename = $nicenames{$item};
>         if ($response =~ /.td.($nicename \([^)]+\))/) { print "Currently in store: ", $1, "\n"; }
>     }
> }
> 
> 
2254a2286
>     elsif ($verb eq "mallsell") { $allowedobjects = \%mallsellobjs; }
2670a2703,2718
>     # If verb is mallsell, get price
>     my $price = 999999;
> 
>     if ($verb eq "mallsell") {
>         if (!@inputwords) {
>             print "Usage: $verb $promptword <price>\n";
>             next;
>         }
>         $price = shift @inputwords;
> 
>         if (!($price =~ /^\d+$/)) {
>             print "price must be numeric.\n";
>             next;
>         }
>     }
> 
2891a2940
>     elsif ($verb eq "mallsell") { &sell_mall($object, $price); }

