fontawesome icons (both svgs and converted to pngs) added.
< Opiniones de Xeraphinite - zombs.io
I don't think it will *ever* sell a tower twice, but if another player is selling the same tower as the script is doing then it will break and thats a flaw of my code. I will try to patch it in the next update, dont worry!
I don't think it will *ever* sell a tower twice, but if another player is selling the same tower as the script is doing then it will break and thats a flaw of my code. I will try to patch it in the next update, dont worry!
umm, i console.log the uid of the tower and there is always 2 same uid, even 3 sometimes, maybe because high ping so game.ui.buildings lag
I don't think it will *ever* sell a tower twice, but if another player is selling the same tower as the script is doing then it will break and thats a flaw of my code. I will try to patch it in the next update, dont worry!
i made this code, for me it sell almost 2x faster and dont break if another player sell the same tower
let sellUid = []
function sellAllByType(type) {
let buildings = Object.values(game.ui.buildings)
for (let i = 0; i < buildings.length; i++){
if (Object.values(Object.values(game.ui.buildings)[i])[2] == type){
sellUid.push(Object.values(Object.values(game.ui.buildings)[i])[4])
}
}
let sellInterval = setInterval(() => {
if (sellUid.length > 0 && game.ui.playerPartyCanSell) {
game.network.sendRpc({
name: "DeleteBuilding",
uid: parseInt(sellUid.shift())
})
} else {
clearInterval(sellInterval)
}
},200);
}
Your solution is complicated to say the least, and i dont see any failsafe built into it? Also, there is literally no way for my code to sell more than 2 towers at once unless you spammed the function.
Your solution is complicated to say the least, and i dont see any failsafe built into it? Also, there is literally no way for my code to sell more than 2 towers at once unless you spammed the function.
just add console.log(target.uid) to your sell function and you will understand
It's Unless you spammed the function .
Sell function sometime selling the same tower twice, make it slow
When i use 2 or more player to sell at the same time, it sometime create a tower that i cant sell but still count as placed and i cant sell anything.