[AutoIt] Help making a Script menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    m0rbidang3l's Avatar Contributor
    Reputation
    291
    Join Date
    Feb 2007
    Posts
    794
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [AutoIt] Help making a Script

    So, I'm trying to make a bot for Minecraft to fly around my world in a spiral.

    I need to do this, because the world generation mod I am using is not compatible with Bukkit. So, I'm going to have to pre-generate the world and then upload it.

    Anyways... Onto the problem

    I'm using this code to hold down W, until I press Escape.

    Code:
    local $i=0
    
    
    Do
    	Send('{w down}')
    
    
    If _IsPressed("1B") Then
    	$i= $i+2
    EndIf
    It hold W down just fine, but doesn't stop when I press escape.

    Problem number 2. I need the mouse to continuously drift to the left. I have no idea how to do that though.

    Would this work to make it always move to the left?

    Code:
    MouseMove(0,450,75)

    [AutoIt] Help making a Script
  2. #2
    Swum's Avatar Corporal
    Reputation
    8
    Join Date
    Aug 2011
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by m0rbidang3l View Post
    I need to do this, because the world generation mod I am using is not compatible with Bukkit. So, I'm going to have to pre-generate the world and then upload it.
    You want to fly around and load the chunks? Can you explain this some more?

    For problem one, I'd imagine that you forgot to add "until <expression>" to the end of the "do" loop.
    Code:
    Do
    	Send('{w down}')
    
    Until
            IsPressed("1B") = 1
    That should work, but I can't test it (Mac user). If there is an error, it would be with the IsPressed function. I don't know what AutoIt does with its functions' return values, but you should be checking if the escape button being pressed is true.

    For problem two, you'll need to add the mouse moving statement to the first 'do' loop. I'd imagine just tweaking the code will work. Remember that the parameters are the following:
    Code:
    MouseMove ( x, y [, speed] )
    x is the x coordinate (horizontal)
    y is the y coordinate (vertical)
    speed is the speed to move the mouse in the range 1 (fastest) to 100 (slowest). A speed of 0 will move the mouse instantly. Default speed is 10.
    You'll need to remember that the MouseMove statement is part of the loop. You might be able to express a variable as the x coordinate and then decrease it at the end of the loop. ***Decreasing the x value goes left, increasing goes right***Take a look of the below code.
    Code:
    local $coord = 500
    Do
    	Send('{w down}')
            MouseMove ( $coord, 500 , 0)
            $coord= $coord - 10
    Until
            IsPressed("1B") = 1
    The code should (with tweaking) work (not sure about the coord variable as parameter in AutoIt). Set the x and y coords to the center of your Minecraft window.
    Tell me how it went, as I can't test this.
    Last edited by Swum; 07-19-2012 at 03:15 PM. Reason: Fixed an error.

Similar Threads

  1. i need help making my rogue backstab/ambush lua script better
    By rogueape in forum WoW UI, Macros and Talent Specs
    Replies: 0
    Last Post: 11-05-2014, 10:41 AM
  2. Replies: 0
    Last Post: 07-25-2012, 03:13 AM
  3. Looking for / help creating AutoIT Sarkoth *XP* grinding script
    By thefrobel in forum Diablo 3 Bots Questions & Requests
    Replies: 0
    Last Post: 07-14-2012, 02:10 AM
  4. [Help]Making People GM's
    By Nemesis Kkc in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 09-15-2007, 08:31 AM
  5. [Autoit help]Modify hotkey to rightclick(fishbot)
    By darknavi in forum World of Warcraft General
    Replies: 4
    Last Post: 07-01-2006, 09:31 PM
All times are GMT -5. The time now is 10:48 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search