roleplay regulator #98

Parent #74Owner #2Flags readSource QuestCore.db

Aliases: roleplay regulator, regulator

27 verbs · 27 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
statcostthis none thisrxd#985
skillcostthis none thisrxd#983
max_from_freethis none thisrxd#9824
boost_costthis none thisrxd#9820
boost_modthis none thisrxd#9810
three_fourths_hourthis none thisrxd#985
mass_advancethis none thisrxd#9815
mass_healthis none thisrxd#9822
parse_stat_levelthis none thisrxd#9840
init_for_corethis none thisrxd#986
@awardsnone none nonerxd#9813
collect_orphansthis none thisrxd#9825
person_match_failedthis none thisrxd#9822
@addskill @rmskill @clearskillany none nonerxd#9893
random_statthis none thisrxd#9811
weatherthis none thisrxd#988
weeklythis none thisrxd#987
dailythis none thisrxd#984
welfarethis none thisrxd#9821
unstock_surplusthis none thisrxd#984
restock_ammothis none thisrxd#9810
restock_foodthis none thisrxd#988
remove_rollerthis none thisrxd#983
knock_em_homersthis none thisrxd#9811
@deadstuffnone none nonerxd#9816
@set-salesnone none nonerxd#9822
reset_used_spellsthis none thisrxd#9810

Properties

PropertyDefinerFlagsOwnerValue
awards#98rc#2{}
do_clean_rooms#98rc#21
do_restrict_guests#98rc#21
rollers#98r#2{}
warehouse#74r#36<clear>
help_msg#74rc#2"A storage facility for verbs that regulate the roleplay environment. Some verbs on this can be used if this is added as a player feature, and additional verbs can be used in conjunction with the $scheduler for regular automatic maintenance. '@verbs $rp_regulator' will give you a list."
feature_verbs#74r#36{"@awards", "@addskill", "@deadstuff", "@set-sales"}
feature_ok#74r#36<clear>
drop_failed_msg#5rc#2<clear>
drop_succeeded_msg#5rc#2<clear>
odrop_failed_msg#5rc#2<clear>
odrop_succeeded_msg#5rc#2<clear>
otake_succeeded_msg#5rc#2<clear>
otake_failed_msg#5rc#2<clear>
take_succeeded_msg#5rc#2<clear>
take_failed_msg#5rc#2<clear>
value_base#102r#2<clear>
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#2<clear>
key#1c#20
aliases#1rc#2{"roleplay regulator", "regulator"}
description#1rc#2"A storage facility for verbs that regulate the roleplay environment. Some verbs on this can be used if this is added as a player feature, and additional verbs can be used in conjunction with the $scheduler for regular automatic maintenance. '@verbs $rp_regulator' will give you a list."
object_size#1r#36{23980, 1539462952}

Ancestry

Ancestors (nearest first): #74 Generic Feature Object#5 generic thing#102 subthing#1 Root Class

Children: none

Call graph

