Skip to content

Commit

Permalink
Update Rotur.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Mistium authored Aug 16, 2024
1 parent a0835dd commit 93369bc
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions featured/Rotur.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@ class RoturExtension {
}
}
},
{
opcode: 'sendRaw',
blockType: Scratch.BlockType.COMMAND,
text: 'send raw [PAYLOAD] to user [USER]',
arguments: {
VAL: {
type: Scratch.ArgumentType.STRING,
defaultValue: '{"payload":"","source":"","target":"","timestamp":""}'
},
USER: {
type: Scratch.ArgumentType.STRING,
defaultValue: 'targetUser'
},
}
},
{
opcode: 'getPacketsFromTarget',
blockType: Scratch.BlockType.REPORTER,
Expand Down Expand Up @@ -275,6 +290,14 @@ class RoturExtension {
this.packets = {};
}

rawMessage(args) {
let msg = {
"cmd": "pmsg",
"val": args.VAL,
"id": args.USER || ""
};
}

sendMessage(args) {
let payload = args.PAYLOAD || "";
let target = args.TARGET || "";
Expand Down

0 comments on commit 93369bc

Please sign in to comment.