(function() {
let lastPeriode = null;
let saldo = 20000;
let betAwal = 1000;
let bet = betAwal;
let menang = 0, kalah = 0;
let history = [];
function getData() {
const rows = document.querySelectorAll('.van-row'); // sesuaikan jika selector berubah
if (!rows.length) return;
const data = Array.from(rows).map(row => {
const cols = row.querySelectorAll('.van-col');
return {
periode: cols[0]?.innerText.trim(),
angka: parseInt(cols[1]?.innerText.trim()),
besarKecil: cols[2]?.innerText.trim(),
};
});
const terbaru = data[0];
if (terbaru && terbaru.periode !== lastPeriode) {
lastPeriode = terbaru.periode;
prosesHasil(terbaru);
}
}
function prediksiOtomatis() {
if (history.length < 5) return "Besar"; // default awal
const besar = history.filter(h => h === "Besar").length;
const kecil = history.filter(h => h === "Kecil").length;
return besar >= kecil ? "Besar" : "Kecil";
}
function prosesHasil(hasil) {
const prediksi = prediksiOtomatis();
const isMenang = hasil.besarKecil === prediksi;
if (isMenang) {
saldo += bet;
menang++;
bet = betAwal;
} else {
saldo -= bet;
kalah++;
bet *= 2;
}
history.unshift(hasil.besarKecil);
if (history.length > 5) history.pop();
console.clear();
console.log("=== BOT WINGO OTOMATIS ===");
console.log(`Periode : ${hasil.periode}`);
console.log(`Angka : ${hasil.angka}`);
console.log(`Hasil : ${hasil.besarKecil}`);
console.log(`Prediksi : ${prediksi}`);
console.log(`Status : ${isMenang ? "MENANG" : "KALAH"}`);
console.log(`Saldo : ${saldo}`);
console.log(`Riwayat : ${history.join(', ')}`);
console.log(`Win/Lose : ${menang} / ${kalah}`);
}
setInterval(getData, 1500);
})();