roleplay regulator #98
Aliases: roleplay regulator, regulator
27 verbs · 27 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
statcost | this none this | rxd | #98 | 5 |
skillcost | this none this | rxd | #98 | 3 |
max_from_free | this none this | rxd | #98 | 24 |
boost_cost | this none this | rxd | #98 | 20 |
boost_mod | this none this | rxd | #98 | 10 |
three_fourths_hour | this none this | rxd | #98 | 5 |
mass_advance | this none this | rxd | #98 | 15 |
mass_heal | this none this | rxd | #98 | 22 |
parse_stat_level | this none this | rxd | #98 | 40 |
init_for_core | this none this | rxd | #98 | 6 |
@awards | none none none | rxd | #98 | 13 |
collect_orphans | this none this | rxd | #98 | 25 |
person_match_failed | this none this | rxd | #98 | 22 |
@addskill @rmskill @clearskill | any none none | rxd | #98 | 93 |
random_stat | this none this | rxd | #98 | 11 |
weather | this none this | rxd | #98 | 8 |
weekly | this none this | rxd | #98 | 7 |
daily | this none this | rxd | #98 | 4 |
welfare | this none this | rxd | #98 | 21 |
unstock_surplus | this none this | rxd | #98 | 4 |
restock_ammo | this none this | rxd | #98 | 10 |
restock_food | this none this | rxd | #98 | 8 |
remove_roller | this none this | rxd | #98 | 3 |
knock_em_homers | this none this | rxd | #98 | 11 |
@deadstuff | none none none | rxd | #98 | 16 |
@set-sales | none none none | rxd | #98 | 22 |
reset_used_spells | this none this | rxd | #98 | 10 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
awards | #98 | rc | #2 | {} |
do_clean_rooms | #98 | rc | #2 | 1 |
do_restrict_guests | #98 | rc | #2 | 1 |
rollers | #98 | r | #2 | {} |
warehouse | #74 | r | #36 | <clear> |
help_msg | #74 | rc | #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 | #74 | r | #36 | {"@awards", "@addskill", "@deadstuff", "@set-sales"} |
feature_ok | #74 | r | #36 | <clear> |
drop_failed_msg | #5 | rc | #2 | <clear> |
drop_succeeded_msg | #5 | rc | #2 | <clear> |
odrop_failed_msg | #5 | rc | #2 | <clear> |
odrop_succeeded_msg | #5 | rc | #2 | <clear> |
otake_succeeded_msg | #5 | rc | #2 | <clear> |
otake_failed_msg | #5 | rc | #2 | <clear> |
take_succeeded_msg | #5 | rc | #2 | <clear> |
take_failed_msg | #5 | rc | #2 | <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 | #2 | <clear> |
key | #1 | c | #2 | 0 |
aliases | #1 | rc | #2 | {"roleplay regulator", "regulator"} |
description | #1 | rc | #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 | #1 | r | #36 | {23980, 1539462952} |
Ancestry
Ancestors (nearest first): #74 Generic Feature Object → #5 generic thing → #102 subthing → #1 Root Class
Children: none
Call graph
Source
statcost
Referenced by
- #91:@boost line 17:
$rp_regulator:statcost - #91:@boost line 18:
$rp_regulator:statcost - #91:@boost line 27:
$rp_regulator:statcost - #98:max_from_free line 15:
this:statcost - #98:boost_cost line 10:
this:statcost - #98:boost_cost line 11:
this:statcost
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
Referenced by
- #91:@boost line 38:
$rp_regulator:skillcost - #91:@boost line 39:
$rp_regulator:skillcost - #91:@boost line 46:
$rp_regulator:skillcost - #98:max_from_free line 11:
this:skillcost - #98:boost_cost line 15:
this:skillcost - #98:boost_cost line 16:
this:skillcost
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
Referenced by
- #98:parse_stat_level line 27:
this:max_from_free
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
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
Referenced by
- #91:@boost line 17:
$rp_regulator:boost_mod - #91:@boost line 18:
$rp_regulator:boost_mod - #91:@boost line 27:
$rp_regulator:boost_mod - #91:@boost line 38:
$rp_regulator:boost_mod - #91:@boost line 39:
$rp_regulator:boost_mod - #91:@boost line 46:
$rp_regulator:boost_mod - #98:max_from_free line 11:
this:boost_mod - #98:max_from_free line 15:
this:boost_mod - #98:boost_cost line 10:
this:boost_mod - #98:boost_cost line 11:
this:boost_mod - #98:boost_cost line 15:
this:boost_mod - #98:boost_cost line 16:
this:boost_mod
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
Referenced by
none
Source
1if (!caller_perms().wizard) 2return E_PERM; 3endif 4this:mass_advance(); 5this:mass_heal();
mass_advance
Referenced by
- #98:three_fourths_hour line 4:
this:mass_advance
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
Referenced by
- #98:three_fourths_hour line 5:
this:mass_heal
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
Referenced by
- #91:@boost line 5:
$rp_regulator:parse_stat_level - #98:boost_cost line 3:
this:parse_stat_level
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
Referenced by
none
Source
1if (caller_perms().wizard) 2this.awards = {}; 3this.do_restrict_guests = 1; 4this.do_clean_rooms = 1; 5endif 6pass();
@awards
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
Referenced by
- #98:weekly line 4:
this:collect_orphans
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
Referenced by
- #91:follow line 4:
$rp_regulator:person_match_failed - #91:gi*ve line 27:
$rp_regulator:person_match_failed - #104:attack_bypass line 10:
$rp_regulator:person_match_failed - #104:queue_attack line 6:
$rp_regulator:person_match_failed - #120:use line 12:
$rp_regulator:person_match_failed - #143:pub-ban line 5:
$rp_regulator:person_match_failed
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
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
Referenced by
- #141:set_stats line 5:
$rp_regulator:random_stat - #141:set_stats line 6:
$rp_regulator:random_stat - #141:set_stats line 7:
$rp_regulator:random_stat - #141:set_stats line 8:
$rp_regulator:random_stat
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
Referenced by
- #98:weekly line 3:
this:weather - #98:daily line 4:
this:weather
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
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
Referenced by
none
Source
1"Daily tasks"; 2"WIZ PERMS"; 3`this:unstock_surplus() ! ANY => ""'; 4`this:weather() ! ANY => ""';
welfare
Referenced by
- #98:weekly line 5:
this:welfare
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
Referenced by
- #98:daily line 3:
this:unstock_surplus
Source
1"Daily store cleanup."; 2for x in ($object_utils:descendants_suspended($sales_bot)) 3x:_clean_inv(); 4endfor
restock_ammo
Referenced by
- #98:weekly line 6:
this:restock_ammo
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
Referenced by
- #98:weekly line 7:
this:restock_food
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
Referenced by
none
Source
1if (caller_perms().wizard) 2this.rollers = setremove(this.rollers, args[1]); 3endif
knock_em_homers
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
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
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
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