Jump to content

help to implement Switch Bot 2.3 by Mijago


Go to solution Solved by .JαyZoN,

Recommended Posts

I am trying to implement the bot Mijago
 however I am having a problem can not
 log into the game
 
 this is the tutorial that I'm following to implement the bot
 
 
Now to Game.py:
Adds top of the file the following line:

 

 

 

from switchbot import Bot

 

Now you're looking for the following:

 

 

 

def __init__(self, stream):

 

and adds the following somewhere in this function code below:

 

 

 

self.switchbot = Bot()
self.switchbot.Hide()

 

Creating a new key listener
Now for the keys!
Searches the following line in the game.py:
 

 

 

onPressKeyDict[app.DIK_F4]= lambda : self.__PressQuickSlot(7)

 

Seek out the function a beautiful place and adds its following:

 

 

 

onPressKeyDict[app.DIK_F6]= lambda : self.__toggleSwitchbot()

 

 

Now the AUTO F6 it would rise
Creating the key listener function
Now we need the function!
Seek out for an empty seat in the game.py.
 

 

 

def __toggleSwitchbot(self):
if self.switchbot.bot_shown == 1:
self.switchbot.Hide()
else:
self.switchbot.Show()

 

in my game the screen is so loguin

 

cWBkg.png

 

 

in my SYSERR to the following error

 

 

 

1202 15:50:49335 :: CMapOutdoor::Load - LoadMonsterAreaInfo ERROR

1202 15:50:54675 :: GRANNY: r:/granny/rt/granny_file_info.cpp(145): File has run-time type tag of 0x8000000f, which doesn't match this version of Granny (0x80000010).  Automatic conversion will be attempted.
1202 15:50:18351 :: Traceback (most recent call last):
 
1202 15:50:18351 ::   File "networkModule.py", line 245, in SetGamePhase
 
1202 15:50:18353 ::   File "system.py", line 130, in __pack_import
 
1202 15:50:18375 ::   File "
1202 15:50:18375 :: game.py
1202 15:50:18375 :: ", line 
1202 15:50:18375 :: 2197
1202 15:50:18375 :: 
 
1202 15:50:18375 ::     
1202 15:50:18375 :: self.switchbot.Hide()
 
1202 15:50:18375 ::     
1202 15:50:18375 ::  
1202 15:50:18375 ::  
1202 15:50:18375 ::  
1202 15:50:18375 :: ^
 
1202 15:50:18375 :: IndentationError
1202 15:50:18375 :: : 
1202 15:50:18375 :: expected an indented block
1202 15:50:18375 :: 

 

 

my client's version is 28249

 

thanks for listening

 

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
  • 1 month later...
  • 6 years later...

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4076

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4077

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4078

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4079

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4080

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4081

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4082

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4083

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4084

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4085

1029 23:52:12904 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/paymessage_warning.mse) Error
1029 23:52:12904 :: CInstanceBase::RegisterEffect(eEftType=279, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/paymessage_warning.mse, isCache=1) - Error
1029 23:52:12904 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/paymessage_decide.mse) Error
1029 23:52:12904 :: CInstanceBase::RegisterEffect(eEftType=280, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/paymessage_decide.mse, isCache=1) - Error
1029 23:52:37234 :: Traceback (most recent call last):

1029 23:52:37234 ::   File "networkModule.py", line 261, in SetGamePhase

1029 23:52:37234 ::   File "system.py", line 160, in __hybrid_import

1029 23:52:37234 ::   File "
1029 23:52:37234 :: game.py
1029 23:52:37234 :: ", line 
1029 23:52:37234 :: 3287
1029 23:52:37234 :: 

1029 23:52:37234 ::     
1029 23:52:37234 :: self.switchbot.Hide()

1029 23:52:37234 ::     
1029 23:52:37234 ::  
1029 23:52:37234 ::  
1029 23:52:37234 ::  
1029 23:52:37234 :: ^

1029 23:52:37234 :: IndentationError
1029 23:52:37234 :: : 
1029 23:52:37234 :: expected an indented block
1029 23:52:37234 :: 

 

Link to comment
Share on other sites

3 minutes ago, JeeH said:

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4076

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4077

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4078

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4079

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4080

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4081

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4082

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4083

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4084

1029 23:52:12049 ::  CItemManager::LoadItemList(locale/common/item_list.txt) - StrangeLine in 4085

1029 23:52:12904 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/paymessage_warning.mse) Error
1029 23:52:12904 :: CInstanceBase::RegisterEffect(eEftType=279, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/paymessage_warning.mse, isCache=1) - Error
1029 23:52:12904 :: CEffectManager::RegisterEffect - LoadScript(d:/ymir work/effect/paymessage_decide.mse) Error
1029 23:52:12904 :: CInstanceBase::RegisterEffect(eEftType=280, c_szEftAttachBone=, c_szEftName=d:/ymir work/effect/paymessage_decide.mse, isCache=1) - Error
1029 23:52:37234 :: Traceback (most recent call last):

1029 23:52:37234 ::   File "networkModule.py", line 261, in SetGamePhase

1029 23:52:37234 ::   File "system.py", line 160, in __hybrid_import

1029 23:52:37234 ::   File "
1029 23:52:37234 :: game.py
1029 23:52:37234 :: ", line 
1029 23:52:37234 :: 3287
1029 23:52:37234 :: 

1029 23:52:37234 ::     
1029 23:52:37234 :: self.switchbot.Hide()

1029 23:52:37234 ::     
1029 23:52:37234 ::  
1029 23:52:37234 ::  
1029 23:52:37234 ::  
1029 23:52:37234 :: ^

1029 23:52:37234 :: IndentationError
1029 23:52:37234 :: : 
1029 23:52:37234 :: expected an indented block
1029 23:52:37234 :: 

 

And where you have tutorial for switchbot?

Link to comment
Share on other sites

this is the tutorial that I'm following to implement the bot

 

 

Now to Game.py:

Adds top of the file the following line:

 

  Quote

 

 

from switchbot import Bot

 

Now you're looking for the following:

 

  Quote

 

 

def __init__(self, stream):

 

and adds the following somewhere in this function code below:

 

  Quote

 

 

self.switchbot = Bot()
self.switchbot.Hide()

 

Creating a new key listener

Now for the keys!

Searches the following line in the game.py:

 

  Quote

 

 

onPressKeyDict[app.DIK_F4]= lambda : self.__PressQuickSlot(7)

 

Seek out the function a beautiful place and adds its following:

 

  Quote

 

 

onPressKeyDict[app.DIK_F6]= lambda : self.__toggleSwitchbot()

 

 

Now the AUTO F6 it would rise

Creating the key listener function

Now we need the function!

Seek out for an empty seat in the game.py.

 

  Quote

 

 

def __toggleSwitchbot(self):
if self.switchbot.bot_shown == 1:
self.switchbot.Hide()
else:
self.switchbot.Show()

I fixed the tabs now I have this error:

1030 11:27:24237 ::   File "system.py", line 160, in __hybrid_import

1030 11:27:24237 ::   File "system.py", line 122, in _process_result

1030 11:27:24238 ::   File "game.py", line 56, in <module>

1030 11:27:24238 :: ImportError
1030 11:27:24238 :: : 
1030 11:27:24238 :: cannot import name Bot
1030 11:27:24238 :: 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.