Xeraphinite - zombs.io

fontawesome icons (both svgs and converted to pngs) added.

< Opiniones de Xeraphinite - zombs.io

Puntuación: Pasable; el script funciona, pero tiene carencias importantes

§
Publicado: 02/04/2022

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.

ayubloomAutor
§
Publicado: 05/04/2022

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!

§
Publicado: 05/04/2022
Editado: 05/04/2022

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

§
Publicado: 05/04/2022
Editado: 05/04/2022

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);
}

ayubloomAutor
§
Publicado: 08/04/2022

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.

§
Publicado: 09/04/2022

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

ayubloomAutor
§
Publicado: 15/04/2022

It's Unless you spammed the function .

Publicar respuesta

Inicia sesión para responder.