System Object #0

Parent #1Owner #10Flags readSource MurpgCore-0.4/MurpgCore-0.4.db

12 verbs · 103 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
do_login_commandthis none thisrxd#046
do_prompt_taskthis none thisrwxd#056
user_connectedthis none thisrwxd#023
welcome_msgthis none thisrwxd#02
checkpoint_startedthis none thisrwxd#02
checkpoint_finishedthis none thisrwxd#07
user_reconnectedthis none thisrwxd#05
user_disconnectedthis none thisrwxd#06
user_client_disconnectedthis none thisrwxd#02
shutdownthis none thisrwxd#022
server_startedthis none thisrwxd#04
get_next_help_idthis none thisrwxd#06

Properties

PropertyDefinerFlagsOwnerValue
esc#0#10"\u001b"
room#0rw#10#2
utils#0rw#10#20
recycler#0rw#10#24
anonymous#0rw#10#25
architect#0rw#10#8
player#0rw#10#6
coder#0rw#10#9
dm#0rw#10#10
exit#0rw#10#13
door#0rw#10#16
window#0rw#10#17
reusable#0rw#10#22
game_object#0rw#10#11
nothing#0rw#10#-1
failed_match#0rw#10#-3
ambiguous_match#0rw#10#-2
animate#0rw#10#3
black#0rw#10"[0;30m"
red#0rw#10"[0;31m"
green#0rw#10"[0;32m"
yellow#0rw#10"[0;33m"
blue#0rw#10"[0;34m"
magenta#0rw#10"[0;35m"
cyan#0rw#10"[0;36m"
white#0rw#10"[0;37m"
bblack#0rw#10"[1;30m"
bred#0rw#10"[1;31m"
bgreen#0rw#10"[1;32m"
byellow#0rw#10"[1;33m"
bblue#0rw#10"[1;34m"
bmegenta#0rw#100
bcyan#0rw#10"[1;36m"
bwhite#0rw#10"[1;37m"
bmagenta#0rw#10"[1;35m"
color_codes#0rw#10
list of 16{"%K", "%r", "%g", "%y", "%b", "%m", "%c", "%w", "%K", "%R", "%G", "%Y", "%B", "%M", "%C", "%W"}
raw_colors#0rw#10
list of 16{"\u001b[0;30m", "\u001b[0;31m", "\u001b[0;32m", "\u001b[0;33m", "\u001b[0;34m", "\u001b[0;35m", "\u001b[0;36m", "\u001b[0;37m", "\u001b[1;30m", "\u001b[1;31m", "\u001b[1;32m", "\u001b[1;33m", "\u001b[1;34m", "\u001b[1;35m", "\u001b[1;36m", "\u001b[1;37m"}
server_options#0rw#10#0
fg_ticks#0rw#10100000
fg_seconds#0rw#105
admins#0rw#10{#4, #5, #51}
banner#0rw#10{"OpenBSD 2.8 (GENERIC) #399: Mon Nov 6 10:59:23 MST 2000"}
log#0rw#10#43
last_help_topic#0rw#10100
max_msg_box_size#0rw#103000
max_msg_length#0rw#10350
languages#0rw#10{#63, #75}
default_language#0rw#10#63
editor#0rw#10#58
next_help_id#0rw#10"A10188"
start_time#0rw#101030237770
max_connected#0rw#10{1, 1030237775}
banner_small#0rw#10" %r---===>>>%R>>>%B>>> Murpg Core <<<%R<<<%r<<<===---%w"
connect_timeout#0rw#1030
container#0rw#10#19
wearable#0rw#10#41
male#0rw#10{"man", "he", "him", "his", "his", "himself"}
female#0rw#10{"woman", "she", "her", "hers", "her", "herself"}
neither#0rw#10{"neuter", "it", "it", "its", "its", "itself"}
str_weight_table#0rw#10
list of 20{20, 25, 30, 35, 40, 50, 60, 70, 80, 90, 100, 110, 120, 140, 170, 200, 300, 400, 500, 600}
channels#0rw#10#68
bad_command#0rw#10"I couldn't understand that."
safety_lock#0rw#101
dex_ac_table#0rw#10
list of 20{5, 4, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2, -2, -3, -4, -5}
who#0rw#10#64
both#0rw#10{"gynander", "et", "et", "ets", "ets", "etself"}
combat#0rw#10#42
dex_thac0_table#0rw#10
list of 20{-3, -2, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3}
str_dam_table#0rw#10
list of 20{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 3, 4, 5}
spd_att_table#0rw#10
list of 20{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4}
dex_init_table#0rw#10
list of 20{3, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2, -2, -3, -3, -3}
spd_init_table#0rw#10
list of 20{3, 3, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, -1, -1, -1, -2, -2, -3, -3, -3}
bg_ticks#0rw#1050000
str_end_table#0rw#10
list of 20{-50, -40, -30, -20, -10, -5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 10, 20, 30, 40, 50}
con_end_table#0rw#10
list of 20{-50, -40, -30, -20, -10, -5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 10, 20, 30, 40, 50}
con_hp_regen_table#0rw#10
list of 20{-3, -2, -2, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 2, 3}
ticker#0rw#10#52
spell#0rw#10#49
weapon#0rw#10#76
shield#0rw#10#77
shutdown_pid#0rw#100
language#0rw#10#96
default_prompt#0rw#10"%B[%dhp%hp%B/%c%HP%B][%df%f%B/%c%F%B][%de%e%B/%c%E%B]%w "
banner_old#0rw#10
list of 13{" __ ___ ______ ", " / |/ /_ ___________ ____ _ / ____/___ ________ ", " / /|_/ / / / / ___/ __ \\/ __ `/ / / / __ \\/ ___/ _ \\ ", " / / / / /_/ / / / /_/ / /_/ / / /___/ /_/ / / / __/ ", " /_/ /_/\\__,_/_/ / .___/\\__, / \\____/\\____/_/ \\___/ ", " /_/ /____/ ", "", " --------========[ Compatible with All Future Technologies", "", "", "", "", ""}
player_species#0rw#10{#67, #84, #89}
genders#0rw#10{"female", "male", "both", "neither"}
exit_size_enc#0rw#10
list of 9{30, 50, 60, 80, 100, 150, 200, 250, 500}
letters#0rw#10"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
key#0rw#10#72
description#1rw#10<clear>
aliases#1rw#10<clear>
home#1rw#10<clear>
short_desc#1rw#10<clear>
core#1rw#101
handedness#1rw#10<clear>
base_enc#1rw#10<clear>
base_weight#1rw#10<clear>
capacity#1rw#10<clear>
max_fit#1rw#10<clear>
pprep#1rw#10<clear>
gprep#1rw#10<clear>
generic_name#1rw#10<clear>
age#1rw#10<clear>

