Jump to content
maycon_dih

I can not log into my account in mybot

Recommended Posts

On 5/3/2019 at 3:00 PM, ShaneOss said:

Hi @Majid sabzehali,

 

Please check out the following post from cosote. Just download the archive from the link in the post and then extract to the lib folder. This fix will be included in the next version.

Cheers,

Shane

I still have have problem about logging into my bot and it did not also fixed by updating the latest version i mean 7.7.6 my emulator is blue stacks version 0.9.6.4092 i think its so good if you delete usuing username and password for the next updates or solve the problem that we have about logging

Share this post


Link to post
Share on other sites

Simple:

1. Open path <Bot directory>\COCBot\functions\Other

2. open file MBRFunc.au3 for edit

3. find ltclaration of function by string  Func CheckForumAuthentication()

4. Replace text of this function, with this 

Func CheckForumAuthentication()
	If $g_hLibMyBot = -1 Then Return False ; Bot didn't finish launch yet
	Local $result = DllCall($g_hLibMyBot, "str", "CheckForumAuthentication")
	If @error Then
		_logErrorDLLCall($g_sLibMyBotPath & ", CheckForumAuthentication:", @error)
		Return SetError(@error)
	EndIf
	;dll return string including access_token
	Local $iAuthenticated = 0 ; 0 = not authenticated (username or password incorrect), 1 = authenticated, -1 = not authenticated (unknown error)
	If IsArray($result) Then
;		If StringInStr($result[0], '"access_token"') > 0 Then
		If $result[0] <> -1 Then
			SetLog(GetTranslatedFileIni("MBR Authentication", "BotIsAuthenticated", "MyBot.run is authenticated"), $COLOR_SUCCESS)
			$iAuthenticated = 1
		Else
			SetLog(GetTranslatedFileIni("MBR Authentication", "BotIsNotAuthenticated", "Error authenticating Mybot.run"), $COLOR_ERROR)
			If StringInStr($result[0], '"login_err_') > 0 Then
				; username or password incorrect
				$iAuthenticated = 0
			Else
				; unknown error
				$iAuthenticated = -1
			EndIf
		EndIf
	Else
		SetDebugLog($g_sMBRLib & " not found.", $COLOR_ERROR)
	EndIf
	Return $iAuthenticated
EndFunc   ;==>CheckForumAuthentication

5. save file

6. for run bot use file MyBot.run.au3 from main directory of bot

7. enjoy

 

Share this post


Link to post
Share on other sites
17 hours ago, snakkenest said:

Simple:

1. Open path <Bot directory>\COCBot\functions\Other

2. open file MBRFunc.au3 for edit

3. find ltclaration of function by string  Func CheckForumAuthentication()

4. Replace text of this function, with this 

Func CheckForumAuthentication()
	If $g_hLibMyBot = -1 Then Return False ; Bot didn't finish launch yet
	Local $result = DllCall($g_hLibMyBot, "str", "CheckForumAuthentication")
	If @error Then
		_logErrorDLLCall($g_sLibMyBotPath & ", CheckForumAuthentication:", @error)
		Return SetError(@error)
	EndIf
	;dll return string including access_token
	Local $iAuthenticated = 0 ; 0 = not authenticated (username or password incorrect), 1 = authenticated, -1 = not authenticated (unknown error)
	If IsArray($result) Then
;		If StringInStr($result[0], '"access_token"') > 0 Then
		If $result[0] <> -1 Then
			SetLog(GetTranslatedFileIni("MBR Authentication", "BotIsAuthenticated", "MyBot.run is authenticated"), $COLOR_SUCCESS)
			$iAuthenticated = 1
		Else
			SetLog(GetTranslatedFileIni("MBR Authentication", "BotIsNotAuthenticated", "Error authenticating Mybot.run"), $COLOR_ERROR)
			If StringInStr($result[0], '"login_err_') > 0 Then
				; username or password incorrect
				$iAuthenticated = 0
			Else
				; unknown error
				$iAuthenticated = -1
			EndIf
		EndIf
	Else
		SetDebugLog($g_sMBRLib & " not found.", $COLOR_ERROR)
	EndIf
	Return $iAuthenticated
EndFunc   ;==>CheckForumAuthentication

5. save file

6. for run bot use file MyBot.run.au3 from main directory of bot

7. enjoy

 

 

For 7.7.6 within that function you can just change:

$iAuthenticated = -1

to

$iAuthenticated = 1

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...