#53206 #53206

Parent Owner Flags Source rpg_march_2006/Features/Kagan's RPG FO.txt

10 verbs · 7 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
gemany none nonerxd#5320632
desany none nonerxd#5320625
pen*alty penfull penaltyfullany none nonerxd#5320613
pstat plocany any anyrxd#532069
dependant_skillsthis none this#5320611
sarcnone none nonerxd#5320630
@ninja*-radarany any anyrxd#5320613
surveyany none nonerxd#5320663
make_scrollthis none this#5320633
@itemany none nonerxd#532065

Properties

PropertyDefinerFlagsOwnerValue
help_msg#53206"Ha! They won't get rid of me that easily! Er..."
feature_verbs#53206{"@ninja-radar", "sarc", "gem", "ploc", "des"}
guest_ok#532061
key#53206not readable (E_PERM)
aliases#53206{"Kagan's RPG FO"}
description#53206"LRPG stuff that actually tells useful information and aren't just shortcuts for lazy typists."
object_size#53206{17447, 1141286927}

Ancestry

Ancestors (nearest first): none

Children: none

Call graph

calls n53206_2 #53206:pen*alty n53206_4 #53206:dependant_skills n53206_2->n53206_4 n53206_4->n53206_4 n53206_7 #53206:survey n15870_5 #15870:graph n53206_7->n15870_5

Source

gem

