rock5's "fastLogin Revisited"

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.
Message
Author
miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Autologin revisited

#41 Post by miximixi007 » Tue Jun 22, 2010 5:31 am

:) i just set it using Default.xml

<?xml version="1.0" encoding="utf-8"?>
<profile>
<options>
<!-- Try the bot with a new char mage -->
<!-- At the pioneer village. Use demo.xml waypoint file -->
<option name="HP_LOW" value="85" />
<option name="MP_LOW_POTION" value="50" />
<option name="HP_LOW_POTION" value="40" />
<option name="USE_HP_POTION" value="best" /> <!-- potion select strategy: best|minstack -->
<option name="USE_MANA_POTION" value="best" /> <!-- potion select strategy: best|minstack -->

<!-- Rest if HP or Mana is below that level -->
<option name="HP_REST" value="15" />
<option name="MP_REST" value="15" />

<!-- Shopping options, how many of what do you want to keep in your inventory -->
<option name="HEALING_POTION" value="99" />
<option name="MANA_POTION" value="99" />
<option name="ARROW_QUIVER" value="2" />
<option name="THROWN_BAG" value="2" />
<option name="POISON" value="30" />

<!-- either false or arrow or thrown -->
<option name="RELOAD_AMMUNITION" value="false" /> <!-- false|arrow|thrown -->

<!-- Combat options -->
<option name="COMBAT_TYPE" value="" /> <!-- leave empty or choose ranged/melee if not using class default -->
<option name="COMBAT_RANGED_PULL" value="true" /> <!-- only important for melees -->
<option name="COMBAT_DISTANCE" value="200" />
<option name="MAX_FIGHT_TIME" value="15" /> <!-- Max time without damage before break -->
<option name="DOT_PERCENT" value="90" />
<option name="ANTI_KS" value="true" />
<option name="MAX_TARGET_DIST" value="10000" />

<!-- Attack monsters 3 levels above or 10 below your level -->
<option name="TARGET_LEVELDIF_ABOVE" value="3" />
<option name="TARGET_LEVELDIF_BELOW" value="10" />

<!-- Waypoint and movement settings -->
<option name="WAYPOINTS" value="" /> <!-- leave empty to show a list -->
<option name="RETURNPATH" value="" />
<option name="PATH_TYPE" value="waypoints" /> <!-- waypoints | wander -->
<option name="WANDER_RADIUS" value="500" />
<option name="WAYPOINT_DEVIATION" value="0" />
<option name="QUICK_TURN" value="false" />

<!-- Loot settings -->
<option name="LOOT" value="true" />
<option name="LOOT_IN_COMBAT" value="true" />
<option name="LOOT_DISTANCE" value="100" />
<option name="LOOT_PAUSE_AFTER" value="0" /> <!-- probability in % for a short rest -->

<!-- Log out and resurrect settings -->
<option name="LOGOUT_TIME" value="0" /> <!-- in minutes, 0 = timer disabled -->
<option name="LOGOUT_SHUTDOWN" value="false" />
<option name="LOGOUT_WHEN_STUCK" value="true" />
<option name="RES_AUTOMATIC_AFTER_DEATH" value="true" />
<option name="MAX_DEATHS" value="10" /> <!-- Log out after this many deaths -->

<!-- For more options and documentation see the RoM Bot Wiki: -->
<!-- http://www.solarstrike.net/wiki/index.p ... le=RoM_Bot -->

</options>

<friends>
<!-- names of friends we help fighting or enemys we don't want to attack -->
<!-- for umlauts use \129 (ue),\132 (ae),\148 (oe) e.g. K\132fer -->
<friend name="MyOtherCharacter1" />
<friend name="MyOtherCharacter2" />
<friend name="Elite_Mob_Name1" />
<friend name="Elite_Mob_Name2" />
</friends>

<mobs>
<!-- names of mobs we want to attack -->
<!-- if no names defined we will attack all mobs -->
<mob name="" />
<mob name="" />
<mob name="" />
</mobs>

<hotkeys>
<!-- to communicate with the RoM API / define ingame dummy macro at place 1 -->
<hotkey name="MACRO" modifier="" key="VK_0" />
</hotkeys>