Ancestry

Ancestors (nearest first): #1 Root Class

Children: none

Call graph

calls n0_0 #0:do_login_command n20_7 #20:match n0_0->n20_7 n43_0 #43:add_entry n0_0->n43_0 n0_2 #0:user_connected n0_2->n43_0 n3_2 #3:tell n0_2->n3_2 n0_4 #0:checkpoint_started n0_4->n43_0 n0_5 #0:checkpoint_finished n0_5->n43_0 n0_6 #0:user_reconnected n0_6->n43_0 n0_7 #0:user_disconnected n0_7->n43_0 n3_76 #3:set_disconnect_info n0_7->n3_76 n0_8 #0:user_client_disconnected n0_8->n43_0 n0_8->n3_76 n0_9 #0:shutdown n0_9->n43_0 n0_9->n3_2 n0_10 #0:server_started n0_10->n43_0

Source

do_login_command

Spec this none thisFlags rxdOwner #10Definer #0

Referenced by

none

Source

1"#0.do_login_command([str name [str passwd]]);";
2"called with no args when connection first comes in,";
3"and then whenever someone types a command after getting";
4"connected.  if name and password both typed (two tokens)";
5"then will try to connect as player args1 with passwd args2";
6"if only name is specified, then will prompt for passwd, and";
7"do a force_input() with both name and passwd.  this is because";
8"server doesn't allow the do_login_command to suspend, and a call";
9"to read() forces a suspend().";
10{?name = "", ?typedpass = ""} = args;
11valid = 0;
12auth = 0;
13is_connected = 0;
14pc = 0;
15if (argstr == "")
16for each in ($banner)
17notify(player, each);
18endfor
19notify(player, "~Type your name to log in: ");
20return 0;
21elseif ((name != "") && (typedpass == ""))
22notify(player, "~Password: ");
23typedpass = read(player, 0);
24if (typedpass == "")
25typedpass = "crap";
26endif
27force_input(player, (name + " ") + typedpass, 1);
28elseif ((name != "") && (typedpass != ""))
29"exact match, name only";
30matchlist = $utils:match(name, players(), 1, 1);
31valid = length(matchlist) == 1;
32if (valid)
33{pc} = matchlist;
34auth = crypt(typedpass, pc.password[1..2]) == pc.password;
35is_connected = pc in connected_players();
36endif
37if ((auth && (!is_connected)) && valid)
38return pc;
39else
40notify(player, "Either that player does not exist, is currently logged in, or the password you typed is incorrect.");
41$log:add_entry("login", $log.log_levels[2], (("Failed login on " + connection_name(player)) + "  ") + name);
42notify(player, "");
43force_input(player, "");
44return 0;
45endif
46endif

