Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
-
dx876234
- Posts: 188
- Joined: Sat Jul 24, 2010 6:13 am
#1
Post
by dx876234 » Fri Feb 13, 2015 1:36 am
Attached is my "start the client" function as a Lua plugin to Micromacro. It will start client directly with arguments (NoCheckVersion) or through a link and return the PID and HWND of the client which can be used directly for attaching Micromacro to the client.
This enables Micromacro to start client without reserving the window/mouse.
Usage:
Code: Select all
mmext = require("mmext")
--local pid, win = mmext.Client("C:\\Games\\rom\\ClientRun.lnk")
local pid, win = mmext.Client("C:\\Games\\rom\\Client.exe", "NoCheckVersion", "C:\\Games\\rom")
-- Open client memory space
proc = openProcess(pid)
-- Attach keyboard/mouse to client
attach(win)
To compile you compile as a Lua 5.2 extension and link as a .dll to
micromacro /lua52.dll, then put mmext.dll into micromacro/lib/mods directory.
I'm using MinGW for compilation, my makefile is as below.
Best regards
DX
Changes:
- Added a mmext.KillClient(pid) function
-
Attachments
-
- mmext.c
- v1.0
- (4.02 KiB) Downloaded 138 times
Last edited by
dx876234 on Sun Feb 15, 2015 7:52 am, edited 2 times in total.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#2
Post
by rock5 » Fri Feb 13, 2015 1:54 am
Nice. So we wont need to use the locking mechanism in the login userfunction, right? Cool.
Does it accept relative paths?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
dx876234
- Posts: 188
- Joined: Sat Jul 24, 2010 6:13 am
#3
Post
by dx876234 » Fri Feb 13, 2015 5:27 am
I haven't tested relative paths but on the other hand, I don't do anything with paths at all, it's
all delivered to the Windows ShellExecuteEx command so I'd guess it accepts them.
-dx
I have inserted into my local copy of userfunction_login and it runs nicely without any locking.
But, I have been hesitant to publish as it's makes a prerequisite beyond what most ppl
can or are willing to build. I am also hesitant to distribute a binary as ppl should't run
"unknown" binaries.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#4
Post
by rock5 » Fri Feb 13, 2015 6:13 am
There is that. It sort of feels like something that should be built into Micromacro. Then it would just require people to update Micromacro.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
dx876234
- Posts: 188
- Joined: Sat Jul 24, 2010 6:13 am
#5
Post
by dx876234 » Fri Feb 13, 2015 4:13 pm
Ye, I pretty much agree. Micromacro needs a proper process started, something better
than os.execute()/system().
-dx
Who is online
Users browsing this forum: No registered users and 0 guests