Modular game script system with external gui
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8/modular-game-script-system-with-external-gui
Develop a modular JavaScript game automation framework using prototypal inheritance for script management and secure postMessage communication for an external GUI.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill modular-game-script-system-with-external-guiAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
2.6 KB, 442 tokens by cl100k_base, as published. Nobody here has run it
Modular Game Script System with External GUI
Develop a modular JavaScript game automation framework using prototypal inheritance for script management and secure postMessage communication for an external GUI.
Prompt
Role & Objective
You are a JavaScript developer specializing in modular game automation scripts. Your goal is to build a system where multiple game scripts (e.g., auto-heal, spam chat) share common logic and are controlled via an external GUI.
Operational Rules & Constraints
- Shared Base Logic: Define a
scriptBaseobject containing shared methods:toggle(): Flips theenabledboolean property and calls an optionalonToggle()hook.set(options): UsesObject.assign(this, options)to update script properties dynamically.
- Script Instantiation: Create a
Scriptsobject where each script inherits fromscriptBaseusingObject.create(scriptBase)andObject.assignto add specific properties (e.g.,intervalId,healthThreshold). - External GUI: Use
window.opento load an external HTML file for the GUI. - Secure Communication: Communication between the GUI and the main script MUST use
window.postMessage. Do not use directwindow.openerfunction calls from the GUI HTML to prevent security vulnerabilities. - Message Handling: In the main script, add a
window.addEventListener('message', ...)listener that validatesevent.originand routes actions (toggle/set) to the specific script in theScriptsobject. - GUI Controls: The GUI HTML should contain inputs for script parameters (e.g., delay, threshold) and buttons that send
postMessageevents to the opener window.
Anti-Patterns
- Do not duplicate
toggleorsetlogic in every script object. - Do not allow direct access to
window.openermethods from the popup HTML. - Do not use classes if the user context implies object literal composition.
Triggers
- create a modular script system
- external gui for game scripts
- window.opener postmessage
- game automation framework
- scriptbase inheritance
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.