Find
You are looking at the cash registers
Created by
Cold Taco
, last updated 24 Dec 2006
Code
##base;
##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;