Find
You are in a fair trader who helps players buy and sell objects of worth
This is a fair trading space.
Anything you
drop
will be treated as yours for sale.
Anything you
get
you pay for and payment goes to the owner.
This way you can drop fish from the fisherman, and when someone picks it up you get paid for it.
Please be warned, you wont be asked twice, if you get it, you buy it.
Have a nice day now.
Created by
wolis
, last updated 03 Feb 2011
Code
##get:runsub checkworth;
##drop:runsub setowner;
##setowner:
set $target's owner to $init_obj;
say 'msg',"[$target] is now owned by [$init_obj]";
var $ledge to "[$init_obj] dropped [$target]";
runsub recordit;
##checkworth:
var $iworth to $init_obj's worth;
var $tworth to $target's worth;
var $comission to 1; rem the amount of comission;
var $total to $tworth;
add $comission to $total;
if $iworth > $total then sellit else nosale;
##sellit:
var $ownr to $actor's owner; rem if paying cash registers owner;
var $ownr to $target's owner; rem if paying objects owner;
var $cobj to $actor; rem who gets the commission;
var $mworth to $cobj's worth;
var $oworth to $ownr's worth;
take $total from $iworth; rem take from buy;
add $tworth to $oworth; rem give to owner;
add $comission to $mworth; add comission to com obj;
set $ownr's worth to $oworth;
set $init_obj's worth to $iworth;
set $cobj's worth to $mworth;
say 'msg',"[$init_obj] buys [$target] making [$ownr] $tworth $coinage richer with $comission going to [$cobj]";
var $ledge to "[$init_obj] bought [$target] from [$ownr] for $tworth $coinage";
runsub recordit;
##recordit:
rem - record this transaction in the ledger;
load $actor's ledger;
loop paste "$ledge at $adelaide_time $adelaide_date";
save $actor's ledger;
##nosale:
say 'msg',"[$init_obj] can not afford to buy [$target] for $tworth $coninage";
set $target's loc to $actor's loc;
##talk:runsub talkingtome;
##talkingtome:
if $actor eq $target then startplaying else end;
##startplaying:
load $actor's ledger;
loop playmsg;
##playmsg:
say 'playback',"[$actor] says '$listitem '";
##put:runsub pushit;
##carry:runsub pushit;
##wear:runsub pushit;
##pushit:
say 'hmm',"[$actor] hmmms";
call "push $target";
the old ledger 1
the ledger