calls n98_2 #98:max_from_free n6_18 #6:tell n98_2->n6_18 n98_1 #98:skillcost n98_2->n98_1 n98_4 #98:boost_mod n98_2->n98_4 n98_0 #98:statcost n98_2->n98_0 n98_3 #98:boost_cost n98_3->n6_18 n98_3->n98_1 n98_3->n98_4 n98_3->n98_0 n98_8 #98:parse_stat_level n98_3->n98_8 n98_8->n98_2 n98_8->n6_18 n6_79 #6:tell_lines n98_8->n6_79 n98_5 #98:three_fourths_hour n98_6 #98:mass_advance n98_5->n98_6 n98_7 #98:mass_heal n98_5->n98_7 n52_25 #52:descendants_suspended n98_6->n52_25 n98_7->n52_25 n55_10 #55:append n98_7->n55_10 n98_9 #98:init_for_core n74_8 #74:init_for_core n98_9->n74_8 n98_10 #98:@awards n98_10->n6_18 n20_59 #20:name_and_number n98_10->n20_59 n43_12 #43:mmddyy n98_10->n43_12 n98_11 #98:collect_orphans n98_11->n52_25 n52_0 #52:has_property n98_11->n52_0 n63_1 #63:_recycle n98_11->n63_1 n98_12 #98:person_match_failed n42_0 #42:controls n98_12->n42_0 n59_2 #59:toobj n98_12->n59_2 n98_13 #98:@addskill n98_13->n6_18 n98_13->n52_25 n56_4 #56:yes_or_no n98_13->n56_4 n98_15 #98:weather n98_15->n52_25 n98_16 #98:weekly n98_16->n98_11 n98_16->n98_15 n98_18 #98:welfare n98_16->n98_18 n98_20 #98:restock_ammo n98_16->n98_20 n98_21 #98:restock_food n98_16->n98_21 n98_18->n52_25 n55_16 #55:slice n98_18->n55_16 n98_20->n52_25 n98_21->n52_25 n98_17 #98:daily n98_17->n98_15 n98_19 #98:unstock_surplus n98_17->n98_19 n98_19->n52_25 n98_23 #98:knock_em_homers n98_23->n52_25 n99_17 #99:schedule n98_23->n99_17 n98_24 #98:@deadstuff n98_24->n6_18 n98_24->n20_59 n98_25 #98:@set-sales n98_25->n6_18 n98_25->n52_25 n98_25->n20_59 n98_26 #98:reset_used_spells n98_26->n52_0

Source

statcost

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"USAGE: statcost(number) => free point cost for stat level, a decimal figure";
2x = tofloat(args[1]);
3y = (tofloat(x) - 10.0) * 10.0;
4y = (y == 0.0) ? 1e-09 | y;
5return (y > 0.0) ? (tofloat(x) - 10.0) * 15.0 | y;

skillcost

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"USAGE: skillcost(number) => free point cost for skill level, a decimal figure";
2x = tofloat(args[1]);
3return 3.142 * (x ^ 2);

max_from_free

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"USAGE: $RP_regulator:max_from_free(<stat or skill name>, <player or bot>)";
2"       Drains all free points & boosts the single score on person.";
3"       => floating point number representing the new boosted score";
4sname = args[1];
5person = args[2];
6if (((free = person.free_points) <= 0.0) && (person == player))
7player:tell("No available free points.");
8free = 0.0;
9endif
10if (x = sname in person.skills[1])
11allfree = this:skillcost(person.skills[2][x]) + (free / this:boost_mod(sname));
12max = sqrt(allfree / 3.142);
13person.skills[2][x] = max;
14elseif (x = sname in person.stats[1])
15allfree = this:statcost(person.stats[2][x]) + (free / this:boost_mod(sname));
16max = (allfree > 0.0) ? (allfree / 15.0) + 10.0 | ((allfree / 10.0) + 10.0);
17diff = person.stats[2][x] - person.stats_current[2][x];
18person.stats[2][x] = max;
19person.stats_current[2][x] = max - diff;
20else
21return E_INVARG;
22endif
23person.free_points = (free == 0.0) ? person.free_points | 0.0;
24return max;

boost_cost

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"USAGE: boost_cost(<stat/skill>,<level>,<person>)";
2"       <level> can be any number";
3if (length(parsed = this:parse_stat_level(args[1], args[2], args[3])) == 3)
4{kind, index, newlevel} = parsed;
5else
6return player:tell(E_INVARG);
7endif
8person = args[3];
9if (kind == "stat")
10all_free_points = person.free_points + (this:boost_mod(person.stats[1][index], person) * this:statcost(person.stats[2][index]));
11newcost = this:boost_mod(person.stats[1][index], person) * this:statcost(newlevel);
12all_free_points = all_free_points - newcost;
13player:tell(person.stats[1][index], " => ", floatstr(newlevel, 2), " sets free points to ", all_free_points);
14else
15all_free_points = this.free_points + (this:boost_mod(person.skills[1][index], person) * this:skillcost(person.skills[2][index]));
16newcost = this:boost_mod(person.skills[1][index], person) * this:skillcost(newlevel);
17all_free_points = all_free_points - newcost;
18player:tell(person.skills[1][index], " => ", floatstr(newlevel, 2), " sets free points to ", all_free_points);
19endif
20return all_free_points;

