Get info

Get info from people near to you.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         Get info
// @namespace    https://www.youtube.com/channel/UCC4Q28czyJPjSPtYQerbPGw
// @version      1.1.0
// @description  Get info from people near to you.
// @author       Demostanis
// @match        http://zombs.io/*
// @discord      https://discord.gg/CcAgabU
// ==/UserScript==

class GetInfo {
        constructor() {}

        init() {
                this.SendChatMessage(atob("U2NyaXB0IG1hZGUgYnkgRGVtb3N0YW5pcyBodHRwczovL2Rpc2NvcmQuZ2cvQ2NBZ2FiVQ=="), "Global")

                setTimeout(() => {
                        const lastMessage = this.GetLastMessage(),
                                style = document.createElement("style"),
                                disabledInfo = [
                                        "aimingYaw",
                                        "availableSkillPoints",
                                        "baseSpeed",
                                        "collisionRadius",
                                        "damage",
                                        "energy",
                                        "energyRegenerationRate",
                                        "entityClass",
                                        "experience",
                                        "firingTick",
                                        "hatName",
                                        "height",
                                        "interpolatedYaw",
                                        "isBuildingWalking",
                                        "isInvulnerable",
                                        "isPaused",
                                        "lastDamage",
                                        "lastDamageTarget",
                                        "lastDamageTick",
                                        "lastPetDamage",
                                        "lastPetDamageTarget",
                                        "lastPetDamageTick",
                                        "level",
                                        "maxEnergy",
                                        "maxHealth",
                                        "model",
                                        "msBetweenFires",
                                        "reconnectSecret",
                                        "slowed",
                                        "speedAttribute",
                                        "startChargingTick",
                                        "stunned",
                                        "weaponName",
                                        "weaponTier",
                                        "width",
                                        "yaw",
                                        "zombieShieldHealth",
                                        "zombieShieldMaxHealth"
                                ]

                        style.innerHTML = ".hud-chat .hud-chat-message { white-space: normal; } .hud-chat-messages { resize: both; }"

                        document.head.appendChild(style)

                        Game.currentGame.network.addEntityUpdateHandler(e => {
                                const entities = Game.currentGame.world.entities

                                let HTML = ""

                                Object.keys(entities).forEach((t, i) => {
                                        const entity = entities[t].fromTick

                                        if (entity.entityClass !== "PlayerEntity") return

                                        Object.keys(entity).forEach((prop, index) => {
                                                if (disabledInfo.indexOf(prop) >= 0) return

                                                if (entity[prop].x && entity[prop].y) {
                                                        HTML += `<p>${prop}: ${entity[prop].x}, ${entity[prop].y}</p>`
                                                } else {
                                                        HTML += `<p>${prop}: ${entity[prop]}</p>`
                                                }
                                        })

                                        HTML += "<hr>"
                                })

                                lastMessage.innerHTML = HTML
                        })
                }, 1000)
        }

        SendChatMessage(msg, channel) {
                Game.currentGame.network.sendRpc({
                        name: "SendChatMessage",
                        channel: channel,
                        message: msg
                })
        }

        SendFakeChatMessage(name, msg) {
                Game.currentGame.ui.getComponent("Chat").onMessageReceived({
                        displayName: name,
                        message: msg
                })
        }

        GetLastMessage() {
                const messages = document.querySelectorAll(".hud-chat-message"),
                        messagesArray = Array.prototype.slice.call(messages)

                return Array.prototype.pop.call(messagesArray)
        }

        GetFirstMessage() {
                const messages = document.querySelectorAll(".hud-chat-message"),
                        messagesArray = Array.prototype.slice.call(messages)

                return Array.prototype.shift.call(messagesArray)
        }
}

if (!Game.currentGame.world.inWorld) Game.currentGame.network.addEnterWorldHandler(() => new GetInfo().init())
else new GetInfo().init()