adding random shit

This commit is contained in:
Ryan Voots 2011-08-28 16:07:19 -04:00
parent 3ca2ae0695
commit 9614214f99
4 changed files with 413 additions and 0 deletions

5
loopprompt Executable file
View file

@ -0,0 +1,5 @@
while [ 1 ]
do
dtach -c dtach ./testprompt
sleep 2
done

297
players-0.json Normal file
View file

@ -0,0 +1,297 @@
/*Tue Jul 26 14:08:48 2011*/$VAR1 = {
'isThundering' => bless( do{\(my $o = 0)}, 'JSON::XS::Boolean' ),
'timestamp' => '1311703722924',
'players' => [
{
'account' => 'alexbc2999',
'world' => 'main',
'armor' => 9,
'name' => 'alexbc2999',
'x' => '73.09375',
'health' => 16,
'y' => '70',
'type' => 'player',
'z' => '383.09375'
},
{
'account' => 'mas195287',
'world' => 'main',
'armor' => 15,
'name' => 'mas195287',
'x' => '385.375',
'health' => 17,
'y' => '57',
'type' => 'player',
'z' => '-406.59375'
},
{
'account' => 'SpadesDMF',
'world' => 'main',
'armor' => 0,
'name' => 'SpadesDMF',
'x' => '1143.0095246991',
'health' => 13,
'y' => '54',
'type' => 'player',
'z' => '-846.801613043614'
},
{
'account' => 'elioskmil',
'world' => 'anathema',
'armor' => 0,
'name' => 'elioskmil',
'x' => '-194.699999988079',
'health' => 15,
'y' => '79',
'type' => 'player',
'z' => '-1283.69999998824'
},
{
'account' => 'chopsticks00',
'world' => 'main',
'armor' => 0,
'name' => 'chopsticks00',
'x' => '-2169.30000001192',
'health' => 6,
'y' => '36',
'type' => 'player',
'z' => '70.6999999880791'
},
{
'account' => 'darkwizar185',
'world' => 'main',
'armor' => 20,
'name' => 'darkwizar185',
'x' => '2128.6281473724',
'health' => 20,
'y' => '17.9215999984741',
'type' => 'player',
'z' => '183.393869720435'
},
{
'account' => 'SparkyPrawn',
'world' => 'main',
'armor' => 0,
'name' => 'SparkyPrawn',
'x' => '-278.374205408493',
'health' => 17,
'y' => '17',
'type' => 'player',
'z' => '465.552444231487'
},
{
'account' => 'shoetechnews',
'world' => 'anathema',
'armor' => 0,
'name' => 'shoetechnews',
'x' => '-308.130377575484',
'health' => 10,
'y' => '64',
'type' => 'player',
'z' => '245.9226854339'
},
{
'account' => 'myers121',
'world' => 'main',
'armor' => 17,
'name' => 'myers121',
'x' => '2138.93369724977',
'health' => 20,
'y' => '17',
'type' => 'player',
'z' => '183.196918389422'
},
{
'account' => 'SaintBruce',
'world' => 'main',
'armor' => 0,
'name' => 'SaintBruce',
'x' => '-1031.69372391284',
'health' => 15,
'y' => '61',
'type' => 'player',
'z' => '560.810959929699'
},
{
'account' => 'tristochoper9004',
'world' => 'main',
'armor' => 0,
'name' => 'tristochoper9004',
'x' => '-15.716207284946',
'health' => 20,
'y' => '84',
'type' => 'player',
'z' => '-218.628336204988'
},
{
'account' => 'DarkHero057',
'world' => 'main',
'armor' => 0,
'name' => 'DarkHero057',
'x' => '-201.161012608041',
'health' => 13,
'y' => '73.2522033402537',
'type' => 'player',
'z' => '424.534542962791'
},
{
'account' => 'indiansfan19',
'world' => 'main',
'armor' => 0,
'name' => 'indiansfan19',
'x' => '142.339166398507',
'health' => 17,
'y' => '117',
'type' => 'player',
'z' => '-280.300000011921'
},
{
'account' => 'xfleshcrawlerx',
'world' => 'anathema',
'armor' => 0,
'name' => 'xfleshcrawlerx',
'x' => '-608.650689413045',
'health' => 18,
'y' => '78',
'type' => 'player',
'z' => '906.135194196839'
},
{
'account' => 'ThePumkinKing',
'world' => 'main',
'armor' => 0,
'name' => 'ThePumkinKing',
'x' => '-34.0063905208272',
'health' => 20,
'y' => '64',
'type' => 'player',
'z' => '-157.237774995133'
},
{
'account' => 'sunrester',
'world' => 'main',
'armor' => 7,
'name' => 'sunrester',
'x' => '782.375',
'health' => 16,
'y' => '97',
'type' => 'player',
'z' => '222'
},
{
'account' => 't3hw0z',
'world' => 'main',
'armor' => 0,
'name' => 't3hw0z',
'x' => '816.748252281419',
'health' => 20,
'y' => '86',
'type' => 'player',
'z' => '-13.7402937404569'
},
{
'account' => 'steelwall3',
'world' => 'main',
'armor' => 0,
'name' => 'steelwall3',
'x' => '143.692645106254',
'health' => 7,
'y' => '117',
'type' => 'player',
'z' => '-283.020994027104'
},
{
'account' => 'halo3rox',
'world' => 'main',
'armor' => 0,
'name' => 'halo3rox',
'x' => '-99.3417889951335',
'health' => 16,
'y' => '64',
'type' => 'player',
'z' => '18.1450997420802'
},
{
'account' => 'Kanervdss',
'world' => 'anathema',
'armor' => 19,
'name' => 'Kanervdss',
'x' => '130.5',
'health' => 18,
'y' => '70',
'type' => 'player',
'z' => '211.09375'
},
{
'account' => 'lostmind123',
'world' => 'main',
'armor' => 20,
'name' => 'lostmind123',
'x' => '864.236635211665',
'health' => 20,
'y' => '12',
'type' => 'player',
'z' => '-120.172429813339'
},
{
'account' => 'METiZBaCk',
'world' => 'main',
'armor' => 0,
'name' => 'METiZBaCk',
'x' => '-25.3194447352315',
'health' => 20,
'y' => '63.5',
'type' => 'player',
'z' => '-170.844787586895'
},
{
'account' => 'xboxfreak2000jb',
'world' => 'main',
'armor' => 0,
'name' => 'xboxfreak2000jb',
'x' => '138.300000011921',
'health' => 20,
'y' => '105.281515866994',
'type' => 'player',
'z' => '-285.425000011921'
},
{
'account' => 'fg0810',
'world' => 'main',
'armor' => 0,
'name' => 'fg0810',
'x' => '17.5938780751845',
'health' => 20,
'y' => '64',
'type' => 'player',
'z' => '152.004766853894'
}
],
'servertime' => 7857,
'updates' => [
{
'timestamp' => '1311703705726',
'playerName' => 'mr_coolman99',
'account' => 'mr_coolman99',
'type' => 'playerjoin'
},
{
'timestamp' => '1311703713090',
'name' => 'flat_128/-1_-1/-1_-1.png',
'type' => 'tile'
},
{
'timestamp' => '1311703714431',
'playerName' => 'mr_coolman99',
'account' => 'mr_coolman99',
'type' => 'playerquit'
},
{
'timestamp' => '1311703718557',
'playerName' => 'fg0810',
'account' => 'fg0810',
'type' => 'playerjoin'
}
],
'hasStorm' => $VAR1->{'isThundering'}
};

103
res.pl.save Normal file
View file

@ -0,0 +1,103 @@
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use YAML qw/LoadFile/;
use List::Util;
our $resdb;
=for comment
'natural_noob' => {
'Subzones' => {},
'EnterMessage' => 'Welcome %player to %residence, owned by %owner.',
'LeaveMessage' => 'Now leaving %residence.',
'Permissions' => {
'Owner' => 'simcop2387',
'AreaFlags' => {
'move' => 'true',
'use' => 'true',
'firespread' => 'false',
'creeper' => 'false',
'tnt' => 'false',
'container' => 'false',
'build' => 'false'
},
'World' => 'main',
'GroupFlags' => {},
'PlayerFlags' => {
'simcop2387' => {
'admin' => 'true',
'move' => 'true',
'use' => 'true',
'container' => 'true',
'build' => 'true'
}
}
},
'Areas' => {
'main' => {
'X2' => '2571',
'Z1' => '-175',
'Y1' => '101',
'Z2' => '-180',
'Y2' => '71',
'X1' => '2576'
}
}
},
=cut
sub checkres {
my ($res, $x, $y, $z) = @_;
my $areas = $res->{Areas};
for my $area (keys %$areas) {
my ($mx, $my, $mz, $nx, $ny, $nz) = @{$res->{Areas}{$area}}{qw(X2 Y2 Z2 X1 Y1 Z1)};
if ($x >= $mx && $y >= $my && $z >= $mz && $x < $nx && $y < $ny && $z < $nz) { # check the rectangle
return 1;
}
}
}
sub findres
{
}
sub grepres
{
my ($x,$y,$z) = @_;
my @residences = keys %{$resdb->{Residences}};
for my $res (@residences)
{
my $rr = $resdb->{Residences}{$res};
if (
}
}
sub getsubres {
my ($res, $x, $y, $z) = @_;
}
sub loadres
{
$resdb = LoadFile("var/res.yml");
}
loadres();
#17:19:20 < simcop2387> !coords lee
#17:19:21 < dirkobot> Lee1138 was in world 'main' at -1041x 60y -733z right now
#17:19:26 < simcop2387> !coords sugna
#17:19:26 < dirkobot> sugna_z was in world 'main' at -170x 66y -701z 5 seconds ago
print findres(-1041, 61, -733);

8
testprompt Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/perl
print "> ";
while(<>) {
if (/exit/) { exit(0) };
print;
print "> ";
}