how to change settings of modules via chat which are made using scripts
-
@the_shadow_emp can you more clearly describe what i did wrong?
or can you do it right with the help of your enlightning ressource@somedudeyouveneverheardof https://liquidbounce.net/docs/ScriptAPI/Global Instances
-
@somedudeyouveneverheardof https://liquidbounce.net/docs/ScriptAPI/Global Instances
@mems can you give more details? i don't really get what that page should tell me
do i need to register the module to the commandManager?
and if how to do that?commandManager.registerCommand(moduleManager.getModule('Example'))that is what i tried but it doesn't seem to work
-
@mems can you give more details? i don't really get what that page should tell me
do i need to register the module to the commandManager?
and if how to do that?commandManager.registerCommand(moduleManager.getModule('Example'))that is what i tried but it doesn't seem to work
@somedudeyouveneverheardof
moduleManager.getModule("Spammer").getValue("Message").set(your message)pretty sure something like that -
@somedudeyouveneverheardof
moduleManager.getModule("Spammer").getValue("Message").set(your message)pretty sure something like that -
@somedudeyouveneverheardof
moduleManager.getModule("Spammer").getValue("Message").set(your message)pretty sure something like that@the_shadow_emp ye i guess
var Spammer = moduleManager.getModule("Spammer"); moduleManager.getModule("Spammer").getValue("Message").set(module.settings.text.get())not sure if he wants to use the setting in the module but yeah
-
@the_shadow_emp ye i guess
var Spammer = moduleManager.getModule("Spammer"); moduleManager.getModule("Spammer").getValue("Message").set(module.settings.text.get())not sure if he wants to use the setting in the module but yeah
@faaatpotato i want to set the setting of a script-created module via a chat command, like this: ".examplemodule text asd"
this works fine with native modules but doesn't with script-created ones and i wonder how to fix this or another way to change a string setting ingame
-
@faaatpotato i want to set the setting of a script-created module via a chat command, like this: ".examplemodule text asd"
this works fine with native modules but doesn't with script-created ones and i wonder how to fix this or another way to change a string setting ingame
This post is deleted! -
@faaatpotato i want to set the setting of a script-created module via a chat command, like this: ".examplemodule text asd"
this works fine with native modules but doesn't with script-created ones and i wonder how to fix this or another way to change a string setting ingame
@somedudeyouveneverheardof still not sure what u want but this script changes the spammer message if you type ingame
.ssssd text (message you want)/// api_version=2 var script = registerScript({ name: "ss", version: "1.0", authors: ["No Author ok"] }); var Spammer = moduleManager.getModule("Spammer"); script.registerModule({ name: "ssssd", description: "Nutting in cats is illegal", category: "Fun", tag: "s", settings: { text: Setting.text({ name: "text", default: "" }), } }, function (module) { module.on("enable", function () { }); module.on("disable", function () { }); module.on("update", function () { moduleManager.getModule("Spammer").getValue("Message").set(module.settings.text.get()) }); }); -
@faaatpotato i want to set the setting of a script-created module via a chat command, like this: ".examplemodule text asd"
this works fine with native modules but doesn't with script-created ones and i wonder how to fix this or another way to change a string setting ingame
@somedudeyouveneverheardof well it is probably a script issue, the setting changer works with other scripts
-
@somedudeyouveneverheardof still not sure what u want but this script changes the spammer message if you type ingame
.ssssd text (message you want)/// api_version=2 var script = registerScript({ name: "ss", version: "1.0", authors: ["No Author ok"] }); var Spammer = moduleManager.getModule("Spammer"); script.registerModule({ name: "ssssd", description: "Nutting in cats is illegal", category: "Fun", tag: "s", settings: { text: Setting.text({ name: "text", default: "" }), } }, function (module) { module.on("enable", function () { }); module.on("disable", function () { }); module.on("update", function () { moduleManager.getModule("Spammer").getValue("Message").set(module.settings.text.get()) }); });@faaatpotato Spammer was just an example module to demonstrate where it would work, now make a module with a script and try to do the same
-
@faaatpotato Spammer was just an example module to demonstrate where it would work, now make a module with a script and try to do the same
@somedudeyouveneverheardof i just gave you an example you don't need to change that much do it yourself
-
@somedudeyouveneverheardof i just gave you an example you don't need to change that much do it yourself
@faaatpotato it wasn't meant as a challange or something but as a way to get you to understand my problem, it doesn't work if you would replace spammer with a module created with the ScriptAPI and that's my problem, nor can you change these values via ingame chat.
I want to know how to fix this. -
@faaatpotato it wasn't meant as a challange or something but as a way to get you to understand my problem, it doesn't work if you would replace spammer with a module created with the ScriptAPI and that's my problem, nor can you change these values via ingame chat.
I want to know how to fix this.@somedudeyouveneverheardof
ok sorry, this should work then
commandManager.executeCommands(".scriptapimodule setting "+module.settings.text.get()) -
@somedudeyouveneverheardof
ok sorry, this should work then
commandManager.executeCommands(".scriptapimodule setting "+module.settings.text.get())@faaatpotato gives me the same error as if i would type it in the chat manually.
".scriptapimodule setting 123"
gives
"[LiquidBounce] Syntax: .scriptapimodule <setting>"
but doesn't change anything -
@faaatpotato gives me the same error as if i would type it in the chat manually.
".scriptapimodule setting 123"
gives
"[LiquidBounce] Syntax: .scriptapimodule <setting>"
but doesn't change anything@somedudeyouveneverheardof

works for me/// api_version=2 var script = registerScript({ name: "ss", version: "1.0", authors: ["No Author ok"] }); script.registerModule({ name: "ssssd", description: "Nutting in cats is illegal", category: "Fun", tag: "s", settings: { text: Setting.text({ name: "text", default: "" }), } }, function (module) { module.on("enable", function () { commandManager.executeCommands(".JartexL LMode "+module.settings.text.get()); }); module.on("disable", function () { }); module.on("update", function () { }); });example with a script I made
-
@somedudeyouveneverheardof

works for me/// api_version=2 var script = registerScript({ name: "ss", version: "1.0", authors: ["No Author ok"] }); script.registerModule({ name: "ssssd", description: "Nutting in cats is illegal", category: "Fun", tag: "s", settings: { text: Setting.text({ name: "text", default: "" }), } }, function (module) { module.on("enable", function () { commandManager.executeCommands(".JartexL LMode "+module.settings.text.get()); }); module.on("disable", function () { }); module.on("update", function () { }); });example with a script I made
@FaaatPotato
yeah, your example works on b73, previously played with b72. sorry about that
seems to be fixed in b73, sorry to bother you all
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better š
Register Login