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.26 by pippijn, Fri Mar 2 11:23:17 2007 UTC vs.
Revision 1.27 by pippijn, Fri Mar 2 11:41:14 2007 UTC

87 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE); 87 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE);
88 88
89 1 89 1
90}; 90};
91 91
92cf::register_command body => sub {
93 my ($ob) = @_;
94
95 my @body_locations = ("in your range slot", "on your arm", "on your body", "on your head",
96 "around your neck", "in your skill slot", "on your finger", "around your shoulders",
97 "on your feet", "on your hands", "around your wrists", "around your waist");
98
99 # Too hard to try and make a header that lines everything up, so just
100 # give a description. (comment from C++)
101 $ob->reply (undef, "The first column is the name of the body location.");
102 $ob->reply (undef, "The second column is how many of those locations your body has.");
103 $ob->reply (undef, "The third column is how many slots in that location are available.");
104
105 for (0 .. scalar @body_locations - 1) {
106 $ob->reply (undef, (sprintf "%-30s %5d %5d", $body_locations[$_], $ob->body_info($_), $ob->body_used($_)))
107 if $ob->body_info($_) or $ob->body_used($_);
108 }
109
110 $ob->reply (undef, "You are not allowed to wear armor")
111 unless $ob->flag (cf::FLAG_USE_ARMOUR);
112 $ob->reply (undef, "You are not allowed to use weapons")
113 unless $ob->flag (cf::FLAG_USE_WEAPON);
114
115 1
116};
117
118cf::register_command who => sub {
119 my ($ob, $arg) = @_;
120
121 $ob->speed_left ($ob->speed_left - 0.25);
122
123 $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE);
124
125 1
126};
127
92cf::register_command mapinfo => sub { 128cf::register_command mapinfo => sub {
93 my ($ob) = @_; 129 my ($ob) = @_;
94 130
95 my $map = $ob->map 131 my $map = $ob->map
96 or return; 132 or return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines