… | |
… | |
73 | cp++; |
73 | cp++; |
74 | } |
74 | } |
75 | |
75 | |
76 | if (!INVOKE_PLAYER (COMMAND, pl->contr, ARG_STRING (command), ARG_STRING (cp))) |
76 | if (!INVOKE_PLAYER (COMMAND, pl->contr, ARG_STRING (command), ARG_STRING (cp))) |
77 | { |
77 | { |
78 | csp = find_command_element (command, NewServerCommands, NewServerCommandSize); |
78 | csp = find_command_element (command, Commands, CommandsSize); |
79 | if (!csp) csp = find_command_element (command, Commands, CommandsSize); |
|
|
80 | if (!csp) csp = find_command_element (command, CommunicationCommands, CommunicationCommandSize); |
79 | if (!csp) csp = find_command_element (command, CommunicationCommands, CommunicationCommandSize); |
81 | if (!csp && QUERY_FLAG (pl, FLAG_WIZ)) |
80 | if (!csp && QUERY_FLAG (pl, FLAG_WIZ)) |
82 | csp = find_command_element (command, WizCommands, WizCommandsSize); |
81 | csp = find_command_element (command, WizCommands, WizCommandsSize); |
83 | |
82 | |
84 | if (!csp) |
83 | if (!csp) |
… | |
… | |
92 | csp->func (pl, cp); |
91 | csp->func (pl, cp); |
93 | } |
92 | } |
94 | } |
93 | } |
95 | |
94 | |
96 | int |
95 | int |
97 | command_run (object *op, char *params) |
|
|
98 | { |
|
|
99 | int dir; |
|
|
100 | |
|
|
101 | dir = params ? atoi (params) : 0; |
|
|
102 | if (dir < 0 || dir >= 9) |
|
|
103 | { |
|
|
104 | new_draw_info (NDI_UNIQUE, 0, op, "Can't run into a non adjacent square."); |
|
|
105 | return 0; |
|
|
106 | } |
|
|
107 | |
|
|
108 | op->contr->run_on = 1; |
|
|
109 | return move_player (op, dir); |
|
|
110 | } |
|
|
111 | |
|
|
112 | int |
|
|
113 | command_run_stop (object *op, char *params) |
|
|
114 | { |
|
|
115 | op->contr->run_on = 0; |
|
|
116 | return 1; |
|
|
117 | } |
|
|
118 | |
|
|
119 | int |
|
|
120 | command_fire (object *op, char *params) |
|
|
121 | { |
|
|
122 | int dir; |
|
|
123 | |
|
|
124 | dir = params ? atoi (params) : 0; |
|
|
125 | if (dir < 0 || dir >= 9) |
|
|
126 | { |
|
|
127 | new_draw_info (NDI_UNIQUE, 0, op, "Can't fire to a non adjacent square."); |
|
|
128 | return 0; |
|
|
129 | }; |
|
|
130 | op->contr->fire_on = 1; |
|
|
131 | return move_player (op, dir); |
|
|
132 | } |
|
|
133 | |
|
|
134 | int |
|
|
135 | command_fire_stop (object *op, char *params) |
|
|
136 | { |
|
|
137 | op->contr->fire_on = 0; |
|
|
138 | return 1; |
|
|
139 | } |
|
|
140 | |
|
|
141 | int |
|
|
142 | bad_command (object *op, char *params) |
96 | bad_command (object *op, char *params) |
143 | { |
97 | { |
144 | new_draw_info (NDI_UNIQUE, 0, op, "bind and unbind are no longer handled on the server"); |
98 | new_draw_info (NDI_UNIQUE, 0, op, "bind and unbind are no longer handled on the server"); |
145 | return 1; |
99 | return 1; |
146 | } |
100 | } |