xabbo-scripts/Snake Target Probe.csx
Administrator 7bfc390ed6 Initial commit: 68 Xabbo Scripter scripts
Habbo Hotel automation scripts including:
- Game solvers (Snake, Color Puzzle, Tetris, Flappy Bird, Flood-IT)
- Room utilities (Autogate, One-Way Door, Furni Scanner)
- Bot tools (Heal Bot, Pet Trainer, User Collector)
- Trading & economy (Furni-Matic, Seed Trade, Trade Spam)

Cleaned up: removed 5 duplicates and 2 broken scripts,
renamed 37 gibberish filenames to descriptive names.
2026-03-16 09:38:59 +01:00

47 lines
1.2 KiB
C#

/// @name Snake Target Probe
using System;
using System.Linq;
using System.Collections.Generic;
const int MIN_X = 37, MAX_X = 59, MIN_Y = 29, MAX_Y = 51;
bool InBoard(dynamic i)
=> i != null && i.Location.X >= MIN_X && i.Location.X <= MAX_X && i.Location.Y >= MIN_Y && i.Location.Y <= MAX_Y;
var map = new Dictionary<long, (int kind, int x, int y, int state)>();
foreach (var i in FloorItems)
{
if (!InBoard(i)) continue;
map[i.Id] = ((int)i.Kind, i.Location.X, i.Location.Y, (int)i.State);
}
Log("Snake Target Probe started");
Log("Watching board item state/move changes...");
while (Run)
{
Delay(100);
foreach (var i in FloorItems)
{
if (!InBoard(i)) continue;
int kind = (int)i.Kind;
int x = i.Location.X;
int y = i.Location.Y;
int state = (int)i.State;
if (!map.TryGetValue(i.Id, out var prev))
{
map[i.Id] = (kind, x, y, state);
Log($"add id={i.Id} kind={kind} pos=({x},{y}) state={state}");
continue;
}
if (prev.x != x || prev.y != y || prev.state != state)
{
Log($"chg id={i.Id} kind={kind} ({prev.x},{prev.y})/{prev.state} -> ({x},{y})/{state}");
map[i.Id] = (kind, x, y, state);
}
}
}