boost_mod

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Customized for this particular MOO";
2"Adjust the numbers in the following line for proper balance";
3"boost_mod(stat-or-skill-name, person)";
4m = 0.85;
5if ((args[1] == "combat") && ((c = args[2].skills[2]["combat" in args[2].skills[1]]) > 3.5))
6m = (c > 6.0) ? 5.0 | 2.5;
7elseif ((args[1] == "medical") && ((c = args[2].skills[2]["medical" in args[2].skills[1]]) > 3.5))
8m = (c > 4.0) ? 2.0 | 1.5;
9endif
10return m;

three_fourths_hour

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1if (!caller_perms().wizard)
2return E_PERM;
3endif
4this:mass_advance();
5this:mass_heal();

mass_advance

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"WIZ PERMS";
2"Rewards players for participating. Boosts free points and intelligence.";
3"This is used in conjunction with the $scheduler";
4if (!caller_perms().wizard)
5return E_PERM;
6endif
7for p in ($object_utils:descendants_suspended($rpgamer))
8(ticks_left() < 4000) && suspend(1);
9if (((time() - p.last_disconnect_time) < 2700) || ((p in connected_players()) && (idle_seconds(p) < 2700)))
10iboost = (18.0 - p.stats[2][3]) * 1e-05;
11p.stats[2][3] = (iboost > 0.0) ? p.stats[2][3] + iboost | p.stats[2][3];
12p.stats_current[2][3] = (iboost > 0.0) ? p.stats_current[2][3] + iboost | p.stats_current[2][3];
13p.free_points = p.free_points + 0.0025;
14endif
15endfor

mass_heal

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Simulates natural healing.";
2"This is used in conjunction with the $scheduler";
3"$scheduler:schedule_every(2700,<this object#>,'mass_heal')";
4"Hack this to incorporate poison or disease.";
5"WIZ PERMS";
6if (!caller_perms().wizard)
7return E_PERM;
8endif
9players = $list_utils:append($object_utils:descendants_suspended($rpgamer), $object_utils:descendants_suspended($monster));
10for ic in (players)
11(ticks_left() < 4000) && suspend(1);
12if (ic.alive)
13max = ic.stats[2][4];
14cur = ic.stats_current[2][4];
15if (cur < max)
16points = ((z = 0.075 * max) > 0.75) ? tofloat(z) | 0.75;
17points = ((z = max - cur) < 0.75) ? tofloat(z) | 0.75;
18ic.stats_current[2][4] = cur + points;
19ic:notify("You feel a bit better.");
20endif
21endif
22endfor

