<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Help a script-noob now]]></title><description><![CDATA[<p dir="auto">I tried to recreate my BotCheck in Script, but it gives just lots of errors and wont work <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/customizations/d30706f3-039b-40f6-9a36-377a5e6f23e3-axocry.png?v=2d2252001bf" class="not-responsive emoji emoji-customizations emoji--axocry" style="height:23px;width:auto;vertical-align:middle" title=":axocry:" alt="undefined" /></p>
<pre><code>/// api_version=2
var script = registerScript({
    name: "RadiusAntiBot",
    version: "1.0",
    authors: ["BestNub"]
});

var EntityPlayer = Java.type("net.minecraft.entity.player.EntityPlayer");
var EventState = Java.type("net.ccbluex.liquidbounce.event.EventState");
var notAlwaysInRadius = [];

script.registerModule({
    name: "RadiusAntiBot",
    description: "Removes bots always in radius.",
    category: "Misc",
    settings: {
        radius: Setting.float({
            name: "Radius",
            default: 20.0,
            min: 10.0,
            max: 100.0
        }),
        removeRadius: Setting.float({
            name: "RemoveRadius",
            default: 10.0,
            min: 0.0,
            max: 10.0
        }),
        chatLog: Setting.boolean({
            name: "ChatLog",
            default: false
        }),
    }
}, function (module) {
    module.on("enable", function () {
        notAlwaysInRadius = [];
    });

    module.on("world", function (event) {
        notAlwaysInRadius = [];
    });

    module.on("update", function () {
        var entityList = mc.theWorld.getLoadedEntityList();
        var playerList = [];

        for (var i in entityList)
            if (entityList[i] instanceof EntityPlayer)
                playerList.push(entityList[i]);

        for (var i in playerList) {
            var currentEntity = playerList[i];

            if (notAlwaysInRadius.indexOf(currentEntity.getEntityId()) == -1 &amp;&amp; mc.thePlayer.getDistanceToEntity(currentEntity) &gt; module.settings.radius.get()) {
                notAlwaysInRadius.push(currentEntity.getEntityId());
                if (module.settings.chatLog.get())
                    Chat.print("[RadiusAntiBot] " + currentEntity.getName() + " is a Player");
            }

            if (currentEntity != mc.thePlayer &amp;&amp; notAlwaysInRadius.indexOf(currentEntity.getEntityId()) == -1 &amp;&amp; mc.thePlayer.getDistanceToEntity(currentEntity) &lt; module.settings.removeRadius.get()) {
                mc.theWorld.removeEntity(currentEntity);
                if (module.settings.chatLog.get())
                    Chat.print("[RadiusAntiBot] Removed " + currentEntity.getName());
            }
        }
    });
});
</code></pre>
<p dir="auto">Edit: Thx for the help. Fixed it and remove only Players added. Works great on JartexNetwork</p>
]]></description><link>https://forum.liquidbounce.net/topic/268/help-a-script-noob-now</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Mar 2026 21:15:46 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/268.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jul 2020 20:57:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Help a script-noob now on Tue, 21 Jul 2020 11:02:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/senk-ju">@<bdi>Senk-Ju</bdi></a>  thx</p>
]]></description><link>https://forum.liquidbounce.net/post/1566</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/1566</guid><dc:creator><![CDATA[bestnub]]></dc:creator><pubDate>Tue, 21 Jul 2020 11:02:00 GMT</pubDate></item><item><title><![CDATA[Reply to Help a script-noob now on Tue, 21 Jul 2020 06:37:57 GMT]]></title><description><![CDATA[<p dir="auto">indexOf is similar to includes, you just have to use it cause java only supports ES5.</p>
]]></description><link>https://forum.liquidbounce.net/post/1555</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/1555</guid><dc:creator><![CDATA[6Sence]]></dc:creator><pubDate>Tue, 21 Jul 2020 06:37:57 GMT</pubDate></item><item><title><![CDATA[Reply to Help a script-noob now on Tue, 21 Jul 2020 03:33:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/bestnub">@<bdi>bestnub</bdi></a> JavaScript ES5 does not support <code>Array.includes()</code>. If you want to use it, either add a polyfill like <a href="https://mariusschulz.com/blog/ecmascript-2016-array-prototype-includes" target="_blank" rel="noopener noreferrer nofollow ugc">this one</a> or setup a <a href="https://liquidbounce.net/docs/ScriptAPI/Setting%20up%20Babel" target="_blank" rel="noopener noreferrer nofollow ugc">Babel environment</a> to compile modern JavaScript down to ES5.</p>
]]></description><link>https://forum.liquidbounce.net/post/1545</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/1545</guid><dc:creator><![CDATA[Senk Ju]]></dc:creator><pubDate>Tue, 21 Jul 2020 03:33:56 GMT</pubDate></item><item><title><![CDATA[Reply to Help a script-noob now on Tue, 21 Jul 2020 02:23:05 GMT]]></title><description><![CDATA[<p dir="auto">I don't understand how does it work <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f615.png?v=2d2252001bf" class="not-responsive emoji emoji-android emoji--confused" style="height:23px;width:auto;vertical-align:middle" title=":/" alt="😕" /></p>
]]></description><link>https://forum.liquidbounce.net/post/1534</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/1534</guid><dc:creator><![CDATA[notautismatall]]></dc:creator><pubDate>Tue, 21 Jul 2020 02:23:05 GMT</pubDate></item><item><title><![CDATA[Reply to Help a script-noob now on Mon, 20 Jul 2020 21:31:18 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/czechhek">@<bdi>CzechHek</bdi></a> can you explain, how i should use indexOf</p>
]]></description><link>https://forum.liquidbounce.net/post/1509</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/1509</guid><dc:creator><![CDATA[bestnub]]></dc:creator><pubDate>Mon, 20 Jul 2020 21:31:18 GMT</pubDate></item><item><title><![CDATA[Reply to Help a script-noob now on Mon, 20 Jul 2020 21:20:51 GMT]]></title><description><![CDATA[<p dir="auto"><s>why don't you read the errors and fix them lololololo</s></p>
<p dir="auto">replace includes with indexOf</p>
]]></description><link>https://forum.liquidbounce.net/post/1507</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/1507</guid><dc:creator><![CDATA[CzechHek]]></dc:creator><pubDate>Mon, 20 Jul 2020 21:20:51 GMT</pubDate></item></channel></rss>