school explosion bomb #165

Parent #108Owner #2Flags Source RPG Core/rpgcore-patched.db

Aliases: explosion bomb, bomb

1 verbs · 28 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
dr*op th*rowthis none nonerxd#16541

Properties

PropertyDefinerFlagsOwnerValue
min#165rc#21
max#165rc#28
returning#108rc#2<clear>
how_long#108rc#2<clear>
been_told#108rc#2<clear>
home#108rc#2<clear>
child_limit#108rc#2<clear>
recycle_at_death#108rc#2<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
list of 7{"Dig a room for the classroom hallway. Go to that room.", "Decide on the stat/skill/language to be taught. Be prepared to spell out the word completely & correctly, and add a tilde (~) to the end of any language name you chose.", "Decide on who will own the rooms.", "@set explosion.min to the lowest level of training (1-8)", "@set explosion.max to the highest level of training (1-8)", "Drop da bomb.", "Customize the rooms, if you want."}
key#1c#20
aliases#1rc#2{"explosion bomb", "bomb"}
description#1rc#2"A shiny metal sphere. (Type 'help explosion' for instructions.)"
object_size#1r#36{0, 0}
html#1rc#2<clear>

Ancestry

Ancestors (nearest first): #108 generic replicating & returning thing#5 generic thing#102 subthing#1 Root Class

Children: none

Call graph

calls n165_0 #165:dr*op n5_1 #5:dr*op n165_0->n5_1 n52_5 #52:isa n165_0->n52_5 n6_18 #6:tell n165_0->n6_18 n56_4 #56:yes_or_no n165_0->n56_4 n56_2 #56:read n165_0->n56_2 n56_1 #56:player_match_result n165_0->n56_1 n20_20 #20:match_player n165_0->n20_20 n129_7 #129:match_lang n165_0->n129_7 n80_21 #80:summarize_one_user n165_0->n80_21 n80_10 #80:get_quota n165_0->n80_10 n20_59 #20:name_and_number n165_0->n20_59 n63_2 #63:_create n165_0->n63_2 n21_1 #21:set_names n165_0->n21_1

Source

dr*op th*row

Spec this none noneFlags rxdOwner #2Definer #165

Referenced by

none

Source

1pass(@args);
2player.location:announce_all("tick...tick...tick");
3lobby = this.location;
4if ($object_utils:isa(lobby, $veroom) && (!$object_utils:isa(lobby, $school)))
5if (!player.wizard)
6return player:tell("This bomb needs to be dropped by a wizard.");
7elseif (length(lobby.virtual_exits) > 1)
8return player:tell("There should only be one exit from this room. Remove the exits to other rooms and recycle the rooms if needed. If this is already the lobby of an existing school, you can clean it with the 'school implosion bomb'.");
9elseif ($command_utils:yes_or_no("Do you know the stat or skill taught at this school, and the builder character you wish to own the rooms?"))
10oname = $command_utils:read("who will own this school");
11sname = $command_utils:read("which skill or stat will be taught (a blank response will be interpreted as general knowledge)");
12if ($command_utils:player_match_failed(owner = $string_utils:match_player(oname), oname))
13return;
14elseif (((sname && (!(sname in $rpgamer.skills[1]))) && (!(sname in $rpgamer.stats[1]))) && (!valid($school:match_lang(sname + "~"))))
15return player:tell("\"", sname, "\" is not a valid skill.");
16elseif (($quota_utils:summarize_one_user(owner)[1] + 20000) > $quota_utils:get_quota(owner))
17return player:tell("Increase the quota of ", $string_utils:nn(owner), " by about 20000 bytes and try again.");
18else
19chparent(lobby, $lobby);
20english = {"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight"};
21for x in [this.min..this.max]
22class = $recycler:_create($school, owner);
23class:moveto(lobby.location);
24$building_utils:set_names(class, tostr("Class Level ", x));
25class.virtual_exits = {{{"Out [o]", "out", "o", "exit", "leave"}, lobby, 0}};
26entrance = {{tostr(english[x], " [", x, "]"), english[x], tostr(x)}, class, 0};
27lobby.virtual_exits = {@lobby.virtual_exits, entrance};
28class.level = x;
29class.skill = valid($school:match_lang(sname + "~")) ? sname + "~" | sname;
30if (sname[$] == "~")
31class.skill_cutoff_mod = 0.25;
32else
33class.skill_cutoff_mod = 0.5;
34endif
35endfor
36lobby:announce_all("[red]KA-BOOM![normal]");
37endif
38endif
39else
40return player:tell("This room has to have virtual exits and NOT be an existing classroom.");
41endif