… | |
… | |
161 | char namebuf[MAX_BUF]; |
161 | char namebuf[MAX_BUF]; |
162 | int login_order; |
162 | int login_order; |
163 | } chars_names; |
163 | } chars_names; |
164 | |
164 | |
165 | int |
165 | int |
166 | command_afk (object *op, char *params) |
|
|
167 | { |
|
|
168 | if ((op->contr->ns->afk = !op->contr->ns->afk)) |
|
|
169 | new_draw_info (NDI_UNIQUE, 0, op, "You are no longer AFK"); |
|
|
170 | else |
|
|
171 | new_draw_info (NDI_UNIQUE, 0, op, "You are now AFK"); |
|
|
172 | |
|
|
173 | return 1; |
|
|
174 | } |
|
|
175 | |
|
|
176 | int |
|
|
177 | command_mapinfo (object *op, char *params) |
166 | command_mapinfo (object *op, char *params) |
178 | { |
167 | { |
179 | current_map_info (op); |
168 | current_map_info (op); |
180 | return 1; |
169 | return 1; |
181 | } |
170 | } |
… | |
… | |
344 | { |
333 | { |
345 | sprintf (buf, "Global debug level is %d.", settings.debug); |
334 | sprintf (buf, "Global debug level is %d.", settings.debug); |
346 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
335 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
347 | return 1; |
336 | return 1; |
348 | } |
337 | } |
349 | if (op != NULL && !QUERY_FLAG (op, FLAG_WIZ)) |
|
|
350 | { |
|
|
351 | new_draw_info (NDI_UNIQUE, 0, op, "Privileged command."); |
|
|
352 | return 1; |
|
|
353 | } |
|
|
354 | settings.debug = (enum LogLevel) FABS (i); |
338 | settings.debug = (enum LogLevel) FABS (i); |
355 | sprintf (buf, "Set debug level to %d.", i); |
339 | sprintf (buf, "Set debug level to %d.", i); |
356 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
340 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
357 | return 1; |
341 | return 1; |
358 | } |
342 | } |
… | |
… | |
457 | new_draw_info_format (NDI_UNIQUE, 0, op, "Output count now set to %d", op->contr->outputs_count); |
441 | new_draw_info_format (NDI_UNIQUE, 0, op, "Output count now set to %d", op->contr->outputs_count); |
458 | } |
442 | } |
459 | else |
443 | else |
460 | new_draw_info (NDI_UNIQUE, 0, op, "Invalid value for output_count."); |
444 | new_draw_info (NDI_UNIQUE, 0, op, "Invalid value for output_count."); |
461 | |
445 | |
462 | return 1; |
|
|
463 | } |
|
|
464 | |
|
|
465 | int |
|
|
466 | command_listen (object *op, char *params) |
|
|
467 | { |
|
|
468 | int i; |
|
|
469 | |
|
|
470 | if (params == NULL || !sscanf (params, "%d", &i)) |
|
|
471 | { |
|
|
472 | new_draw_info_format (NDI_UNIQUE, 0, op, "Set listen to what (presently %d)?", op->contr->listening); |
|
|
473 | return 1; |
|
|
474 | } |
|
|
475 | op->contr->listening = (char) i; |
|
|
476 | new_draw_info_format (NDI_UNIQUE, 0, op, "Your verbose level is now %d.", i); |
|
|
477 | return 1; |
446 | return 1; |
478 | } |
447 | } |
479 | |
448 | |
480 | /* Prints out some useful information for the character. Everything we print |
449 | /* Prints out some useful information for the character. Everything we print |
481 | * out can be determined by the docs, so we aren't revealing anything extra - |
450 | * out can be determined by the docs, so we aren't revealing anything extra - |
… | |
… | |
1060 | strcpy (op->contr->own_title, params); |
1029 | strcpy (op->contr->own_title, params); |
1061 | return 1; |
1030 | return 1; |
1062 | } |
1031 | } |
1063 | |
1032 | |
1064 | int |
1033 | int |
1065 | command_peaceful (object *op, char *params) |
|
|
1066 | { |
|
|
1067 | new_draw_info (NDI_UNIQUE, 0, op, |
|
|
1068 | "You cannot change your peaceful setting with this command." |
|
|
1069 | " Please speak to the priest in the temple of Gorokh" |
|
|
1070 | " if you want to become hostile or in temple of Valriel" " if you want to become peaceful again."); |
|
|
1071 | |
|
|
1072 | /* |
|
|
1073 | if((op->contr->peaceful=!op->contr->peaceful)) |
|
|
1074 | new_draw_info(NDI_UNIQUE, 0,op,"You will not attack other players."); |
|
|
1075 | else |
|
|
1076 | new_draw_info(NDI_UNIQUE, 0,op,"You will attack other players."); |
|
|
1077 | */ |
|
|
1078 | return 1; |
|
|
1079 | } |
|
|
1080 | |
|
|
1081 | int |
|
|
1082 | command_wimpy (object *op, char *params) |
|
|
1083 | { |
|
|
1084 | int i; |
|
|
1085 | char buf[MAX_BUF]; |
|
|
1086 | |
|
|
1087 | if (params == NULL || !sscanf (params, "%d", &i)) |
|
|
1088 | { |
|
|
1089 | sprintf (buf, "Your current wimpy level is %d.", op->run_away); |
|
|
1090 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
|
|
1091 | return 1; |
|
|
1092 | } |
|
|
1093 | sprintf (buf, "Your new wimpy level is %d.", i); |
|
|
1094 | new_draw_info (NDI_UNIQUE, 0, op, buf); |
|
|
1095 | op->run_away = i; |
|
|
1096 | return 1; |
|
|
1097 | } |
|
|
1098 | |
|
|
1099 | int |
|
|
1100 | command_brace (object *op, char *params) |
|
|
1101 | { |
|
|
1102 | if (!params) |
|
|
1103 | op->contr->braced = !op->contr->braced; |
|
|
1104 | else |
|
|
1105 | op->contr->braced = onoff_value (params); |
|
|
1106 | |
|
|
1107 | if (op->contr->braced) |
|
|
1108 | new_draw_info (NDI_UNIQUE, 0, op, "You are braced."); |
|
|
1109 | else |
|
|
1110 | new_draw_info (NDI_UNIQUE, 0, op, "Not braced."); |
|
|
1111 | |
|
|
1112 | op->update_stats (); |
|
|
1113 | return 0; |
|
|
1114 | } |
|
|
1115 | |
|
|
1116 | int |
|
|
1117 | command_kill_pets (object *op, char *params) |
1034 | command_kill_pets (object *op, char *params) |
1118 | { |
1035 | { |
1119 | objectlink *obl, *next; |
1036 | objectlink *obl, *next; |
1120 | int counter = 0, removecount = 0; |
1037 | int counter = 0, removecount = 0; |
1121 | |
1038 | |