added scanfoo game :)
This commit is contained in:
parent
2ea1d736b0
commit
bea4b482b0
1 changed files with 38 additions and 0 deletions
38
plugins/game
Normal file
38
plugins/game
Normal file
|
@ -0,0 +1,38 @@
|
|||
#!perl
|
||||
|
||||
#Scan-foo-game for Revbank - (C)Edwin Eefting (psy0rz)
|
||||
|
||||
#Released under GPL or whatever revbank uses as license :)
|
||||
|
||||
use Time::HiRes qw( gettimeofday tv_interval);
|
||||
|
||||
HELP "game" => "Scan-foo game!";
|
||||
|
||||
sub command :Tab(game) {
|
||||
my ($self, $cart, $command) = @_;
|
||||
|
||||
return NEXT if $command !~ /^(?:game)$/;
|
||||
|
||||
print "\nWelcome to SCAN-FOO \\o/\n";
|
||||
|
||||
|
||||
my $start_time=[gettimeofday];
|
||||
|
||||
for (my $i=1; $i<=5; $i++)
|
||||
{
|
||||
print "NOW SCAN game_$i: ";
|
||||
my $scanned=<STDIN>;
|
||||
if ($scanned ne "game_$i\n")
|
||||
{
|
||||
print "\nFAIL! :( *sad trombone*\n";
|
||||
|
||||
return ACCEPT;
|
||||
}
|
||||
}
|
||||
|
||||
my $elapsed = tv_interval ( $start_time, [gettimeofday]);
|
||||
|
||||
print "COMPLETED in $elapsed seconds *tadaah*\n";
|
||||
|
||||
return ACCEPT;
|
||||
}
|
Loading…
Add table
Reference in a new issue