<!-- define your skills depending from your actual primary class -->
<!-- see the example for a priest/mage -->
<!-- delete skills you don't have or don't want to use. -->
<!-- For more skills to use see /database/skills.xml -->
<!-- demo skills for LvL 1 character for all classes -->
<skills_priest>
<skill name="PRIEST_SOUL_SOURCE" modifier="" hotkey="VK_4" priority="110" inbattle="true" hpper="15" />
<skill name="PRIEST_HOLY_AURA" modifier="" hotkey="VK_7" priority="100" inbattle="true" hpper="24" />
<skill name="PRIEST_URGENT_HEAL" modifier="" hotkey="VK_2" priority="100" hpper="30" />
<skill name="PRIEST_REGENERATE" modifier="" hotkey="VK_6" priority="90" />
<skill name="PRIEST_RISING_TIDE" modifier="" hotkey="VK_3" priority="80" />
<skill name="MAGE_FIREBALL" modifier="" hotkey="VK_8" priority="70" />
<skill name="PRIEST_WAVE_ARMOR" modifier="" hotkey="VK_5" priority="40" inbattle="true" />
<!--skill name="PRIEST_SOUL_BOND" hotkey="VK_T" priority="30" /> -->
<!--skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_F" priority="20" rebuffcut="60" inbattle="false" /> -->
</skills_priest>

<skills_warrior>
<skill name="WARRIOR_SLASH" modifier="" hotkey="VK_2" priority="90" />
<skill name="WARRIOR_PROBING_ATTACK" modifier="" hotkey="VK_4" priority="80" />
<skill name="WARRIOR_OPEN_FLANK" modifier="" hotkey="VK_5" priority="70" />
</skills_warrior>

<skills_scout>
<skill name="SCOUT_SHOT" modifier="" hotkey="VK_2" priority="90" />
<skill name="SCOUT_AUTOSHOT" modifier="" hotkey="VK_4" priority="80" />
<skill name="SCOUT_WIND_ARROWS" modifier="" hotkey="VK_5" priority="70" />
</skills_scout>

<skills_rogue>
<skill name="ROGUE_SHADOWSTAB" modifier="" hotkey="VK_2" priority="90" />
<skill name="ROGUE_LOW_BLOW" modifier="" hotkey="VK_4" priority="80" />
</skills_rogue>

<skills_mage>
<skill name="MAGE_FLAME" modifier="" hotkey="VK_3" priority="80" />
<skill name="MAGE_ELEMENTAL_CATALYST" modifier="" hotkey="VK_2" priority="30" inbattle="true" />
</skills_mage>

<skills_knight>
<skill name="KNIGHT_HOLY_STRIKE" modifier="" hotkey="VK_3" priority="90" />
<skill name="KNIGHT_HOLY_SHIELD" modifier="" hotkey="VK_4" priority="80" inbattle="true" hpper="15" />
<skill name="KNIGHT_HOLY_SEAL" modifier="" hotkey="VK_5" priority="70" />
<skill name="KNIGHT_PUNISHMENT" modifier="" hotkey="VK_2" priority="60" />
</skills_knight>

<skills_warden>
<skill name="WARDEN_CHARGED_CHOP" modifier="" hotkey="VK_2" priority="90" />
<skill name="WARDEN_ENERGY_ABSORB" modifier="" hotkey="VK_3" priority="80" inbattle="true" hpper="25" />
</skills_warden>

<skills_druid>
<skill name="DRUID_RECOVER" modifier="" hotkey="VK_2" priority="90" hpper="30" />
<skill name="DRUID_EARTH_ARROW" modifier="" hotkey="VK_3" priority="80" />
</skills_druid>

<onLoad><![CDATA[
-- Additional Lua code to execute after loading the profile
-- and before the bot starts. e.g. You could overwrite profile settings here
-- like: changeProfileOption("HP_REST", 60);
]]></onLoad>

<onDeath><![CDATA[
-- Additional Lua code to execute on death
-- pauseOnDeath(); -- Stop the script
-- player:logout(); -- logout
]]></onDeath>

<onLeaveCombat><![CDATA[
-- Additional Lua code to execute after killing an enemy
]]></onLeaveCombat>

<onLevelup><![CDATA[
-- Additional Lua code to execute after having a levelup
-- and levelup the skills for a new character (mage or priest recommended)
-- e.g. sendMacro("SetSpellPoint(_tabnr, _skillnr);"); would levelup a skill
]]></onLevelup>

