From 5a62ce32747207119ce7f23743365a2dfcad601d Mon Sep 17 00:00:00 2001 From: Mute Date: Wed, 10 Jul 2024 02:23:08 +0000 Subject: [PATCH] hopeful fixes --- lily.user.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lily.user.js b/lily.user.js index c926239..0d116f6 100644 --- a/lily.user.js +++ b/lily.user.js @@ -12,6 +12,10 @@ // @match https://www.bondage-europe.com/* // @match http://localhost:*/* // ==/UserScript== +// checklist: +// ? OOC blocked +// ? custom lenses aren't updated +// ? custom lenses wrong colour (async function() { 'use strict'; @@ -44,7 +48,7 @@ roll_rgb() {this.next_rgb() && W.ChatRoomCharacterItemUpdate(W.Player, 'Mask')}, start() {return Boolean(this.check('Mask')) && !this.timeout && Boolean(this.timeout = setInterval(() => this.roll_rgb(), 1000))}, stop() {return Boolean(this.check('Mask')) && Boolean(this.timeout) && !(this.timeout = void clearInterval(this.timeout))}, - dim() {return !this.check('ItemHead') && Boolean(W.InventoryWear(W.Player, 'AnimeLenses', 'ItemHead', undefined, undefined, 71_240, this.craft) && !void W.ChatRoomCharacterUpdate(W.Player))}, + dim() {return !this.check('ItemHead') && !void W.InventoryWear(W.Player, 'AnimeLenses', 'ItemHead', ['#FFFFFF', 'Default', '#FFFFFF', 'Default'], undefined, 71_240, this.craft) && !void W.ChatRoomCharacterUpdate(W.Player)}, clear() {return Boolean(this.check('ItemHead')) && !void W.InventoryRemove(W.Player, 'ItemHead') && !void W.ChatRoomCharacterUpdate(W.Player)}, check(zone) {return U.with(this.item, item => (item && item.Asset.Group.Name === zone) ? item : undefined)}, get item() {return this.zones.map(z => W.InventoryGet(W.Player, z)).find(item => item && item.Asset.Name === 'AnimeLenses') || undefined}, @@ -71,11 +75,12 @@ return U.with(cmd(...tokens), r => typeof r === 'boolean' ? (r ? 'success' : 'fail') : String(r)) }, receive(data) { if (!data.Sender) return undefined + W.ChatRoomSendLocal(`${data.Content}`) const reply = this.admins.includes(data.Sender) ? this.run(data.Content.split(' ')) : 'access denied' return void W.ChatRoomSendWhisper(data.Sender, `LILY: ${reply}`) }, } SDK.hookFunction('SpeechTransformGagGarble', 0, ([text]) => text) // disable garbling - SDK.hookFunction('ChatRoomSendChatMessage', 0, (na, n) => Box.enabled ? n(na) : Boolean(W.ChatRoomSendLocal('You try to talk, but nothing comes out.'))) + SDK.hookFunction('ChatRoomSendChatMessage', 0, (na, n) => Box.enabled || na[0].startsWith('(') ? n(na) : Boolean(W.ChatRoomSendLocal('You try to talk, but nothing comes out.'))) W.ChatRoomRegisterMessageHandler({Priority: -169, Description: 'LILY', Callback: data => data.Type === 'Whisper' && data.Content.startsWith('#LILY') && (Belt.receive(data) || true)}) })()