System Object #0
12 verbs · 103 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
do_login_command | this none this | rxd | #0 | 46 |
do_prompt_task | this none this | rwxd | #0 | 56 |
user_connected | this none this | rwxd | #0 | 23 |
welcome_msg | this none this | rwxd | #0 | 2 |
checkpoint_started | this none this | rwxd | #0 | 2 |
checkpoint_finished | this none this | rwxd | #0 | 7 |
user_reconnected | this none this | rwxd | #0 | 5 |
user_disconnected | this none this | rwxd | #0 | 6 |
user_client_disconnected | this none this | rwxd | #0 | 2 |
shutdown | this none this | rwxd | #0 | 22 |
server_started | this none this | rwxd | #0 | 4 |
get_next_help_id | this none this | rwxd | #0 | 6 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
esc | #0 | | #10 | "\u001b" |
room | #0 | rw | #10 | #2 |
utils | #0 | rw | #10 | #20 |
recycler | #0 | rw | #10 | #24 |
anonymous | #0 | rw | #10 | #25 |
architect | #0 | rw | #10 | #8 |
player | #0 | rw | #10 | #6 |
coder | #0 | rw | #10 | #9 |
dm | #0 | rw | #10 | #10 |
exit | #0 | rw | #10 | #13 |
door | #0 | rw | #10 | #16 |
window | #0 | rw | #10 | #17 |
reusable | #0 | rw | #10 | #22 |
game_object | #0 | rw | #10 | #11 |
nothing | #0 | rw | #10 | #-1 |
failed_match | #0 | rw | #10 | #-3 |
ambiguous_match | #0 | rw | #10 | #-2 |
animate | #0 | rw | #10 | #3 |
black | #0 | rw | #10 | "[0;30m" |
red | #0 | rw | #10 | "[0;31m" |
green | #0 | rw | #10 | "[0;32m" |
yellow | #0 | rw | #10 | "[0;33m" |
blue | #0 | rw | #10 | "[0;34m" |
magenta | #0 | rw | #10 | "[0;35m" |
cyan | #0 | rw | #10 | "[0;36m" |
white | #0 | rw | #10 | "[0;37m" |
bblack | #0 | rw | #10 | "[1;30m" |
bred | #0 | rw | #10 | "[1;31m" |
bgreen | #0 | rw | #10 | "[1;32m" |
byellow | #0 | rw | #10 | "[1;33m" |
bblue | #0 | rw | #10 | "[1;34m" |
bmegenta | #0 | rw | #10 | 0 |
bcyan | #0 | rw | #10 | "[1;36m" |
bwhite | #0 | rw | #10 | "[1;37m" |
bmagenta | #0 | rw | #10 | "[1;35m" |
color_codes | #0 | rw | #10 | list of 16{"%K", "%r", "%g", "%y", "%b", "%m", "%c", "%w", "%K", "%R", "%G", "%Y", "%B", "%M", "%C", "%W"} |
raw_colors | #0 | rw | #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 | #0 | rw | #10 | #0 |
fg_ticks | #0 | rw | #10 | 100000 |
fg_seconds | #0 | rw | #10 | 5 |
admins | #0 | rw | #10 | {#4, #5, #51} |
banner | #0 | rw | #10 | {"OpenBSD 2.8 (GENERIC) #399: Mon Nov 6 10:59:23 MST 2000"} |
log | #0 | rw | #10 | #43 |
last_help_topic | #0 | rw | #10 | 100 |
max_msg_box_size | #0 | rw | #10 | 3000 |
max_msg_length | #0 | rw | #10 | 350 |
languages | #0 | rw | #10 | {#63, #75} |
default_language | #0 | rw | #10 | #63 |
editor | #0 | rw | #10 | #58 |
next_help_id | #0 | rw | #10 | "A10188" |
start_time | #0 | rw | #10 | 1030237770 |
max_connected | #0 | rw | #10 | {1, 1030237775} |
banner_small | #0 | rw | #10 | " %r---===>>>%R>>>%B>>> Murpg Core <<<%R<<<%r<<<===---%w" |
connect_timeout | #0 | rw | #10 | 30 |
container | #0 | rw | #10 | #19 |
wearable | #0 | rw | #10 | #41 |
male | #0 | rw | #10 | {"man", "he", "him", "his", "his", "himself"} |
female | #0 | rw | #10 | {"woman", "she", "her", "hers", "her", "herself"} |
neither | #0 | rw | #10 | {"neuter", "it", "it", "its", "its", "itself"} |
str_weight_table | #0 | rw | #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 | #0 | rw | #10 | #68 |
bad_command | #0 | rw | #10 | "I couldn't understand that." |
safety_lock | #0 | rw | #10 | 1 |
dex_ac_table | #0 | rw | #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 | #0 | rw | #10 | #64 |
both | #0 | rw | #10 | {"gynander", "et", "et", "ets", "ets", "etself"} |
combat | #0 | rw | #10 | #42 |
dex_thac0_table | #0 | rw | #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 | #0 | rw | #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 | #0 | rw | #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 | #0 | rw | #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 | #0 | rw | #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 | #0 | rw | #10 | 50000 |
str_end_table | #0 | rw | #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 | #0 | rw | #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 | #0 | rw | #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 | #0 | rw | #10 | #52 |
spell | #0 | rw | #10 | #49 |
weapon | #0 | rw | #10 | #76 |
shield | #0 | rw | #10 | #77 |
shutdown_pid | #0 | rw | #10 | 0 |
language | #0 | rw | #10 | #96 |
default_prompt | #0 | rw | #10 | "%B[%dhp%hp%B/%c%HP%B][%df%f%B/%c%F%B][%de%e%B/%c%E%B]%w " |
banner_old | #0 | rw | #10 | list of 13{" __ ___ ______ ", " / |/ /_ ___________ ____ _ / ____/___ ________ ", " / /|_/ / / / / ___/ __ \\/ __ `/ / / / __ \\/ ___/ _ \\ ", " / / / / /_/ / / / /_/ / /_/ / / /___/ /_/ / / / __/ ", " /_/ /_/\\__,_/_/ / .___/\\__, / \\____/\\____/_/ \\___/ ", " /_/ /____/ ", "", " --------========[ Compatible with All Future Technologies", "", "", "", "", ""} |
player_species | #0 | rw | #10 | {#67, #84, #89} |
genders | #0 | rw | #10 | {"female", "male", "both", "neither"} |
exit_size_enc | #0 | rw | #10 | list of 9{30, 50, 60, 80, 100, 150, 200, 250, 500} |
letters | #0 | rw | #10 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" |
key | #0 | rw | #10 | #72 |
description | #1 | rw | #10 | <clear> |
aliases | #1 | rw | #10 | <clear> |
home | #1 | rw | #10 | <clear> |
short_desc | #1 | rw | #10 | <clear> |
core | #1 | rw | #10 | 1 |
handedness | #1 | rw | #10 | <clear> |
base_enc | #1 | rw | #10 | <clear> |
base_weight | #1 | rw | #10 | <clear> |
capacity | #1 | rw | #10 | <clear> |
max_fit | #1 | rw | #10 | <clear> |
pprep | #1 | rw | #10 | <clear> |
gprep | #1 | rw | #10 | <clear> |
generic_name | #1 | rw | #10 | <clear> |
age | #1 | rw | #10 | <clear> |
Ancestry
Ancestors (nearest first): #1 Root Class
Children: none
Call graph
Source
do_login_command
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
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
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
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
Referenced by
none
Source
1"$checkpoint_started() this none this"; 2$log:add_entry("system", "[INFO]", "Checkpoint started.");
checkpoint_finished
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
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
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
Referenced by
none
Source
1player:set_disconnect_info(); 2$log:add_entry("connection", "[INFO]", ((player.name + " (") + tostr(player)) + ") has (client) disconnected.");
shutdown
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
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
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);