Spec any none noneFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: gem <object/player>";
2"Gives you a list of all the gems carried in/by <object/player>, their values, and the total.";
3if (!valid(dobj))
4  target = $string_utils:match_player(dobjstr);
5else
6  target = dobj;
7endif
8if (!valid(target))
9  return player:tell("I don't see that here.");
10endif
11player:tell($string_utils:nn(target));
12total = 0;
13what = target;
14lastloc = #-1;
15for gem in ($object_utils:all_contents(what))
16  $command_utils:suspend_if_needed(5);
17  if ($object_utils:isa(gem, #25600))
18    if (gem.appraised_value)
19      val = gem.appraised_value;
20      total = total + val;
21    else
22      val = "-NA-";
23    endif
24    if (gem.location != lastloc)
25      player:tell("----");
26      player:tell("Inside: ", gem.location.name);
27      lastloc = gem.location;
28    endif
29    player:tell_lines($string_utils:columnize({gem.name, val}, 2));
30  endif
31endfor
32player:tell("Total: $", total, " in gold.");

des

Spec any none noneFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: des <object>";
2"Gives a list of names, object #'s, and locations of the kids of <object>.";
3if (!valid(dobj))
4  return player:tell("Want to try that again?");
5endif
6if (dobj == #348)
7  return player:tell(">> Try typing 'sarc' instead.");
8endif
9number = length(kiddies = children(dobj));
10x = number;
11player:tell_lines($string_utils:columnize({"Name", "Number", "Location", ""}, 4));
12player:tell_lines($string_utils:columnize({"----", "------", "--------", ""}, 4));
13for what in (kiddies[1..x])
14  $command_utils:suspend_if_needed(5);
15  if (valid(what.location))
16    locname = what.location.name;
17    location = what.location;
18  else
19    locname = "Nowhere";
20    location = "";
21  endif
22  player:tell_lines($string_utils:columnize({what.name, what, locname, location}, 4));
23endfor
24player:tell("--------------");
25player:tell($string_utils:nn(dobj), ": ", x, " total");

pen*alty penfull penaltyfull

Spec any none noneFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: penalty <skill>";
2"Where <skill> is any RPG skill that appears on the slip.  The learn rate helps determine how often a stat will go up.";
3skillstr = dobjstr;
4if (valid(skill = $local.rpg:match_skill(skillstr)))
5  learn = skill.learn;
6  player:tell("Skill: ", skill.name, ", Learn rate: ", learn);
7  if (verb in {"penfull", "penaltyfull"})
8    string = setremove(this:dependant_skills(skill, {}), skill);
9    player:tell("Parent skills: ", $string_utils:english_list($list_utils:map_prop(string, "name")));
10  endif
11else
12  player:tell("No such skill.");
13endif

pstat ploc

Spec any any anyFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: ploc/pstat <player>";
2"This does the exact same thing that loc does on Kristia's FO (#57580) but this one only works on other players.";
3if (valid(dobj = $string_utils:match_player(argstr)))
4  player:tell($string_utils:nn(dobj));
5  #15870:sc();
6  player:tell(dobj.psc, " is currently at ", $string_utils:nn(dobj.location), ".");
7else
8  player:tell("There is no player by that name.");
9endif

dependant_skills

Spec this none thisDefiner #53206

Referenced by

Source

1{skill, total} = args;
2total = listappend(total, skill);
3depends = skill.dependant;
4if (depends == {{}, {}})
5  return total;
6endif
7depends = $list_utils:append(depends[1], depends[2]);
8for dep in (depends)
9  total = this:dependant_skills(dep, total);
10endfor
11return total;

sarc

Spec none none noneFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: sarc";
2"Yes, the name of the original Spiderknight.  This will hopefully tell you which Spiderknights are alive, who they're hunting, what they're hunting, etc.   Thank Lothian for the rebirth of this verb.";
3spiders = children(#348);
4total = 0;
5for spider in (spiders)
6  if (spider.location == #10555)
7    spiders = setremove(spiders, spider);
8  endif
9endfor
10total = length(spiders);
11if (!total)
12  return player:tell("They're all dead.  :(");
13endif
14player:tell_lines($string_utils:columnize({"Drider", "Hunting", "Wielding", "Location"}, 4));
15player:tell_lines($string_utils:columnize({"~~~~~~", "~~~~~~~", "~~~~~~~~", "~~~~~~~~"}, 4));
16for drider in (spiders)
17  if (valid(drider.hunted))
18    hunted = drider.hunted.name;
19  else
20    hunted = "No one";
21  endif
22  if (valid(drider.location))
23    loc = drider.location.name;
24  else
25    loc = "Limbo";
26  endif
27  player:tell_lines($string_utils:columnize({drider.name, hunted, drider.mimic.name, loc}, 4));
28endfor
29player:tell("~~~~~~");
30player:tell("There are ", total, " Spiderknights alive and kicking.");

@ninja*-radar

Spec any any anyFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: @ninja-radar <on/off>";
2"Turning this on will automatically notify you when the ninja is getting close to rebirth.";
3if (!(argstr in {"on", "off"}))
4  return player:tell("You can only turn the ninja radar 'on' or 'off'.");
5elseif (argstr == "on")
6  player:tell("You turn your ninja radar on.");
7  player.location:announce_all_but({player}, player.name, " turns ", player.pp, " ninja radar on.");
8  this.ninja_watchers = setadd(this.ninja_watchers, player);
9else
10  player:tell("You turn your ninja radar off.");
11  player.location:announce_all_but({player}, player.name, " turns ", player.pp, " ninja radar off.");
12  this.ninja_watchers = setremove(this.ninja_watchers, player);
13endif

survey

Spec any none noneFlags rxdDefiner #53206

Referenced by

none

Source

1"Usage: survey <whatever>";
2"survey          -> survey of the room you're in";
3"survey <player> -> survey of the room <player> is in";
4"survey <room#>  -> survey of <room>";
5"Prints a sorted list of all the connected players in a room, their gender, age (if registered with the birthday machine), age in months, idle time, and their shortest alias.  People who are idle more than 5 minutes are bumped to the bottom of the list.";
6if (dobjstr == "")
7  loc = player.location;
8else
9  if ((typeof(dobjstr) == STR) && valid(loc = $string_utils:match_player(dobjstr)))
10  else
11    loc = dobj;
12  endif
13endif
14if (!valid(loc))
15  return player:tell("Hrm, invalid target.");
16endif
17if (is_player(loc))
18  loc = loc.location;
19endif
20{male, female, other} = {{}, {}, {}};
21player:tell($string_utils:nn(loc));
22player:tell_lines($string_utils:columnize({"Person", "Gender", "Age", "Months", "Idle", "Alias"}, 6));
23player:tell_lines($string_utils:columnize({"------", "------", "---", "-------", "----", "-----"}, 6));
24players = $set_utils:intersection(connected_players(), loc.contents);
25idlers = {};
26for who in (players)
27  if (idle_seconds(who) > 300)
28    idlers = setadd(idlers, who);
29  else
30    try
31      if (who.ps == "she")
32        female = setadd(female, who);
33      elseif (who.ps == "he")
34        male = setadd(male, who);
35      else
36        other = setadd(other, who);
37      endif
38    except (E_PERM)
39      other = setadd(other, who);
40    endtry
41  endif
42endfor
43c = 0;
44for grouping in ({female, male, other, idlers})
45  c = c + 1;
46  $command_utils:suspend_if_needed();
47  if ((c == 4) && (grouping != {}))
48    player:tell("-Idle-");
49  endif
50  for who in (grouping)
51    $command_utils:suspend_if_needed();
52    alias = $list_utils:shortest(who.aliases);
53    idle = #15870:abbr_time(sec = idle_seconds(who));
54    age = #36714:age(who);
55    vage = #36714:vage(who);
56    try
57      player:tell_lines($string_utils:columnize({who.name, who.gender, age, vage, idle, alias}, 6));
58    except (E_PERM)
59      player:tell_lines($string_utils:columnize({who.name, "Hidden", age, vage, idle, alias}, 6));
60    endtry
61  endfor
62endfor
63player:tell("~~~~~~~~FIN~~~~~~~~");

make_scroll

Spec this none thisDefiner #53206

Referenced by

none

Source

1":make_scroll(header, body) => Return a scroll with the header centered at the top and the body of text centered beneath it, all inside an ASCII scroll.";
2{header, body} = args;
3if (typeof(body) == STR)
4  body = {body};
5elseif (typeof(body) != LIST)
6  return E_INVARG;
7endif
8header_length = length(header);
9if ($math_utils:mod(header_length, 2) == 1)
10  header = tostr(header, " ");
11  header_length = header_length + 1;
12endif
13margin = 6;
14body_length = 58;
15extra_h_margin = (body_length - header_length) / 2;
16scroll = this.scroll_header;
17header_margin = tostr($string_utils:space(margin + extra_h_margin, " "));
18scroll = {@scroll, tostr("  |", header_margin, header, header_margin, "|"), this.scroll_blank};
19for elem in (body)
20  elem = $player:linesplit(elem, body_length);
21  for line in (elem)
22    line_length = length(line);
23    if ($math_utils:mod(line_length, 2) == 1)
24      line = tostr(line, " ");
25      line_length = line_length + 1;
26    endif
27    extra_l_margin = (body_length - line_length) / 2;
28    line_margin = tostr($string_utils:space(margin + extra_l_margin, " "));
29    scroll = {@scroll, tostr("  |", line_margin, line, line_margin, "|")};
30  endfor
31endfor
32scroll = {@scroll, @this.scroll_ending};
33return scroll;

@item

Spec any none noneFlags rxdDefiner #53206

Referenced by

none

Source

1if (valid(res = $local.rpg.dispenser:match_dispensed(dobjstr)))
2  return player:tell($string_utils:nn(res));
3else
4  return player:tell("No match found.");
5endif