xabbo-scripts/FriendAdder.csx
Administrator b6c31a7feb Add 165 scripts from desktop collection + update README
Added scripts from C:\Users\ploet\Desktop\Habbo\Xabbo Scripte:
- 39 KI/Chatbot scripts (ChatGPT, Gemini, Grok, DeepSeek, Ollama)
- Game solvers (Domino, Dodgeball, Obsidian Maze, IceBall)
- Collision avoidance bots (5 versions)
- Plant/breeding automation (12 scripts)
- Trading tools, packet debuggers, room utilities
- Navigation & teleport helpers

Removed: 9 files (3 empty, 2 trivial, 4 cross-duplicates)
Updated README with full categorized index of all 230+ scripts.

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

60 lines
1.4 KiB
C#

bool CurrentRoom = false;
HashSet<long> requestedFriends = new HashSet<long>();
int totalRequestsSent = 0;
OnIntercept(In.MessengerError, e => {
e.Block();
});
OnEnteredRoom(async (e) => {
if (CurrentRoom) return;
Log("Entered: " + e.Room.Data.Name);
Log("Adding all users...");
CurrentRoom = true;
await DelayAsync(2000);
var usersToAdd = Users.Where(u => u.Id != UserId && !requestedFriends.Contains(u.Id)).ToList();
foreach (var user in usersToAdd)
{
Log($"Sending friend request to: {user.Name}");
try {
AddFriend(user);
requestedFriends.Add(user.Id);
totalRequestsSent++;
await DelayAsync(500);
}
catch (Exception ex) {
Log($"Error adding {user.Name} as friend: {ex.Message}");
}
}
Log($"Total friend requests sent: {totalRequestsSent}");
});
OnLeftRoom(e => {
Log("Left room");
CurrentRoom = false;
});
OnEntityAdded(e => {
if (CurrentRoom && e.Entity is IRoomUser user && user.Id != UserId && !requestedFriends.Contains(user.Id))
{
Log($"New user joined: {user.Name}, adding as friend");
try {
AddFriend(user);
requestedFriends.Add(user.Id);
totalRequestsSent++;
}
catch (Exception ex) {
Log($"Error adding {user.Name} - {ex.Message}");
}
}
});
Log("Started");
Wait();