parse_stat_level

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"USAGE: parse_stat_level(<stat/skill>,<level>, <person>)";
2"       <level> can be any number";
3"       => {'stat/skill', index, float} or {}";
4"       IF ARGS[2] == 'MAX*IMUM' THE MAX WILL BE SET ON PERSON";
5st = (args[1] in {"st", "str", "strength"}) ? 1 | 0;
6dx = (args[1] in {"dx", "dex", "dexterity"}) ? 1 | 0;
7iq = (args[1] in {"iq", "int", "intelligence"}) ? 1 | 0;
8ht = (args[1] in {"ht", "hps", "health"}) ? 1 | 0;
9stat_found = ((st + dx) + iq) + ht;
10person = args[3];
11skill_found = args[1] in person.skills[1];
12if ((!stat_found) && (!skill_found))
13player:tell("These are the valid names for statistics:");
14player:tell("    Strength (st, str)");
15player:tell("    Dexterity (dx, dex)");
16player:tell("    Intelligence (iq, int)");
17player:tell("    Health (ht, hps)");
18player:tell("These are the valid names for skills:");
19skills = {};
20for sk in (person.skills[1])
21skills = {@skills, tostr("    ", sk)};
22endfor
23player:tell_lines(skills);
24return {};
25elseif (args[2] in {"max", "maximum"})
26sname = stat_found ? person.stats[1][1 in {st, dx, iq, ht}] | person.skills[1][skill_found];
27person:tell("Boosting ", sname, " to ", floatstr(this:max_from_free(sname, person), 4), ".");
28return {};
29elseif (!(toint(args[2]) > 0))
30try
31number = (tofloat(args[2]) > 0.1) ? 1.0 | E_INVARG;
32except v (ANY)
33person:tell("You must use a valid number greater than 0.1");
34person:tell("(eg. \"11\" or \"11.75\")");
35return {};
36endtry
37endif
38index = skill_found ? skill_found | (1 in {st, dx, iq, ht});
39newlevel = tofloat(args[2]);
40return skill_found ? {"skill", index, newlevel} | {"stat", index, newlevel};

init_for_core

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1if (caller_perms().wizard)
2this.awards = {};
3this.do_restrict_guests = 1;
4this.do_clean_rooms = 1;
5endif
6pass();

@awards

Spec none none noneFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"Tells wizard all recent @awards.";
2if (!player.wizard)
3return player:tell("This FO is for wizard use only.");
4endif
5if (length(this.awards) > 50)
6this.awards = this.awards[2..$];
7endif
8for x in (this.awards)
9(ticks_left() < 4000) && suspend(0);
10atype = (x[2] == 1) ? "minor" | "major";
11atype = (x[2] == 2) ? "standard" | atype;
12player:tell($string_utils:nn(x[1]), " awarded ", atype, " by ", $string_utils:nn(x[3]), " ", $time_utils:mmddyy(x[4]));
13endfor

collect_orphans

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Finds empty collectives and recycles them";
2"Finds 'homers' in bad locations and recycles them";
3"Recycles all death purses in $nothing";
4"Returns findable money to it's own org.";
5"Run every 2 to 7 days.";
6if (!caller_perms().wizard)
7return E_PERM;
8endif
9for c in ($object_utils:descendants_suspended($collective))
10if (($object_utils:has_property(c, "rounds") && (!c.rounds)) && (!c.f))
11$recycler:_recycle(c);
12elseif (($object_utils:has_property(c, "units") && (!c.units)) && (!c.f))
13$recycler:_recycle(c);
14endif
15endfor
16for h in ($object_utils:descendants_suspended($homer))
17if ((!valid(h.location)) && (!h.f))
18$recycler:_recycle(h);
19endif
20endfor
21for p in (children($death_purse))
22if ((!valid(p.location)) && (!p.f))
23$recycler:_recycle(p);
24endif
25endfor

person_match_failed

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Usage: person_match_failed(object, string)";
2"Prints a message if string does not match object.  Generally used after object is derived from a :match_object(string).";
3{match_result, string} = args;
4tell = $perm_utils:controls(caller_perms(), player) ? "notify" | "tell";
5if ((index(string, "#") == 1) && ($code_utils:toobj(string) != E_TYPE))
6"...avoid the `I don't know which `#-2' you mean' message...";
7if (!valid(match_result))
8player:(tell)(tostr(string, " does not exist here."));
9endif
10return !valid(match_result);
11elseif (match_result == $nothing)
12player:(tell)("You must give the name of some person in this area.");
13elseif (match_result == $failed_match)
14player:(tell)(tostr("I see no \"", string, "\" here."));
15elseif (match_result == $ambiguous_match)
16player:(tell)(tostr("I don't know which \"", string, "\" you mean. Try \"1st ", string, "\" or \"2nd ", string, "\" instead."));
17elseif (!valid(match_result))
18player:(tell)(tostr(match_result, " does not exist here."));
19else
20return 0;
21endif
22return 1;

@addskill @rmskill @clearskill

Spec any none noneFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"USAGE: @addskill <skill>   => Adds <skill> to $rpgamer and all descendants,";
2"                              with a value of 0.0";
3"       @rmskill <skill>    => Removes <skill> from $rpgamer and all descendants";
4"       @clearskill <skill> => gives <skill> a value of 0.0 in all";
5"                              descendants of $rpgamer";
6"       @clearskill         => gives all skills a value of 0.0 in all";
7"                              descendants of $rpgamer";
8"       (FOR WIZARDS ONLY)";
9if (!player.wizard)
10return player:tell("Ask a wizard to alter the skills for you.");
11endif
12players = $object_utils:descendants_suspended($rpgamer);
13players = {@players, $rpgamer};
14if (verb == "@addskill")
15if (dobjstr in $rpgamer.skills[1])
16return player:tell("The skill \"", dobjstr, "\" already exists.");
17endif
18player:tell("By adding a skill you take full responsibility for incorporating it into the roleplay. If the skill is not brought into play within a short period of time, it will be removed.");
19if (!$command_utils:yes_or_no("Are you sure you want to do this?"))
20return;
21endif
22player:tell("Adding \"", dobjstr, "\" to skills...");
23for p in (players)
24(ticks_left() < 4000) && suspend(0);
25p.skills[1] = {@p.skills[1], dobjstr};
26p.skills[2] = {@p.skills[2], 0.0};
27endfor
28if (`tonum($edu_stds) ! E_PROPNF => 0')
29if (!`!(!property_info($edu_stds, dobjstr)) ! E_PROPNF => 0')
30add_property($edu_stds, dobjstr, {{1.0, 1.0, 3.0, 1.0}, {2.0, 2.0, 4.0, 2.0}, {3.0, 3.0, 5.0, 3.0}, {4.0, 4.0, 6.0, 4.0}, 1.0, {}}, property_info($edu_stds, "combat"));
31endif
32if (!`!(!property_info($edu_stds, tostr(dobjstr, "_steps"))) ! E_PROPNF => 0')
33add_property($edu_stds, tostr(dobjstr, "_steps"), {{"*language_steps"}}, property_info($edu_stds, "combat"));
34endif
35if (!`!(!property_info($edu_stds, tostr(dobjstr, "_adjust"))) ! E_PROPNF => 0')
36add_property($edu_stds, tostr(dobjstr, "_adjust"), {}, property_info($edu_stds, "combat"));
37endif
38player:tell("Make sure you adjust the coresponding properties on $edu_stds.");
39player:tell("You will have to make any necessary additions to $rpgamer:@roll, $rpgamer:roll_against, and any other roleplay verb using this skill.");
40endif
41player:tell("Done.");
42elseif (verb == "@rmskill")
43if (!(index = dobjstr in $rpgamer.skills[1]))
44return player:tell("The skill \"", dobjstr, "\" does not exist.");
45endif
46player:tell("By removing a skill you also take full responsibility for removing all associated code from the roleplay.");
47if (!$command_utils:yes_or_no("Are you sure you want to do this?"))
48return;
49endif
50player:tell("Removing \"", dobjstr, "\" from skills...");
51for p in (players)
52(ticks_left() < 4000) && suspend(0);
53p.skills[1] = setremove(p.skills[1], dobjstr);
54p.skills[2] = {@p.skills[2][1..index - 1], @p.skills[2][index + 1..$]};
55endfor
56if (`tonum($edu_stds) ! E_PROPNF => 0')
57`delete_property($edu_stds, dobjstr) ! ANY => player:tell("ERROR deleting $edu_stds.", dobjstr)';
58`delete_property($edu_stds, tostr(dobjstr, "_steps")) ! ANY => player:tell("ERROR deleting $edu_stds.", tostr(dobjstr, "_steps"))';
59`delete_property($edu_stds, tostr(dobjstr, "_adjust")) ! ANY => player:tell("ERROR deleting $edu_stds.", tostr(dobjstr, "_adjust"))';
60player:tell("Coresponding properties removed from $edu_stds.");
61endif
62player:tell("Done.");
63else
64if (!dobjstr)
65player:tell("This will set all skills to 0.0 on every player!");
66if (!$command_utils:yes_or_no("Are you sure you want to do this?"))
67return;
68endif
69player:tell("Resetting all skills...");
70levels = {};
71for x in ($rpgamer.skills[1])
72levels = {@levels, 0.0};
73endfor
74for p in (players)
75(ticks_left() < 4000) && suspend(0);
76p.skills[2] = levels;
77endfor
78return player:tell("Done.");
79endif
80if (!(index = dobjstr in $rpgamer.skills[1]))
81return player:tell("The skill \"", dobjstr, "\" does not exist.");
82endif
83player:tell("This will set everyones \"", dobjstr, "\" skill to 0.0.");
84if (!$command_utils:yes_or_no("Are you sure you want to do this?"))
85return;
86endif
87player:tell("Resetting \"", dobjstr, "\" on skills...");
88for p in (players)
89(ticks_left() < 4000) && suspend(0);
90p.skills[2][index] = 0.0;
91endfor
92player:tell("Done.");
93endif

random_stat

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"USAGE: random_stat(1-3) => a random statistic from 1.0-18.0";
2"1 => stat from 9.1 to 18.0, most likely between 11.5 & 12.5, with 18.0 being rare.";
3"2 => stat from 3.0 to 18.0, most likely between 10.0 & 11.0, extremes very rare.";
4"3 => stat from 3.0 to 18.0, even chance of any number.";
5if ((!args) || (args[1] == 1))
6return ((x = tofloat(((random(3) + random(4)) + random(4)) + random(4)) + (tofloat(random(30)) * 0.1)) > 9.0) ? x | (9.0 + (tofloat(random(20)) * 0.1));
7elseif (args[1] == 2)
8return tofloat(((random(50) + random(50)) + random(50)) + 27) * 0.1;
9else
10return 2.9 + (tofloat(random(151)) * 0.1);
11endif

weather

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Daily weather generation";
2if (!caller_perms().wizard)
3return E_PERM;
4endif
5for w in ($object_utils:descendants_suspended($realm))
6w:set_weather();
7w.zone = (w.zone > w.hours_in_day) ? w.zone - w.hours_in_day | w.zone;
8endfor

weekly

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"Weekly tasks";
2"WIZ PERMS";
3`this:weather() ! ANY => ""';
4`this:collect_orphans() ! ANY => ""';
5`this:welfare() ! ANY => ""';
6`this:restock_ammo() ! ANY => ""';
7`this:restock_food() ! ANY => ""';

daily

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"Daily tasks";
2"WIZ PERMS";
3`this:unstock_surplus() ! ANY => ""';
4`this:weather() ! ANY => ""';

welfare

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Weekly income generation";
2"WIZ PERMS";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6players = $object_utils:descendants_suspended($rpgamer);
7for ic in (players)
8(ticks_left() < 5000) && suspend(2);
9if (ic.alive && ((time() - ic.last_disconnect_time) < 151200))
10if (currency = $currency_utils:match_org(ic.org))
11amount = $currency_utils:_from_to("Gold", currency, 2.5);
12if (index = currency in $list_utils:slice(ic.money, 1))
13amount = (ic.money[index][2] > (amount * 10.0)) ? amount * 0.1 | amount;
14endif
15ic:_add_money(currency, amount);
16if (ic in connected_players())
17ic:tell("Hey! You just found ", floatstr(amount, 2), " ", currency, " you didn't know you had!");
18endif
19endif
20endif
21endfor

unstock_surplus

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Daily store cleanup.";
2for x in ($object_utils:descendants_suspended($sales_bot))
3x:_clean_inv();
4endfor

restock_ammo

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Weekly bullet generation";
2"WIZ PERMS";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6for x in ($object_utils:descendants_suspended($ammo))
7if (x.f)
8x.rounds = 3000;
9endif
10endfor

restock_food

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

Source

1"Weekly food production";
2"WIZ PERMS";
3if (!caller_perms().wizard)
4return E_PERM;
5endif
6for x in ($object_utils:descendants_suspended($food1))
7x.units = x.f ? (random(25) + 10) + x.units | x.units;
8endfor

remove_roller

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1if (caller_perms().wizard)
2this.rollers = setremove(this.rollers, args[1]);
3endif

knock_em_homers

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"A daily cleanup of $homers that didn't get triggered.";
2if (!caller_perms().wizard)
3return E_PERM;
4endif
5homers = $object_utils:descendants_suspended($homer);
6for homey in (homers)
7if (homey.returning && (homey.location != homey.home))
8`$scheduler:schedule(homey.how_long, homey, "go_home") ! ANY => "oh well"';
9endif
10(ticks_left() < 2000) && suspend(0);
11endfor

@deadstuff

Spec none none noneFlags rxdOwner #36Definer #98

Referenced by

none

Source

1"Tells contents of $dead_zone and $local.dead_objects_container";
2dead_p = `$dead_zone.contents ! ANY => {}';
3dead_o = `$local.dead_object_container.contents ! ANY => {}';
4if ((!dead_p) && (!dead_o))
5return player:tell("All clear.");
6endif
7if (dead_p)
8player:tell("  Objects in $dead_zone, ", $string_utils:nn($dead_zone), ":");
9player:tell("  ", $string_utils:nn(dead_p));
10player:tell("  ---------------");
11endif
12if (dead_o)
13player:tell("  Objects in $local.dead_object_container, ", $string_utils:nn($local.dead_object_container), ":");
14player:tell("  ", $string_utils:nn(dead_o));
15player:tell("  ---------------");
16endif

@set-sales

Spec none none noneFlags rxdOwner #2Definer #98

Referenced by

none

Source

1"Sets the home of all descendants of $sales_bot to their current respective locations, and the .retail property of those locations to 1. Wiz only.";
2if (!player.wizard)
3return E_PERM;
4endif
5sales_rooms = {};
6for s in ($object_utils:descendants_suspended($sales_bot))
7if (valid(s.home = s.location))
8sales_rooms = {@sales_rooms, s.location};
9else
10player:tell($string_utils:nn(s), " has a bad location.");
11endif
12`s.location.retail = 1 ! ANY => player:tell($string_utils:nn(s), ".location.retail could not be set.") || (sales_rooms = setremove(@sales_rooms, s.location))';
13player:tell(`tostr($string_utils:nn(s), " in ", $string_utils:nn(s.location)) ! ANY');
14endfor
15player:tell("Clearing the '.retail' prop of rooms without sales bots.");
16for r in ($object_utils:descendants_suspended($rpg_room))
17((seconds_left() < 2) || (ticks_left() < 4000)) && suspend(0);
18if (!(r in sales_rooms))
19`r.retail = 0 ! ANY => player:tell($string_utils:nn(r), ".retail could not be set.")';
20endif
21endfor
22player:tell("Set-up complete. Don't forget to stock the sales bots with goods.");

reset_used_spells

Spec this none thisFlags rxdOwner #2Definer #98

Referenced by

none

Source

1for x in (players())
2if ($object_utils:has_property(x, "used_spells"))
3if (x.used_spells != 0)
4x.used_spells = 0;
5if (x in connected_players())
6x:tell("[bold][white]Your fatigue from spellcasting has worn off.[normal]");
7endif
8endif
9endif
10endfor