stuffies
This commit is contained in:
parent
be50b9ad1c
commit
14461a905e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
MANIFEST-000159
|
||||
MANIFEST-000169
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
2021/05/13-20:15:39.975 cf4 Recovering log #158
|
||||
2021/05/13-20:15:40.183 cf4 Level-0 table #160: started
|
||||
2021/05/13-20:15:40.220 cf4 Level-0 table #160: 276036 bytes OK
|
||||
2021/05/13-20:15:40.236 cf4 Delete type=0 #158
|
||||
2021/05/13-20:15:40.239 cf4 Delete type=3 #156
|
||||
2021/08/06-00:12:04.964 2320 Recovering log #167
|
||||
2021/08/06-00:12:04.964 2320 Level-0 table #170: started
|
||||
2021/08/06-00:12:04.970 2320 Level-0 table #170: 213 bytes OK
|
||||
2021/08/06-00:12:04.985 2320 Delete type=0 #167
|
||||
2021/08/06-00:12:04.989 2320 Delete type=3 #165
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
2021/05/12-13:48:11.247 53ec Recovering log #154
|
||||
2021/05/12-13:48:11.247 53ec Level-0 table #157: started
|
||||
2021/05/12-13:48:11.256 53ec Level-0 table #157: 228 bytes OK
|
||||
2021/05/12-13:48:11.276 53ec Delete type=0 #154
|
||||
2021/05/12-13:48:11.279 53ec Delete type=3 #152
|
||||
2021/08/06-00:11:59.612 6c3c Recovering log #164
|
||||
2021/08/06-00:11:59.612 6c3c Level-0 table #166: started
|
||||
2021/08/06-00:11:59.627 6c3c Level-0 table #166: 3461 bytes OK
|
||||
2021/08/06-00:11:59.685 6c3c Delete type=0 #164
|
||||
2021/08/06-00:11:59.689 6c3c Delete type=3 #162
|
||||
2021/08/06-00:11:59.700 66a4 Compacting 4@0 + 1@1 files
|
||||
2021/08/06-00:11:59.750 66a4 Generated table #168@0: 8 keys, 661 bytes
|
||||
2021/08/06-00:11:59.750 66a4 Compacted 4@0 + 1@1 files => 661 bytes
|
||||
2021/08/06-00:11:59.752 66a4 compacted to: files[ 0 1 0 0 0 0 0 ]
|
||||
2021/08/06-00:11:59.752 66a4 Delete type=2 #155
|
||||
2021/08/06-00:11:59.760 66a4 Delete type=2 #157
|
||||
2021/08/06-00:11:59.763 66a4 Delete type=2 #160
|
||||
2021/08/06-00:11:59.767 66a4 Delete type=2 #163
|
||||
2021/08/06-00:11:59.771 66a4 Delete type=2 #166
|
||||
|
|
Binary file not shown.
Binary file not shown.
121
src/Commands.js
121
src/Commands.js
|
@ -153,7 +153,7 @@ module.exports = (bot) => {
|
|||
setTimeout(function() {
|
||||
var duration = 6 + Math.random() * 24;
|
||||
for(var i = 0; i < duration; i++) {
|
||||
sendChat("1");
|
||||
// sendChat("1");
|
||||
if(Math.random() > 0.5) {
|
||||
setTimeout(function() {
|
||||
db.getFruits(function(num_fruits) {
|
||||
|
@ -1448,4 +1448,123 @@ module.exports = (bot) => {
|
|||
}
|
||||
});
|
||||
}, false);
|
||||
|
||||
bot.addCommand(['/hug'], 0, msg => {
|
||||
var part = findParticipantByNameFuzzy(msg.argcat());
|
||||
if (part) {
|
||||
let hug = rando("a squeeze", "an affectionate hug",
|
||||
"a deep, passionate hug", `a "normal" hug`, "a snug hug", "a new hug", "a special embrace", "caring hug");
|
||||
sendChat(`Our friend ` + msg.p.name + ` gave ` + part.name + ' ' + hug);
|
||||
} else {
|
||||
db.getLocation(msg.p._id, location => {
|
||||
var message = "Friend " + msg.p.name + " missed and the hug went everywhere.";
|
||||
if (location == 'outside' && Math.random() < 0.25) {
|
||||
message += " Some of it went into the water and love was felt by the fish inside.";
|
||||
}
|
||||
sendChat(message);
|
||||
});
|
||||
}
|
||||
}, false);
|
||||
|
||||
bot.addCommand(['/give'], 0, msg => {
|
||||
var thief = msg.p;
|
||||
var victim = findParticipantByNameFuzzy(msg.args[0]);
|
||||
if (!victim) {
|
||||
sendChat("Friend " + thief.name + " missed");
|
||||
return;
|
||||
}
|
||||
if (victim._id == thief._id) {
|
||||
sendChat("Friendly friend " + thief.name + " fudged");
|
||||
return;
|
||||
}
|
||||
var target_fish = msg.argcat(1);
|
||||
db.getFish(thief._id, function (thief_fish) {
|
||||
db.getFish(victim_id, function (victim_fish) {
|
||||
if (victim_fish.length >= TOO_MANY_FISH) {
|
||||
sendChat("Friend " + victim.name + " is carrying too much.");
|
||||
return;
|
||||
}
|
||||
if (thief_fish.length > 0) {
|
||||
var idx = -1;
|
||||
var arg = target_fish.trim().toLowerCase();
|
||||
for (var i = 0; i < thief_fish.length; i++) {
|
||||
if (arg == "" || thief_fish[i].toLowerCase().indexOf(arg) !== -1) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx == -1) {
|
||||
sendChat("Friend " + thief.name + ": You don't have a " + arg + "that you can /give like that.");
|
||||
return;
|
||||
}
|
||||
var thefish = thief_fish[idx];
|
||||
thief_fish.splice(idx, 1);
|
||||
victim_fish.push(thefish);
|
||||
|
||||
sendChat("Our friend" + thief.name + " gave " + victim.name + " his/her " + thefish);
|
||||
db.putFish(thief._id, thief_fish);
|
||||
db.putFish(victim._id, victim_fish);
|
||||
} else {
|
||||
sendChat("Friend " + thief.name + ": You don't have the fish to give.");
|
||||
}
|
||||
});
|
||||
});
|
||||
return;
|
||||
}, false);
|
||||
|
||||
// bot.addCommand(['/give_'], 0, msg => {
|
||||
|
||||
// }, true);
|
||||
|
||||
bot.addCommand(['/bestow'], 0, msg => {
|
||||
var thief = msg.p;
|
||||
var victim = findParticipantByNameFuzzy(msg.args[0]);
|
||||
if (!victim) {
|
||||
sendChat("Friend " + thief.name + " missed");
|
||||
return;
|
||||
}
|
||||
if (victim._id == thief._id) {
|
||||
sendChat("Friendly friend " + thief.name + " fudged");
|
||||
return;
|
||||
}
|
||||
var target_fish = msg.argcat(1);
|
||||
db.getFish(thief._id, function (thief_fish) {
|
||||
db.getFish(victim_id, function (victim_fish) {
|
||||
if (victim_fish.length >= TOO_MANY_FISH) {
|
||||
sendChat("Friend " + victim.name + " is carrying too much.");
|
||||
return;
|
||||
}
|
||||
if (thief_fish.length > 0) {
|
||||
var idx = -1;
|
||||
var arg = target_fish.trim().toLowerCase();
|
||||
for (var i = 0; i < thief_fish.length; i++) {
|
||||
if (arg == "" || thief_fish[i].toLowerCase().indexOf(arg) !== -1) {
|
||||
idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx == -1) {
|
||||
sendChat("Friend " + thief.name + ": You don't have " + arg + ".");
|
||||
return;
|
||||
}
|
||||
var thefish = thief_fish[idx];
|
||||
thief_fish.splice(idx, 1);
|
||||
victim_fish.push(thefish);
|
||||
|
||||
sendChat("Our friend" + thief.name + " bestowed " + victim.name + " his/her " + thefish);
|
||||
db.putFish(thief._id, thief_fish);
|
||||
db.putFish(victim._id, victim_fish);
|
||||
} else {
|
||||
sendChat("Friend " + thief.name + ": You don't have the fish to bestow.");
|
||||
}
|
||||
});
|
||||
});
|
||||
return;
|
||||
});
|
||||
|
||||
// bot.addCommand(['/bestow_'], 0, msg => {
|
||||
|
||||
// }, true);
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue