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
Yeah, I seem to remember having issues with the client not being ready to accept commands for a few seconds after starting. I basically wait a few seconds after the clients has started then use the gameState function to tell me when I can continue.
In regards to the execute function you've been working on, it wouldn't have to wait. It would be up to the program that started the process to decide when it is ready to continue. In the cast of the login script I don't see any issue with waiting a few seconds.
In regards to the execute function you've been working on, it wouldn't have to wait. It would be up to the program that started the process to decide when it is ready to continue. In the cast of the login script I don't see any issue with waiting a few seconds.
- 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 think I found a nice way of detecting when client is ready, I access the FPS field, wait until it's not 0.
Where 0x8c is offset for FPS in the struct.
-dx
Code: Select all
repeat
rest(1000)
until memoryReadFloatPtr(getProc(), addresses.staticbase_char, 0x8c) > 0
-dx
Re: Automatic 'login' script
I've added the wait for fps to the userfunction_login.lua which works nicely.
I also split out parts of the login function to separate functions; startClient,
loginAccount and selectCharacter. This is to further facilitate delete/create
character stuff.
-dx
Note!!!!
The attached file does ONLY work with the mmext plugin installed.
All the mouse click on buttons stuff is removed.
I also split out parts of the login function to separate functions; startClient,
loginAccount and selectCharacter. This is to further facilitate delete/create
character stuff.
-dx
Note!!!!
The attached file does ONLY work with the mmext plugin installed.
All the mouse click on buttons stuff is removed.
- Attachments
-
- userfunction_login.lua
- (8.34 KiB) Downloaded 216 times
Re: Automatic 'login' script
That's clever. I'll have to test it some time.
- 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
Another full compatible version of userfunction_login.lua
Work only with my modified version of loginxml v3.71b1 http://solarstrike.net/phpBB3/viewtopic ... 904#p60904
Work only with my modified version of loginxml v3.71b1 http://solarstrike.net/phpBB3/viewtopic ... 904#p60904
- Attachments
-
- userfunction_login.lua
- (11.22 KiB) Downloaded 202 times
Re: Automatic 'login' script
First of all thx Rock for this great function.
My Settings:
My Charlist:
I have a problem where I don´t find a solution:
If i start 4 Clients manually the Charlist work great, but when I use the following *.bat the Clients 2-4 stop after the first Char and the message: "Last Account reached logging out". The first Client get through the selected Accounts without an error.
bat-file:
I hope someone can help me and can tell my where to find my fault.
(Sorry about the bad english)
My Settings:
Code: Select all
Micromacro: 1.04.167
Rom Bot: 3.29 Rev 783
Loginxml: 3.71 b1
Login.lua: 4.0b1
userfunction_login: 3.6b1
loginnextchar: 1.51
Code: Select all
SetCharList({
{account=1, chars= {1}},
{account=2, chars= {1}},
{account=3, chars= {1}},
{account=4, chars= {1}},
{account=5, chars= {1}},
{account=6, chars= {1}},
{account=7, chars= {1}},
{account=8, chars= {1}},
{account=9, chars= {1}},
{account=10, chars= {1}},
},{
{account=11, chars= {1}},
{account=12, chars= {1}},
{account=13, chars= {1}},
{account=14, chars= {1}},
{account=15, chars= {1}},
{account=16, chars= {1}},
{account=17, chars= {1}},
{account=18, chars= {1}},
{account=19, chars= {1}},
},{
{account=20, chars= {1}},
{account=21, chars= {1}},
{account=22, chars= {1}},
{account=23, chars= {1}},
{account=24, chars= {1}},
{account=25, chars= {1}},
{account=26, chars= {1}},
{account=27, chars= {1}},
{account=28, chars= {1}},
{account=29, chars= {1}},
},{
{account=30, chars= {1}},
{account=31, chars= {1}},
{account=32, chars= {1}},
{account=33, chars= {1}},
{account=34, chars= {1}},
{account=35, chars= {1}},
{account=36, chars= {1}},
{account=37, chars= {1}},
{account=38, chars= {1}},
})
If i start 4 Clients manually the Charlist work great, but when I use the following *.bat the Clients 2-4 stop after the first Char and the message: "Last Account reached logging out". The first Client get through the selected Accounts without an error.
bat-file:
Code: Select all
@echo off
START ../../micromacro.exe "%~dp0/login.lua" acc:1 char:1 client:rom path:path1 clientx:0 clienty:0 clientw:200 clienth:180 consolex:201 consoley:0 consoleh:180
START ../../micromacro.exe "%~dp0/login.lua" acc:11 char:1 client:rom path:path2 clientx:0 clienty:181 clientw:200 clienth:180 consolex:201 consoley:181 consoleh:180
START ../../micromacro.exe "%~dp0/login.lua" acc:20 char:1 client:rom path:path3 clientx:0 clienty:361 clientw:200 clienth:180 consolex:201 consoley:361 consoleh:180
START ../../micromacro.exe "%~dp0/login.lua" acc:30 char:1 client:rom path:path4 clientx:0 clienty:541 clientw:200 clienth:180 consolex:201 consoley:541 consoleh:180
(Sorry about the bad english)
Sorry about the bad english
Re: Automatic 'login' script
This sounds a bit familiar but I'm not sure.
It seems to work for me even when I tried to match your setup. Unfortunately I can match it exactly.
I'm not sure what's going on. I suspect some value is not getting set properly when using login. Here is a version of LoginNextChar with some print messages that might help figure out what going on. Use the bat file. Then, when it fails to load the next character, copy and paste the output here so I can have a look at it. Check my signature if you don't know how to copy and paste from MM.
It seems to work for me even when I tried to match your setup. Unfortunately I can match it exactly.
Code: Select all
Micromacro: 1.04.174 (don't think it matters)
Rom Bot: Rev 781 (only goes up to 781 not 783)
Loginxml: 3.7 (I couldn't find 3.71 b1)
Login.lua: 4.0b1 (same)
userfunction_login: 3.6b1 (same)
loginnextchar: 1.51 (same)
- Attachments
-
- userfunction_LoginNextChar.lua
- (7.95 KiB) Downloaded 195 times
- 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
Thx for the fast reply and your help.
Here is the log from the working Task:
This are the logs from the NOT WORKING Tasks:
Maybe its a error because the frist account has 8 chars and the other (3) accounts has only 1 char...
The thing i don´t understand is, when i start the "Clients 2-4" after that regulary (with console typing rom/bot) the script is working.
Here is the log from the working Task:
Code: Select all
currAcc 1
currChar 1
NumChars 8
table: 051BE3B8
1: table: 051BE458
account: 1
chars: table: 051BE598
1: 1
2: table: 051BE638
account: 2
chars: table: 051BE6D8
1: 1
3: table: 051BE778
account: 3
chars: table: 051BE890
1: 1
4: table: 051BE930
account: 4
chars: table: 051BE980
1: 1
5: table: 051BE9D0
account: 5
chars: table: 051BEA70
1: 1
6: table: 051BE8E0
account: 6
chars: table: 051BEC50
1: 1
7: table: 051BEE08
account: 7
chars: table: 051BEEA8
1: 1
8: table: 051BEF48
account: 8
chars: table: 051BF088
1: 1
9: table: 051BF268
account: 9
chars: table: 051BF470
1: 1
10: table: 051BF5B0
account: 10
chars: table: 051BF740
1: 1
nextChar 1
nextAcc 2
Changing to character 1 account 2.
Code: Select all
currAcc 11
currChar 1
NumChars 1
table: 04E13438
1: table: 04E135F0
account: 1
chars: table: 04E13690
1: 1
2: table: 04E13758
account: 2
chars: table: 04E13910
1: 1
3: table: 04E13A00
account: 3
chars: table: 04E13AA0
1: 1
4: table: 04E13C30
account: 4
chars: table: 04E13CF8
1: 1
5: table: 04E13EB0
account: 5
chars: table: 04E13F50
1: 1
6: table: 04E13B90
account: 6
chars: table: 04E14388
1: 1
7: table: 04E14478
account: 7
chars: table: 04E145B8
1: 1
8: table: 04E14658
account: 8
chars: table: 04E146F8
1: 1
9: table: 04E14798
account: 9
chars: table: 04E14B80
1: 1
10: table: 04E14CC0
account: 10
chars: table: 04E14E28
1: 1
nextChar nil
nextAcc nil
Last player finished.
04/29/15 13:42:31 Automatisches Ausloggen
The game client did not crash.
2015-04-29 13:43:02 - I:\rom_bot\scripts\rom\/login.lua:75: Exiting: Au
to-logout
Code: Select all
currAcc 20
currChar 1
NumChars 1
table: 04EAA440
1: table: 04EAA788
chars: table: 04EAA8C8
1: 1
account: 1
2: table: 04EAAA08
chars: table: 04EAAD00
1: 1
account: 2
3: table: 04EAAE40
chars: table: 04EAAF80
1: 1
account: 3
4: table: 04EABE80
chars: table: 04EABF48
1: 1
account: 4
5: table: 04EAD4B0
chars: table: 04EADD20
1: 1
account: 5
6: table: 04EAB2A0
chars: table: 04EAE068
1: 1
account: 6
7: table: 04EAE1A8
chars: table: 04EAE310
1: 1
account: 7
8: table: 04EAED60
chars: table: 04EAFE68
1: 1
account: 8
9: table: 04EAFFA8
chars: table: 04EB0278
1: 1
account: 9
10: table: 04EB03E0
chars: table: 04EB0520
1: 1
account: 10
nextChar nil
nextAcc nil
Last player finished.
04/29/15 13:40:03 Automatisches Ausloggen
The game client did not crash.
2015-04-29 13:40:34 - I:\rom_bot\scripts\rom\/login.lua:75: Exiting: Au
to-logout
Code: Select all
currAcc 30
currChar 1
NumChars 1
table: 05084F20
1: table: 05085060
chars: table: 050853A8
1: 1
account: 1
2: table: 05085498
chars: table: 050858F8
1: 1
account: 2
3: table: 05085D08
chars: table: 05085E98
1: 1
account: 3
4: table: 050863E8
chars: table: 050867F8
1: 1
account: 4
5: table: 05086A28
chars: table: 05086B68
1: 1
account: 5
6: table: 05086168
chars: table: 05086CA8
1: 1
account: 6
7: table: 05087EA0
chars: table: 050876A8
1: 1
account: 7
8: table: 05080218
chars: table: 05087158
1: 1
account: 8
9: table: 05080060
chars: table: 05085B78
1: 1
account: 9
10: table: 05086EB0
chars: table: 050861E0
1: 1
account: 10
nextChar nil
nextAcc nil
Last player finished.
04/29/15 13:40:11 Automatisches Ausloggen
The game client did not crash.
2015-04-29 13:40:41 - I:\rom_bot\scripts\rom\/login.lua:75: Exiting: Au
to-logout
Maybe its a error because the frist account has 8 chars and the other (3) accounts has only 1 char...
The thing i don´t understand is, when i start the "Clients 2-4" after that regulary (with console typing rom/bot) the script is working.
Sorry about the bad english
Re: Automatic 'login' script
It's always using the first group of accounts so it looks like there is something wrong with your list. I see what the problem is. SetCharList accepts only 1 table. You've given it multiple tables instead of 1 big table with multiple tables inside it. You just need to add extra curly brackets at the top and bottom. Try this
Code: Select all
SetCharList({{
{account=1, chars= {1}},
{account=2, chars= {1}},
{account=3, chars= {1}},
{account=4, chars= {1}},
{account=5, chars= {1}},
{account=6, chars= {1}},
{account=7, chars= {1}},
{account=8, chars= {1}},
{account=9, chars= {1}},
{account=10, chars= {1}},
},{
{account=11, chars= {1}},
{account=12, chars= {1}},
{account=13, chars= {1}},
{account=14, chars= {1}},
{account=15, chars= {1}},
{account=16, chars= {1}},
{account=17, chars= {1}},
{account=18, chars= {1}},
{account=19, chars= {1}},
},{
{account=20, chars= {1}},
{account=21, chars= {1}},
{account=22, chars= {1}},
{account=23, chars= {1}},
{account=24, chars= {1}},
{account=25, chars= {1}},
{account=26, chars= {1}},
{account=27, chars= {1}},
{account=28, chars= {1}},
{account=29, chars= {1}},
},{
{account=30, chars= {1}},
{account=31, chars= {1}},
{account=32, chars= {1}},
{account=33, chars= {1}},
{account=34, chars= {1}},
{account=35, chars= {1}},
{account=36, chars= {1}},
{account=37, chars= {1}},
{account=38, chars= {1}},
}})
- 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
Big thx! Now it works! Thx a lot for your help !
Sorry about the bad english
Re: Automatic 'login' script
Hello its me again
Next problem:
The login-script works now very good. The problem now is when i want to use the Rock5's Ultra Model files the login don´t work. It selects the account but get stuck at the char select. I use the bat file from the topic to change (Start Client for botting).
Ultra Model files Version: 1.3.2
Settings (like befor):
My start-bat file (like befor)
My Charlist (like befor, thx again to rock)
Next problem:
The login-script works now very good. The problem now is when i want to use the Rock5's Ultra Model files the login don´t work. It selects the account but get stuck at the char select. I use the bat file from the topic to change (Start Client for botting).
Ultra Model files Version: 1.3.2
Settings (like befor):
Code: Select all
Micromacro: 1.04.167
Rom Bot: 3.29 Rev 783
Loginxml: 3.71 b1
Login.lua: 4.0b1
userfunction_login: 3.6b1
loginnextchar: 1.51
My Charlist (like befor, thx again to rock)
Sorry about the bad english
Re: Automatic 'login' script
I don't support the model files anymore. They're too much trouble. But what you can do is a process of elimination to find what file is causing the problem. What I mean is remove half the files from the botting models folder and see which half has the problem file. Then split it in half again etc. until you find the file. Then remove 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
Sorry Testa, I just realized my old rom folder was still pointing to the old repository. The latest revision was 783 (now 784).rock5 wrote:Code: Select all
Rom Bot: Rev 781 (only goes up to 781 not 783)
- 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
No problem rockrock5 wrote:Sorry Testa, I just realized my old rom folder was still pointing to the old repository. The latest revision was 783 (now 784).rock5 wrote:Code: Select all
Rom Bot: Rev 781 (only goes up to 781 not 783)
I think the loginscript require the player model to login.... I will test it as soon as i have some time and will post the results.rock5 wrote:I don't support the model files anymore. They're too much trouble. But what you can do is a process of elimination to find what file is causing the problem. What I mean is remove half the files from the botting models folder and see which half has the problem file. Then split it in half again etc. until you find the file. Then remove it.
and big thx again for your fast replys
Sorry about the bad english
Re: Automatic 'login' script
Don´t know why but it works nowTesta wrote: The problem now is when i want to use the Rock5's Ultra Model files the login don´t work. It selects the account but get stuck at the char select. I use the bat file from the topic to change (Start Client for botting).
New problem :
Often i get an error while using the function. There are 2 errorcodes:
Code: Select all
I:\rom_bot\scripts\rom\/login.lua:75: I:/rom_bot/scripts/rom/classes/memorytable.lua:213: attempt to concatenate a nil value
I:\rom_bot\scripts\rom\/login.lua:75: tmp value
- Attachments
-
- model.7z
- (135.15 KiB) Downloaded 172 times
Sorry about the bad english
Re: Automatic 'login' script
Use this version of memorytable.lua. It should print out some extra info that might help figure out why you get that error.
I don't know what to make of the login error. Save it the next time you get it and then show it to me.- 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
The print outs with this version of memorytable.lua are:
or
----------------------------------------
Code: Select all
name:
memoryRead: nil
itemId: 202928
nameaddress: 3F3D97A3
itemAddress: 26703100
The game client did not crash.
2015-06-22 08:27:54 - I:/rom_bot/scripts/rom/classes/memorytable.lua:221: attempt to concatenate a nil value
Code: Select all
name:
memoryRead: nil
itemId: 202928
The game client did not crash.
2015-06-23 07:57:44 - I:/rom_bot/scripts/rom/classes/memorytable.lua:217: bad argument #2 to 'string.format' (not a non-negative number in proper range)
The second error code is:Testa wrote: The second error code i add when it displays again (i forgot to save it) but it´s something like:
I:\rom_bot\scripts\rom\/login.lua:75: tmp value
Code: Select all
2015-06-23 06:57:47 - I:\rom_bot\scripts\rom\/login.lua:75: I:/rom_bot/scripts/rom/classes/item.lua:143: attempt to concatenate global 'tmp' (a nil value)
Last edited by Testa on Tue Jun 23, 2015 11:50 pm, edited 1 time in total.
Sorry about the bad english
Re: Automatic 'login' script
This will probably be really hard to fix. login.lua can be a bit buggy. I have a newer version. Try it and see if it helps
- Attachments
-
- login.lua
- Version 4.0b2
- (2.55 KiB) Downloaded 176 times
- 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
login.lua outsputs are like:
or
(edit)
the second error code was showing up again
if i get another errorcodes i will post it.
when i look at the errorcodes from memorytable.lua they seem similar
(edit 2)
another output:
(edit 3)
today i get many errorcodes :/
(edit 4)
this errorcode again
idea:
is it possible to restart the bot and resume the path in place of print out this messages? because after a error when i start the bot again and load the same path, the error will not show and the bot is working again...
Code: Select all
name:
memoryRead: nil
itemId: 202881
nameaddress: 3F537348
itemAddress: 35563F00
The game client did not crash.
I:\rom_bot\scripts\rom\/login.lua:75: I:/rom_bot/scripts/rom/classes/memorytable.lua:221: attempt to concatenate a nil value
Code: Select all
name:
memoryRead: nil
itemId: 202928
The game client did not crash.
I:\rom_bot\scripts\rom\/login.lua:88: I:/rom_bot/scripts/rom/classes/memorytable.lua:217: bad argument #2 to 'string.format' (not a non-negative number in proper range)
the second error code was showing up again
Code: Select all
name:
memoryRead: nil
itemId: 202928
The game client did not crash.
I:\rom_bot\scripts\rom\/login.lua:88: I:/rom_botscripts/rom/classes/memorytable.lua:217: bad argument #2 to 'string.format' (not a non-negative number in proper range)
when i look at the errorcodes from memorytable.lua they seem similar
(edit 2)
another output:
Code: Select all
name:
memoryRead: nil
itemId: 493642
nameaddress: 1
itemAddress: 2004D800
The game client did not crash.
I:\rom_bot\scripts\rom\/login.lua:75: I:/rom_bot/scripts/rom/classes/memorytable.lua:221: attempt to concatenate a nil value
today i get many errorcodes :/
Code: Select all
I:\rom_bot\scripts\rom\/login.lua:88: I:/rom_bot/scripts/rom/classes/item.lua:143: attempt to concatenate global 'tmp' (a nil value)
this errorcode again
Code: Select all
I:\rom_bot\scripts\rom\/login.lua:88: I:/rom_bot/scripts/rom/classes/item.lua:143: attempt to concatenate global 'tmp' (a nil value)
is it possible to restart the bot and resume the path in place of print out this messages? because after a error when i start the bot again and load the same path, the error will not show and the bot is working again...
Sorry about the bad english
Re: Automatic 'login' script
I fix problem
Code: Select all
memorytable.lua:221: attempt to concatenate a nil value
- Attachments
-
- memorytable.lua
- Fixed Error memorytable.lua:221: attempt to concatenate a nil value
- (7.78 KiB) Downloaded 150 times
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests