This commit is contained in:
Hri7566 2022-03-17 09:16:47 +01:00
parent 876b5f20d2
commit b234fc26f7
11 changed files with 86 additions and 28 deletions

Binary file not shown.

Binary file not shown.

BIN
bot2022.db/000525.log Normal file

Binary file not shown.

BIN
bot2022.db/000527.ldb Normal file

Binary file not shown.

View File

@ -1 +1 @@
MANIFEST-000489
MANIFEST-000518

View File

@ -1,11 +1,29 @@
2022/03/15-11:37:58.642339 7fefa67fc700 Recovering log #487
2022/03/15-11:37:58.705212 7fefa67fc700 Level-0 table #490: started
2022/03/15-11:37:58.724919 7fefa67fc700 Level-0 table #490: 131633 bytes OK
2022/03/15-11:37:58.762282 7fefa67fc700 Delete type=3 #485
2022/03/15-11:37:58.762369 7fefa67fc700 Delete type=0 #487
2022/03/15-12:37:43.198784 7fefa4ff9700 Compacting 1@0 + 1@1 files
2022/03/15-12:37:43.233054 7fefa4ff9700 Generated table #492@0: 1614 keys, 64785 bytes
2022/03/15-12:37:43.233104 7fefa4ff9700 Compacted 1@0 + 1@1 files => 64785 bytes
2022/03/15-12:37:43.234931 7fefa4ff9700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/03/15-12:37:43.235125 7fefa4ff9700 Delete type=2 #490
2022/03/15-12:37:43.235493 7fefa4ff9700 Delete type=2 #488
2022/03/16-00:24:53.383751 7f931c8e1700 Recovering log #516
2022/03/16-00:24:53.406715 7f931c8e1700 Level-0 table #519: started
2022/03/16-00:24:53.420613 7f931c8e1700 Level-0 table #519: 78678 bytes OK
2022/03/16-00:24:53.425008 7f931c8e1700 Delete type=0 #516
2022/03/16-00:24:53.426093 7f931c8e1700 Delete type=3 #514
2022/03/16-02:07:00.678172 7f92fed88700 Compacting 1@0 + 1@1 files
2022/03/16-02:07:00.717364 7f92fed88700 Generated table #521@0: 1748 keys, 71526 bytes
2022/03/16-02:07:00.717398 7f92fed88700 Compacted 1@0 + 1@1 files => 71526 bytes
2022/03/16-02:07:00.719197 7f92fed88700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/03/16-02:07:00.719967 7f92fed88700 Delete type=2 #519
2022/03/16-02:07:00.720207 7f92fed88700 Delete type=2 #517
2022/03/16-15:07:09.229805 7f92fed88700 Level-0 table #523: started
2022/03/16-15:07:09.320146 7f92fed88700 Level-0 table #523: 391229 bytes OK
2022/03/16-15:07:09.331903 7f92fed88700 Delete type=0 #520
2022/03/16-21:08:43.357784 7f92fed88700 Compacting 1@0 + 1@1 files
2022/03/16-21:08:43.391672 7f92fed88700 Generated table #524@0: 1827 keys, 74712 bytes
2022/03/16-21:08:43.391702 7f92fed88700 Compacted 1@0 + 1@1 files => 74712 bytes
2022/03/16-21:08:43.397356 7f92fed88700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/03/16-21:08:43.397803 7f92fed88700 Delete type=2 #521
2022/03/16-21:08:43.398618 7f92fed88700 Delete type=2 #523
2022/03/17-03:48:54.971905 7f92fed88700 Level-0 table #526: started
2022/03/17-03:48:55.203197 7f92fed88700 Level-0 table #526: 370049 bytes OK
2022/03/17-03:48:55.213505 7f92fed88700 Delete type=0 #522
2022/03/17-08:29:10.564024 7f92fed88700 Compacting 1@0 + 1@1 files
2022/03/17-08:29:10.585438 7f92fed88700 Generated table #527@0: 1901 keys, 77758 bytes
2022/03/17-08:29:10.585470 7f92fed88700 Compacted 1@0 + 1@1 files => 77758 bytes
2022/03/17-08:29:10.589675 7f92fed88700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/03/17-08:29:10.589898 7f92fed88700 Delete type=2 #524
2022/03/17-08:29:10.590224 7f92fed88700 Delete type=2 #526

View File

