Find
You are in a store clerk
readall store clerk
to see what I'm selling.Then type "buy (item you desire) from the store clerk" to buy it.
Created by
Chaotic Bob
, last updated 13 Apr 2008
Code
##buy:runsub buychk;
##buychk:
if $second eq $actor then buyitemchk else end1;
##end1:msg $loc,$actor,0,0,'think',". o 0 ( what is [$second] trading? ) ";
##buyitemchk:
if $target's loc eq $actor then buychkworth else introitems;
##introitems:msg $loc,$actor,0,0,'say',"[$actor] says 'These items don't sell themselves you know'";
runsub listitems;
##listitems:
var $click_cmd to "buy";
var $click_mid to "from $actor";
var $desc_intro to '
Items for sale:
';
rem look $actor,trade;
msg $loc,$init_obj,$init_obj,0,'force',"force:look $actor,trade,worth>0";
##buychkworth:
var $aworth to $init_obj's worth;
var $tworth to $target's worth;
if $aworth > $tworth then buyit else buynocando;
##buyit:
set $target's loc to $init_obj;
take $tworth from $aworth;
set $init_obj's worth to $aworth;
msg $loc,$actor,0,0,'say',"[$init_obj] buys [$target] for $tworth $coinage from [$actor]";
rem look $loc;
msg $loc,$init_obj,$init_obj,0,'force',"force:look $loc";
##buynocando:
say 'say',"[$init_obj] can not afford [$target]";
the flower
a pair of boxing gloves
a Necklace