ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/commands.ext
(Generate patch)

Comparing deliantra/server/ext/commands.ext (file contents):
Revision 1.19 by pippijn, Thu Mar 1 13:27:52 2007 UTC vs.
Revision 1.20 by pippijn, Fri Mar 2 10:15:38 2007 UTC

94 94
95 $ob->contr->ns->afk ($ob->contr->ns->afk ? 0 : 1); 95 $ob->contr->ns->afk ($ob->contr->ns->afk ? 0 : 1);
96 $ob->reply (undef, $ob->contr->ns->afk ? "You are now AFK" : "You are no longer AFK"); 96 $ob->reply (undef, $ob->contr->ns->afk ? "You are now AFK" : "You are no longer AFK");
97}; 97};
98 98
99cf::register_command brace => sub {
100 my ($ob, $arg) = @_;
101
102 $ob->contr->braced ($ob->contr->braced ? 0 : 1);
103 $ob->reply (undef, $ob->contr->braced ? "You are braced." : "Not braced.");
104};
105
106# XXX: This has a bug. After one sets his wimpy level to 0 and resets it to
107# some other level (which may also be 0), this does not get echoed,
108# but it does get set.
109cf::register_command wimpy => sub {
110 my ($ob, $arg) = @_;
111
112 my $wimpy = $ob->run_away;
113 return $ob->reply (undef, "Your current wimpy level is $wimpy.")
114 if $arg eq "";
115
116 return $ob->run_away ($arg) && $ob->reply (undef, "Your new wimpy level is $arg.")
117 if $arg =~ /^\d+$/ and $arg <= 100;
118
119 $ob->reply (undef, "Incorrect parameters for wimpy: $arg");
120};
121
122cf::register_command peaceful => sub {
123 my ($ob, $arg) = @_;
124
125 $ob->reply (undef, "You cannot change your peaceful setting with this command."
126 ." Please speak to the priest in the temple of Gorokh"
127 ." if you want to become hostile or in temple of Valriel"
128 ." if you want to become peaceful again.");
129
130 #$ob->contr->peaceful ($ob->contr->peaceful ? 0 : 1);
131 #$ob->reply (undef, $ob->contr->peaceful ? "You will attack other players." : "You will not attack other players.");
132};
133
134
99cf::register_command rename => sub { 135cf::register_command rename => sub {
100 my ($ob, $arg) = @_; 136 my ($ob, $arg) = @_;
101 137
102 $ob->speed_left ($ob->speed_left - 0.25); 138 $ob->speed_left ($ob->speed_left - 0.25);
103 139

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines