Author Topic: Log-in Multi accounts & chrs : BOD farming  (Read 2676 times)

0 Members and 1 Guest are viewing this topic.

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Log-in Multi accounts & chrs : BOD farming
« on: August 02, 2021, 08:49:32 PM »
0
Was wondering how a pro would code logging in 4 accounts, all 7 chrs (blocking a few chrs)
only time needs account name entered is if first time / chr in that account.
(chrs 2-7 , dont need account name, just password)
(all accounts have same password)

Feedback Needed !
 
Here the sloppy way i came up with, that works , but needs cleaned up:

Code: [Select]
set %login %login + 1
if %login = 2       ;--- block 2nd chr on all account
   set %login 3
if %login > 7
   {
    set %accountIn %accountIn + 1
    set %account %account + 1
    if %account > %accountNumber
        {
        set %account 1
        set %accountIn 1
        }
    set %accName %accName_ . %account
    set %login 1
   }
if %account = 0 || %login > 1
    set %accName 0
if %accountIn = 4 && %login = 1   ;-- block chr 1 and 2 on 4th account
     set %login 3
if %accountIn = 2 && %login = 5   ;-- block chr
     set %login 6
if %accountIn = 2 && %login = 7   ;-- block chr
     set %login 8
if %accountIn = 4 && %login = 7   ;-- block chr
    {
     set %accountin 1
     set %account 4
     set %accName %accName_ . %account
     set %login 1
     }



Code: [Select]
;========================================================
; Script Name: Hitech's BOD farmer
; Authors: Hitech
; Version: 1.0.1
; Client Tested with: 7.0.90.16
; EUO version tested with: 1.6.0 (333)
; Shard: Freeshard : Heritage / TrueUo
; Shard: open source - https://github.com/TrueUO
; Revision Date: 8/2/2021
; Public Release:
; Purpose: login muliple accounts / chrs to get BODS
; thanks to " script-y " for what ever he says i copied :(
;-------------------------------------------------------
; update any needed Vars listed below
; logout all chrs above scribe 2nd floor in luna
; Log in 1st chr on 1st account, press play
;=========================================================
; thanks to " Orngrimm & ABC " for date and time
; http://www.easyuo.com/forum/viewtopic.php?p=96499#p144885
;--------------------------------------------------------
;---- Hitech edit : i turned into a sub, thank you,
; Thanks to: yolcu for Auto Login - Re Login script
; http://www.easyuo.com/forum/viewtopic.php?f=3&t=53130
;---------------------------------------------------------

;--- loging Gumps ---
set %shardName #SHARD
set %loginMain KLMD
Set %shardSelection WTLD
set %chrSelection QUSB
set %lostConn OZQB
set %unableToConn OZQB ; 408_288
set %passwordBox QUSB
set %wrongpassword OZQB
set %chrScreen OLFC   ; after seletecd chr
;---------------------------
set %scribeNpc VRMD
set %login 1
set %accountNumber 4
set %accountIn 1
set %AccName_1 x
set %accName_2 x
set %accName_3 x
set %accName_4 x
set %Password    x
set %Character 1
set %account 0
set %accName 0

;---------- testing ----------
;- start on diffrent chr / account
;set %accountin 4
;set %account 3
;set %login 6
;------------------------------

Start1:
finditem %scribeNpc g_8
if #findkind <> -1
   {
    for %aaa 1 4
       {
        set %jStart #jIndex
        exevent popup %scribeNpc
        wait 5
        click 20 40 f dmc
        wait 15
        for %bb %jStart #jIndex
            {
             scanjournal %bb
             if offer_may_be in #journal
                  goto bodStart
            }
        set %clickxx #contsizex - 345
        set %clickyy #contsizey - 30
        set %clickx %clickxx + #contposx
        set %clicky %clickYY + #contposy
        click %clickx %clicky f dmc
        wait 20
       }
   }
bodStart:
;---------- logout ----------
wait 40
set %login %login + 1
if %login = 2       ;--- block 2nd chr on all account
   set %login 3
if %login > 7
   {
    set %accountIn %accountIn + 1
    set %account %account + 1
    if %account > %accountNumber
        {
        set %account 1
        set %accountIn 1
        }
    set %accName %accName_ . %account
    set %login 1
   }
if %account = 0 || %login > 1
    set %accName 0
if %accountIn = 4 && %login = 1   ;-- block chr 1 and 2 on 4th account
     set %login 3
if %accountIn = 2 && %login = 5   ;-- block chr
     set %login 6
if %accountIn = 2 && %login = 7   ;-- block chr
     set %login 8
if %accountIn = 4 && %login = 7   ;-- block chr
    {
     set %accountin 1
     set %account 4
     set %accName %accName_ . %account
     set %login 1
     }
     
event macro 8 1 ;- paperdoll
gosub gumpWait 262_324
set %clickx #contposx + 215
set %clicky #contposy + 105
click %clickx %clicky f dmc
wait 15
gosub gumpWait 178_108
set %clickx #contposx + 120
set %clicky #contposy + 85
click %clickx %clicky f dmc
wait 15


 if #contSize = 203_121 || #shard <> %shardName ;--- check for lost connection  .
     {
     wait 5s
     gosub ConnectionLost
     wait 5s
     }

goto Start1

sub gumpWait
;-- %1 gump size
set %timeout #systime + 500
   while #contsize <> %1 && %timeout > #systime
   {
   wait 1
   }
if %timeout < #systime
    return #false
return

;=============================================
; Script Name: Auto Login - Re Login
; Author: yolcu *edited By Hitech to fix endless jorurny gumps*
; Version: 1.0.01
; Language: English
; Client Tested with: 7.0.66.0
; EUO version tested with: 1.6.0.330
; Shard OSI / FS: FS Easyuo's alexandria / Lexia
; Public Release: 03-25-2017
; Global Variables Used: N/A
; Purpose: Auto login - relogin when connection lost
;*edited By Hitech to fix endless jorurny gumps*
;=============================================
;---- Hitech edit : i turned into a sub, thank you,
; Thanks to: yolcu for Auto Login - Re Login script
; http://www.easyuo.com/forum/viewtopic.php?f=3&t=53130

sub ConnectionLost
{
    _OpenMainWindow:
    if #contkind = %lostConn && #contName = waiting_gump && #contSize = 203_121   ;--- lost conn gump
    {
         set %cx_ #contPosX + 100 ; 145  ;--140
         set %cy_ #contPosY + 90  ;-- 90
         wait 10
         click %cx_ %cy_ f dmc
         gosub WaitForGump mainmenu_gump %loginMain 30 ;--- main login gump
         wait 20
         goto _OpenMainWindow
    }
    gosub Login
    return
}
sub Login
{
    if #contName = mainmenu_gump && #contKind = %loginMain  ;--- main login gump
    {
        _Login:
        gosub EnterAccName %accName
        wait 20
        gosub EnterPassword
        wait 20
        gosub PressLoginButton
        wait 20
        gosub WaitForGump normal_gump %shardSelection 60 ;should be 60     ;---- shard select gump
        if #contName = waiting_gump && #contKind = %passwordBox   ;--- problem? still main gump
        {
            click 320 350 f dmc
            gosub WaitForGump normal_gump %loginMain 10 ;--- fix
            goto _Login
        }
       if #contName = waiting_gump && #contKind = %wrongpassword
        {
        ;could not connect GUMP SIZE   408 288 waiting_gump YQMD ; CLICK 320 350
            click 320 350 f dmc
            gosub WaitForGump normal_gump %loginMain 9
            goto _Login
        }
        gosub PressNextButton
        wait 20
        gosub WaitForGump normal_gump %passwordBox 30   ;-- char selet gump
        wait 20
        gosub SelectChar %login
        wait 20
        gosub PressNextButton
        wait 20
        gosub WaitForLogin
    }
    else #contName = normal_gump && #contKind = %loginMain  ;--- progems ? 2nd try?
    {
        _Login1:
        gosub EnterAccName %accName
        wait 20
        gosub EnterPassword
        wait 20
        gosub PressLoginButton
        wait 20
        gosub WaitForGump normal_gump %shardSelection 60 ;should be 60
        if #contName = waiting_gump && #contKind = %lostConn
        {
            click 320 350 f dmc
            gosub WaitForGump normal_gump %passwordBox 9 ;--- fix ?
            goto _Login1
        }
        if #contName = waiting_gump && #contKind = %wrongpassword
        {
        ;could not connect GUMP SIZE   408 288 waiting_gump YQMD ; CLICK 320 350
            click 320 350 f dmc
            gosub WaitForGump normal_gump %loginMain 9
            goto _Login1
        }
        gosub PressNextButton
        wait 20
        gosub WaitForGump normal_gump %passwordBox 30
        wait 20
        gosub SelectChar %login
        wait 20
        gosub PressNextButton
        wait 20
        gosub WaitForLogin
    }
return
}

sub PressLoginButton
{
    click 325 380 f dmc ; Next Button
    return
}

sub PressNextButton
{
    click 620 445 f dmc ; Next Button
    return
}
sub EnterAccName
{
   if %1 = 0 ;--skip
      return
    click 295 295 f dmc ; Account Name
    gosub ClearPlace
    msg %1
    return
}
sub EnterPassword
{
   click 230 350 f dmc ;click 510 400 f dmc ; Password
    gosub ClearPlace
    msg %Password
    return
}

sub ClearPlace
{
    for %i 1 8  ;16
    {
        key BACK
    }
    return
}
sub SelectChar
{
    set %cx_ 360
    set %cy_ 100 + ( %1 * 40 ) ; ( %Character * 40 )
    click %cx_ %cy_ f dmc
    gosub WaitForGump login_gump %chrScreen 10
    return
}
sub WaitForGump
{
    set %contName %1
    set %contKind %2
    set %timeCheck #false
    set %timeOut #scnt
    if %0 = 3
    {
        set %timeCheck #true
        set %timeOut #scnt + %3
    }
    while #contName <> %contName || #contKind <> %contKind
    {
         if %timeCheck && #scnt > %timeOut
             break
    }
    return
}
sub WaitForLogin
{
    set %timeOut #scnt + 60
    while #CliLogged = 0 && #scnt < %timeOut
        wait
    return
}

return

; thanks to " Orngrimm & ABC " for date and time
; http://www.easyuo.com/forum/viewtopic.php?p=96499#p144885
sub time_Date
set %AMPM AM
set %d1 %1 / 1 % 10
set %d2 %1 / 10 % 10
set %d3 %1 / 100 % 10
set %d4 %1 / 1000 % 10
set %d5 %1 / 10000 % 10
set %d6 %1 / 100000 % 10
if %2 = date
    return %d4 , %d3 , #dot , %d2 , %d1
set %tempampm %d6 , %d5
if %tempampm > 12 && %2 = 12
        {
        set %AMPM PM
        set %tempampm %tempampm - 12
        }
if %2 = 12
        return %tempampm , : , %d4 , %d3 , : , %d2 , %d1 , #SPC , %AMPM
return %tempampm , : , %d4 , %d3

;----------------------------------------------------





Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Log-in Multi accounts & chrs : BOD farming
« Reply #1 on: August 03, 2021, 06:10:05 AM »
+1
You might look at ENs multi-account tools.

http://www.scriptuo.com/index.php?topic=1509.0

I have a few different login tools I've used over the years but nothing that was all that special.
« Last Edit: August 03, 2021, 06:29:10 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Log-in Multi accounts & chrs : BOD farming
« Reply #2 on: August 03, 2021, 04:45:34 PM »
0
Thanks TrailMyx, thats a nice one, should learn alot there:
http://www.scriptuo.com/index.php?topic=1509.0

Code: [Select]
sub AddAccount  ; Repeat Calling of sub adds more to the list
  IF %AccountTotal = N/A
    set %AccountTotal 0
  set %AccountTotal %AccountTotal + 1
  Set %AccountNAme . %AccountTotal %1
  Set %AccountPAssword . %AccountTotal %2
  If %3 = DEFAULT && %0 = 3
    Set %AccountDefault %AccountTotal
Return

Code: [Select]
Sub Login %1 %2 %3 %4
  Set !Account %1
  set !Pass    %2 ; UO password - Variable reset after use for safety
  set !Shard   %3 ; Select this shard
  set !Char    %4
  set %SignInContinue #True

Code: [Select]
      Until %ShardLoop >= %ShardTotal ; Shard Loop
      goSub ActionLoopAccountFooter
    Until %Accountloop > %AccountTotal ; Account loop
    set %CharLoop %CharLoop + 1
  Until %CharLoop > %MaxChars    ; char loop


Also was sent another one to look into:
http://www.easyuo.com/forum/viewtopic.php?f=27&t=54261&hilit=login#p438191

Code: [Select]

start:
repeat
 for %character 1 7
  {
  if %character = 3
    continue ; skip this character from logging in
  gosub login %password %character
  if %Character = 1
   {
    ; go mine
    ; this mining logic has to be sensitive to the time as well so it ends and returns to this logic
    ; take the mining character to a safe logout location
    ; recall to Inn
   }
  else
   {
   ; collect bod
   }
  gosub logout
  }
until #time > %TimeServerDown
; take the mining character to a safe logout location
gosub login %password 1
; recall to Inn
gosub logout
 
repeat
 wait 60s
until #time > %TimeServerUp
goto start:
 

Quote

 set %charselect 100 + %2 * 40

Code: [Select]
sub login
 set %text %1
 set %character_number %2
 gosub waitForSysVars contname = MainMenu_gump && contsize = 640_480
 msg %text
 set %clickx #contposx + 325
 set %clicky #contposy + 380
 click %clickx %clicky
 gosub waitForSysVars contname = normal_gump && contsize = 640_480
 set %clickx #contposx + 615
 set %clicky #contposy + 445
 click %clickx %clicky
 gosub waitForSysVars contname = normal_gump && contsize = 2_2
 click 295 110
 gosub waitForSysVars contname = Login_gump && contsize = 640_480
 set %clickx #contposx + 250
 set %clicky #contposy + %character_number
 click %clickx %clicky
 wait 10

« Last Edit: August 03, 2021, 04:47:44 PM by Hitechs »

Offline HitechsTopic starter

  • Full Member
  • ***
  • Posts: 116
  • Activity:
    0%
  • Reputation Power: 2
  • Hitechs has no influence.
  • Respect: +28
  • Referrals: 1
    • View Profile
Re: Log-in Multi accounts & chrs : BOD farming
« Reply #3 on: August 03, 2021, 07:54:40 PM »
0
looking at my math, since i dont do the last char on account 2 or account 4,
seems better just to send it back to start and let it push the next chr/account instead of hard setting the vars, saved a few lines and several millsecs

Still needs complete rewrite tho,

Quote
if %accountIn = 2 && %login = 7   ;-- block chr
    set %login 8goto bodStart
if %accountIn = 4 && %login = 7   ;-- block chr
    {
     set %accountin 1
     set %account 4
     set %accName %accName_ . %account
     set %login 1
     }
goto bodStart

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Log-in Multi accounts & chrs : BOD farming
« Reply #4 on: August 03, 2021, 08:16:23 PM »
0
Yeh, seems like every time I tried to touch my login subs, I'd end up re-writing them.  They can be pretty fussy.  The last set I made worked pretty well.  I'll try to snip them out of a script I used them in with hopes it'll give you any more ideas. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: