[autoit] 180° script menu

User Tag List

Results 1 to 2 of 2
  1. #1
    revolutionary's Avatar Member
    Reputation
    1
    Join Date
    Jun 2008
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [autoit] 180° script

    hey,

    so i am trying to write a script that turns my char around when i press a button. its for an 3d mmo with 1st / 3rd person view.

    anyways, this is what i got so far:
    Code:
    hotkeyset("a", "test")
    $turn=1
    
    while 1
    $mousex = MouseGetPos(0)
    ToolTip($mousex, 600, 0)
    wend
    
    func test()
    $mousex = MouseGetPos(0)
    mousemove($mousex+13,@desktopheight/2,0)
    endfunc
    1st problem: after a while, the script will stop turning.
    the tooltip from my script shows the x-coordinates of my mouse. if i turn around manually, after a while they wont increase or decrease. if i turn around to the right, the x coordinates will not increase above 1919 and will not go below 960 if i turn to the left. whenever i use the script to turn, it will stop turning once the 1919 x coordinate is reached. after that i can however use the mouse to turn further to the right, however the x coordinate will not increase.

    2nd problem: the first time i press the hotkey, nothing happens. after that each press will turn the character (untill the above mentioned 1919 coordinate is reached). however if i turn a few times using the hotkey, then move around manually and then press the button again, it will either not turn at all, or turn only a small bit. i need to press the hotkey again, and then it will turn normally again untill either the x coordinate is reached or untill i move manually (the first press of the hotkey after moving manually will again result in either no turn or only a small turn).

    i hope i made myself clear.
    does anyone have any advice on how to get this to work properly?

    thanks

    [autoit] 180° script
  2. #2
    TheDank's Avatar Member
    Reputation
    5
    Join Date
    Apr 2012
    Posts
    88
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1st problem: this is because the game does not actually take up the full screen. the game is only playing in a portion of the screen. think of it as a window that only takes up about 1/4 of the desktop. now i understand that the game displays on the entire screen but thats not how windows handles games.

    2nd problem: normally with 1st/3rd person games, the mouse is actually stationary and moving the mouse with move the camera but not the mouse. in a shooter, if you bring up the menu the mouse cursor will appear. lets say you put the cursor on the "Settings" button in the menu. when you close the menu and move the camera around, the cursor *should* be in a different place, right? unfortunately not. the cursor will be in the same spot that you left it when you closed the menu, the "Settings" button.

    however, since the cursor does in fact "move" even tho you cant see it, the reason why the script is not working is because autoit is trying to move the mouse cursor, not the actual mouse. moving the mouse will always move the camera. moving the cursor however, will only move the camera until it goes to the limit of the window.

    now, all of this has a plus side. it looks like you found out that moving the cursor 13 pixels to the right will allow you to do a 180°. you might want to try making autoit doing some logic before performing the mousemove.
    for example:

    If 1919 - $mousex < 14 Then
    mousemove($mousex-13,@desktopheight/2,0)
    Else
    mousemove($mousex+13,@desktopheight/2,0)
    EndIf


    This will now turn you 180° to the left instead of the right. easy fix. long answer

Similar Threads

  1. [Goldfarming] AutoIT only script Monk Sarkoth 16:10 Resolution
    By Karlschlag in forum D3 Gold profiles
    Replies: 4
    Last Post: 07-04-2012, 11:04 AM
  2. AutoIT Barbarian Script (Royal Crypts)
    By Amagicalman in forum Diablo 3 Bots Questions & Requests
    Replies: 6
    Last Post: 06-09-2012, 12:34 PM
  3. Looking for an Autoit goldfarming script for barbarian
    By XxVendettaXx in forum Diablo 3 Bots and Programs
    Replies: 0
    Last Post: 06-09-2012, 06:01 AM
  4. AutoIt / AutoRess Script
    By sariks in forum WoW Bots Questions & Requests
    Replies: 16
    Last Post: 03-19-2010, 02:49 PM
  5. [Guide] AutoIT Above script.
    By Emuchild in forum Programming
    Replies: 0
    Last Post: 05-11-2008, 12:50 PM
All times are GMT -5. The time now is 04:21 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search