Find
You are looking at a Bluey who is the owner of this shop and at the moment is the only worker at any of the telephone places
Created by
Josh
, last updated 27 Oct 2008
Code
##get:runsub checkworth;
##checkworth:
var $aworth to $init_obj's worth;
var $tworth to $target's worth;
if $aworth > $tworth then sellit else nosale;
##sellit:
var $ownr to $actor's owner;
var $oworth to $ownr's worth;
take $tworth from $aworth; rem take from buy;
add $tworth to $oworth; rem give to owner;
say 'msg',"[$init_obj] buys [$target] making [$ownr] $tworth $coinage richer";
##nosale:
say 'msg',"[$init_obj] can not afford to buy [$target] for $tworth $coninage";
set $target's loc to $actor's loc;
##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',"[$this_actor] can not afford [$target]";