--- deliantra/server/ext/commands.ext 2007/03/02 11:23:17 1.26 +++ deliantra/server/ext/commands.ext 2007/03/02 11:41:14 1.27 @@ -89,6 +89,42 @@ 1 }; +cf::register_command body => sub { + my ($ob) = @_; + + my @body_locations = ("in your range slot", "on your arm", "on your body", "on your head", + "around your neck", "in your skill slot", "on your finger", "around your shoulders", + "on your feet", "on your hands", "around your wrists", "around your waist"); + + # Too hard to try and make a header that lines everything up, so just + # give a description. (comment from C++) + $ob->reply (undef, "The first column is the name of the body location."); + $ob->reply (undef, "The second column is how many of those locations your body has."); + $ob->reply (undef, "The third column is how many slots in that location are available."); + + for (0 .. scalar @body_locations - 1) { + $ob->reply (undef, (sprintf "%-30s %5d %5d", $body_locations[$_], $ob->body_info($_), $ob->body_used($_))) + if $ob->body_info($_) or $ob->body_used($_); + } + + $ob->reply (undef, "You are not allowed to wear armor") + unless $ob->flag (cf::FLAG_USE_ARMOUR); + $ob->reply (undef, "You are not allowed to use weapons") + unless $ob->flag (cf::FLAG_USE_WEAPON); + + 1 +}; + +cf::register_command who => sub { + my ($ob, $arg) = @_; + + $ob->speed_left ($ob->speed_left - 0.25); + + $ob->reply (undef, (join "\n", who_listing $ob->may ("extended_who")), cf::NDI_UNIQUE | cf::NDI_DK_ORANGE); + + 1 +}; + cf::register_command mapinfo => sub { my ($ob) = @_;