do_prompt_task

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"#0:do_prompt_task";
2targ = args[1];
3prompt_str = targ.prompt_string;
4maxhp = targ:max_hp();
5curhp = targ.cur_hp;
6maxf = targ:max_focus();
7curf = targ.cur_focus;
8maxe = targ:max_endurance();
9cure = targ.cur_endurance;
10hpdam = (curhp * 100) / maxhp;
11fdam = (curf * 100) / maxf;
12edam = (cure * 100) / maxe;
13if (curhp == maxhp)
14hpcol = targ.prompt_colors[1];
15elseif (hpdam >= 75)
16hpcol = targ.prompt_colors[2];
17elseif (hpdam >= 50)
18hpcol = targ.prompt_colors[3];
19elseif (hpdam >= 25)
20hpcol = targ.prompt_colors[4];
21else
22hpcol = targ.prompt_colors[5];
23endif
24if (curf == maxf)
25fcol = targ.prompt_colors[6];
26elseif (fdam >= 75)
27fcol = targ.prompt_colors[7];
28elseif (fdam >= 50)
29fcol = targ.prompt_colors[8];
30elseif (fdam >= 25)
31fcol = targ.prompt_colors[9];
32else
33fcol = targ.prompt_colors[10];
34endif
35if (cure == maxe)
36ecol = targ.prompt_colors[11];
37elseif (edam >= 75)
38ecol = targ.prompt_colors[12];
39elseif (edam >= 50)
40ecol = targ.prompt_colors[13];
41elseif (edam >= 25)
42ecol = targ.prompt_colors[14];
43else
44ecol = targ.prompt_colors[15];
45endif
46codes = {"%n", "%hp", "%HP", "%f", "%F", "%e", "%E", "%dhp", "%df", "%de"};
47values = {targ.name, tostr(curhp), tostr(maxhp), tostr(curf), tostr(maxf), tostr(cure), tostr(maxe), hpcol, fcol, ecol};
48for x in [1..length(codes)]
49new = strsub(prompt_str, codes[x], values[x], 1);
50prompt_str = new;
51endfor
52if (targ.afk)
53prompt_str = "%B[%cAFK%B]%w" + prompt_str;
54endif
55targ:tell("");
56targ:tell(("~" + "%w") + prompt_str);

user_connected

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"#0:user_connected this none this";
2" called with args[1]=player that just connected by do_login_command ";
3"  upon a valid player connecting to moo. ";
4" we need it to set up the player's prompt connection option. ";
5{player} = args;
6$log:add_entry("connection", "[INFO]", ((((player.name + " (") + tostr(player)) + ") has connected (") + connection_name(player)) + ").");
7"set $max_connected if applicable";
8curlen = length(connected_players());
9if (curlen >= $max_connected[1])
10$max_connected = {curlen, time()};
11endif
12if (player.prompt_on == 1)
13set_connection_option(player, "prompt", 1);
14endif
15player:tell("");
16player:tell($welcome_msg());
17player:tell("");
18force_input(player, "look");
19if (player.messages != {})
20player:tell("%YYou have messages.  Type 'msg view' to see them.%w");
21endif
22player:tell();
23return 0;

welcome_msg

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"called by user_connected";
2return "%WWelcome to Murpg Core! Enjoy your stay, and write some damn code...%w";

checkpoint_started

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"$checkpoint_started() this none this";
2$log:add_entry("system", "[INFO]", "Checkpoint started.");

checkpoint_finished

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"$checkpoint_finished() this none this";
2{success} = args;
3if (success)
4$log:add_entry("system", "[INFO]", "Checkpoint finished (success).");
5else
6$log:add_entry("system", "[ERROR]", "Checkpoint finished (failure).");
7endif

user_reconnected

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1{player} = args;
2$log:add_entry("connection", "[WARNING]", ((((player.name + " (") + tostr(player)) + ") has redirected connection (") + connection_name(player)) + ").");
3if (player.prompt_on == 1)
4set_connection_option(player, "prompt", 1);
5endif

user_disconnected

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1if (!valid(player))
2$log:add_entry("login", "[INFO]", ((connection_name(player) + " (") + tostr(player)) + ") has timed out.");
3else
4player:set_disconnect_info();
5$log:add_entry("connection", "[INFO]", ((player.name + " (") + tostr(player)) + ") has disconnected.");
6endif

user_client_disconnected

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1player:set_disconnect_info();
2$log:add_entry("connection", "[INFO]", ((player.name + " (") + tostr(player)) + ") has (client) disconnected.");

shutdown

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"$shutdown this none this";
2{when, why} = args;
3if (when == 0)
4$log:add_entry("system", "[WARNING]", (player.name + " has initiated immediate server shutdown: ") + why);
5"shutdown(why)";
6#5:tell("server shutdown");
7#4:tell("server shutdown");
8else
9fork pid (when)
10$log:add_entry("system", "[INFO]", ((((((player.name + " has initiated server shutdown [") + tostr(when)) + "]: ") + why) + " [PID = ") + tostr(pid)) + "]");
11$shutdown_pid = 0;
12"shutdown(why)";
13#5:tell("server shutdown");
14#4:tell("server shutdown");
15endfork
16$shutdown_pid = pid;
17"{days, hours, minutes, seconds} = $utils:dhms(when)";
18for each in (connected_players())
19each:tell(((((("%W" + player.name) + " has initiated server shutdown.%w  The server will be shutdown in ") + tostr(when)) + " seconds.  %Y") + why) + "%w");
20endfor
21$log:add_entry("system", "[INFO]", (((("Server will be shutdown in " + tostr(when)) + " seconds.  [PID = ") + tostr(pid)) + "]  ") + why);
22endif

server_started

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"#0:server_started this none this";
2$log:add_entry("system", "[INFO]", "Server has started.");
3$start_time = time();
4$max_connected = {0, 0};

get_next_help_id

Spec this none thisFlags rwxdOwner #10Definer #0

Referenced by

none

Source

1"$get_next_help_id this none this";
2"returns the next available article num for help db topics.";
3current_id = tonum($next_help_id[2..$]);
4next_id = current_id + 1;
5$next_help_id = "A" + tostr(next_id);
6return "A" + tostr(current_id);