• 0

    posted a message on Macro / Keybind Mod
    Quote from Mart3323»

    You can clear an array easily with `Unset(&myarray[])`
    If that didn't exist you could still do something like `#n = ArraySize(&myarray[]);DO(%#n%);POP(&myarray[]);LOOP;`


    Wait, UNSET also works for other variables then boolean flags?

    Thanks, thats good to know, but I am still a bit confused why local variables are globaly saved in a file and even survive a computer restart.

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod

    Is it possible to delete local variables after a script is run?


    I had run some scripts set local variables e.g. #m, &m, &m[] and after stopping all scripts or even restarting minecraft,

    if I check the variables its still filled with the same values - and no its not global variables.


    This is a problem especially with arrays.

    At one point a array is filled with 10 different values (index 0-9). If I want to use this variable name again, I first have to empty the array by hand with POP(), otherwise if I only put 4 values (index 0-3) into the array it would still iteraote over 10 values, because the old ones are still there, too.


    Is there some setting I am missing or some command doing something like &m[]=NULL (this specific doesn't work) or &m[] = new Array() or only &m[]; to get a completly new/empty array?

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod

    Can you get the label from a custom GUICHEST?

    i.e. the GUI title would say "NPC-Seller", is it possible to extract and utilize this title in my program?



    In vanilla minecraft you can farm sugar cane holding the left mouse button down. Is there any command for this in macro mod?

    The KEYDOWN only supports walking movements and the only option I see is calling KEY("attack") again and again, but not to fast to get banned for autoclicking.

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Mart3323»

    The other thing i suspect is that you have spaces after the commas - i remember at least some commands choking on them (they treat the space as part of the input)


    OMG, yes I have, now it works, thank you!

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Mart3323»

    You may need to wait for the GUI to open using `DO;UNTIL(GUI=="GUIINVENTORY")` (Double check what the correct inventory name is)


    Even when I add lots of breaks between, it still does not work.

    Do you have a working example?


    GUI("inventory");
    WAIT(5000ms);
    DO;UNTIL(GUI=="GUIINVENTORY")
    IF(GUI!="GUIINVENTORY");STOP();ENDIF;
    LOG(%GUI%);


    Output:

    GUIINVENTORY

    9 0


    I don't have any other mods installed, its vanilla minecraft with liteloader 1.12.1.

    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod

    Is it possible that GETSLOT() and GETSLOTITEM() are bugged in the newest version (0.15.4)?


    I got very basic code, but both functions won't assign anything to the variables.


    ${
    
    GUI("inventory");
    
    FOR(#invslot, 9, 35);
    		GETSLOTITEM(%#invslot%, &invidvar, #invstacksize);
    		WAIT(10ms);
    		LOG(%#invslot% %&invidvar% %#invstacksize%);
    NEXT;
    
    }$

    Output: 9 0

    Expected Output: 9 reeds 64


    Tested lots of variation, but I can only get item name and not the stacksize if I write:

    &invidvar = GETSLOTITEM(%#invslot%);

    Can anyone help what I am doing wrong or if it is really bugged.

    Thanks.

    Posted in: Minecraft Mods
  • To post a comment, please or register a new account.