Skip to content

ScriptAPI

A place to ask for help on writing scripts

312 Topics 2.3k Posts
  • How to draw a gradient rect

    Solved
    11
    0 Votes
    11 Posts
    1k Views
    T
    A better way of not using reflection would be: /** * @param color1 color in hex. * @param color2 color in hex. */ function drawSimpleVerticalGradientRect(x, y, x2, y2, color1, color2) { GL11.glBegin(GL11.GL_QUADS); glColor(color1); GL11.glVertex2d(x, y); GL11.glVertex2d(x, y2); glColor(color2); GL11.glVertex2d(x2, y2); GL11.glVertex2d(x2, y); GL11.glEnd(); } /** * @param color A color in hex. */ function glColor(color) { var a = (color >> 24) & 0xFF; var r = (color >> 16) & 0xFF; var g = (color >> 8) & 0xFF; var b = (color) & 0xFF; GL11.glColor4f(r / 255, g / 255, b / 255, a / 255); } I would like to explain this, but i don't know if i could do it well Example Usage: GlStateManager.disableTexture2D(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); // Tells GL to transition between colors GlStateManager.shadeModel(GL11.GL_SMOOTH); drawSimpleVerticalGradientRect(10, 10, 390, 390, 0xffffffff, 0x00ffffff); // Tells GL to use the ONLY' last color GlStateManager.shadeModel(GL11.GL_FLAT); GlStateManager.disableBlend();
  • This topic is deleted!

    Solved
    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Add to TargetStrafe

    Solved
    6
    0 Votes
    6 Posts
    829 Views
    Ali00035A
    @mxmblee Yes
  • drawString wrong xy value

    Solved
    2
    0 Votes
    2 Posts
    338 Views
    test test2T
    help please. text goes nowhere
  • drawScaledCustomSizeModalRect isn't working

    Solved gui script
    4
    0 Votes
    4 Posts
    595 Views
    test test2T
    Sorry, i'm stupid. x and y does not exists
  • anything wrong in this skidded stupid script?

    20
    0 Votes
    20 Posts
    2k Views
    F
    [image: .png]
  • setTimeout

    Solved
    2
    0 Votes
    2 Posts
    317 Views
    CzechHekC
    @dinofeng You have to define setTimeout function as it isn't built-in. Consider importing Core and using timeout(1000, func).
  • What is the method of sending packets(Or usage)

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    Ali00035A
    @wowiesocl use the inline code option pls
  • Script not working

    Solved
    96
    0 Votes
    96 Posts
    15k Views
    M
    @mems said in Script not working: I guess I gotta call you Ali from now on. but you still call me ender
  • How can I get a random player's name in ScriptAPI?

    Solved
    3
    0 Votes
    3 Posts
    404 Views
    Ali00035A
    @czechhek i might use core and ty
  • Core blockanimation

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    L
    How to view?
  • How can i crash minecraft client with script

    Unsolved
    6
    0 Votes
    6 Posts
    754 Views
    Ali00035A
    @yan-tommy np
  • How to render images on screen

    Solved
    5
    0 Votes
    5 Posts
    592 Views
    Purpl3 YTP
    @throwaway39234 Thank you
  • How can i execute a client command?

    Solved
    8
    0 Votes
    8 Posts
    795 Views
    ?
    @bosscreeper48 ok np
  • How can I check for a certain chat message and then execute some code?

    Unsolved
    9
    0 Votes
    9 Posts
    911 Views
    ?
    @bosscreeper48 then you're good to go
  • armorbreaker script

    Unsolved
    7
    0 Votes
    7 Posts
    845 Views
    M
    @plumer-man this
  • Why scripts on 1.12.2 don't work?

    Unsolved
    7
    0 Votes
    7 Posts
    921 Views
    D
    @fartcheese I'm sorry but I uploaded but it doesn't work.
  • B73 and packet S02

    Unsolved
    13
    0 Votes
    13 Posts
    2k Views
    ?
    @idk-my-name yeah, and by telling a lot of script makers to use wrapped packets because of a change
  • How to obtain killaura attacking players

    Unsolved
    19
    0 Votes
    19 Posts
    2k Views
    I
    @somedudeyouveneverheardof ok I see
  • fake lag script

    Unsolved
    11
    0 Votes
    11 Posts
    2k Views
    ?
    @czechhek