Files
BorisBot/BorisBotV1/indexpoige.js
2024-01-15 09:30:27 +00:00

1476 lines
60 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//Load required classes.
const { WebsocketBot } = require('att-bot-core');
const { BasicWrapper } = require('att-websockets');
const jsapi = require('alta-jsapi')
const createapi = require('./output')
//Load information from credentials and config
const { username, password } = require("./credentials");
const { targetServers } = require("./config");
const fs = require('fs');
//readline stuffs
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
//variables
{
var loop = 0;
var i = 0;
var i2 = 0;
var x = 0;
var y = 0;
var z = 0;
var r = 5;
var a = 0;
var b = 0;
var x2 = 0;
var y2 = 0;
var z2 = 0;
var x3 = 0;
var y3 = 0;
var z3 = 0;
var smf = "select move forward ";
var sml = "select move left ";
var pi = Math.PI;
var smfx = "select move forward ";
var smly = "select move left ";
var dat = [];
var playername = username;
var playername2 = username;
var playerid = null;
var playerid2 = null;
var deletes;
var powspir = .5;
var mulspir = 55;
var turnFraction = -0.6005000;
var numpoints = 400;
var upheight = 20;
var dist;
var angle;
var parse = false;
var midarray;
//var fak = createapi.default(wrapper)
}
//Run the program
main();
async function main()
{
//Create a new bot
const bot = new WebsocketBot();
//Login. Use "loginWithHash" if you're storing a hashed version of the password
await bot.login(username, password);
//Run the bot.
//When any of the 'targetServers' are available, a connection is automatically created.
await bot.run(test => targetServers.includes(test.id), async (server, connection) =>
{
var wrapper = new BasicWrapper(connection);
wrapper.subscribe("TraceLog", data => {});
//subscriptions
wrapper.subscribe("PlayerKilled", data =>
{
(async ()=>{
await new Promise(r => setTimeout(r, 10000))
wrapper.send(`spawn string ${data.killedPlayer.username} 40748,238,40748,1153596956,1131759753,1152314055,3166093433,3207611429,1017707607,1060732130,1065353237,2290978823,418,1153596956,1131759753,1152314055,3166093433,3207611429,1017707607,1060732130,784502081,1314217728,248297180,0,0,0,363610349,2147483656,1058831617,4171539668,2147483664,0,0,703843710,2147483648,1073741824,1901,3221225536,3181911225,2415919106,619548216,54023745,2013265920,2147483648,64208762,1,2214592512,17891632,4227858479,3935379412,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,8388608,0,0,|93,3801256786,2,272188517,1,237360636,1,391977879,1,22446553,1,2617495528,1,2272630171,1,1217391130,1,276353327,1,1823429789,1,3445325106,1,2126500253,1,2624099526,1,1871432223,1,3373651539,1,2907231276,1,654225716,1,1454441398,1,3704379512,1,3257374625,1,2262399392,2,3146178080,1,661497638,1,2293737711,1,2190886200,1,3920618075,1,3665939353,1,3901697682,1,1211178616,1,2951515968,1,1588536425,1,70871065,1,3101665521,1,2815374842,1,4081488368,1,3820454400,2,1624211074,1,7704646,1,1651678475,1,2400796504,1,910018632,2,4144776006,3,2975913730,1,2169673426,1,3450348902,1,1233775263,1,43510150,2,1645673210,2,4095875831,1,2314081177,1,2590537994,2,2443660852,1,4248664925,1,634164392,5,3642863935,2,1931537627,1,259381630,1,3932346318,1,2978388169,1,1431397437,2,3070493599,2,3588929783,1,3640332570,1,1787084913,3,1454955908,1,788405183,1,2563567105,2,766675725,1,2882590463,1,1499506132,1,205333986,1,4179293747,1,3236280681,2,902024186,1,2450553269,1,2629079826,1,963907309,1,1753993206,1,1923918202,1,1776498660,1,3638500874,2,1098050191,3,3084373371,1,4163873252,1,1587058252,1,2592242915,2,1962842866,1,4282337604,1,3561515449,1,2290978823,1,3674519521,1,4109360768,2,3457519710,2,`)
})()
}
)
wrapper.subscribe("PlayerJoined", data =>
{
(async ()=>{
await new Promise(r => setTimeout(r, 10000))
wrapper.send(`spawn string ${data.user.username} 40748,238,40748,1153596956,1131759753,1152314055,3166093433,3207611429,1017707607,1060732130,1065353237,2290978823,418,1153596956,1131759753,1152314055,3166093433,3207611429,1017707607,1060732130,784502081,1314217728,248297180,0,0,0,363610349,2147483656,1058831617,4171539668,2147483664,0,0,703843710,2147483648,1073741824,1901,3221225536,3181911225,2415919106,619548216,54023745,2013265920,2147483648,64208762,1,2214592512,17891632,4227858479,3935379412,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,8388608,0,0,|93,3801256786,2,272188517,1,237360636,1,391977879,1,22446553,1,2617495528,1,2272630171,1,1217391130,1,276353327,1,1823429789,1,3445325106,1,2126500253,1,2624099526,1,1871432223,1,3373651539,1,2907231276,1,654225716,1,1454441398,1,3704379512,1,3257374625,1,2262399392,2,3146178080,1,661497638,1,2293737711,1,2190886200,1,3920618075,1,3665939353,1,3901697682,1,1211178616,1,2951515968,1,1588536425,1,70871065,1,3101665521,1,2815374842,1,4081488368,1,3820454400,2,1624211074,1,7704646,1,1651678475,1,2400796504,1,910018632,2,4144776006,3,2975913730,1,2169673426,1,3450348902,1,1233775263,1,43510150,2,1645673210,2,4095875831,1,2314081177,1,2590537994,2,2443660852,1,4248664925,1,634164392,5,3642863935,2,1931537627,1,259381630,1,3932346318,1,2978388169,1,1431397437,2,3070493599,2,3588929783,1,3640332570,1,1787084913,3,1454955908,1,788405183,1,2563567105,2,766675725,1,2882590463,1,1499506132,1,205333986,1,4179293747,1,3236280681,2,902024186,1,2450553269,1,2629079826,1,963907309,1,1753993206,1,1923918202,1,1776498660,1,3638500874,2,1098050191,3,3084373371,1,4163873252,1,1587058252,1,2592242915,2,1962842866,1,4282337604,1,3561515449,1,2290978823,1,3674519521,1,4109360768,2,3457519710,2,`)
})()
}
)
var result = await wrapper.send("player list-detailed")
console.log(result.Result);
if(playername !== "poiuytrewq4645") {
console.log('\x1b[31m%s\x1b[0m', 'PLAYER NAME ISNT POI')
}
setid()
setid2(playername)
//functions
async function ro(rad, amnt, item, up) {
while (i<amnt) {
wrapper.send(`spawn ${playername} ${item}`)
x=Math.cos(i) * rad
y=Math.sin(i) * rad
smfx = smf.concat(x);
smly = sml.concat(y);
wrapper.send(smfx)
wrapper.send(smly)
wrapper.send(`select move up ${up}`)
i++
};
i=0
}
async function ror(rad, amnt, item, up, pitch, yaw, roll) {
while (i<amnt) {
wrapper.send(`spawn ${playername} ${item}`)
x=Math.cos(i) * rad
y=Math.sin(i) * rad
smfx = smf.concat(x);
smly = sml.concat(y);
wrapper.send(smfx)
wrapper.send(smly)
wrapper.send(`select move up ${up}`)
wrapper.send(`select rotate pitch ${pitch}`)
wrapper.send(`select rotate yaw ${yaw}`)
wrapper.send(`select rotate roll ${roll}`)
i++
};
i=0
}
async function ros(rad, amnt, string, up) {
while (i<amnt) {
wrapper.send(`spawn string ${playername} ${string}`)
x=Math.cos(i) * rad
y=Math.sin(i) * rad
smfx = smf.concat(x);
smly = sml.concat(y);
wrapper.send(smfx)
wrapper.send(smly)
wrapper.send(`select move up ${up}`)
i++
};
i=0
}
async function roe(rad, amnt, item, up, x, y, z) {
while (i<amnt) {
x2=Math.cos(i) * rad + x
y2=Math.sin(i) * rad + y
up2 = z + up
wrapper.send(`spawn exact ${x2},${up2},${y2} 0,0,0 ${item} FAKUJOEL`)
i++
}
i=0
}
async function newke(amnt) {
while(i<amnt) {
x=Math.floor(Math.random() * 1000) / 10 - 50;
y=Math.floor(Math.random() * 1000) / 10 - 50;
wrapper.send(`spawn ${playername} Dynamite`)
wrapper.send(`s move forward ${x}`)
wrapper.send(`s move left ${y}`)
wrapper.send(`spawn ${playername} ExplosiveSpike`)
wrapper.send(`s move forward ${x}`)
wrapper.send(`s move left ${y}`)
wrapper.send("select move up 10")
//await new Promise(r => setTimeout(r, 100));
i++
}
i=0
}
async function newke2(amnt, item) {
while(i<amnt) {
x=Math.floor(Math.random() * 1000) / 10 - 50;
y=Math.floor(Math.random() * 1000) / 10 - 50;
wrapper.send(`spawn ${playername} ${item}`)
wrapper.send(`s move forward ${x}`)
wrapper.send(`s move left ${y}`)
wrapper.send("select move up 10")
//await new Promise(r => setTimeout(r, 100));
i++
}
i=0
}
function namemanager(name) {
if(name == undefined) {
name = playername
}
if(name == "") {
name = playername
}
if(name == "poi") {
name = "poiuytrewq4645"
}
if(name == "league") {
console.log('\x1b[31m%s\x1b[0m', 'DONT YOU GO NUKING PPL NOW')
name = "league"
}
console.log(name);
return name
}
async function getid() {
var result = await wrapper.send(`player detailed ${playername}`)
console.log(result.Result.Body.Identifier)
command()
}
async function setid() {
var result = await wrapper.send(`player detailed ${playername}`)
playerid = result.Result.Body.Identifier
console.log(playerid)
command()
}
async function setid2(playerinternal) {
playerinternal = namemanager(playerinternal)
var result = await wrapper.send(`player detailed ${playerinternal}`)
playerid2 = result.Result.Body.Identifier
console.log(playerid)
command()
}
async function spiral(item) {
setid()
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
x2 = location.Result.Position[0]
z2 = location.Result.Position[1]
y2 = location.Result.Position[2]
while(i < numpoints) {
dst = Math.pow(i / (numpoints - 1), powspir)
angle = 2 * Math.PI * turnFraction * i
x = dst * Math.cos(angle) * mulspir
y = dst * Math.sin(angle) * mulspir
z = upheight + (i/30)
console.log("z",z)
x = x+x2
y = y+y2
z = z+z2
console.log(x,y,z)
//await new Promise(r => setTimeout(r, 20))
wrapper.send(`spawn exact ${x},${z},${y} 0,0,0 ${item} fakujoel`)
console.log(i)
i++
}
i=0
command()
}
// these dont work- just copy them into async code
/*async function plyr1crds() {
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
x2 = location.Result.Position[0]
z2 = location.Result.Position[1]
y2 = location.Result.Position[2]
//console.log(location)
}*/
/*async function plyr2crds() {
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
x3 = location.Result.Position[0]
z3 = location.Result.Position[1]
y3 = location.Result.Position[2]
//console.log(location)
}*/
function teleportmanager(location) {
console.log(location)
switch (location) {
case "Mountain":
return [-1259,1000.69,942]
break
case "000":
return [0,1000.69,0]
break
case "EE":
return [-174.5,1000.69,-644.5]
break
case "GW":
return [-639.453,1000.69,-82.208]
break
case "SC":
return [-329.748,1000.69,-343.807]
break
case "Blacksmith Building":
return [-717.2,1000.69,12.7]
break
case "Town Hall":
return [-895.2,1000.69,93.9]
break
case "Archery":
return [-835,1000.69,385]
break
case "Blacksmith":
return [-642.704,1000.69,19.363]
break
case "Combat":
return [-1403.3,1000.69,161]
break
case "Woodcutting":
return [-404.3,1000.69,19.6]
break
case "Mining":
return [-825.419,1000.69,-59.953]
break
case "Dust Bowl":
return [-581,1000.69,325.3]
break
case "Mines":
return [-897.749,1000.69,-160.403]
break
case "Outback Mountain":
return [988.816,1000.69,-736.122]
break
case "Oo Mountain":
return [1019.675,1000.69,-1371.084]
break
default:
return null
break
}
}
async function spiralstring(string1,string2,string3,string4) {
setid()
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
x2 = location.Result.Position[0]
z2 = location.Result.Position[1]
y2 = location.Result.Position[2]
while(i < numpoints) {
dst = Math.pow(i / (numpoints - 1), powspir)
angle = 2 * Math.PI * turnFraction * i
x = dst * Math.cos(angle) * mulspir //* 5
y = dst * Math.sin(angle) * mulspir //* 5
z = -1
x = x+x2
y = y+y2
z = z+z2
console.log(x,y,z)
//try selecting around player and searching for higest id
/*var id = await */
if(i%4 == 0) {
wrapper.send(`spawn string ${playername} ${string4}`)
}
else if(i%3 == 0) {
wrapper.send(`spawn string ${playername} ${string3}`)
}
else if(i%2 == 0) {
wrapper.send(`spawn string ${playername} ${string2}`)
}
else if(i%1 == 0) {
wrapper.send(`spawn string ${playername} ${string1}`)
}
/*wrapper.send(`select ${id.Result[0].Identifier}`)
dat.push(id.Result[0].Identifier)*/
wrapper.send(`select move exact ${x},${z + 2},${y}`)
console.log(i)
i++
}
console.log(dat)
/*while(i > -1) {
wrapper.send(`select ${dat[i]}`)
wrapper.send(`select destroy`)
i--
}*/
i=0
command()
}
command()
async function command() {
rl.question('command?: ', (answer) => {
//player list detailed
if (answer.startsWith("playerlist")) {
playerlist()
async function playerlist() {
var result = await wrapper.send("player list-detailed")
result.Result.forEach(result => {
console.log(result.username)
console.log(result.Body.Identifier)
console.log(result.id)
}
)
}
/*if (answer.startsWith("playerlist")) {
playerlist()
async function playerlist() {
var result = await wrapper.send("player list-detailed")
console.log(result.Result);
}*/
command()
};
//flinthell
if (answer.startsWith("flinthell")) {
while (i<500) {
wrapper.send(`spawn ${playername} flint`)
i++
};
i=0
command()
};
//ringofdeath
if (answer.startsWith("rod")) {
ro(5, 180, "explosivespike", 10)
command()
};
//ZONE OF DEATH
if (answer.startsWith("zod")) {
ro(1, 3, "explosivespike", 10)
ro(2, 5, "explosivespike", 10)
ro(3, 7, "explosivespike", 10)
ro(4, 10, "explosivespike", 10)
ro(5, 15, "explosivespike", 10)
ro(6, 20, "explosivespike", 10)
ro(7, 30, "explosivespike", 10)
ro(8, 30, "explosivespike", 10)
ro(9, 30, "explosivespike", 10)
ro(10, 30, "explosivespike", 10)
ro(11, 30, "explosivespike", 10)
ro(12, 50, "explosivespike", 10)
command()
};
//ringofpotions
if (answer.startsWith("rop")) {
//ro(rad, amnt, item, up)
setTimeout(ro, 0, 5, 25, "potionmedium", 5)
setTimeout(ro, 800, 6, 30, "potionmedium", 5)
setTimeout(ro, 1500, 7, 35, "potionmedium", 5)
command()
};
//ringofslow
if (answer.startsWith("rosl")) {
ro(3, 90, "goteraseedlingorb", 10)
command()
};
//daytime
if (answer.startsWith("tss")) {
wrapper.send("time set 7")
command()
};
//nighttime
if (answer.startsWith("tsn")) {
wrapper.send("time set 20")
command()
};
//ringofmoney
if (answer.startsWith("rom")) {
ro(3, 20, "goldcoin", 2)
command()
};
//ringofvines
if (answer.startsWith("rov")) {
ro(4, 360, "BreakableRootHangingStraight", -1)
command()
};
//change the selected player for playername
if (answer.startsWith("changename ")) {
answerARR = answer.split(" ");
playername = namemanager(answerARR[1])
setid()
console.log(`changed the selected name and id to "${playername}", "${playerid}"`);
command()
};
//change the selected player for playername2
if (answer.startsWith("changename2 ")) {
answerARR = answer.split(" ");
playername2 = namemanager(answerARR[1])
setid2(playername2)
console.log(`changed the second selected name and id to "${playername2}", ${playerid2}`);
command()
};
//teleport either the selected player or the player thats inputted to testing area
if (answer.startsWith("testingarea")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
wrapper.send(`player teleport ${answerARR[1]} testingarea`)
command()
};
//teleport either the selected player or the player thats inputted to spawn
if (answer.startsWith("rspwn")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
wrapper.send(`player teleport ${answerARR[1]} respawnpoint`)
command()
};
//just a fucking nuke lol
if (answer.startsWith("newke")) {
newke(200)
command()
};
//like newke but a circle
if (answer.startsWith("ron")) {
ro(3, 90, "explosivespike", 10)
ro(3, 90, "dynamite", 0)
command();
i=0
command()
};
//like above but with fireworks
if (answer.startsWith("rof")) {
ro(3, 90, "explosivespike", 10)
ro(3, 90, "firework", 0)
command();
i=0
command()
};
//ring of gold
if (answer.startsWith("rog")) {
ro(5, 30, "goldingot", 0)
command();
i=0
command()
};
// ing of whatever item youm want
if (answer.startsWith("ro")) {
answerARR = answer.split(" ");
ro(5, 10, answerARR[1], -1)
command()
};
//like ro but fully customizable
if (answer.startsWith("rot")) {
answerARR = answer.split(" ");
ro(answerARR[1], answerARR[2], answerARR[3], answerARR[4])
command()
};
//a help command
//need to expand
if (answer.startsWith("help")) {
answerARR = answer.split(" ");
if (answerARR[1] = "rot") {
console.log("syntax: rot (radius) (amount) (item) (up dist)")
}
command()
};
//send commands to console bypassing bot and not collecting $200
if (answer.startsWith("cmmd")) {
answer = answer.slice(5)
(async () => { var result = await wrapper.send(answer)
console.log(result.Result)
command()
}) ()
};
//send the id of selected/entered player to console
if (answer.startsWith("id")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
getid()
async function sendcommand() {var result = await wrapper.send(`player id ${answerARR[1]}`)
console.log(result.Result.id)
command()
}
sendcommand()
};
//quit
if (answer.startsWith("quit")) {
quit
command()
};
//set player's speed
if (answer.startsWith("speed ")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
wrapper.send(`player setstat ${answerARR[1]} speed ${answerARR[2]}`)
command()
};
//set a player's health
if (answer.startsWith("heal ")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
wrapper.send(`player setstat ${answerARR[1]} health ${answerARR[2]}`)
command()
};
//set a player's damage
if (answer.startsWith("damage")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
wrapper.send(`player setstat ${answerARR[1]} damage ${answerARR[2]}`)
command()
};
//hue
if (answer.startsWith("fireworktest ")) {
while(i<25) {
//yellow
wrapper.send("spawn string poiuytrewq4645 40748,238,40748,3293268740,1124524024,1097099520,3167335126,1064044012,3178461380,3200485162,1065353224,2290978823,418,3293268740,1124524024,1097099520,3167335126,1064044012,3178461380,3200485162,3221225472,0,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,280860479,2684362763,703843710,2147483648,1610612736,1901,3221225536,3181911225,2415919106,553517056,54023745,2013265920,2147483648,64208762,1,2214592512,11035970,3305111808,647045076,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,25165824,0,0,|92,3801256786,2,272188517,1,237360636,1,391977879,1,22446553,1,2617495528,1,2272630171,1,1217391130,1,276353327,1,1823429789,1,3445325106,1,2126500253,1,2624099526,1,1871432223,1,3373651539,1,2907231276,1,654225716,1,1454441398,1,3227511059,1,3704379512,1,3257374625,1,2262399392,2,3146178080,1,661497638,1,2293737711,1,2190886200,1,3920618075,1,3665939353,1,3901697682,1,1211178616,1,2951515968,1,1588536425,1,70871065,1,3101665521,1,2815374842,1,4081488368,1,3820454400,2,1651678475,1,2400796504,1,910018632,2,4144776006,3,2975913730,1,2169673426,1,3450348902,1,1233775263,1,43510150,2,1645673210,2,2629079826,1,963907309,1,1753993206,1,1923918202,1,1776498660,1,4095875831,1,2314081177,1,2590537994,1,2443660852,1,4248664925,1,634164392,2,3642863935,2,259381630,1,3932346318,1,2978388169,1,1431397437,2,3070493599,2,3588929783,1,3640332570,1,1787084913,3,1650910821,1,1454955908,1,788405183,1,2563567105,2,766675725,1,2882590463,1,1499506132,1,205333986,1,4179293747,1,3236280681,1,902024186,1,2450553269,1,3638500874,2,1098050191,2,3084373371,1,4163873252,1,1587058252,1,2592242915,2,1962842866,1,4282337604,1,3561515449,1,2290978823,1,3674519521,1,4109360768,2,3457519710,2,")
//green
wrapper.send("spawn string poiuytrewq4645 40748,238,40748,3291252396,1124083377,1120039616,0,0,0,1065353216,1065353231,2290978823,418,3291252396,1124083377,1120039616,0,0,0,1065353216,3221225472,0,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,601618698,536879115,1777585534,2147483648,1610612736,1901,3221225536,3181911225,2415919106,553517056,54023745,2013265920,2147483648,64208762,1,2214592512,13231031,3305111808,881926100,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,16777216,0,0,|92,3801256786,2,272188517,1,237360636,1,391977879,1,22446553,1,2617495528,1,2272630171,1,1217391130,1,276353327,1,1823429789,1,3445325106,1,2126500253,1,2624099526,1,1871432223,1,3373651539,1,2907231276,1,654225716,1,1454441398,1,3227511059,1,3704379512,1,3257374625,1,2262399392,2,3146178080,1,661497638,1,2293737711,1,2190886200,1,3920618075,1,3665939353,1,3901697682,1,1211178616,1,2951515968,1,1588536425,1,70871065,1,3101665521,1,2815374842,1,4081488368,1,3820454400,2,1651678475,1,2400796504,1,910018632,2,4144776006,3,2975913730,1,2169673426,1,3450348902,1,1233775263,1,43510150,2,1645673210,2,2629079826,1,963907309,1,1753993206,1,1923918202,1,1776498660,1,4095875831,1,2314081177,1,2590537994,1,2443660852,1,4248664925,1,634164392,2,3642863935,2,259381630,1,3932346318,1,2978388169,1,1431397437,2,3070493599,2,3588929783,1,3640332570,1,1787084913,3,1650910821,1,1454955908,1,788405183,1,2563567105,2,766675725,1,2882590463,1,1499506132,1,205333986,1,4179293747,1,3236280681,1,902024186,1,2450553269,1,3638500874,2,1098050191,2,3084373371,1,4163873252,1,1587058252,1,2592242915,2,1962842866,1,4282337604,1,3561515449,1,2290978823,1,3674519521,1,4109360768,2,3457519710,2,")
//blue
wrapper.send("spawn string poiuytrewq4645 40748,238,40748,3291224682,1124083377,1120154272,0,0,0,1065353216,1065353234,2290978823,418,3291224682,1124083377,1120154272,0,0,0,1065353216,3221225472,0,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,973981719,2684362763,703843710,2147483648,1610612736,1901,3221225536,3181911225,2415919106,553517056,54023745,2013265920,2147483648,64208762,1,2214592512,21475918,4110418176,881926100,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,8388608,0,0,|92,3801256786,2,272188517,1,237360636,1,391977879,1,22446553,1,2617495528,1,2272630171,1,1217391130,1,276353327,1,1823429789,1,3445325106,1,2126500253,1,2624099526,1,1871432223,1,3373651539,1,2907231276,1,654225716,1,1454441398,1,3227511059,1,3704379512,1,3257374625,1,2262399392,2,3146178080,1,661497638,1,2293737711,1,2190886200,1,3920618075,1,3665939353,1,3901697682,1,1211178616,1,2951515968,1,1588536425,1,70871065,1,3101665521,1,2815374842,1,4081488368,1,3820454400,2,1651678475,1,2400796504,1,910018632,2,4144776006,3,2975913730,1,2169673426,1,3450348902,1,1233775263,1,43510150,2,1645673210,2,2629079826,1,963907309,1,1753993206,1,1923918202,1,1776498660,1,4095875831,1,2314081177,1,2590537994,1,2443660852,1,4248664925,1,634164392,2,3642863935,2,259381630,1,3932346318,1,2978388169,1,1431397437,2,3070493599,2,3588929783,1,3640332570,1,1787084913,3,1650910821,1,1454955908,1,788405183,1,2563567105,2,766675725,1,2882590463,1,1499506132,1,205333986,1,4179293747,1,3236280681,1,902024186,1,2450553269,1,3638500874,2,1098050191,2,3084373371,1,4163873252,1,1587058252,1,2592242915,2,1962842866,1,4282337604,1,3561515449,1,2290978823,1,3674519521,1,4109360768,2,3457519710,2,")
//red
wrapper.send("spawn string poiuytrewq4645 40748,238,40748,3291255956,1124083377,1120086944,0,0,0,1065353216,1065353218,2290978823,418,3291255956,1124083377,1120086944,0,0,0,1065353216,3221225472,0,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,325791935,2684362764,2851327358,2147483648,1610612736,1901,3221225536,3181911225,2415919106,553517056,54023745,2013265920,2147483648,64208762,1,2214592512,26382226,2298478848,881926100,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,0,0,0,|92,3801256786,2,272188517,1,237360636,1,391977879,1,22446553,1,2617495528,1,2272630171,1,1217391130,1,276353327,1,1823429789,1,3445325106,1,2126500253,1,2624099526,1,1871432223,1,3373651539,1,2907231276,1,654225716,1,1454441398,1,3227511059,1,3704379512,1,3257374625,1,2262399392,2,3146178080,1,661497638,1,2293737711,1,2190886200,1,3920618075,1,3665939353,1,3901697682,1,1211178616,1,2951515968,1,1588536425,1,70871065,1,3101665521,1,2815374842,1,4081488368,1,3820454400,2,1651678475,1,2400796504,1,910018632,2,4144776006,3,2975913730,1,2169673426,1,3450348902,1,1233775263,1,43510150,2,1645673210,2,2629079826,1,963907309,1,1753993206,1,1923918202,1,1776498660,1,4095875831,1,2314081177,1,2590537994,1,2443660852,1,4248664925,1,634164392,2,3642863935,2,259381630,1,3932346318,1,2978388169,1,1431397437,2,3070493599,2,3588929783,1,3640332570,1,1787084913,3,1650910821,1,1454955908,1,788405183,1,2563567105,2,766675725,1,2882590463,1,1499506132,1,205333986,1,4179293747,1,3236280681,1,902024186,1,2450553269,1,3638500874,2,1098050191,2,3084373371,1,4163873252,1,1587058252,1,2592242915,2,1962842866,1,4282337604,1,3561515449,1,2290978823,1,3674519521,1,4109360768,2,3457519710,2,")
i++
}
i=0
command()
};
//explosivespike spiral
if (answer.startsWith("exspir")) {
spiral("explosivespike")
command()
};
//customisable spiral
if (answer.startsWith("cspir ")) {
answerARR = answer.split(" ");
spiral(answerARR[1])
command()
};
//tomato spiral
if (answer.startsWith("tomat")) {
spiral("tomatofullripe")
command()
}
//handtest
if (answer.startsWith("ht")) {
setid()
wrapper.send(`select snap-to ${playerid + 3}`)
command()
};
//spiral of fireworks (broken)
if (answer.startsWith("firspir")) {
//blue
spiralstring("40748,238,40748,1102324111,1087096292,1101905327,0,0,2969567230,1065353216,1065353234,2290978823,418,1102324111,1087096292,1101905327,0,0,2969567230,1065353216,216037828,272971723,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,1017128448,2147483653,3925069182,2147483648,1610612736,1901,3221225536,3181911225,2415919106,620504393,2000180801,2013265920,2147483648,64208762,1,2214592512,15651320,3825205248,76619732,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,8388608,0,0,"
,"40748,238,40748,1095729689,1067394135,3236749396,0,0,2969567230,1065353216,1065353231,2290978823,418,1095729689,1067394135,3236749396,0,0,2969567230,1065353216,210428035,267251337,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,906752342,1073741831,703843710,2147483648,1610612736,1901,3221225536,3181911225,2415919106,620551526,389568065,2013265920,2147483648,64208762,1,2214592512,26316849,2080374784,143728596,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,16777216,0,0,"
,"40748,238,40748,1098275414,1081449556,3235809248,0,0,0,1065353216,1065353224,2290978823,418,1098275414,1081449556,3235809248,0,0,0,1065353216,0,271914786,3221225472,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,494606384,6,1777585534,2147483648,1610612736,1901,3221225536,3181911225,2415919106,620520345,1127765569,2013265920,2147483648,64208762,1,2214592512,1509020,771751936,177283028,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,25165824,0,0,"
,"40748,238,40748,1098955205,1081794856,3234133429,0,0,2969567230,1065353216,1065353218,2290978823,418,1098955205,1081794856,3234133429,0,0,2969567230,1065353216,214691300,1345418594,0,0,0,0,363610349,2147483656,779697565,2024056020,2147483664,1011978036,2147483655,703843710,2147483648,1610612736,1901,3221225536,3181911225,2415919106,620521477,859330113,2013265920,2147483648,64208762,1,2214592512,3783909,4160749568,177283028,872415232,2181038080,37861376,0,228,33554432,2180306929,763363328,272629760,0,0,0,")
command()
};
//get line of points between two players
if (answer.startsWith("lnt ")) {
lnt()
async function lnt() {
answerARR = answer.split(" ");
//get the target player's id
setid2(answerARR[1])
//set player to crds
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
var [x2, z2, y2] = location.Result.Position;
//target player to crds
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
var [x3, z3, y3] = location.Result.Position;
/*x3 = 1585
y3 = 1431
z3 = z2*/
// example numbers
// x2 100 x3 120 x = 20
// y2 14 y3 50 y = 36
// h = 41.1825205639
// angle = 29.0546040991
x = x3 - x2
y = y3 - y2
//while i is less then 3x hyp
while(i < (Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))) ) {
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
var [x3, z3, y3] = location.Result.Position;
x = x3 - x2
y = y3 - y2
console.log(i)
var angle = Math.atan(x/y)
if (x < 0 && y > 0 || x > 0 && y > 0) {
//console.log('\x1b[31m%s\x1b[0m', `A
//x ${x} y ${y}`)
x3 = Math.sin(angle) * i + x2
y3 = Math.cos(angle) * i + y2
}
else {
//console.log('\x1b[31m%s\x1b[0m', `B
//x ${x} y ${y}`)
x3 = Math.sin(angle) * -i + x2
y3 = Math.cos(angle) * -i + y2
}
console.log(`x3 ${x3}, y3 ${y3}, z2 ${z2}, angle ${angle}, `)
await new Promise(r => setTimeout(r, 50));
wrapper.send(`spawn exact ${x3},${z2 + 10},${y3} 0,0,0 explosivespike fakujoel`)
i++
}
//roe(3, 90, "explosivespike", 10, x3, y3, z3)
//spiral("explosivespike")
i=0
}
command()
};
if (answer.startsWith("chase")) {
chase()
async function chase() {
answerARR = answer.split(" ");
setid2(answerARR[1])
//set player to crds
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
var [x2, z2, y2] = location.Result.Position;
//target player to crds
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
var [x3, z3, y3] = location.Result.Position;
x = x3 - x2
y = y3 - y2
//while i is less then 3x hyp
var spikeid = await wrapper.send(`spawn ${playername} potionmedium`)
console.log(spikeid.Result[0].Identifier)
while(i < (Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))) ) {
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
x3 = location.Result.Position[0]
z3 = location.Result.Position[1]
y3 = location.Result.Position[2]
x = x3 - x2
y = y3 - y2
console.log(i)
var angle = Math.atan(x/y)
if (x < 0 && y > 0 || x > 0 && y > 0) {
//console.log('\x1b[31m%s\x1b[0m', `A
//x ${x} y ${y}`)
x3 = Math.sin(angle) * i + x2
y3 = Math.cos(angle) * i + y2
}
else {
//console.log('\x1b[31m%s\x1b[0m', `B
//x ${x} y ${y}`)
x3 = Math.sin(angle) * -i + x2
y3 = Math.cos(angle) * -i + y2
}
console.log(`x3 ${x3}, y3 ${y3}, z2 ${z2}, angle ${angle}, `)
wrapper.send(`select ${spikeid.Result[0].Identifier}`)
await wrapper.send(`select move exact ${x3},${z3 + 10},${y3}`)
i++
}
i=0
while(i < 30) {
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
x3 = location.Result.Position[0]
z3 = location.Result.Position[1]
y3 = location.Result.Position[2]
wrapper.send(`select ${spikeid.Result[0].Identifier}`)
await wrapper.send(`select move exact ${x3},${z3 + 10-(i/5)},${y3}`)
i++
}
i=0
}
command()
};
if (answer.startsWith("lst ")) {
lst()
async function lst() {
answerARR = answer.split(" ");
//get the target player's id
setid2(answerARR[1])
//set player to crds
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
var [x2, z2, y2] = location.Result.Position;
//target player to crds
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
var [x3, z3, y3] = location.Result.Position;
/*x3 = 1585
y3 = 1431
z3 = z2*/
// example numbers
// x2 100 x3 120 x = 20
// y2 14 y3 50 y = 36
// h = 41.1825205639
// angle = 29.0546040991
x = x3 - x2
y = y3 - y2
//while i is less then 3x hyp
while(i < (Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))) ) {
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
var [x3, z3, y3] = location.Result.Position;
x = x3 - x2
y = y3 - y2
console.log(i)
var angle = Math.atan(x/y)
if (x < 0 && y > 0 || x > 0 && y > 0) {
//console.log('\x1b[31m%s\x1b[0m', `A
//x ${x} y ${y}`)
x3 = Math.sin(angle) * i + x2
y3 = Math.cos(angle) * i + y2
}
else {
//console.log('\x1b[31m%s\x1b[0m', `B
//x ${x} y ${y}`)
x3 = Math.sin(angle) * -i + x2
y3 = Math.cos(angle) * -i + y2
}
console.log(`x3 ${x3}, y3 ${y3}, z2 ${z2}, angle ${angle}, `)
await new Promise(r => setTimeout(r, 50));
wrapper.send(`spawn exact ${x3},${z2 + 10},${y3} 0,0,0 ${answerARR[2]} fakujoel`)
i++
}
//roe(3, 90, "explosivespike", 10, x3, y3, z3)
//spiral("explosivespike")
i=0
}
command()
};
if (answer.startsWith("spin")) {
spin()
async function spin() {
while(i < 1800) {
await new Promise(r => setTimeout(r, 5));
wrapper.send(`select rotate yaw 15`)
i++
}
i=0
}
command()
};
if (answer.startsWith("hammer")) {
spin()
async function spin() {
while(i < 1800) {
await new Promise(r => setTimeout(r, 5));
wrapper.send(`select move up 0.2`)
await new Promise(r => setTimeout(r, 5));
wrapper.send(`select move down 0.2`)
i++
}
i=0
}
command()
};
//line spike
/*if (answer.startsWith("lst ")) {
lst()
async function lst() {
answerARR = answer.split(" ");
//get the target player's id
setid2(answerARR[1])
//set player to crds
wrapper.send(`select ${playerid}`)
var location = await wrapper.send("select get")
x2 = location.Result.Position[0]
z2 = location.Result.Position[1]
y2 = location.Result.Position[2]
//target player to crds
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
x3 = location.Result.Position[0]
z3 = location.Result.Position[1]
y3 = location.Result.Position[2]
/*x3 = 1585
y3 = 1431
z3 = z2
// example numbers
// x2 100 x3 120 x = 20
// y2 14 y3 50 y = 36
// h = 41.1825205639
// angle = 29.0546040991
x = x3 - x2
y = y3 - y2
//while i is less then 3x hyp
while(i < (Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))) ) {
wrapper.send(`select ${playerid2}`)
var location = await wrapper.send("select get")
x3 = location.Result.Position[0]
z3 = location.Result.Position[1]
y3 = location.Result.Position[2]
x = x3 - x2
y = y3 - y2
console.log(i)
var angle = Math.atan(x/y)
if (x < 0 && y > 0 || x > 0 && y > 0) {
//console.log('\x1b[31m%s\x1b[0m', `A
//x ${x} y ${y}`)
x3 = Math.sin(angle) * i + x2
y3 = Math.cos(angle) * i + y2
}
else {
//console.log('\x1b[31m%s\x1b[0m', `B
//x ${x} y ${y}`)
x3 = Math.sin(angle) * -i + x2
y3 = Math.cos(angle) * -i + y2
}
console.log(`x3 ${x3}, y3 ${y3}, z2 ${z2}, angle ${angle}, `)
//await new Promise(r => setTimeout(r, 50));
var id = await wrapper.send(`spawn exact ${x3},${z2 + 10},${y3} 0,0,0 BreakableRootHangingStraight fakujoel`)
dat.push(id.Result[0].Identifier)
i++
}
//roe(3, 90, "explosivespike", 10, x3, y3, z3)
i2= i2 + i
i=0
}
command()
};*/
if (answer.startsWith("delet")) {
while(i2 >= 0) {
wrapper.send(`select ${dat[i2]}`)
wrapper.send("select destroy")
i2--
}
command()
};
if (answer.startsWith("timetest ")) {
console.log(`${new Date().toUTCString()}`)
command()
};
if (answer.startsWith("potnuke")) {
newke2(300, "potionmedium")
command()
};
if (answer.startsWith("test ")) {
test()
async function test() {
const load = [".","..","..."]
while(i <= 50) {
wrapper.send(`player message ${playername} "loading${load[i%3]}"`)
await new Promise(r => setTimeout(r, 1000));
i++
i2++
}
i=0
}
command()
};
if (answer.startsWith("rosh")) {
ror(5, 30, "rustyspade", 5, 90, 0, 0)
command()
};
if (answer.startsWith("clone")) {
(async () => {
const string = await wrapper.send("select tostring")
wrapper.send(`spawn string ${playername} ${string.ResultString}`)
})()
command()
};
if (answer.startsWith("eyeon")) {
command()
};
if (answer.startsWith("eyeoff")) {
command()
};
if (answer.startsWith("teleport ")) {
//probs not possible but worth poking
(async ()=>{
answerARR = answer.split(" ");
wrapper.send(`select 4`)
var location = await wrapper.send(`select get`)
let [x, z, y] = location.Result.Position;
let [bla, name, x2, z2, y2] = answerARR
playername = namemanager(name)
let dest = teleportmanager(x2)
if (dest != null) {
[x2, z2, y2] = dest
}
wrapper.send(`select move exact ${x2},${z2},${y2}`)
if(z2 == 1000.69) {
wrapper.send(`select snap-ground`)
wrapper.send(`select move up 3`)
}
wrapper.send(`player teleport ${playername} testingarea`)
wrapper.send(`select move exact ${x},${z},${y}`)
})()
command()
};
if (answer.startsWith("getstring")) {
(async ()=>{
let response = await wrapper.send(`select tostring`)
console.log(response.ResultString)
})()
command()
};
if (answer.startsWith("bigen")) {
//tostring select get, string to array, edit string, spawn and move to selectgetted location
(async ()=>{
let selection = await wrapper.send(`select get`)
if(selection.Result) {
let response = await wrapper.send(`select tostring`)
var location = await wrapper.send(`select get`)
let string = response.ResultString.split(",")
await wrapper.send(`select destroy`)
//11 but js from 0
string[10] = 1092616192
string = string.toString()
//console.log(response, location, string, location.Result.Position.toString())
wrapper.send(`spawn string ${playername} ${string}`)
wrapper.send(`select move exact ${location.Result.Position.toString()}`)
wrapper.send(`select rotate exact ${location.Result.Rotation.toString()}`)
}
})()
command()
};
if (answer.startsWith("normalen")) {
//tostring select get, string to array, edit string, spawn and move to selectgetted location
(async ()=>{
let selection = await wrapper.send(`select get`)
if(selection.Result) {
let response = await wrapper.send(`select tostring`)
var location = await wrapper.send(`select get`)
let string = response.ResultString.split(",")
await wrapper.send(`select destroy`)
//11 but js from 0
string[10] = 1065353216
string = string.toString()
//console.log(response, location, string, location.Result.Position.toString())
wrapper.send(`spawn string ${playername} ${string}`)
wrapper.send(`select move exact ${location.Result.Position.toString()}`)
wrapper.send(`select rotate exact ${location.Result.Rotation.toString()}`)
}
})()
command()
};
if (answer.startsWith("smol")) {
//tostring select get, string to array, edit string, spawn and move to selectgetted location
(async ()=>{
let selection = await wrapper.send(`select get`)
if(selection.Result) {
let response = await wrapper.send(`select tostring`)
var location = await wrapper.send(`select get`)
let string = response.ResultString.split(",")
await wrapper.send(`select destroy`)
//11 but js from 0
string[10] = 1036831949
string = string.toString()
//console.log(response, location, string, location.Result.Position.toString())
wrapper.send(`spawn string ${playername} ${string}`)
wrapper.send(`select move exact ${location.Result.Position.toString()}`)
wrapper.send(`select rotate exact ${location.Result.Rotation.toString()}`)
}
})()
command()
};
if (answer.startsWith("baggies")) {
const mats = ["Straw","Dais Leather","Dais Red Leather","Unknown Leather","Wyrm Face Leather","Aluminium","Brass","Carsi Alloy","Copper","Evinon Steel Alloy","Gold","Iron","Mythril","Orchi Alloy","Red Iron Alloy","Silver","Tin","White Gold Alloy","Ash","Birch","Oak","Redwood","Walnut"]
mats.forEach(thing => {
(async ()=>{
thing = thing.toLowerCase();
thing = thing.replace(/\s/g, "")
console.log(thing)
wrapper.send(`spawn ${playername} bag ${thing}`)
wrapper.send(`spawn ${playername} woodenbag ${thing}`)
wrapper.send(`spawn ${playername} standardsidepouchattachment ${thing}`)
wrapper.send(`spawn ${playername} standardsidetoolattachment ${thing}`)
await new Promise(r => setTimeout(r, 500))
})()
}
)
command()
};
if (answer.startsWith("hoocc")) {
const mats = ["Straw","Dais Leather","Dais Red Leather","Unknown Leather","Wyrm Face Leather","Aluminium","Brass","Carsi Alloy","Copper","Evinon Steel Alloy","Gold","Iron","Mythril","Orchi Alloy","Red Iron Alloy","Silver","Tin","White Gold Alloy","Ash","Birch","Oak","Redwood","Walnut"]
mats.forEach(thing => {
(async ()=>{
thing = thing.toLowerCase();
thing = thing.replace(/\s/g, "")
console.log(thing)
wrapper.send(`spawn ${playername} metalwallhook ${thing}`)
await new Promise(r => setTimeout(r, 500))
})()
}
)
command()
};
if (answer.startsWith("parts")) {
const mats = ["Straw","Dais Leather","Dais Red Leather","Unknown Leather","Wyrm Face Leather","Aluminium","Brass","Carsi Alloy","Copper","Evinon Steel Alloy","Gold","Iron","Mythril","Orchi Alloy","Red Iron Alloy","Silver","Tin","White Gold Alloy","Ash","Birch","Oak","Redwood","Walnut"]
mats.forEach(thing => {
(async ()=>{
thing = thing.toLowerCase();
thing = thing.replace(/\s/g, "")
console.log(thing)
wrapper.send(`spawn ${playername} softfabricmediumroll ${thing} 50`)
wrapper.send(`spawn ${playername} softfabricmediumstrips ${thing} 50`)
wrapper.send(`spawn ${playername} hardmetalsmallbits ${thing} 50`)
wrapper.send(`spawn ${playername} hardplatemetalmediumsquare ${thing} forged 50`)
await new Promise(r => setTimeout(r, 500))
})()
}
)
command()
};
if (answer.startsWith("singleparts")) {
const mats = ["Straw","Dais Leather","Dais Red Leather","Unknown Leather","Wyrm Face Leather","Aluminium","Brass","Carsi Alloy","Copper","Evinon Steel Alloy","Gold","Iron","Mythril","Orchi Alloy","Red Iron Alloy","Silver","Tin","White Gold Alloy","Ash","Birch","Oak","Redwood","Walnut"]
mats.forEach(thing => {
(async ()=>{
thing = thing.toLowerCase();
thing = thing.replace(/\s/g, "")
console.log(thing)
wrapper.send(`spawn ${playername} softfabricmediumroll ${thing}`)
wrapper.send(`spawn ${playername} softfabricmediumstrips ${thing}`)
wrapper.send(`spawn ${playername} hardmetalsmallbits ${thing}`)
wrapper.send(`spawn ${playername} hardplatemetalmediumsquare ${thing} forged`)
await new Promise(r => setTimeout(r, 500))
})()
}
)
command()
};
if (answer.startsWith("justafukkinmess")) {
const mats = ["Straw","Dais Leather","Dais Red Leather","Unknown Leather","Wyrm Face Leather","Aluminium","Brass","Carsi Alloy","Copper","Evinon Steel Alloy","Gold","Iron","Mythril","Orchi Alloy","Red Iron Alloy","Silver","Tin","White Gold Alloy","Ash","Birch","Oak","Redwood","Walnut"]
mats.forEach(thing => {
(async ()=>{
thing = thing.toLowerCase();
thing = thing.replace(/\s/g, "")
console.log(thing)
wrapper.send(`repeat 10 0`)
wrapper.send(`repeat 10 0`)
wrapper.send(`repeat 10 0`)
wrapper.send(`repeat 10 0`)
wrapper.send(`spawn ${playername} softfabricmediumroll ${thing}`)
wrapper.send(`spawn ${playername} softfabricmediumstrips ${thing}`)
wrapper.send(`spawn ${playername} hardmetalsmallbits ${thing}`)
wrapper.send(`spawn ${playername} hardplatemetalmediumsquare ${thing} forged`)
await new Promise(r => setTimeout(r, 500))
})()
}
)
command()
};
if (answer.startsWith("backflip")) {
answerARR = answer.split(" ");
setid2(answerARR[1])
wrapper.send(`select ${playerid2}`)
while(i<360) {
wrapper.send(`select rotate pitch 1`)
if(i<180){
wrapper.send(`select move up 0.1`)
}
else {
}
}
wrapper.send(`select look-at ${answerARR[1]}`)
command()
};
if (answer.startsWith("spiralstaircase ")) {
answerARR = answer.split(" ");
(async ()=>{
setid()
wrapper.send(`select ${playerid}`)
let locat = await wrapper.send("select get")
let x2 = locat.Result.Position[0]
let z2 = locat.Result.Position[1]
let y2 = locat.Result.Position[2]
let rotx = locat.Result.Rotation[0]
let rotz = locat.Result.Rotation[1]
let roty = locat.Result.Rotation[2]
i++
while(i<=answerARR[1]) {
i2++
if(i2==5) {
i2=1
}
//foward
if(i2==4) {
let x = x2 - 1
let z = z2 + i - 1
let y = y2
let ida = await wrapper.send(`spawn exact ${x+1},${z},${y-1} 0,270,0 woodenPlatform_Stairs_02 dammitjoel`)
dat.push(ida.Result.Identifier)
let idb = await wrapper.send(`spawn exact ${x-1},${z+0.2},${y+1} 0,0,0 woodenPlatform_1x1 dammitjoel`)
dat.push(idb.Result.Identifier)
}
//right
else if(i2==3) {
let x = x2
let z = z2 + i - 1
let y = y2 - 1
let ida = await wrapper.send(`spawn exact ${x+2},${z},${y} 0,180,0 woodenPlatform_Stairs_02 dammitjoel`)
dat.push(ida.Result.Identifier)
let idb = await wrapper.send(`spawn exact ${x-2},${z+0.2},${y-2} 0,0,0 woodenPlatform_1x1 dammitjoel`)
dat.push(idb.Result.Identifier)
}
//backward
else if(i2==2) {
let x = x2 + 1
let z = z2 + i - 1
let y = y2
let ida = await wrapper.send(`spawn exact ${x+1},${z},${y+1} 0,90,0 woodenPlatform_Stairs_02 dammitjoel`)
dat.push(ida.Result.Identifier)
let idb = await wrapper.send(`spawn exact ${x+1},${z+0.2},${y-3} 0,0,0 woodenPlatform_1x1 dammitjoel`)
dat.push(idb.Result.Identifier)
}
//left
else if(i2==1) {
let x = x2
let z = z2 + i - 1
let y = y2 + 1
let ida = await wrapper.send(`spawn exact ${x},${z},${y} 0,0,0 woodenPlatform_Stairs_02 dammitjoel`)
dat.push(ida.Result.Identifier)
let idb = await wrapper.send(`spawn exact ${x+2},${z+0.2},${y} 0,0,0 woodenPlatform_1x1 dammitjoel`)
dat.push(idb.Result.Identifier)
}
i++
console.log(i)
}
})()
i=0
command()
};
if (answer.startsWith("destroystairs")) {
//console.log(dat)
dat.forEach(num => {
console.log(num)
wrapper.send(`select ${num}`)
wrapper.send(`select destroy`)
})
dat = []
command()
};
if (answer.startsWith("EVERYTHING ")) {
answerARR = answer.split(" ");
answerARR[1] = namemanager(answerARR[1])
console.log(answerARR[2])
while(i<answerARR[2]) {
wrapper.send(`player progression allxp ${answerARR[1]} 999999`)
wrapper.send(`player progression showskills ${answerARR[1]}`)
wrapper.send(`player progression buyskill 0`)
i++
}
command()
};
if (answer.startsWith("spawn ")) {
answerARR = answer.split(" ");
while(i<answerARR[2]) {
wrapper.send(`spawn ${playername} ${answerARR[1]}`)
console.log(answerARR[2], i)
i++
}
command()
};
if (answer.startsWith("square")) {
(async ()=>{
wrapper.send(`select ${playerid}`)
let locat = await wrapper.send("select get")
let x = locat.Result.Position[0]
let z = locat.Result.Position[1]
let y = locat.Result.Position[2]
let size = [30, 30, 10, 20,]
let div = 3
let up = 10
for(i2=0; i2<size[0]; i2++) {
for(i=0; i<size[1]; i++) {
if(i2>=size[2] && i2<size[3] && i>=size[2] && i<size[3] && !(i == size[2] && i2==size[3]-1)) {
//uhh.push(" ")
wrapper.send(`spawn exact ${i/div+x},${z+up},${i2/div+y} 0,0,0 goteraseedlingorb FUCKINGJOEL`)
} else {
wrapper.send(`spawn exact ${i/div+x},${z+up},${i2/div+y} 0,0,0 explosivespike FUCKINGJOEL`)
//wrapper.send(`spawn ${playername} flint`)
console.log(i)
}
}
}
})()
command()
};
if (answer.startsWith("board ")) {
(async ()=>{
wrapper.send(`select ${playerid}`)
let locat = await wrapper.send("select get")
let x = locat.Result.Position[0]
let z = locat.Result.Position[1]
let y = locat.Result.Position[2]
let size = [30, 30, 10, 20,]
let div = 3
let up = 10
for(i2=0; i2<size[0]; i2++) {
for(i=0; i<size[1]; i++) {
if((i2+i)%2==0 || i2>=size[2] && i2<size[3] && i>=size[2] && i<size[3] && !(i == size[2] && i2==size[3]-1)) {
//uhh.push(" ")
wrapper.send(`spawn exact ${i/div+x},${z+up},${i2/div+y} 0,0,0 goteraseedlingorb FUCKINGJOEL`)
} else {
wrapper.send(`spawn exact ${i/div+x},${z+up},${i2/div+y} 0,0,0 explosivespike FUCKINGJOEL`)
//wrapper.send(`spawn ${playername} flint`)
console.log(i)
}
}
}
})()
command()
};
if (answer.startsWith("string")) {
(async ()=>{
let streeng = await wrapper.send(`select tostring`)
console.log(streeng)
let out = streeng.ResultString.split(`|`)
fs.writeFile("items.json", out[0],'utf8', function (err) {
if (err) {
console.log("An error occured while writing JSON Object to File.");
return console.log(err);
}
console.log("JSON file has been saved.");
})
})()
command()
};
if (answer.startsWith("blend")) {
(async () => {
let locat = await wrapper.send("select get")
let x = locat.Result.Position[0]
let z = locat.Result.Position[1]
let y = locat.Result.Position[2]
let xr = locat.Result.Rotation[0]
let zr = locat.Result.Rotation[1]
let yr = locat.Result.Rotation[2]
while(i < 1800) {
await new Promise(r => setTimeout(r, 5));
wrapper.send(`select rotate exact ${xr},${zr+15},${yr}`)
wrapper.send(`select move exact ${x},${z},${y}`)
i++
}
i=0
})()
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
if (answer.startsWith("")) {
command()
};
})}})}