xabbo-scripts/Scripts/Variable Getter.csx
Administrator 7a548130a3 Move all scripts into Scripts/ subfolder
Keeps the repo root clean - only README.md visible on landing page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 09:49:37 +01:00

61 lines
1.8 KiB
C#

// Flag to track first intercept
bool isFirstIntercept = true;
OnIntercept(In["WiredVariablesForObject"], e => {
// Only log a separator if this isn't the first intercept
if (!isFirstIntercept) {
Log("----------------------------------------");
} else {
isFirstIntercept = false;
}
int param1 = e.Packet.ReadInt();
int param2 = e.Packet.ReadInt();
int itemCount = e.Packet.ReadInt();
var keyMap = new Dictionary<string, string>() {
{"61054", "ach_score"},
{"61053", "user_id"},
{"-100", "@id"},
{"-101", "@class_id"},
{"-102", "@height"},
{"-110", "@state"},
{"-120", "@position.x"},
{"-121", "@position.y"},
{"-122", "@rotation"},
{"-123", "@altitude"},
{"-180", "@owner_id"},
{"-129", "index/dimension_related"},
{"-130", "unknown_1"},
{"-131", "unknown_2"},
{"-140", "@type/stackable_related"},
{"-141", "dimension_related"},
{"61057", "index/dimension_related"},
// User variables mappings
{"-205", "@index"},
{"-200", "@type"},
{"-220", "@gender"},
{"-210", "@level"},
{"-211", "@achievement_score"},
{"-206", "@is_hc"},
{"-266", "@is_group_admin"},
{"-230", "@position.x"},
{"-231", "@position.y"},
{"-232", "@direction"},
{"-233", "@altitude"},
{"-250", "@favourite_group_id"},
{"-222", "@room_entry_method"},
{"-270", "@user_id"}
};
for (int i = 0; i < itemCount; i++) {
string key = e.Packet.ReadString();
int value = e.Packet.ReadInt();
string varName = keyMap.ContainsKey(key) ? keyMap[key] : $"Unknown ({key})";
Log($"{varName}: {value}");
}
});
Wait();