anything wrong in this skidded stupid script?
-
@ChocoPie_isme I see that because you use tab & spaces in a single file lol
-
-
@ChocoPie_isme independent animations
-
@ChocoPie_isme
lol I edited it randomly// api_version=2 var EntityPlayer = Java.type("net.minecraft.entity.player.EntityPlayer"); //var EntityLivingBase = Java.type("net.minecraft.entity.EntityLivingBase"); var GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager"); var RenderHelper = Java.type("net.minecraft.client.renderer.RenderHelper"); var OpenGlHelper = Java.type("net.minecraft.client.renderer.OpenGlHelper"); var Potion = Java.type("net.minecraft.potion.Potion"); var Fonts = Java.type("net.ccbluex.liquidbounce.ui.font.Fonts"); var ScaledResolution = Java.type("net.minecraft.client.gui.ScaledResolution"); var GL11 = Java.type("org.lwjgl.opengl.GL11"); var Gui = Java.type("net.minecraft.client.gui.Gui"); //plz add other necessary imports. var script = registerScript({ name: "TargetHUD", version: "6.9", authors: ["Choco", "Kasumi"] }); /**@type EntityPlayer? */ var target = null; script.registerModule({ name: "TargetHUD", category: "Render", description: "Show your current target." }, function (TargetHUD) { TargetHUD.on("disable", function () { target = null; }); TargetHUD.on("render2D", function (event) { if (!target.isEntityAlive() || target.getDistanceToEntity(mc.thePlayer) > 10.0) target = null; if (!target) return; var sr = new ScaledResolution(mc); var y = 5; var pos = `Distance: ${target.getDistanceToEntity(mc.thePlayer).toFixed(1)}m | Sneaking: ${target.isSneaking()}`; var health = `Health: ${target.getMaxHealth().toFixed(1)}/${target.getMaxHealth().toFixed(1)} | HurtTime: ${target.hurtTime}`; var regeneration = `Regeneration: ${target.isPotionActive(Potion.regeneration) ? "Active" : "Inactive"}` GL11.glPushMatrix(); GL11.glTranslated(sr.getScaledWidth_double() * 0.5, sr.getScaledHeight_double() * 0.5, 0); Gui.drawRect(35, 0, 297.5, 75, 0x7F000000); drawEntityOnScreen(405, 260, 31, 90, 90, target); Fonts.font40.drawStringWithShadow(target.getName(), 91, y, 0x00CFFF); Fonts.font35.drawStringWithShadow(pos, 91, y += Fonts.font40.FONT_HEIGHT, 0xFFFFFF); Fonts.font35.drawStringWithShadow(health, 91, y += Fonts.font35.FONT_HEIGHT, 0xFFFFFF); Fonts.font35.drawStringWithShadow(regeneration, 91, y += Fonts.font35.FONT_HEIGHT, 0xFFFFFF); var delta = ~~mc.thePlayer.getHealth() - ~~target.getHealth(); if (!delta) Fonts.font40.drawStringWithShadow("You Will Draw The Duel! ", 91, y += Fonts.font35.FONT_HEIGHT, 0xFFFF00); else if (delta > 0) Fonts.font40.drawStringWithShadow("You Will Win The Duel! ", 91, y += Fonts.font35.FONT_HEIGHT, 0x6CC312); else Fonts.font40.drawStringWithShadow("You Will Lose The Duel! ", 91, y += Fonts.font35.FONT_HEIGHT, 0xFF3300); var proportion = (target.getHealth() + target.getAbsorptionAmount()) / (target.getMaxHealth() + target.getAbsorptionAmount()); Gui.drawRect(88, y + Fonts.font35.FONT_HEIGHT, proportion * 50 + 88, y + Fonts.font35.FONT_HEIGHT + 15, 0xFFFF0000); GL11.glPopMatrix(); }); TargetHUD.on("attack", function (event) { var entity = event.getTargetEntity(); if (entity instanceof EntityPlayer) target = entity; }); }); function drawEntityOnScreen(posX, posY, scale, mouseX, mouseY, ent) { GlStateManager.enableColorMaterial(); GlStateManager.pushMatrix(); GlStateManager.translate(posX, posY, 50.0); GlStateManager.scale((-scale), scale, scale); GlStateManager.rotate(180.0, 0.0, 0.0, 1.0); GlStateManager.rotate(135.0, 0.0, 1.0, 0.0); RenderHelper.enableStandardItemLighting(); GlStateManager.rotate(-135.0, 0.0, 1.0, 0.0); GlStateManager.rotate(-(Math.atan((mouseY / 40.0))) * 20.0, 1.0, 0.0, 0.0); ent.renderYawOffset = 0 ent.renderPitchOffset = 0 ent.rotationYaw = Math.atan((mouseX / 40.0)) * 40.0; ent.rotationPitch = -(Math.atan((mouseY / 40.0))) * 20.0; ent.rotationYawHead = ent.getRotationYawHead() GlStateManager.translate(0.0, 0.0, 0.0); rendermanager = mc.getRenderManager(); rendermanager.setPlayerViewY(180.0); rendermanager.setRenderShadow(false); rendermanager.renderEntityWithPosYaw(ent, 0.0, 0.0, 0.0, 0.0, 1.0); rendermanager.setRenderShadow(true); GlStateManager.popMatrix(); RenderHelper.disableStandardItemLighting(); GlStateManager.disableRescaleNormal(); GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit); GlStateManager.disableTexture2D(); GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit); }
-
skidding is that hard apparently
-
can i get a useful reply
-
-
@chocopie_isme this is the issue:
if (target.isDead || target.getDistanceToEntity(mc.thePlayer)> 15.0) {
target = null;
it should be undefined -