Jump to content

Improvement possible ?


Recommended Posts

Hello all,

the situation is, that i'm playing a game and at some point i use a macro, it's for mining. I'll post it a sec:

HotKeySet("{ESC}", "_Exit") ; Make a hotkey to exit the script ; Very important when u are using MouseMove, MouseClick etc. in a loop

HotKeySet("{^}", "_Mine") ; Look at the Send command in the help file for keys

Global $Mine = False ; Here we say $Mine = false, so the bot has stopped as default

While 1

Sleep(1000) ; Use a sleep in the main loop for not getting a high CPU

WEnd

Func _Mine()

$Mine = Not $Mine ; It's basicly something like: If $Mine = False Then $Mine = True; Also visa versa

While $Mine

MouseMove(600, 400, 10)

MouseClick("right")

MouseMove(615, 400, 20)

MouseMove(615, 451, 20)

MouseMove(685, 451, 20)

MouseClick("left")

Sleep(6000)

WEnd

EndFunc

Func _Exit()

Exit

EndFunc

It works very good so far, helped me a lot, the macro is from a guy in here, his name i unfortunatelly forgot. But one little problem still exists: From time to time, sometimes after 1 loop, sometimes after 15 but likely much earlier the macro doesn't hit the small window with the arrow, which it has opened. Causing the macro to do empty loops. The lines in which the problem appears are the following:

MouseMove(615, 451, 20)

MouseMove(685, 451, 20)

It's a up-down problem, so i tried to get around it by changing the 451 to 450, problem then is, the arrow wanders off above, as it wanders to far down when using 451.

Question is, is there a function or anything i could make sure the arrow doesn't start wandering after a certain number of loops ? Something like a correction, or a function asking "Am i really at the right coordinates ?"

Link to comment
Share on other sites

  • Moderators

Reskal,

i'm playing a game

I take it you have not read this.

Bye. :blink:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Byebye Melba23.

I got this macro from this side, and topic is not getting advance over other players, or farming gold or weapons or items. The macro is just helping me digging my cave into a mountain tile by tile. I don't save time or materials with this macro, and no one ever will come along the isle i live and bother about my cave;)

I just dont have to click every 10 seconds, thats all, so if someone serious could help me in this, would be very kind.

Edited by Reskal
Link to comment
Share on other sites

Macroing

Definition:

Macroing is the use of a program that automatically performs actions for you, this is a game unbalancing activity and as such is dealt with harshly

Key locking (IE weighing down a key on your keyboard) a bound key is illegal, as is any contrivance to automate game actions not intended as part of the game mechanics.

Such actions will be considered under the heading of macro's and will be penalised as such."

Punishment

First Offense: 30 day account IP ban, character permanently banned.

Second Offense: Permanent account ban.

http://www.wurmonline.com/forum/index.php?topic=10.msg12#msg12

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

In a world full of liers and betrayers i always love to meet honest and upright people.

Especially when they can make life harder for others with their moralities.

If there is someone around not a hypocrite please send me PM, ty.

Link to comment
Share on other sites

  • Moderators

This seems to be more entertaining to you than trying to play the game correctly.

Rules are Rules, theirs and ours. You're flagrantly breaking both. This verbal warning is the only warning you'll get from the moderators side before you go:

Byebye

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...