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
User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: rock5's "fastLogin Revisited"

#861 Post by Bot_romka » Sun Nov 30, 2014 8:36 pm

Automatic Character Create!

instal: закиньте файл в папку interface\loginxml\

Code: Select all

fastAutoCharacterCreate = true;	-- set to false or true
fastLoginCharCreateWaitTime = 0.5;

local time_remaining = fastLoginCharCreateWaitTime;
function CharacterSelect_OnUpdate(this, elapsedTime)
	if ( CHARACTER_SELECT_ROTATION_START_X ) then
		local x = GetCursorPos();
		local diff = (x - CHARACTER_SELECT_ROTATION_START_X) * CHARACTER_ROTATION_CONSTANT;
		CHARACTER_SELECT_ROTATION_START_X = x;
		SetCharacterSelectFacing(GetCharacterSelectFacing() - diff);
	end


	if (fastLoginAutoEnter and ( not fastLoginLoggedIn )) or (fastLoginLoggedIn and DoRelog) then -- rv edited
		if fastLoginRegSel then
			CHARACTERSELECT_REGION_SELECTED = fastLoginRegSel;
		end
		CharacterSelect_EnterWorld();
	end

	if (fastAutoCharacterCreate) then
		time_remaining = time_remaining - elapsedTime;
		if (time_remaining > 0) then
			return
		end
		time_remaining = fastLoginCharCreateWaitTime;
		local fastLoginNumChars = GetNumCharacters();
		if ( fastLoginNumChars < MAX_CHARACTERS_DISPLAYED ) then
			CharacterSelect_SelectCharacter(CharacterSelectCreateButton:GetID())
			CharacterCreate_Default()
			CharacterCreate_Okay()
			CharacterList_Update()
		end  
	end
end
Need help with a bug create extra characters after re-entering the account.

All file were not working and removed.
Last edited by Bot_romka on Mon Dec 01, 2014 4:21 pm, edited 2 times in total.

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

Re: rock5's "fastLogin Revisited"

#862 Post by rock5 » Sun Nov 30, 2014 10:41 pm

Note: This wont be compatible with future versions of my fastlogin (loginxml). And, if I ever get around to finishing my new version, it will have an auto generate characters option. But it could be a while so this file could be useful until then.
  • 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
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: rock5's "fastLogin Revisited"

#863 Post by Bot_romka » Mon Dec 01, 2014 4:18 pm

I tested many variant and I'm sure full automatic char create without bugs will not be able to create. I added function for manual start auto create character (Shift-Click on "Create" button) and unlock all 10 chars for select and create.

The second archive interface_Login_texture for those who want to redraw the frame character selection.
Attachments
interface_Login_texture.zip
Texture of CharacterSelect frame
(104.09 KiB) Downloaded 304 times
Loginxml_v3.4_moded.zip
(27.91 KiB) Downloaded 309 times

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#864 Post by Desmond » Sat Jan 03, 2015 10:27 am

Interesting I just realized, I do run one account addon creates characters but when run a second account it doesn't make it bad, but when I close the game and run the following account addon creates..

User avatar
Desmond
Posts: 184
Joined: Wed Jan 08, 2014 4:39 pm
Location: Ukraine

Re: rock5's "fastLogin Revisited"

#865 Post by Desmond » Tue Jan 06, 2015 7:37 am

How to bind the button to automatically add-click "Delete"?
for example

Code: Select all

DeleteCharacter(())
Attachments
Delete.png

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: rock5's "fastLogin Revisited"

#866 Post by Bot_romka » Mon Mar 02, 2015 4:57 am

Fixed and modified version of loginxml v3.71b1

fix: not working baseScript() and fastLoginAutoEnter
add: skip dialog character recover, fastLoginCharacterSelectDelete, fastLoginCharacterSelectRecover, CustomStartAutoGenerateCharacters, many Tooltip, new user options and even something...


p.s. function AutoGenerateCharacters not work properly...
Attachments
loginxml_17_Рабочий.zip
(32.18 KiB) Downloaded 321 times

User avatar
Bot_romka
Posts: 96
Joined: Tue Apr 05, 2011 2:59 am
Location: Russia

Re: rock5's "fastLogin Revisited"

#867 Post by Bot_romka » Mon Mar 02, 2015 5:37 am

For Desmond
How to bind the button to automatically add-click "Delete"?
Можешь использовать loginScript("CharacterSelect_Delete()") для удаления персонажей, не обязательно кликать мышкой. Просто в онлоад добавь эту функцию с её переменными из новой версии userfunction_login.lua Я щас разрабатываю как использовать авто-удаление в аддоне автологине но из-за жуткого бага с определением что окно персонажей загрузилось не могу это использовать. Вот моя версия http://www.solarstrike.net/phpBB3/viewt ... 903#p60903 для аддона автологина что выложил в паблик выше.

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#868 Post by Testa » Wed Jun 03, 2015 3:35 am

Idea for a new function to print the actually state of relogging:

Charlist:

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}},
   }})
Active Account | Output (print):

Code: Select all

acc 1 | Account 1 of 2
acc 2 | Account 2 of 2

acc 3 | Account 1 of 4
acc 4 | Account 2 of 4
acc 5 | Account 3 of 4
acc 6 | Account 4 of 4
with an option to modify:
Active Account | Output (print):

Code: Select all

acc 1 | Account 1 of 2 (1 left)
acc 2 | Account 2 of 2 (0 left)

acc 3 | Account 1 of 4 (3 left)
acc 4 | Account 2 of 4 (2 left)
acc 5 | Account 3 of 4 (1 left)
acc 6 | Account 4 of 4 (0 left)
Sorry about the bad english

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

Re: rock5's "fastLogin Revisited"

#869 Post by rock5 » Thu Jun 04, 2015 11:19 am

The output looks a bit confusing. Are you saying that every time it changes character you want it to print out the whole list of characters and where you are up to? Or are you saying you want it to just print 3 of 4 etc?

One thing you have to realize, there is no way for the userfunction (or even loginxml) to know how many characters there are in all the listed accounts. So at this point, I don't even think we could add how many are left, except of course for the current account. Of course you could do it if you specify a full character list with setCharList, but if you use chars={}, which means 'all characters in the account', then there would be no way to know the numbers.
  • 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

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#870 Post by Testa » Fri Jun 05, 2015 2:18 am

First of all thx for the fast reply and your help
rock5 wrote:The output looks a bit confusing. Are you saying that every time it changes character you want it to print out the whole list of characters and where you are up to? Or are you saying you want it to just print 3 of 4 etc?
The second :D I only want to print out: "Account 1 of 2 (1 left)" etc
rock5 wrote: One thing you have to realize, there is no way for the userfunction (or even loginxml) to know how many characters there are in all the listed accounts. So at this point, I don't even think we could add how many are left, except of course for the current account. Of course you could do it if you specify a full character list with setCharList, but if you use chars={}, which means 'all characters in the account', then there would be no way to know the numbers.
I mean accounts (not chars) ...
If account 1 has 3 chars then the output of all 3 chars would be for example: Account 1 of 2 (1 left)

Code: Select all

account 1, char1 -> Print: Account 1 of 2 (1 left)
account 1, char2 -> Print: Account 1 of 2 (1 left)
account 2, char1 -> Print: Account 2 of 2 (0 left)
account 2, char2 -> Print: Account 2 of 2 (0 left)
account 2, char3 -> Print: Account 2 of 2 (0 left)
Sorry about the bad english

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

Re: rock5's "fastLogin Revisited"

#871 Post by rock5 » Sat Jun 06, 2015 2:07 am

I see what you mean now. It just gets a bit confusing especially when you add the existing printout. When you print both I think it will look confusing. How about modifying the existing print out to look something like this.

Code: Select all

Changing to character 2 account 3 (2/4)
(2/4) meaning '2 of 4'. I think that's clear.

We could also have how many characters on the account left too. Eg.

Code: Select all

Changing to character 2 (2/7) account 3 (2/4)
How does that sound?
  • 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

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#872 Post by Testa » Sat Jun 06, 2015 3:05 am

this is exactly what i mean :)


Maybe a second idea: would it be possible to print out the runtime of the script?
for example: charlist has 3 accounts... after finished the last acc (char) it would print out the runtime. it tryed to make it by myself but i get it only to print nonsence
Printout:

Code: Select all

Last player finished. Runtime: 2:15 hours
and/ or

Code: Select all

Changing to character 2 (2/7) account 3 (2/4). Runtime: 1:10 hours
[/i]
Sorry about the bad english

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

Re: rock5's "fastLogin Revisited"

#873 Post by rock5 » Sat Jun 06, 2015 4:09 am

I think that could be done. Of course the time wont make much sense if you had to restart a waypoint file or if you paused it for a time.

All we would have to do is record the time when it loads a new character and then display the difference when we load the next one. For the first character, that wont have a start time, we can just record the time as soon as the userfunction is loaded which is as soon as you start the bot.

To display the time you need to format it with something like os.date. This would work

Code: Select all

print(os.date("%H%M%S",os.time()-startTime))
This would print something like 02:15:32 for 2 hours, 15 minutes and 32 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

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#874 Post by Testa » Sat Jun 06, 2015 4:25 am

this sounds great

i tryed it with

Code: Select all

printf("\nWe where running for %s seconds.\n", math.floor (os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time ));
but it displays nonsence by using the relog function (if i use it with a single waypoint and one char it works). maybe because i have 2 waypoint in a loop and 6 accounts.
Sorry about the bad english

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

Re: rock5's "fastLogin Revisited"

#875 Post by rock5 » Sat Jun 06, 2015 7:20 am

I can't guess what you mean by 'nonsense'. I suppose it would depend on when and where BotStartTime_nr and Sleeping_time are updated. Probably, also, if you do a loadProfile it will reset those values. Hm... that's probably what you want. Are you doing a loadProfile() after changing character?
  • 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

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#876 Post by Testa » Sat Jun 06, 2015 7:39 am

nonsense = wrong values, like -2357675,2322 seconds
rock5 wrote:Are you doing a loadProfile() after changing character?
yes

my relog function is like this:

Code: Select all

function relog()
   
      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}},
      })

      LoginNextChar()
      yrest(4000)
      player:update()
      loadProfile()
      loadPaths("path2.xml");
   end
i try it tomorrow without the loadProfile()

thx again and sorry about the bad english :)
Sorry about the bad english

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#877 Post by Testa » Sun Jun 07, 2015 1:54 am

now it works! big thx!

but i can´t get it in a format like this
rock5 wrote:02:15:32 for 2 hours, 15 minutes and 32 seconds.
my code i try to format
Testa wrote:printf("\nRuntime: %s.\n", math.floor (os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time ));
Sorry about the bad english

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

Re: rock5's "fastLogin Revisited"

#878 Post by rock5 » Sun Jun 07, 2015 9:59 am

Looks like it doesn't work after all.

I found another way that might work.

Code: Select all

print(os.date("!%X",os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time))
I'm not sure what "!%X" is supposed to mean but it seems to work.
  • 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

Testa
Posts: 28
Joined: Wed Apr 29, 2015 1:59 am

Re: rock5's "fastLogin Revisited"

#879 Post by Testa » Mon Jun 08, 2015 9:34 am

tested it with your code
rock5 wrote:print(os.date("!%X",os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time))
but the code return wrong values (outputs)

the code returns

Code: Select all

!01:00:08
but should return like (i don´t clock the exact time but it is just after the script started)

Code: Select all

!00:00:08
Sorry about the bad english

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

Re: rock5's "fastLogin Revisited"

#880 Post by rock5 » Tue Jun 09, 2015 3:58 pm

I think the problems with the hours is because of time zones. The ! is supposed to fix that. Seeing as it adds 1 hour maybe it is a daylight hours issue?

At this point I would just give up using os.date and do it manually by calculating the separate values and formatting it.

Code: Select all

local s = os.difftime(os.time(),player.BotStartTime_nr) - player.Sleeping_time
printf("%.2d:%.2d:%.2d", s/(60*60), s/60%60, s%60)
  • 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: No registered users and 5 guests