Salesperson #134
Aliases: Salesperson, seller
17 verbs · 113 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
take_hit | this none this | rxd | #134 | 17 |
tell | this none this | rxd | #134 | 43 |
list | this none this | rxd | #134 | 38 |
stock | this with/using any | rd | #134 | 12 |
unstock | any out of/from inside/from this | rd | #134 | 12 |
sell | any at/to this | rd | #134 | 29 |
ask | this any any | rxd | #134 | 28 |
collect_cash | this none this | rxd | #134 | 11 |
sell_product | this none this | rxd | #134 | 56 |
find_product | this none this | rxd | #134 | 22 |
index_match | this none this | rxd | #134 | 10 |
items | this none this | rxd | #134 | 7 |
_clean_inv | this none this | rxd | #134 | 18 |
check_stocks | this none this | rxd | #134 | 15 |
@menu | none none none | rd | #134 | 2 |
init_for_core | this none this | rxd | #134 | 20 |
buy order | any out of/from inside/from this | rxd | #134 | 7 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
items | #134 | r | #2 | {} |
oldstuff | #134 | r | #2 | {} |
outrage_msg | #134 | rc | #36 | "This is an outrage!" |
done_deal_msg | #134 | rc | #36 | "Wonderful doing business with you!" |
currency | #134 | rc | #36 | "Gold" |
listname | #134 | rc | #36 | "catalog" |
buyback_rate | #134 | rc | #36 | 50 |
advertise_msg | #134 | rc | #36 | "Sure, I buy and sell. I can show you a catalog, if you ask for it." |
trustees | #134 | rc | #36 | {#2} |
help_msg | #134 | rc | #36 | list of 9{"The bot responds to:", "ask <bot> for ---", "buy --- from <bot>", "sell --- to <bot>", "", "The bot also reponds to some spoken cues, like \"sell\", \"buy\", \"for sale\", \"list\", \"prices\", \"money\", \"cash\" when posed as a question.", "Ammunition can be bought in bulk quantities, but other items must be purchased individually. In order to make a profit, the bot will not buy back 'used' ammo, and will always try to sell what he has in stock first, rather than replicating from a generic.", "", "The trustees can \"ask <bot> for money\" and recieve all money on the bot, excluding taxes and overhead."} |
my_tell | #116 | rw | #36 | <clear> |
watchers | #116 | r | #36 | <clear> |
terrain_only | #116 | rc | #36 | <clear> |
enemy | #116 | r | #36 | <clear> |
hostility | #116 | rc | #36 | <clear> |
gestate | #116 | rc | #36 | <clear> |
birth_msg | #116 | rc | #36 | <clear> |
wander_task | #116 | r | #36 | <clear> |
wait_seconds | #116 | rc | #36 | <clear> |
controller | #116 | rc | #36 | <clear> |
death_msg | #91 | rc | #36 | <clear> |
alive | #91 | r | #36 | <clear> |
alert | #91 | r | #36 | <clear> |
mobile | #91 | r | #36 | <clear> |
wielded | #91 | r | #36 | <clear> |
last_paged | #91 | r | #36 | <clear> |
last_healed | #91 | r | #36 | <clear> |
followed_by | #91 | r | #36 | <clear> |
following | #91 | r | #36 | <clear> |
free_points | #91 | r | #36 | 1.36249999999999 |
stats | #91 | r | #36 | <clear> |
stats_current | #91 | r | #36 | <clear> |
skills | #91 | r | #36 | <clear> |
race | #91 | r | #36 | <clear> |
org | #91 | r | #36 | <clear> |
money | #91 | r | #36 | <clear> |
follow_msg | #91 | rc | #36 | <clear> |
stopfollow_msg | #91 | rc | #36 | <clear> |
searching | #91 | r | #36 | <clear> |
languages | #91 | r | #36 | {{#142}, {2.0}} |
speaking | #91 | r | #36 | <clear> |
remembered_names | #91 | r | #36 | {} |
short_desc_msg | #91 | r | #36 | "" |
_mail_task | #40 | rc | #36 | <clear> |
messages_going | #40 | c | #36 | <clear> |
mail_lists | #40 | rc | #36 | <clear> |
mail_notify | #40 | r | #2 | <clear> |
mail_forward | #40 | rc | #36 | <clear> |
mail_options | #40 | rc | #36 | {} |
message_keep_date | #40 | rc | #36 | <clear> |
messages_kept | #40 | rc | #36 | <clear> |
current_message | #40 | c | #36 | {0, -1300000000} |
messages | #40 | c | #36 | <clear> |
ansi_options | #95 | r | #36 | <clear> |
replace_codes | #95 | r | #36 | <clear> |
features | #6 | r | #36 | <clear> |
previous_connection | #6 | | #2 | <clear> |
email_address | #6 | | #2 | <clear> |
last_disconnect_time | #6 | r | #2 | <clear> |
help | #6 | rc | #36 | 0 |
more_msg | #6 | rc | #36 | <clear> |
linetask | #6 | r | #36 | <clear> |
linesleft | #6 | r | #36 | <clear> |
linebuffer | #6 | | #36 | <clear> |
pagelen | #6 | r | #36 | <clear> |
owned_objects | #6 | r | #2 | <clear> |
linelen | #6 | r | #36 | <clear> |
current_folder | #6 | c | #36 | <clear> |
all_connect_places | #6 | | #2 | <clear> |
last_connect_place | #6 | | #2 | <clear> |
brief | #6 | rc | #36 | <clear> |
lines | #6 | c | #36 | <clear> |
page_absent_msg | #6 | rc | #36 | <clear> |
pq | #6 | rc | #36 | <clear> |
pqc | #6 | rc | #36 | <clear> |
page_origin_msg | #6 | rc | #36 | <clear> |
page_echo_msg | #6 | rc | #36 | <clear> |
edit_options | #6 | rc | #36 | <clear> |
last_connect_time | #6 | r | #2 | <clear> |
ownership_quota | #6 | | #36 | <clear> |
gender | #6 | rc | #36 | <clear> |
prc | #6 | rc | #36 | <clear> |
ppc | #6 | rc | #36 | <clear> |
poc | #6 | rc | #36 | <clear> |
psc | #6 | rc | #36 | <clear> |
pr | #6 | rc | #36 | <clear> |
pp | #6 | rc | #36 | <clear> |
po | #6 | rc | #36 | <clear> |
ps | #6 | rc | #36 | <clear> |
home | #6 | rc | #36 | #62 |
password | #6 | | #2 | <clear> |
gaglist | #6 | rc | #36 | <clear> |
paranoid | #6 | rc | #36 | <clear> |
display_options | #6 | rc | #36 | <clear> |
verb_subs | #6 | rc | #36 | <clear> |
first_connect_time | #6 | r | #2 | <clear> |
size_quota | #6 | | #36 | <clear> |
last_password_time | #6 | | #2 | <clear> |
last_connect_attempt | #6 | | #2 | <clear> |
page_count_start_time | #6 | r | #2 | <clear> |
ping_task | #6 | r | #36 | <clear> |
value_base | #102 | r | #2 | <clear> |
damage_base | #102 | r | #2 | <clear> |
x_loc | #102 | r | #36 | <clear> |
y_loc | #102 | r | #36 | <clear> |
ansi_title | #102 | r | #36 | <clear> |
obvious | #102 | r | #36 | <clear> |
build_help | #102 | rc | #36 | list of 11{"PROPS TO SET:", "currency -- string, the type of money the bot will accept.", "listname -- string, a synonym for the bot's item list. \"List\" & \"prices\" are already synonyms.", "buyback_rate -- integer (50% = 50), the percentage of retail price which the bot will pay to repurchase items.", "..", "MESSAGES:", "@short_desc $sales_bot isn't set.", "@birth $sales_bot is \"%N %<unfades> from non-being.\"", "@outrage $sales_bot is \"This is an outrage!\"", "@done_deal $sales_bot is \"Wonderful doing business with you!\"", "@advertise $sales_bot is \"Sure, I buy and sell. I can show you a catalog, if you ask for it.\""} |
key | #1 | c | #36 | 0 |
aliases | #1 | r | #2 | {"Salesperson", "seller"} |
description | #1 | rc | #36 | <clear> |
object_size | #1 | r | #36 | {25954, -1090650497} |
html | #1 | rc | #36 | <clear> |
Ancestry
Ancestors (nearest first): #116 generic puppet → #91 generic gamer → #40 Generic Mail Receiving Player → #95 ANSI PC → #6 generic player → #102 subthing → #1 Root Class
Children: #146 Mr. Fasco
Call graph
Showing 48 of 51 verbs; 3 not shown.
Source
take_hit
Referenced by
none
Source
1"USAGE: victim:take_hit(damage)"; 2" Sets off silent alarm in case of attack"; 3if ((this.location.retail && (!this.location.sanctuary)) && (this.stats_current[2][4] < (this.stats[2][4] * 0.75))) 4loc = this.location; 5loc.dump_loc = (loc.dump_loc == $rpg_room.dump_loc) ? `loc.virtual_exits[random($)][2] ! ANY => loc.dump_loc' | loc.dump_loc; 6fork (6) 7loc:announce_all("A loud and shrill alarm begins to ring!"); 8loc.sanctuary = 1; 9endfork 10fork (60) 11loc.sanctuary = 0; 12endfork 13endif 14pass(@args); 15if (random(3) == 1) 16this:say(tostr("-", this.enemy, " ", this.outrage_msg)); 17endif
tell
Referenced by
- #134:sell line 2:
this:tell - #134:ask line 6:
this:tell - #134:ask line 8:
this:tell - #134:buy line 2:
this:tell
Source
1if ((this.location != this.home) && (this in connected_players())) 2return pass(@args); 3elseif (($string_utils:index_delimited(tostr(@args), "hands you") && (parent(player) == parent(this))) && (!(player in connected_players()))) 4"This puppet just bought from another puppet."; 5return pass(@args); 6elseif (`parent(this) == $local.cargo_bot ! ANY => 0') 7"has its own tell verb for this stuff"; 8return pass(@args); 9endif 10if ($string_utils:index_delimited(tostr(@args), "hands you")) 11fork (1) 12newstuff = $set_utils:diff(this:contents(), this.oldstuff); 13for x in (newstuff) 14if ((!$object_utils:has_callable_verb(x, "value")) || $object_utils:has_callable_verb(x, "combine")) 15this:say(tostr("-", player, " I can't use this.")); 16this:_force("give ", x, " to ", player); 17else 18offer = $money_utils:_from_to("Gold", this.currency, (dobj:value() * tofloat(this.buyback_rate)) / 100.0); 19offer = ((money = tofloat(this:_has_amount(this.currency))) < offer) ? money | offer; 20this.oldstuff = setadd(this.oldstuff, x); 21this:_rem_money(this.currency, offer); 22player:_add_money(this.currency, offer); 23$you:say_action(tostr("%N %<receives> ", floatstr(offer, 2), " ", this.currency, " from ", this:title(), ".")); 24this:say(tostr("-", player, " ", this.done_deal_msg)); 25endif 26endfor 27endfork 28return pass(@args); 29endif 30if (this.my_tell || ((this.location != this.home) && (this in connected_players()))) 31return pass(@args); 32endif 33if ($string_utils:index_delimited(tostr(@args), "asks")) 34this:random_free(); 35if (($string_utils:index_delimited(tostr(@args), "list") || $string_utils:index_delimited(tostr(@args), "prices")) || $string_utils:index_delimited(tostr(@args), this.listname)) 36this:list(); 37elseif (($string_utils:index_delimited(tostr(@args), "cash") || $string_utils:index_delimited(tostr(@args), "money")) || $string_utils:index_delimited(tostr(@args), this.currency)) 38this:collect_cash(); 39elseif (($string_utils:index_delimited(tostr(@args), "sell") || $string_utils:index_delimited(tostr(@args), "buy")) || $string_utils:index_delimited(tostr(@args), "for sale")) 40this:say(tostr("-", player, " ", this.advertise_msg)); 41endif 42endif 43pass(@args);
list
Referenced by
- #134:tell line 36:
this:list - #134:ask line 17:
this:list - #134:@menu line 2:
this:list
Source
1this.my_tell = 1; 2items = this:items(); 3length = length(items); 4if (!length) 5this:say(tostr("-", player, " I don't have any items at the moment, but check back later.")); 6return this.my_tell = 0; 7endif 8if (player != this) 9this:say(tostr("-", player, " Here is a ", this.listname, " of items for sale.")); 10endif 11this.my_tell = 1; 12player:tell(""); 13fork (3) 14this.my_tell = 1; 15this.location:announce_all_but({player}, tostr(this:title(), " pulls out a ", this.listname, " and shows it to ", player:title(), ".")); 16player:tell("--------------------------------------------------"); 17indices = $string_utils:char_list($string_utils.alphabet)[1..length]; 18names = {}; 19prices = {}; 20for a in [1..length] 21names = {@names, tostr(indices[a], " - ", items[a]:title())}; 22credpr = $object_utils:has_callable_verb(items[a], "combine") ? items[a].value_base | items[a]:value(); 23prices = {@prices, tostr(floatstr($money_utils:_from_to("Gold", this.currency, credpr), 2), " ", this.currency)}; 24endfor 25player:tell_lines($string_utils:columnize({@names, @prices}, 2, 64)); 26player:tell("--------------------------------------------------"); 27if (player != this) 28this:say(tostr("-", player, " You can ask me for the product by name or alphabetical index. Items followed by numbers in ( ) can be purchased in bulk.")); 29fork (3) 30player:tell(""); 31player:tell("(Hints: \"ask ", this:title(), " for <item>\""); 32player:tell(" \"buy <item> from ", this:title(), "\""); 33player:tell(" \"ask ", this:title(), " for <amount> <bulk item>\")"); 34endfork 35endif 36suspend(6); 37this.my_tell = 0; 38endfork
stock
Referenced by
none
Source
1iobj = valid(iobj) ? iobj | $string_utils:literal_object(iobjstr); 2if (((!valid(iobj)) || (!`player.victim_port_msg ! E_PROPNF => 0')) || (!$object_utils:has_callable_verb(iobj, "value"))) 3return player:tell("The object must be both valid and valuable. You must also be an administrator to perform this out-of-character task."); 4endif 5if (iobj.f) 6this.items = setadd(this.items, iobj); 7player:tell("You have added ", iobj:title(), " to ", this:title(), "'s list of goods."); 8else 9iobj:moveto(this); 10this.oldstuff = setadd(this.oldstuff, iobj); 11player:tell("You have given ", iobj:title(), " to ", this:title(), "."); 12endif
unstock
Referenced by
none
Source
1dobj = this:find_product(dobjstr); 2if ((!valid(dobj)) || (!`player.victim_port_msg ! E_PROPNF => 0')) 3return player:tell("The object must be valid, and you must be an administrator to perform this out-of-character task."); 4endif 5if (dobj in this:contents()) 6dobj:moveto(player); 7this.oldstuff = setremove(this.oldstuff, dobj); 8player:tell("You have taken ", dobj:title(), " from ", this:title(), "."); 9else 10this.items = setremove(this.items, dobj); 11player:tell("You have removed ", dobj:title(), " from ", this:title(), "'s list of goods."); 12endif
sell
Referenced by
none
Source
1if (player == this) 2return this:tell("Don't be silly."); 3endif 4this.my_tell = 1; 5$you:say_action(tostr("%N %<offers> to sell ", dobjstr, " to ", this:title(), ".")); 6amountitem = $string_utils:first_word(dobjstr); 7amount = toint(amountitem[1]); 8itemname = amountitem[2]; 9if ((valid(dobj) && (dobj in player:contents())) && (!$object_utils:has_callable_verb(dobj, "combine"))) 10if ($object_utils:has_callable_verb(dobj, "value")) 11offer = $money_utils:_from_to("Gold", this.currency, (dobj:value() * tofloat(this.buyback_rate)) / 100.0); 12offer = ((money = tofloat(this:_has_amount(this.currency))) < offer) ? money | offer; 13this:say(tostr("-", player, " I can offer you no more than ", floatstr(offer, 2), " ", this.currency, " for that.")); 14this:say(tostr("-", player, " Give it to me if you still want to sell it.")); 15else 16this:say(tostr("-", player, " That has no value to me.")); 17return this.my_tell = 0; 18endif 19elseif ($object_utils:has_callable_verb(dobj, "combine") || amount) 20if (valid(item = player:match(itemname))) 21this:say(tostr("-", player, " I only buy brand new ammunition from authorized dealers.")); 22return this.my_tell = 0; 23else 24this:say(tostr("-", player, " I don't buy used ", dobjstr, " in bulk quantities.")); 25return this.my_tell = 0; 26endif 27else 28player:tell("You don't seem to have any \"", dobjstr, "\" to sell."); 29endif
ask
Referenced by
none
Source
1if (prepstr == "to") 2pass(@args); 3elseif (prepstr == "for") 4if (player == this) 5if (iobjstr in {"list", this.listname, "prices"}) 6return this:tell("Try \"@menu\"."); 7endif 8return this:tell("Sorry, that's just too convenient to be fair."); 9endif 10this.my_tell = 1; 11$you:say_action(tostr("%N %<asks> ", this:title(), " for ", iobjstr, ".")); 12this.my_tell = 0; 13if (iobjstr in {"stocks", "shelves", "stores", "inventory"}) 14return this:check_stocks(); 15endif 16if (iobjstr in {"list", this.listname, "prices"}) 17return this:list(); 18endif 19if (iobjstr in {"money", "cash", this.currency}) 20return this:collect_cash(); 21endif 22if (iobjstr in {"name", "his name", "her name"}) 23return this:say(tostr("-", player, " My name is ", this.name, ".")); 24endif 25this:sell_product(iobjstr, player); 26else 27player:tell("Try: \"ask ", this:title(), " to/for <something>\""); 28endif
collect_cash
Referenced by
Source
1if (player in this.trustees) 2this:say(tostr("-", player, " Sure thing, Boss!")); 3cash = tofloat(this:_has_amount(this.currency)); 4this:_rem_money(this.currency, cash); 5player:_add_money(this.currency, cash); 6this.my_tell = 1; 7suspend(2); 8$you:say_action(tostr("%N %<receives> ", floatstr(cash, 2), " ", this.currency, " from ", this:title(), ".")); 9else 10this:say(tostr("-", player, " Get away, beggar!")); 11endif
sell_product
Referenced by
Source
1"usage: sell_product(item name, buyer object)"; 2"this verb needs to be wiz-owned."; 3itemname = args[1]; 4iobj = args[2]; 5amountitem = $string_utils:first_word(itemname); 6item = (amount = toint(amountitem[1])) ? this:find_product(amountitem[2]) | this:find_product(itemname); 7if (item == $failed_match) 8return this:say(tostr("-", iobj, " Sorry, I don't have any ", itemname, " today.")); 9elseif (`player:reached_limit() ! E_VERBNF => "GUEST"') 10return this:say(tostr("-", iobj, " You don't look strong enough to carry more!")); 11endif 12if (amount && (!$object_utils:has_callable_verb(item, "combine"))) 13return this:say(tostr("-", iobj, " Sorry, I don't sell ", item:title(), " in bulk quantities.")); 14elseif ((!amount) && $object_utils:has_callable_verb(item, "combine")) 15amount = 1; 16endif 17price = amount ? tofloat(amount) * $money_utils:_from_to("Gold", this.currency, item.value_base) | $money_utils:_from_to("Gold", this.currency, item:value()); 18if (tofloat(iobj:_has_amount(this.currency)) < price) 19this:say(tostr("-", iobj, " ", this.outrage_msg)); 20return this:say(tostr("-", iobj, " I only deal in ", this.currency, ". Clearly you do not have enough!")); 21endif 22if (item.f && (item in this.items)) 23if ($object_utils:has_callable_verb(item, "combine")) 24prop = $object_utils:has_property(item, "rounds") ? "rounds" | "units"; 25if (amount > item.(prop)) 26return this:say(tostr("-", iobj, " Sorry, I don't have that many.")); 27elseif (amount == 0) 28return this:say(tostr("-", iobj, " Pardon me, I didn't hear how many you wanted.")); 29endif 30this:transfer_ammo(amount, item, iobj); 31elseif ($object_utils:has_callable_verb(item, "replicate")) 32object = item:replicate(); 33if (valid(object)) 34object:moveto(this); 35this:_force("give ", object, " to ", iobj); 36else 37return this:say(tostr("-", iobj, " Ahh, I only have the display model for that, and it's non-functional. :|")); 38endif 39else 40owner = ($set_utils:intersection($object_utils:ancestors(item), {$note, $container}) != {}) ? iobj | $default_holder; 41object = $recycler:_create(item, owner); 42if (!valid(object)) 43return player:tell("You have gone over quota. Delete some mail using @rmm."); 44endif 45object:set_name(item.name); 46object.aliases = item.aliases; 47object:moveto(this); 48this:_force("give ", object, " to ", iobj); 49endif 50elseif (item in this:contents()) 51this:_force("give ", item, " to ", iobj); 52this.oldstuff = setremove(this.oldstuff, item); 53endif 54iobj:_rem_money(this.currency, price); 55this:_add_money(this.currency, price * 0.35); 56this:say(tostr("-", iobj, " ", this.done_deal_msg));
find_product
Referenced by
- #134:unstock line 1:
this:find_product - #134:sell_product line 6:
this:find_product - #134:sell_product line 6:
this:find_product
Source
1"usage: find_product(item name) => object or $failed_match"; 2" Returns first item found, never $ambiguous_match, thus"; 3" trys to sell inventory before 'ordering' new products"; 4product = args[1]; 5if (valid(x = this:index_match(product))) 6return x; 7endif 8if (toobj(product) in this:items()) 9return toobj(product); 10endif 11match = $string_utils:match_suspended(product, this:items(), "aliases"); 12if (match != $ambiguous_match) 13return match; 14else 15"the first exact match will do"; 16for x in (this:items()) 17if (product in x.aliases) 18return x; 19endif 20(ticks_left() < 5000) && suspend(0); 21endfor 22endif
index_match
Referenced by
- #134:find_product line 5:
this:index_match
Source
1items = this:items(); 2n = length(items); 3if (!n) 4return $failed_match; 5endif 6indices = $string_utils:char_list($string_utils.alphabet)[1..n]; 7if (i = args[1] in indices) 8return items[i]; 9endif 10return $failed_match;
items
Referenced by
- #134:list line 2:
this:items - #134:find_product line 8:
this:items - #134:find_product line 11:
this:items - #134:find_product line 16:
this:items - #134:index_match line 1:
this:items
Source
1stuff = this:contents(); 2for item in (stuff) 3if (((item == this.wielded) || $object_utils:has_callable_verb(item, "combine")) || `item.wornness ! E_PROPNF => 0') 4stuff = setremove(stuff, item); 5endif 6endfor 7return $list_utils:remove_duplicates({@stuff, @this.items});
_clean_inv
Referenced by
none
Source
1"Factory buys back used goods from retail outlet"; 2"Use with the $scheduler"; 3stuff = this:contents(); 4for item in (stuff) 5if (item.f) 6$mail_agent:send_message(this, $default_holder, "Bot Has Generic", {$string_utils:nn(this), $string_utils:nn(item)}); 7elseif ((((item != this.wielded) && (parent(item) in this.items)) || $object_utils:isa(item, $food1)) || $object_utils:isa(item, $food2)) 8this:_add_money(this.currency, (item:value() * tofloat(this.buyback_rate)) / 100.0); 9$recycler:_recycle(item); 10endif 11endfor 12suspend(0); 13this.oldstuff = this:contents(); 14for item in (this.items) 15if (parent(item) == $garbage) 16this.items = setremove(this.items, item); 17endif 18endfor
check_stocks
Referenced by
- #134:ask line 14:
this:check_stocks
Source
1dobj = this; 2if ((!(player in this.trustees)) && (!player.wizard)) 3return player:tell(E_PERM); 4endif 5objs = {}; 6for x in (dobj.items) 7if ($object_utils:isa(x, $homer)) 8objs = {@objs, x}; 9endif 10endfor 11player:tell($string_utils:left("[white][bold]Name[normal]", 17), $string_utils:left("[yellow][bold]Manufactured[normal]", 18), $string_utils:left("[green][bold]In Stock[normal]", 10)); 12player:tell("[bold]", $string_utils:space(46, "-"), "[normal]"); 13for x in (objs) 14player:tell($string_utils:left(tostr("[white][bold]", x.name, "[normal]"), 17), $string_utils:right(tostr("[yellow][bold]", x.child_limit, "[normal]"), 6), $string_utils:right(tostr("[green][bold]", x.child_limit - length(children(x)), "[normal]"), 16)); 15endfor
@menu
Referenced by
none
Source
1"If the sales bot is a a player, this allows the player to check its own stock."; 2this:list();
init_for_core
Referenced by
none
Source
1if (caller_perms().wizard) 2if (this == $sales_bot) 3this.items = {}; 4this.oldstuff = {}; 5this.outrage_msg = "This is an outrage!"; 6this.done_deal_msg = "Wonderful doing business with you!"; 7this.currency = "Gold"; 8this.listname = "catalog"; 9this.buyback_rate = 50; 10this.advertise_msg = "Sure, I buy and sell. I can show you a catalog, if you ask for it."; 11this.trustees = {#2}; 12else 13for p in (properties($sales_bot)) 14if ((!p) in {"build_help", "help_msg"}) 15clear_property(this, p); 16endif 17endfor 18endif 19return pass(@args); 20endif
buy order
Referenced by
none
Source
1if ((player == this) || (player.location != this.location)) 2return this:tell("Sorry, that's just too convenient to be fair."); 3endif 4this.my_tell = 1; 5$you:say_action(tostr("%N %<requests> to buy ", dobjstr, " from ", this:title(), ".")); 6this.my_tell = 0; 7this:sell_product(dobjstr, player);