@ -1,13 +1,13 @@
2022/03/15-06:20:46.015723 7f4e74ff9700 Recovering log #484
2022/03/15-06:20:46.015851 7f4e74ff9700 Level-0 table #486: started
2022/03/15-06:20:46.017869 7f4e74ff9700 Level-0 table #486: 377 bytes OK
2022/03/15-06:20:46.020536 7f4e74ff9700 Delete type=3 #482
2022/03/15-06:20:46.020581 7f4e74ff9700 Delete type=0 #484
2022/03/15-08:01:33.573536 7f4e677fe700 Compacting 3@0 + 1@1 files
2022/03/15-08:01:33.582497 7f4e677fe700 Generated table #488@0: 1576 keys, 62904 bytes
2022/03/15-08:01:33.582529 7f4e677fe700 Compacted 3@0 + 1@1 files => 62904 bytes
2022/03/15-08:01:33.588153 7f4e677fe700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/03/15-08:01:33.588372 7f4e677fe700 Delete type=2 #478
2022/03/15-08:01:33.588928 7f4e677fe700 Delete type=2 #486
2022/03/15-08:01:33.589514 7f4e677fe700 Delete type=2 #480
2022/03/15-08:01:33.589606 7f4e677fe700 Delete type=2 #483
2022/03/15-21:26:15.525619 7ff7c9e8e700 Recovering log #513
2022/03/15-21:26:15.525734 7ff7c9e8e700 Level-0 table #515: started
2022/03/15-21:26:15.527757 7ff7c9e8e700 Level-0 table #515: 556 bytes OK
2022/03/15-21:26:15.531301 7ff7c9e8e700 Delete type=0 #513
2022/03/15-21:26:15.531350 7ff7c9e8e700 Delete type=3 #511
2022/03/15-22:32:49.678402 7ff7c8c17700 Compacting 3@0 + 1@1 files
2022/03/15-22:32:49.698039 7ff7c8c17700 Generated table #517@0: 1733 keys, 70649 bytes
2022/03/15-22:32:49.698074 7ff7c8c17700 Compacted 3@0 + 1@1 files => 70649 bytes
2022/03/15-22:32:49.699779 7ff7c8c17700 compacted to: files[ 0 1 0 0 0 0 0 ]
2022/03/15-22:32:49.699950 7ff7c8c17700 Delete type=2 #507
2022/03/15-22:32:49.700154 7ff7c8c17700 Delete type=2 #512
2022/03/15-22:32:49.700231 7ff7c8c17700 Delete type=2 #515
2022/03/15-22:32:49.700322 7ff7c8c17700 Delete type=2 #509

Binary file not shown.

BIN
bot2022.db/MANIFEST-000518 Normal file

Binary file not shown.

View File

@ -44,6 +44,17 @@ db.putPokemon = function(id, arr) {
db.del(key);
}
db.getTime = function(cb) {
db.get('time', (err, value) => {
if (err !== null) cb(err, value);
cb(undefined, value);
});
}
db.setTime = function(time) {
db.put('time', time);
}
db.readArray = function(start, end, cb) {
var results = [];
db.createReadStream({

View File

@ -18,12 +18,26 @@ module.exports = (bot) => {
var fish_without_images = ["Blowfish", "Brook Trout", "Butterflyfish", "Can", "Giant Trevally", "Key", "Large Bass", "Lobster", "Mitten Crab", "Moray Eel", "Napoleonfish", "Neon Tetra", "Nibble Fish", "Oarfish", "Pike", "Ray", "Ribbon Eel", "Saddled Bichir", "Saw Shark", "Small Bass", "Softshell Turtle", "Surgeonfish", "Tadpole", "Whale Shark"];
var newfish = require("./newfish.json");
var pokedex = require("./pokedex.json");
var untakeable = ['bed', 'chair', 'couch', 'desk', 'dining table', 'fireplace', 'floor lamp', 'flower pot', 'food cart', 'garden', 'grand piano', 'lamp', 'lawn mower', 'mailbox', 'potted plant', 'refrigerator', 'sink', 'sofa', 'stairs', 'stool', 'table', 'television', 'toilet', 'tv', 'vase', 'wardrobe', 'window', 'workbench'];
var untakeable = ['bed', 'chair', 'couch', 'desk', 'dining table', 'fireplace', 'floor lamp', 'flower pot', 'food cart', 'garden', 'grand piano', 'lamp', 'lawn mower', 'mailbox', 'potted plant', 'refrigerator', 'sink', 'sofa', 'stairs', 'stool', 'table', 'television', 'toilet', 'tv', 'vase', 'wardrobe', 'window', 'workbench', 'Trees'];
var sendChat = MPPClient.sendChat;
var blockHelpUntil = 0;
var locations = ["sleep", "outside", "inside", "shop"]
var locations = ["sleep", "outside", "inside", "forest"];
let time = 0;
db.getTime((err, t) => {
if (!err) time = t;
});
setInterval(() => {
time += 1;
if (time >= 60) {
time = 0;
}
db.setTime(time);
}, 60 * 1000);
function underline(text) {
var result = "";
@ -531,6 +545,8 @@ module.exports = (bot) => {
}
text += ") (\"" + pkmn.classification + "\")";
sendChat(text);
} else {
sendChat("Friend " + msg.p.name + ": The Pokédex doesn't know what that is.");
}
}, false);
@ -850,7 +866,7 @@ module.exports = (bot) => {
}
}
if(idx == -1) {
sendChat("Friend " +msg.p.name+": You don't have "+aOrAn(arg)+""+arg+" that's edible.");
sendChat("Friend " +msg.p.name+": You don't have "+aOrAn(arg)+" "+arg+" that's edible.");
return;
}
var food = myfish[idx];
@ -1220,6 +1236,16 @@ module.exports = (bot) => {
});
});
bot.addCommand(['time', 'tomo'], 0, msg => {
db.getTime((err, t) => {
if (t >= 30) {
sendChat('Friend '+msg.p.name+', it is night.');
} else {
sendChat('Friend '+msg.p.name+', it is day.');2
}
});
}, false);
setInterval(function() {
db.put("look.outside.◍Sand", "We don't talk about that.");
@ -1757,6 +1783,9 @@ module.exports = (bot) => {
if (location == 'outside' && Math.random() < 0.25) {
message += " and the fish are happy.";
}
if (location == 'forest' && Math.random() < 0.25) {
message += " and the birds are happy.";
}
sendChat(message);
});
});