Autoit work ?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
kong790
Posts: 21
Joined: Tue May 05, 2009 8:52 pm

Autoit work ?

#1 Post by kong790 » Fri May 08, 2009 1:24 am

I was wondering if autoit works with RoM and if so can you make it so micromacro can start a seperate application, wait X seconds for that app to finish and close then return to its scripts? Like what i wrote for my shop bot except i can input my unique values according to my resolution and everything and try that out.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Autoit work ?

#2 Post by Administrator » Fri May 08, 2009 1:36 am

Yes.

Code: Select all

-- Start program Exec.exe, and wait 5 seconds
os.execute("\"C:/Program Files/Prog/Exec.exe\" arguments");
yrest(5000);
Put this wherever you want, which will probably be inside a waypoint.

Code: Select all

    <waypoint x="1234" z="4321">
        -- Code goes here
    </waypoint>

What do you need AutoIt for, though? MicroMacro can do mouse input as well, and that's really about the only thing I can imagine you would use AutoIt for.

kong790
Posts: 21
Joined: Tue May 05, 2009 8:52 pm

Re: Autoit work ?

#3 Post by kong790 » Fri May 08, 2009 9:17 pm

couldnt a script be writtin just like the one i posted before for the sell bot except I would just input mouse click coordinates based on my resolutions and everything. Just customize all the clickies and everything. But i have no idea on how to do all that other stuff like load a new pathing script and setting the number of farming runs to do before having to go back to town. So you CAN make a sell/repair bot but all the clicking coordinates need to be customized to each person's settings. And for the camera angle thing the character path can lead him right on top of the npc and you can set the mouse to a certain spot like the characters head and right click once, press Q key once to spin a bit, right click, Q key to spin a little bit, right click and so on so you cover it all and it wont matter what angle the camera is. And i know theres a program that will tell you the x,y coordinates of wherever your mouse goes and everyone can adjust the click coordinates themselves according to there resolutions and where they position there inventory and such. I just tried the npc targeting idea and it seems to work pretty well. And to help out with the camera angle's when targeting an npc have everyone turn there camera all the way up so there looking down on the character.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Autoit work ?

#4 Post by Administrator » Fri May 08, 2009 11:15 pm

You can load a new waypoint script within a waypoint itself, using the code I gave you earlier.

Code: Select all

    <waypoint x="x" y="y">
        if( some condition ) then
            __WPL:load("scriptname.xml");
        end
    </waypoint>
You can make a program to display mouse coordinates with MicroMacro itself:

Code: Select all

function main()
    while(true) do
        local x,y = mouseGetPos();
        printf("\rMouse position: %d, %d", x, y);
        yrest(100);
    end;
end
startMacro(main, true);
This is absolute position (position on screen, not necessarily inside this window), though. To get the position inside the RoM window, you'll have to modify it:

Code: Select all

function main()
    while(true) do
        local x,y = mouseGetPos();
        local wx,wy = windowRect(foregroundWindow());
        printf("\rMouse position: %d, %d", x - wx, y - wy);
        yrest(100);
    end;
end
startMacro(main, true);
The difference is that it checks the position of the foreground window, and offsets the mouse by this value.

When you want to use mouseSet(), you'll also have to add in the window position to reverse the effect again.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 0 guests