• 0

    posted a message on Programming languages...
    So, I want to program a video game, but I was wondering what language is the best. I am planning on making it a 2d maze game.

    So, my first option is C++, which I have a little bit of experience using. I would use SDL for graphics, which again, I have some experience using (mainly tutorials for it).

    The other option is Java, which I have only taken a look at before now. I have no clue what I would use for graphics (or if Java has that functionality built in, I don't know). However, Java also has the ability to be used on all different operating systems, which may be useful.

    So, which do you think would be better for a beginning game programmer to use? And then, can you point me in the general direction for some good tutorials for it? I'll be using Eclipse for Java programming, and Bloodshed Dev C++ for C++ programming.
    Posted in: Computer Science and Technology
  • 1

    posted a message on Macro / Keybind Mod
    Quote from Smanly

    Hey, this mod Is awesome and I use it every day.
    However, I can't seem to figure out how to use the variables in the events.
    E.g. Adding the "JOINEDPLAYER" that joined into the "onPlayerJoined" event or the variables in the "onPickupItem" event.


    Just surround them with percent signs, and make sure they are in all caps. For example: %JOINEDPLAYER%.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from DemonCrusher36

    How do I change what hotkey its toggling?


    Just put something like this in another macro key:
    if(@toggle);
      do something;
    else;
      do something else;
    endif
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Mumfrey

    This is always the danger with adding regex support to anything, 99% of the discussion thereafter becomes about regexps :( Would it be worth moving this ongoing discussion into a PM thread until it's worked out? Especially since these forums support multi-way PM's.


    Yeah. I think that I have it figured out though. That line format he provided help immensely.

    You may want to make a separate thread specifically for RegEx help. Just a thought :P

    Quote from DemonCrusher36

    Can i get an answer to my (i think) simple question?


    You could try putting
    $${toggle(@toggle)}$$
    In a key state macro (put it in the Key Down and Key Held sections, and putting a delay of 1), then setting the modifier key to control. That probably won't work for a mouse button though.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from acuena

    Did not work either :(
    And I can't see why because I am a noob with RegEX. I basicly knows [a-zA-Z]
    Trying to learn thouge...


    Here, try changing all of the /xa7 with /u00a7 . This will change it from the ASCII version to the Unicode version, and may work.

    Also, I am going to have you do something for me, which will let us see if you have any weird things in your chat format.
    First, I need you to put this in your onChat:
    set(@&lastchat,%CHAT%);

    Then, I need you to bind this to a key (doesn't matter which):
    echo("%@&lastchat%")

    Then, in your options, enable "Store sent messages in local history".
    Next, say "Test" in the chat.
    After that, activate the macro I had you bind to a key.
    Now, open chat and press up. Copy all of that (hold shift and press the arrow keys) and copy and paste it here.

    That will give us the exact string your server is using for messages, color codes and all. The server's chat mod probably has doubled-up chat codes (like &f&e or something) somewhere. I had to do this with my server, as we use Herochat (it was a nightmare, let me tell you).
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Mumfrey

    The mod replaces colour codes in ampersand form with the "real" colour code, so putting for example "&c" in a regex will be converted to the real colour code string, but &[a-f0-9] will not, so the best approach would be to use the hex representation of the colour code and write it as \xa7[a-f\d] (note that I use case-insensitive match so it's not necessary to cater for upper and lower-case letters).


    Ah, that will be immensely helpful, I think. I currently just use a .[a-fA-F0-9] to match a character code, which hasn't caused any issues for me yet, though it could easily cause problems in a less exact regex than the ones I usually use.

    Quote from Mumfrey

    you've accidentally typed /w instead of \w here.

    EDIT: Also, I just realised I ignored my own advice when correcting the code above, the regex should really be in quotes otherwise weird things tend to happen.


    Darn it, I'm always doing that, mixing up my backslashes with my forward slashes. Also, what weird things happen if the regex isn't in quotes? I don't use quotes at all when matching regexes, and I've never had any problems.

    EDIT:
    Quote from acuena

    That did not workl either :(


    Yes, there is a color code at the beginning of the string that is not being matched due to the carrot, which markes the beginning of the string. This causes the regex to fail.
    Using the info that Mumfrey said above, change you're regex to this:

    IFMATCHES(%CHAT%,^\xa7[a-fA-F0-9]- \xa7[a-fA-F0-9](\w{2,16}): (.*)$);
    	MATCH(%CHAT%,^\xa7[a-fA-F0-9]- \xa7[a-fA-F0-9](\w{2,16}): (.*)$,@&lastmsgname,1);
    	MATCH(%CHAT%,^\xa7[a-fA-F0-9]- \xa7[a-fA-F0-9](\w{2,16}): (.*)$,@&lastmsgtext,2);
    	IFMATCHES(%@&lastmsgtext%,"wiylvl");
    		WAIT(1);
    		ECHO("/msg %@&lastmsgname% Some random text");
    		LOG("/msg %@&lastmsgname% Some random text");
    	ENDIF;
    ENDIF;


    \xa7 will match the actual section sign ("§") used to color text in Minecraft.

    EDIT²: Also, Mumfrey, could you add an option in the next version that makes you return to the text file selection screen after exiting out of the text file editor? Its not necessary, but it would be nice for when you are editing several different text files at once.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from acuena



    AH HA! I think I know the problem. The regex is capturing the color code that is used to color the player's name as well as the actual name. So you are sending ?#PlayerName instead of just PlayerName. Change the regex to this:

    MATCH(%CHAT%,(?:- &[a-fA-F0-9])(\w+)(?::),@&lastmsgname,1);
    MATCH(%CHAT%,(?:- &[a-fA-F0-9]\w+: )(.+),@&lastmsg,1);


    &[a-fA-F0-9] will filter out any legitimate character codes (I think. If it doesn't work, change the ampersand "&" to a period ".")
    \w is a special character that matches all upper and lower case letters, as well as numbers and the underscore. Its just a bit faster than typing [a-fA-F0-9_].

    EDIT: Ok, following Mumfrey's suggestion above, I would do this:
    IFMATCHES(%CHAT%,^- &[a-fA-F0-9](\w{2,16}): (.*)$);
    	MATCH(%CHAT%,^- &[a-fA-F0-9](\w{2,16}): (.*)$,@&lastmsgname,1);
    	MATCH(%CHAT%,^- &[a-fA-F0-9](\w{2,16}): (.*)$,@&lastmsgtext,2);
    	IFMATCHES(%@&lastmsgtext%,"wiylvl");
    		WAIT(1);
    		ECHO("/msg %@&lastmsgname% Some random text");
    		LOG("/msg %@&lastmsgname% Some random text");
    	ENDIF;
    ENDIF;


    EDIT AGAIN: That won't work either. You will need to place an additional &[a-fA-F0-9] in between the carrot "^" and the first hyphen "-" to match the color code at the beginning of the text.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from Dratcha

    IF(myflag)
    	LOG("%myflag%");
    	UNSET(myflag)
    ELSE
    	LOG("%myflag%");
    	SET(myflag);
    ENDIF;

    This always returns '%myflag%' being shown as text in the log instead of True or False. Not sure why this is...


    Check your code to make sure you have semicolons after every line. You are missing a few here...
    Posted in: Minecraft Mods
  • 0

    posted a message on [x64][1.18.X] Ovo's Rustic Pack: Redemption v1.12 WIP [Updated: 2022-02-04]
    Quote from jesusfreaks

    Finished it! there's a bug where one book leans and sharply cuts off into another book if there's two adjacent bookshelves (It doesn't happen with three or more). I'm not sure how to fix it, so maybe one of you guys can. Also, this is all your guys work, I just copied and pasted where necessary. The only distortion is where I used the smudge tool. I'll try to find a way to upload it. If worse comes to worst, I will just email it to one of you guys.


    Edit-- Got it on imgur. http://imgur.com/9CWcF


    No offence, but there is already ctm support...
    Posted in: Resource Packs
  • 0

    posted a message on Macro / Keybind Mod
    Quote from acuena

    I am back again trying to get this to work.
    I now have it so it outputs with a LOG "/msg Acuena Some random text". If I do it like that it outputs it twice. But if I do: echo("/msg %@&lastmsgname% Some random text"); it runts it over and over again. And it also says "Player not found" as if outputs a nick that dont exist, se image below.


    I also tried to enclose evrything in "IFMATCHES(%CHAT%,?:- .+?: .*)" as someone suggested but that prevented it from running totally. Here is my current code:

    IFMATCHES(%CHAT%,?:- .+?: .*)
    MATCH(%CHAT%,(?:- )(.*)(?::),@&lastmsgname,1);
    MATCH(%CHAT%,(?:- .+?:)(.*),@&lastmsg,1);
    
    IF(%&lastmsgcopy% = %@&lastmsg%);
    STOP();
    Endif;
    
    IFMATCHES(%@&lastmsg%,"wiylvl");
    wait(1);
    Set(&lastmsgcopy,%@&lastmsg%);
    echo("/msg %@&lastmsgname% Some random text");
    Log("/msg %@&lastmsgname% Some random text");
    
    
    ENDIF;
    
    ENDIF;

    Any ideas?


    He he... I may have told you to do something incorrectly. You have IFMATCHES(%CHAT%,?:- .+?: .*). You need to remove the ?: part at the beginning of the regex. So you should have IFMATCHES(%CHAT%,- .+?: .*). Sorry about that.

    Quote from agrox027

    Is there a way I can do this forever I know theres Do but you have to press a button to activate it, how do I make it so its automatically running?


    You can place it in the onJoin event to start the macro when you load a world or join a multiplayer server.
    Posted in: Minecraft Mods
  • 0

    posted a message on [x64][1.18.X] Ovo's Rustic Pack: Redemption v1.12 WIP [Updated: 2022-02-04]
    Quote from megaformmitch

    Has anyone got plans for doing anything with the sandstone blocks?

    I love this texture pack but these blocks just really dont seem to fit in with the style of the rest of the textures :(


    Are you referring to the ones in the customizer? If so, you might try my variant out. Here:



    Do you like that better? (If not, any suggestions for improvements?)
    Posted in: Resource Packs
  • 0

    posted a message on Macro / Keybind Mod
    Quote from MegaSniperB

    Why would this every time it goes though log (to the cmd window if you launch with a bat file) say "Executed NULL script action, There is an error in your macro script" it works perfectly fine but for some reason it still says that but there is no if statements that would return NULL so im confused. I have it started by a toggle and the EXEC function so it doesn't need the $${ }$$

    AcrobaticsScript.txt
    Do;
    	 IF(HEALTH = 20);
    		  Echo(/home);
    		  Wait(1);
    		  IF(HEALTH = 20);
    					KEYDOWN(forward);
    					Wait(500ms);
    					KEYDOWN(sneak);
    					Wait(500ms);
    					KEYUP(forward);
    					Wait(500ms);
    					KEYUP(sneak);
    	   		ELSE;
    		  ENDIF;
    		  ELSE;
    		  Wait(2);
    	 ENDIF;
    	 IF(HEALTH < 1);
    			   RESPAWN;
    			   TIME(&time);
    			   Log(&0[&1Acrobatics&0] &bYou Died At &4%&time% &b.);
    			   Wait(5);
    		  ELSE;
    			   Wait(1);
    	 ENDIF;
    Loop;


    Try changing RESPAWN to RESPAWN().

    About the other stuff, I don't know, though a volume option for custom sounds is planned.
    Posted in: Minecraft Mods
  • 0

    posted a message on Macro / Keybind Mod
    Quote from konimiota

    Launcher after turn on download our minecraft.jar and prevent xray.


    So, if I am understanding this correctly, your server has a custom launcher that downloads a special minecraft.jar?

    If that is indeed the case, couldn't they just install an xray mod inside your minecraft.jar? Or use a normal .jar and just log in? Sorry if I'm not getting something obvious, but this isn't making much sense to me.

    Anyway, I could be wrong about this, but I don't believe that you can install an xray mod just by putting it in the mods folder, as it would need to alter the way blocks are rendered, and mods that change base classes can't be installed by putting them in the mods folder.
    Posted in: Minecraft Mods
  • 0

    posted a message on [x64][1.18.X] Ovo's Rustic Pack: Redemption v1.12 WIP [Updated: 2022-02-04]
    Hello guys. After quite a while of not posting anything, I've decided to post something.

    I just want to say that you have all been doing a fantastic job, and that I made a version of smooth and decorative sandstone that is, well, smooth. I'll post it here when I get home.

    EDIT: Ok, here we go. Sorry for the delay.
    Posted in: Resource Packs
  • 0

    posted a message on Macro / Keybind Mod
    Quote from noodude

    Are you just trying to make an auto attack macro? if so just make a autoattack.txt file and put key(attack) inside of it. Bind it to what ever key you want as a key state macro. Put $${$$<autoattack.txt>}$$ in the key held window and set the delay to 1ms.


    That will work for a macro that attacks as long as he is holding the button, but he wants it to toggle.

    Quote from Dratcha

    I am having an issue with an attack script. Here is what my script looks like:
    IF(attk);
    	LOG("Attack Off");
    	UNSET(attk);
    ELSE;
    	LOG("Attack On");
    	SET(attk);
    	DO;
    		KEY(attack);
    	WHILE(attk);
    ENDIF;

    The problem I have is I can click my button to start attacking with "Attack On" showing in the log. If I click the button again I keep attacking and I again see "Attack On" in the log instead of "Attack Off". Basically I cannot stop attacking. Does anyone have an idea what could be going on?


    Hmmm... I don't see anything wrong with that. You might try making attk global and see if that fixes your problem.
    Posted in: Minecraft Mods
  • To post a comment, please .