<onSkillCast><![CDATA[
-- Additional Lua code to execute when casting a skill
-- Note: arg1 contains the skill being used.
-- i.e. arg1.Name will be the name of the skill being cast
-- e.g.:
--if( 15 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_SOUL_SOURCE");
--elseif( 25 > player.HP/player.MaxHP*100 ) then
-- player:cast("PRIEST_HOLY_AURA");
-- player:cast("PRIEST_URGENT_HEAL");
-- player:cast("PRIEST_URGENT_HEAL");
]]></onSkillCast>
</profile>

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#42 Post by rock5 » Tue Jun 22, 2010 7:52 am

I'm at a loss. If you are using the default profile and are using the same version of rombot and game client, it should work the same as on my PC.

Seeing as I'm not able to reproduce the error there's not much more I can do. Sorry.
  • 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

WhiteTiger
Posts: 84
Joined: Tue Jun 22, 2010 8:06 am

Re: Autologin revisited

#43 Post by WhiteTiger » Tue Jun 22, 2010 8:11 am

My autologin doesnt work for some reason.

This is what I have in the waypoint file:

Code: Select all

	printf("We where running for %s seconds.\n", os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time );
         sendMacro("}LoginNextToon=true;a=")
         sendMacro("Logout();"); yrest(30*1000) -- wait 3m for next character to load

         loadPaths("GetHorse"); -- First script
All it does is logout to character screen and log in again with the same character. I want it to log in with the next char. Any idea how I can fix this?

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Autologin revisited

#44 Post by miximixi007 » Wed Jun 23, 2010 11:15 am

download the last version of Loginxml and u lost a character with {
sendMacro("}LoginNextToon=true;a={");player:rest(2)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#45 Post by rock5 » Wed Jun 23, 2010 11:40 am

Oops. The "{" was missing from the example on the first post too. Sorry. Fixed now.
  • 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

smokyru
Posts: 31
Joined: Fri Dec 18, 2009 9:02 am

Re: Autologin revisited

#46 Post by smokyru » Mon Jun 28, 2010 12:33 pm

Hey, i'm sorry if it has already been answered (i really am), but i read quickly and didnt see it:

Do we have to manually put an empty macro on each character?

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

Re: Autologin revisited

#47 Post by Administrator » Mon Jun 28, 2010 4:18 pm

I'm not sure what a 'character' is, but yes.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#48 Post by rock5 » Mon Jun 28, 2010 7:36 pm

Administrator wrote:I'm not sure what a 'character' is, but yes.
Well, obviously, you know what a "character" is because you answered the question :)

But to make things more clear a "character" is a character. I first saw it used awhile ago. I thought it sounded silly too but it's so much shorter than "character" that I started using it too. LoL. Luckily no one seems to fail to understand its meaning when used in context.
  • 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

miximixi007
Posts: 94
Joined: Sat Apr 17, 2010 1:18 pm

Re: Autologin revisited

#49 Post by miximixi007 » Fri Jul 02, 2010 8:42 am

I hope that can have an function of change accounts by auto when last 'character'.expecting

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#50 Post by rock5 » Fri Jul 02, 2010 9:22 am

miximixi007 wrote:I hope that can have an function of change accounts by auto when last 'character'.expecting
I'm guessing you want to change accounts automatically when the last character finishes?

As I've said previously, it is not worth the work to implement it. As it is, it can play 8 characters 1 after another, leveling them from 1 to 10. That will take about 8 hours if you are lucky and it doesn't stop for one reason or another. You will still need to check it occasionally so I don't see the need for it.

Sorry I can help you.
  • 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

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Autologin revisited

#51 Post by MiesterMan » Wed Jul 07, 2010 10:03 pm

rock5 wrote:
miximixi007 wrote:I hope that can have an function of change accounts by auto when last 'character'.expecting
I'm guessing you want to change accounts automatically when the last character finishes?

As I've said previously, it is not worth the work to implement it. As it is, it can play 8 characters 1 after another, leveling them from 1 to 10. That will take about 8 hours if you are lucky and it doesn't stop for one reason or another. You will still need to check it occasionally so I don't see the need for it.

Sorry I can help you.
Well that's not really what I'm using this awsome add-on you fixed up for us for but I get what you're saying. I made a workaround and am working on making it workable but I'm still setting it up so it'll take a while. Since I'm using changes to things I don't really understand, based on what I've read in this thread, I figured it wouldn't hurt to post what I'm trying. I tested all the functionality in game using macros so I know the commands in their sequences will work I just need to make sure they can get from the bot to the game.

Requirements for this to work:

1. All accounts must have the same password. You can change the password using a similar method with what I'm posting if you make the password a global variable but I wouldn't reccomend that for obvious reasons.

2. This method triggers the cycling from ingame. I did this so I can keep my normal autologin info for my main accounts in the file and activate the cycling through the bot without havig to touch anything. So, after you add the code below you'll need to be logged in and start the bot using the profile for your cycling.

3. LoginNextToon is nice but working with it and the method below was taxing so I stuck with the long variables. If you want to use a macro in game to go to your next character then /script LoginNextToon=true;Logout(); works great (already using it) but I'm using the bot to control the changing so CharacterSelect.selectedIndex=NUMBER will be used in place of it.

---

Ok, first this code is added to OnLoad of the profile:

Code: Select all

	<onLoad>
		local CurrentAccNum = 0
		local CharacterNumber = 1
		fastLoginAccNames="Account1","Account2","Account3","Account4","Account5"

			sendMacro("}fastLoginUser=" .. fastLoginAccNames[CurrentAccNum] .. ";a={");
			yrest(500);
			sendMacro("}fastLoginTriedOnce=false;a={");
			yrest(500);
			sendMacro("}CharacterSelect.selectedIndex = " .. CharacterNumber .. ";a={");
			yrest(500);
			sendMacro("}fastLoginAutoEnter=true;a={");
			yrest(500);
			sendMacro("}fastLoginAutoLogin=true;a={");
			yrest(500);
			sendMacro("}fastLoginRelog=true;a={");
			yrest(500);
			sendMacro("}fastLoginNoZoom=true;a={");
			yrest(500);
			sendMacro("CharacterSelect_Exit();");

	</onLoad>
Again, I haven't tested this through the bot so I can't say if the syntax is perfect or if it even works like this so please let me know what to change if you see anything.

Then in waypoint file where the conditions are checked and met this is added:

Code: Select all

		if secretConditionMet then
			CharacterNumber = CharacterNumber + 1
			if CharacterNumber > 8 then
				CharacterNumber = 1
				CurrentAccNum = CurrentAccNum + 1
				if not fastLoginAccNames[CurrentAccNum] = nil then
					sendMacro("}fastLoginUser=" .. fastLoginAccNames[CurrentAccNum] .. ";a={");
					yrest(500);
					sendMacro("}fastLoginTriedOnce=false;a={");
					yrest(500);
					sendMacro("}CharacterSelect.selectedIndex = " .. CharacterNumber .. ";a={");
					yrest(500);
					sendMacro("CharacterSelect_Exit();");
				else
					sendMacro("AccountLogin_Exit();");
				end
			else
				sendMacro("}CharacterSelect.selectedIndex = " .. CharacterNumber .. ";a={");
				yrest(500);
				sendMacro("Logout();");
				yrest(60000);
			end
		end
It'll be a little while till I can work out any kinks in this but feel free correct anything you see wrong right now for me. I've always been terrible with code on the first try so I'm not expecting much.

Thanks in advance!

Prepost Edit: By LoginNextToon being taxing I meant I kept confusing where to use which command so I stuck with one. If you're focused enough to use both great, I'm just not so good at it.

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Autologin revisited

#52 Post by MiesterMan » Wed Jul 07, 2010 10:52 pm

As expected of something I wrote... it's not working at all. I can't even get the onLoad to work, lol. First I was getting errors with concatination, fixed those, now it just says failed to compile with no more info. I think I might start a new thread titled "Autologin Account Cycling" to seperate this instead of continuing this thread.

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Autologin revisited

#53 Post by MiesterMan » Wed Jul 07, 2010 11:08 pm

Ok, corrected the onload and it's working now:

Code: Select all

	<onLoad>
		local CurrentAccNum = 1
		local CharacterNumber = 1
		local fastLoginAccNames={"Account1","Account2","Account3","Account4","Account5"}

			sendMacro("}fastLoginUser=\"" .. fastLoginAccNames[CurrentAccNum] .. "\";a={");
			yrest(500);
			sendMacro("}fastLoginTriedOnce=false;a={");
			yrest(500);
			sendMacro("}CharacterSelect.selectedIndex = " .. CharacterNumber .. ";a={");
			yrest(500);
			sendMacro("}fastLoginAutoEnter=true;a={");
			yrest(500);
			sendMacro("}fastLoginAutoLogin=true;a={");
			yrest(500);
			sendMacro("}fastLoginRelog=true;a={");
			yrest(500);
			sendMacro("}fastLoginNoZoom=true;a={");
			yrest(500);
			sendMacro("CharacterSelect_Exit();");

	</onLoad>

Edit: I am currently testing the rest of it. I'll repost in a new thread when I have it working all correctly.

Edit2: Still having a problem with onLoad I didn't notice. I can't remember how to escape the quotes in the send. Will correct and update later.

Edit 3: Ok, figured out the escape method and corrected it in the code above, currently testing the rest of it (corrected the line in the waypoint file too). After testing is done I'll post the finished product.

Edit4: So something is wrong with the code in the waypoint file and I can't figure out what it is. It won't tell me what's wrong only that it can't compile. I'm going through each line breaking it one piece at a time to find the error but it's taking time.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#54 Post by rock5 » Thu Jul 08, 2010 12:13 am

MiesterMan wrote:Edit4: So something is wrong with the code in the waypoint file and I can't figure out what it is. It won't tell me what's wrong only that it can't compile. I'm going through each line breaking it one piece at a time to find the error but it's taking time.

Code: Select all

sendMacro("}fastLoginUser=" .. fastLoginAccNames[CurrentAccNum] .. ";a={");
You have o be careful of strings as they need to be surrounded by quotes or they will be seen as variables. Should be;
sendMacro("}fastLoginUser='" .. fastLoginAccNames[CurrentAccNum] .. "';a={");

Otherwise I can't see anything else wrong with it.

I don't see anything that should cause it to fail to compile unless you have already fixed that problem.
  • 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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#55 Post by rock5 » Thu Jul 08, 2010 12:36 am

Some thoughts:
- It looks like you are initializing and resetting your variables in the onload section. Why do that? You load your profile after starting a character. What happens if you start the third character first. Your onload assumes you are starting with your first account and character. Assumptions should always be avoided. Also I think the onload will get re-run when you re-initialize your character profile after loading a new character.
- I eventually discovered that the character selection screen and the in-game share the lua environment so I suspect a lot of those values are already available so you don't need to set them.
- What I would do is, when it's time to change character or account, I would collect the current values and then decide what to change and what actions to take.
  • 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

User avatar
MiesterMan
Posts: 543
Joined: Tue Jul 06, 2010 9:15 pm
Location: Between the Second and Third Circles of Hell

Re: Autologin revisited

#56 Post by MiesterMan » Thu Jul 08, 2010 12:59 am

First my progress:

Seems I was imagining being able to control the index. As much as I hate the lack of control and coordination I'll have to settle for attempting to reset to 1 with account changing and rely on the LoginNextToon command. Otherwise I've got all parts working. Now I'm waiting to see if it will reset to char 1 correctly.
rock5 wrote:
MiesterMan wrote:Edit4: So something is wrong with the code in the waypoint file and I can't figure out what it is. It won't tell me what's wrong only that it can't compile. I'm going through each line breaking it one piece at a time to find the error but it's taking time.

Code: Select all

sendMacro("}fastLoginUser=" .. fastLoginAccNames[CurrentAccNum] .. ";a={");
You have o be careful of strings as they need to be surrounded by quotes or they will be seen as variables. Should be;
sendMacro("}fastLoginUser='" .. fastLoginAccNames[CurrentAccNum] .. "';a={");

Otherwise I can't see anything else wrong with it.

I don't see anything that should cause it to fail to compile unless you have already fixed that problem.
The error from this post was actually my using = in the null check if statement instead of == (I've done that so many times I wanted to cry when I realized what it was).
rock5 wrote:Some thoughts:
- It looks like you are initializing and resetting your variables in the onload section. Why do that? You load your profile after starting a character. What happens if you start the third character first. Your onload assumes you are starting with your first account and character. Assumptions should always be avoided. Also I think the onload will get re-run when you re-initialize your character profile after loading a new character.
- I eventually discovered that the character selection screen and the in-game share the lua environment so I suspect a lot of those values are already available so you don't need to set them.
- What I would do is, when it's time to change character or account, I would collect the current values and then decide what to change and what actions to take.
I set the variables so I could keep my regular play and my account cycling play seperated. So the autologin still works for my main characters and I can just load the bot with this profile that sets all the account info and makes the account name array.

All characters on all accounts will be run from the first profile loaded so there won't be any settings reloaded between characters. If there is a command to update the class information without loading the profile it would be great to add it so people can use this to bot several different classes.

Changing the variables through the waypoint file and profile is to keep the bot running while cycling accounts. The bot crashes if the game exits so, along with not changing my normal account info, it will have the info for the other accounts loaded without needing to reload the loginxml stuff (I can't think of what to call it, my brain hurts right now).

The live changes are being made from the waypoint file. The onLoad stuff is just to kick it all off. Only a few values need to change to switch chars/accounts so they're made there then it decides to log off or drop to the account login screen or exit the game if at the end of all the accounts listed.

I've got most of it working now and it's cycling through, on the final leg of testing atm.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#57 Post by rock5 » Thu Jul 08, 2010 1:38 am

MiesterMan wrote:The error from this post was actually my using = in the null check if statement instead of == (I've done that so many times I wanted to cry when I realized what it was).
:) Me too. When I have problems, that's 1 of the first thing I check. I thought I checked that. Not well enough obviously.

Seeing it now, I realize it is not working as intended.

Code: Select all

if not fastLoginAccNames[CurrentAccNum] == nil then
Is read as

Code: Select all

if (not fastLoginAccNames[CurrentAccNum]) = nil then
What you intended was

Code: Select all

if not (fastLoginAccNames[CurrentAccNum] = nil) then
Although nil is taken to be false so you could just use

Code: Select all

if not fastLoginAccNames[CurrentAccNum] then
Which will return true if nil or false.

Maybe you will be able to control the index after all?
MiesterMan wrote:All characters on all accounts will be run from the first profile loaded so there won't be any settings reloaded between characters. If there is a command to update the class information without loading the profile it would be great to add it so people can use this to bot several different classes.
The reason you need to re-initialize the profile as per the instructions on the first post, is because when it loads the next character we had problems with the character not attacking mobs, not opening giftbags and not leveling skills. Don't know if it's still true though.

You mentioned crashes which made me think, what happens if the game crashes half way through your accounts? Will you have to edit the profile so it can continue where it left off?

I'm very impressed with your solution so far. Didn't realize you could get so much control from in-game. Well done. Hopefully this will be of use to others who have asked about this feature.
  • 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

romvn
Posts: 16
Joined: Tue May 04, 2010 10:22 pm

Re: Autologin revisited

#58 Post by romvn » Thu Jul 08, 2010 4:54 am

rock5 wrote:The reason you need to re-initialize the profile as per the instructions on the first post, is because when it loads the next character we had problems with the character not attacking mobs, not opening giftbags and not leveling skills. Don't know if it's still true though.
Yes, it's true. The next character will not open giftbags and leveling skills but we can do this by moving the code from event <onLevelup> to <onLeaveCombat>. That way, you don't need to re-initialize the profile.
Proud to be the GREATEST botter in Chúa Tể Phục Sinh (RoM Vietnamese version)

romvn
Posts: 16
Joined: Tue May 04, 2010 10:22 pm

Re: Autologin revisited

#59 Post by romvn » Thu Jul 08, 2010 5:07 am

As in my previous post in this topic, I again confirm that we CAN implement multi login feature. It's not so difficult as you think. Just do some tweaks on Fastlogin interface that first introduced by Ahmed Mohamed el-Sawalhy. Nothing else required except some changes in your waypoints/profiles to allow the bot instructs your current character logout and wait for the next character loaded.

In that way, your characters/characters will login one by one. When it reaches the 8th one, it will automatically change to the next account. You can do it until your client crashes. You will likely face this problem at the 4th account, when your client uses around 1.5GB RAM. That is what I have on my PC running Windows 7 Ultimate x64, 4GB RAM with 3 clients running at the same time.

Let's see what I have for farming tokens by doing dailies using this feature. This picture taken from RoM VN 3 weeks ago.

Image

Like waypoints, people are not willing to share theirs, I wonder if this feature will be shared soon. As many and many requests these days, I'm thinking of sharing mine, but I'm not sure it's a wise decision.

What are you thinking about?
Proud to be the GREATEST botter in Chúa Tể Phục Sinh (RoM Vietnamese version)

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Autologin revisited

#60 Post by rock5 » Thu Jul 08, 2010 5:41 am

romvn wrote:
rock5 wrote:The reason you need to re-initialize the profile as per the instructions on the first post, is because when it loads the next character we had problems with the character not attacking mobs, not opening giftbags and not leveling skills. Don't know if it's still true though.
Yes, it's true. The next character will not open giftbags and leveling skills but we can do this by moving the code from event <onLevelup> to <onLeaveCombat>. That way, you don't need to re-initialize the profile.
I think, if it doesn't work on level up it won't work on leave combat. I could be wrong though.

Have you tried re-initializing the profile as per the instructions? Because maybe it doesn't run the onload event again.

I'm thinking I may have to implement this feature now that you have shown me it wouldn't be as difficult as I thought.
  • 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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest