Automatic 'login' script
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Only post additional bot resources here. Please do not ask unrelated questions.
Re: Automatic 'login' script
This is a really nice feature. I tried it just today and it works fine, BUT i have one issue...
the .bat-file starts micromacro, but i am always urged to confirm execution, i never bothered when starting it manually, i even don't reember it anymore.
but as i want to try out some time schedule it would be necessary that MM starts without confirmation dialog needed. I searched a bit on google, but in Win7 it seems to be a bit tricky to avoid this confirm dialog. Is there any "easy" way to get rid of this confirmation ?
the .bat-file starts micromacro, but i am always urged to confirm execution, i never bothered when starting it manually, i even don't reember it anymore.
but as i want to try out some time schedule it would be necessary that MM starts without confirmation dialog needed. I searched a bit on google, but in Win7 it seems to be a bit tricky to avoid this confirm dialog. Is there any "easy" way to get rid of this confirmation ?
Re: Automatic 'login' script
What does the message say exactly?
- 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.”
- Ronald Reagan
Re: Automatic 'login' script
For me it sounds like the scheduler needs admin right himself to start MM with admin rights, other solutions may found here http://windows.microsoft.com/de-de/wind ... nt-control
But I have a question too^^ I read something about restarting a crashed client, I don't remember where and I don't know if it already exist(I doubt it) but I think I have may a solution(I m not finished).
First I found this from you :
change to this:
Because I couldn't use RestartChar() because the bot get stucks some where deep in the code, but it work only half because the bot continue where he was so when you close the client the bot got an :
So my plan is first check if client crashed without closing it start a new client, start a proxy program which close the old MM-bot and start a new MM-bot with a delay of 5 sec in the meantime I close the crashed client and let the old MM run in its errors.(I know the WP has to been setup so that the bot always can find out what to do next )
Is there a arg for the bot to which rom windows it should attached and I ask myself would it if I only login in a new client and then close the old client not be already enough ?
But I have a question too^^ I read something about restarting a crashed client, I don't remember where and I don't know if it already exist(I doubt it) but I think I have may a solution(I m not finished).
First I found this from you :
Code: Select all
while(true) do
if isClientCrashed() then
error("Client crash detected in main bot loop.")
end
Code: Select all
local function checkclient()
local crashflag = isClientCrashed();
if crashflag then
RestartChar()-- function
loadPaths(__WPL.FileName);
end
end
registerTimer("ClientDetection", secondsToTimer(3), checkclient);
while(true) do
Code: Select all
ERFOLGREICH: Der Prozess mit PID 8848 wurde beendet.
6:2am - ...xxxxy/Documents/micromacro2/scripts/rb2/functions.lua:1438: bad ar
gument #1 to 'memoryReadBytePtr' ((null))
Is there a arg for the bot to which rom windows it should attached and I ask myself would it if I only login in a new client and then close the old client not be already enough ?
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Automatic 'login' script
The message...in german^^
Möchten Sie zulassen, dass durch das folgende Programm von einem unbekannten Herausgeber Änderungen an diesem Computer vorgenommen werden.
Do you want to allow the following program from unknown ressource to make changes to this computer.
Möchten Sie zulassen, dass durch das folgende Programm von einem unbekannten Herausgeber Änderungen an diesem Computer vorgenommen werden.
Do you want to allow the following program from unknown ressource to make changes to this computer.
Re: Automatic 'login' script
yes that the Question when you need run something with admin rights, MM needs that so you need run the scheduler with admin right I think. The problem with my idea and your problem is I don't know if the admin rights go to the child process I hope so because under linux it does
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Automatic 'login' script
To tell you the truth, I'm not an expert on Windows security. It might be UAC security. You should do a search online.
- 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.”
- Ronald Reagan
Re: Automatic 'login' script
I searched already the first time i didn't find anything, I tried again now I know it does and I'm ready for testing
I'm not sure about the directories the proxy program " romrestarter.exe" lies at the same directory in which Micromacro.exe lies I'm always confused about the lua directory system. I have the c# source code added to the post the first test was so LOL->Kill parent process = kill your test environment system and I got shock for a second didn't thought about it at all.
Code: Select all
local function checkclient()
local crashflag, cpid = isClientCrashed();
if crashflag then
if cpid and windowValid(cpid) then
login( getChar(), getAcc(), "Client") --starting a new rom client
--arg 1 directory"name/" arg 2 path arg3 profile ar4 character (optional) arg5 retpath
-
if( __RPL == nil)then
os.execute("START romrestarter.exe "..getExecutionPath().."/ "..__WPL.Name.." "..getChar().." "..getChar()..""); -- start of a new MM thourgh proxy
else
os.execute("START romrestarter.exe "..getExecutionPath().."/ "..__WPL.Name.." "..getChar().." "..getChar().." " .. __RPL.Name..""); -- start of a new MM thourgh proxy
end
rest(100)
local pidm = findProcessByWindow(cpid);
os.execute("TASKKILL /PID " .. pidm .. " /F") -- kill old client
repeat
rest(500)
until not windowValid(cpid)
end
end
end
registerTimer("ClientDetection", secondsToTimer(3), checkclient);
while(true) do
- Attachments
-
- restart.txt
- (3.64 KiB) Downloaded 191 times
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Automatic 'login' script
Okay after some testing and reading the manual I know more especially how coco works.
In short main() running in a coroutine, yrest() and coroutine.yield() will bounce back the resources to coco coroutine management in the layer above, yrest() only for the time in the arg(arg >100), while coroutine.yield() means take how long it ever take but that is not the point.
The point is something like this:
Is simply a coroutine started from the layer above, to more specific it will very likely never run if the bot not reach it bottom in the main while loop.
So I have 3 possible way to do it:
1. Let it be like it is and it will only work in 30-50%
2. Using real threads with Lua Lanes http://kotisivu.dnainternet.net/askok/bin/lanes/
3. Log the information in File like: MM PID, Client PID, ACC, Char, waypoint, return_waypoint(optional) and using a external prog to watch client and MM
to 2. I have already compiled it and done some basic integration with MM but I'm a little confused by its API (flyer like)
a.) The limitation in which the "lanes" have access to the outside memory seems for me not to clear, what are user datas(function stack ,heap, table?) and are lindas(pipes/queue) really the only way or the suggest way to pass information ...etc (problem in short can I access global vars from inside lanes? )
b.)I would love to avoid busy-waiting loops but the timer in the API is mysterious.
Has anyone a suggestion?
In short main() running in a coroutine, yrest() and coroutine.yield() will bounce back the resources to coco coroutine management in the layer above, yrest() only for the time in the arg(arg >100), while coroutine.yield() means take how long it ever take but that is not the point.
The point is something like this:
Code: Select all
registerTimer("GMdetection", secondsToTimer(5), GMdetection);
So I have 3 possible way to do it:
1. Let it be like it is and it will only work in 30-50%
2. Using real threads with Lua Lanes http://kotisivu.dnainternet.net/askok/bin/lanes/
3. Log the information in File like: MM PID, Client PID, ACC, Char, waypoint, return_waypoint(optional) and using a external prog to watch client and MM
to 2. I have already compiled it and done some basic integration with MM but I'm a little confused by its API (flyer like)
a.) The limitation in which the "lanes" have access to the outside memory seems for me not to clear, what are user datas(function stack ,heap, table?) and are lindas(pipes/queue) really the only way or the suggest way to pass information ...etc (problem in short can I access global vars from inside lanes? )
b.)I would love to avoid busy-waiting loops but the timer in the API is mysterious.
Has anyone a suggestion?
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Automatic 'login' script
i noticed if waypoint file name have 2 word's in name and you wana start it from batch file, like this you will get this error
Code: Select all
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/login.lua" acc:2 char:1 client:rom path:Flower Daily
Code: Select all
MicroMacro v1.03
SolarStrike Software
http://www.solarstrike.net
Opening login.lua...
Starting script execution - Press CTRL+C to exit.
Press CTRL+L to cancel execution and load a new script.
-------------------------------------------------------------------------------
Rock5s 'login' script. Version 3.1
Starting client rom ...
Clicking account 2 ...
Selecting character 1 ...
Waiting until in-game ...
Installing userfunctions. wrong dir
We read the hotkey settings from your bindings.txt file C:\Users\****\My Documents\Runes of Magic\bindings.txt instead of using the settings.xml file.
Welcome to rom bot! press END to quit
RoM Bot Version 3.29, Revision 761
Press the (End) key to stop/pause the script.
You can resume with the (Delete) key.
The game client did not crash.
11:53am - E:\Program Files\micromacro\scripts\rom/login.lua:51: Invalid option 'daily' for bot.lua
Syntax: rom/bot.lua [profile:profname] [path:pathname] [retpath:retname] [charac
ter:charname]
profile:profname force the use of profile 'profname.xml'
path:pathname force the use of waypoint file 'pathname.xml'
retpath:retname force the use of return waypoint file 'retname.xml'
character:charname force the use of client with 'charname' loaded
AL lib: FreeContext: (01EA0F58) Deleting 1 Source(s)
Please enter the script name to run.
Type in 'exit' (without quotes) to exit.
Script>
Life is a journey, not destination
Re: Automatic 'login' script
That is because "Daily"(from: Flower Daily) is the next arg so it won't work.
Flags like path: or char: are for the purpose that you can freely arrange the order of them.(and make some optional and human understandable )
The arg are parted from the OS by " " a space character so you give with " " the next arg, so rename it to Flower_Daily or FlowerDaily
Flags like path: or char: are for the purpose that you can freely arrange the order of them.(and make some optional and human understandable )
The arg are parted from the OS by " " a space character so you give with " " the next arg, so rename it to Flower_Daily or FlowerDaily
Jack-of-all-trades, but master-of-only of a few
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226
Re: Automatic 'login' script
Note: that is not a limitation of the 'login' script. It's a bot limitation. You also can't start a waypoint like that using MM in the usual way.
Wont work. But you can select it from the waypoint list.
But a good rule to follow is don't use spaces in waypoint file names.
Code: Select all
rom/bot path:flower daily
But a good rule to follow is don't use spaces in waypoint file names.
- 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.”
- Ronald Reagan
Re: Automatic 'login' script
Code: Select all
-- Click character until at LoadingScreen
reserveActiveWindow()
print("Selecting character "..character.." ... ")
repeat
clickCharacter(character) rest(1000)
keyboardPress(key.VK_ENTER)
rest(2000)
until memoryReadBytePtr(getProc(),addresses.loadingScreenPtr, addresses.loadingScreen_offset) ~= 0
releaseActiveWindow()
Re: Automatic 'login' script
Code: Select all
Rock5s 'login' script. Version 3.1
Starting client rom4ubot ...
WARNING: Failure reading memory from 0x28FA60 at 0xa42368 in memoryReadBytePtr()
. Error code 299 (Only part of a ReadProcessMemory or WriteProcessMemory request
was completed.)
Re: Automatic 'login' script
I'm not 100% sure but I don't think login.lua will run update.lua automatically. 0xa42368 looks like an official client address and it looks like you are trying to login in to rom4u. So try running update.lua first then try again.
- 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.”
- Ronald Reagan
Re: Automatic 'login' script
Ah i see. I use the 1 MM for official and nexon and at the time of trying to start with the batch file, addresses was updated for official.
Re: Automatic 'login' script
Im not sure how the code for batch files works, but I was wondering how to put a random wait in between each client load, eg
The other question I have is related to the 'current_client_lnk_in_use'. Is there any way to check the region, aka server, and run the client link that relates to that? Probably should have asked this in the UMM thread but its relevant here too I guess. When doing mini's etc on a US server it tried to restart client and opened Nexon. Not a fan of changing that value every time i go to run alts on different servers.
Code: Select all
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/login.lua" acc:1 char:1 client:rom4ubot path:path1
wait random of 5
START ../../micromacro.exe "%folder%/login.lua" acc:5 char:1 client:rom4ubot path:path2
wait random of 5
START ../../micromacro.exe "%folder%/login.lua" acc:13 char:1 client:rom4ubot path:path3
wait random of 5
START ../../micromacro.exe "%folder%/login.lua" acc:9 char:3 client:rom4ubot path:path4
Re: Automatic 'login' script
There is no wait function for batch files. There may be some hacks that simulate a wait though such using pings. do a search online for something like "bat file wait" and see what you come up with.
I'm not sure what you are saying. Are you saying that you start a client with a batch file then if it restarts it uses the wrong link?
I'm not sure what you are saying. Are you saying that you start a client with a batch file then if it restarts it uses the wrong link?
- 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.”
- Ronald Reagan
Re: Automatic 'login' script
Sorry, should have explained better. When UMM restarts the client when mail fails or when fast login restarts after running a set amount of alts (3 in my case) it restarts using the' current_client_lnk_in_use'. I have that set to the Nexon client, but when I run alts on my US server I have to change that lnk to the US client.
And yeh, i looked up batch file waits a few days ago, there was stuff about using pings etc, guess i'll have another look into it.
And yeh, i looked up batch file waits a few days ago, there was stuff about using pings etc, guess i'll have another look into it.
Re: Automatic 'login' script
There is a version of loginnextchar here http://www.solarstrike.net/phpBB3/viewt ... 821#p52821 that allows you to specify a list of servers and their associated link, to be used automatically. I don't think you have to use the other 2 files to use it.
- 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.”
- Ronald Reagan
Re: Automatic 'login' script
Awesome thanks. I'll give it a try and see how it goes
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests