As many requests about Autologin with the capability of switching to next account when the last character of one account reached, I decided to share my version of Autologin, les's call it AutoSwitch. That is based on FastLogin that introduced by Ahmed Mohamed el-Sawalhy.
Installation:
Extract the attached file to <Game Folder>\Interface. You should see a new folder name loginxml that locates at the same level of addons.
Configuration:
You need to provide your account information in the file accountlogin.lua. There are 3 lines you need to notice:
Code: Select all
fastLoginRegSel=1; --region/channel you want to enter
fastLoginPass=""; -- enter your password here
fastLoginUserArray= {"acc01","acc02","acc02","acc03","acc03"}; -- enter your accounts here
How it works:
At first, it will take your first character to game. If you logout, it will load the next character. When the last character exits, it will go to the first character of the next account.
The game will exit when the last character of the last account logout.
Requirements and limitations:
All accounts have the same password.
All accounts have full 8 characters. (remove this limitation in version 1.1)
It always starts at the first character (can select any character in Relogin mode, version 1.1)
Misc.
You might need a function to allow the bot logout and wait for your next character loaded as below. Put it in userfunctions.lua and call it in your waypoint.
Code: Select all
function nextChar()
print(player.Name.." is logging out");
RoMScript("Logout();");
yrest(90000); -- Wait for the log out to process
player:update();
player.Death_counter = 0;
-- you can init you new character here but I don't need it ;)
end
If you have any questions, comments or suggestions, please feel free to post your ideas.
Enjoy!
Update to version 1.1
Features added:
- Relogin, instead of only switching chars/accounts
- Relogin wait time. Your character will wait an amount of time before doing relogin.
- No longer need having 8 characters per account to work. It should know the number of characters in your account and go to next account when needed.
Code: Select all
-- ENTER YOUR INFORMARTION HERE
fastLoginChrSel=1; -- The index of the character you want to login. Only work if fastLoginRelogin = true.
fastLoginRegSel=1; --region/channel you want to enter
fastLoginRelogin = false; -- will relogin if true, false will go to the next char
fastLoginReloginWaitTime = 300; -- time to wait before relogin (by second)
fastLoginPass=""; -- enter your password here
fastLoginUserArray= {"acc01","acc02","acc02","acc03","acc03"}; -- enter your accounts here
--From the 2nd account, you need to duplicate account names. It's stupid but I'm too lazy to change it
-- ENTER YOUR INFORMARTION HERE
If you set it at Relogin mode and fastLoginChrSel=2, it will login to the 2nd char. If you manually select another char during waiting time, fastLoginChrSel will change to your choice and will do relogin on it.
I also updated function nextChar() to make it work better
Code: Select all
function nextChar()
print(player.Name.." is logging out");
RoMScript("Logout();");
yrest(30000);
repeat yrest(5000);loggedin = RoMScript("UnitName('player');"); until loggedin
player:update();
player.Death_counter = 0;
-- you can init you new character here but I don't need it ;)
end