Skip to content

Instantly share code, notes, and snippets.

View at15four2020's full-sized avatar
📆
The time is going

Fifteen Four at15four2020

📆
The time is going
View GitHub Profile
function getGameDataUrl(host) {
switch(host) {
case "game-nl.habbo.com":
return "https://www.habbo.nl/gamedata/";
case "game-br.habbo.com":
return "https://www.habbo.com.br/gamedata/";
case "game-tr.habbo.com":
return "https://www.habbo.com.tr/gamedata/";
case "game-de.habbo.com":
return "https://www.habbo.de/gamedata/";
@at15four2020
at15four2020 / CSPickup.gprog.js
Created August 22, 2021 16:43
Pickup anything, anywhere, client-side.
interceptToServer("PickupObject", function(message) {
message.setBlocked(true)
const packet = message.getPacket()
packet.readInteger()
const id = packet.readInteger()
sendToClient(HPacketToClient("ObjectRemove", [""+id, false, -1, 0]))
sendToClient(HPacketToClient("ItemRemove", [""+id, -1]))
})
if (typeof FFBot == "undefined") {
FFBot = (function() {
if (typeof PrivateChatManager == 'undefined') {
load("https://gist.githubusercontent.com/at15four2020/7a380485e641fb48e9a30593869c1150/raw/PrivateChatManager.gprog.js")
}
if (typeof BlockProgramming == 'undefined') {
load('https://gist.github.com/at15four2020/6b405f224d91fa50975546031f764aec/raw/BlockProgramming.gprog.js')
}
let chat
// BlockProgramming.gprog.js
if (typeof BlockProgramming == "undefined") {
BlockProgramming = (function() {
if (typeof parse_in_Users == 'undefined') {
load('https://gist.github.com/at15four2020/2d69302316f3705dec18e6a04c432896/raw/parse_in_Users.gprog.js')
}
if (typeof parse_in_UserUpdate == 'undefined') {
load('https://gist.github.com/at15four2020/2d69302316f3705dec18e6a04c432896/raw/parse_in_UserUpdate.gprog.js')
if (typeof PrivateChatManager == "undefined") {
PrivateChatManager = (function() {
let botCount = 0
let botIds = 99999999
function blockMessage(message) {
message.setBlocked(true)
}
interceptToServer('GetExtendedProfile', blockMessage)
interceptToClient('ErrorReport', blockMessage)
@at15four2020
at15four2020 / GMarketplaceBuyer.gprog.js
Last active September 23, 2022 15:27
Buy items from the marketplace as soon as they appear.
var GMarketplaceBuyer = (function () {
if (typeof setTimeout == 'undefined') {
load("https://gist.githubusercontent.com/kayhadrin/4bf141103420b79126e434dfcf6d4826/raw/a9174bacb2e4d0d8a619d2575b8de55a291c8786/js-timeout-polyfill.js")
}
if (typeof Promise == 'undefined') {
load("https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.auto.min.js")
}
if (typeof RoomChatManager == 'undefined') {
load("https://gist.github.com/Alynva/7f5dd840fc54fa49e0c538f51b69ac93/raw/RoomChatManager.gprog.js")
}
var http = (function() {
function asResponse(con){
var d = read(con.inputStream);
return d;
}
function read(inputStream){
var inReader = new java.io.BufferedReader(new
java.io.InputStreamReader(inputStream));
@at15four2020
at15four2020 / G-Recorder.gprog.js
Last active July 3, 2021 20:59
Record outgoing packages and save/replay later.
var GPlaceRecorder = (function() {
if (typeof setTimeout == 'undefined') {
load("https://gist.githubusercontent.com/kayhadrin/4bf141103420b79126e434dfcf6d4826/raw/a9174bacb2e4d0d8a619d2575b8de55a291c8786/js-timeout-polyfill.js")
}
if (typeof RoomChatManager == 'undefined') {
load("https://gist.github.com/Alynva/7f5dd840fc54fa49e0c538f51b69ac93/raw/RoomChatManager.gprog.js")
}
var headersToRecord = ['PlaceObject', 'MoveObject'] // PlaceObject 1905, MoveObject 2379
var replayInterval = 500
function _intercepted(message) {
var side = message.getDestination()
var packet = message.getPacket()
var sideListeners = side == TOCLIENT ? _toClientListeners : _toServerListeners
var handlers = sideListeners[packet.headerId()]
if (!handlers) return
handlers.forEach(function (handler) {
try {
@at15four2020
at15four2020 / GParsers.gprog.md
Last active September 23, 2022 15:27
GProgrammer parsers

Parsers

This is a list of known packages parsers mainly to be used in G-Earth with the GProgrammer extension, but the code may be useful to understand the package structure and read it anywhere.

Return structure

Every parser may share some caracteritcs:

  • The parser is responsable to read the whole package, from the start to the end;
  • The return type is always an object;