Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
Conflicts:
	maclient_network.py
  • Loading branch information
fffonion committed Jan 3, 2014
2 parents 5205092 + 3c2c911 commit ff740cc
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 114 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

[在root过的android手机上运行MAClient](https://github.com/fffonion/MAClient/wiki/%E5%9C%A8Android%E6%89%8B%E6%9C%BA%E4%B8%8A%E8%BF%90%E8%A1%8CMAClient)

Windows用户可以从[这里](http://pan.baidu.com/s/19qI4m)获得二进制文件,或者从[release](releases)下载
Windows用户可以从[这里](http://pan.baidu.com/s/19qI4m)获得二进制文件,或者从[release](https://github.com/fffonion/MAClient/releases)下载

其他平台用户:需要下载修改的[httplib2库](https://github.com/fffonion/httplib2-plus)选择安装PyCrypto库
其他平台用户:需要下载修改的[httplib2库](https://github.com/fffonion/httplib2-plus)和PyCrypto库

##运行
MAClient可以在支持websocket的浏览器上运行![chaojibang](http://ww1.sinaimg.cn/bmiddle/436919cbjw1ebx3ktnokkg200m00k741.gif)[炒鸡棒在线版](http://ma.mengsky.net/)
Expand All @@ -23,6 +23,8 @@ MAClient_cli.py [config file] [task]/[commands]
```
子模块为针对py2x的httplib2;对py3x,你需要下载[针对py3x的httplib2](https://github.com/fffonion/httplib2-plus/tree/python3)

**使用打包的exe的windows用户注意**:路径不能包含中文,这是pyinstaller的缺陷

##CONFIG.INI文件说明

关于config.ini可以参考config_sample.ini
Expand Down
112 changes: 48 additions & 64 deletions config_sample.ini
Original file line number Diff line number Diff line change
@@ -1,88 +1,72 @@
[placeholder]

[tasker]
b = 'fairy_battle'
f = 'set_card factor|factor_battle'
e = 'e'

[system]
server =cn
loglevel =2
taskname =b
tasker_times =50
try_factor_times =20
factor_sleep =10
explore_sleep =2
fairy_battle_times =20
fairy_battle_sleep =0,4,6|4,7,4|7,8,2|8,11,2|11,14,1|14,16,2|16,19,0.8|19,21,1.5|21,24,2
fairy_battle_sleep_factor=1
delay =2
server = tw
loglevel = 1
taskname = e
tasker_times = 0
try_factor_times = 20
factor_sleep = 10
explore_sleep = 2
fairy_battle_times = 10
fairy_battle_sleep = 0,4,6|4,7,4|7,8,2|8,11,2|11,14,1|14,16,2|16,19,0.8|19,21,1.5|21,24,2
fairy_battle_sleep_factor = 0.8
delay = 1
display_ani = 0
user-agent =
device_token =
display_ani=1
save_traffic=0
auto_update=1
enable_plugin=1
device_token = huiHignkjiuhiuBiu98gUiGuiyuguYfgIUguIGIugugiUGuigYufuYfyuVyuYuyvYU=
save_traffic = 0
auto_update = 1
enable_plugin = 1

[tactic]
auto_explore =1
auto_green_tea =0
auto_red_tea =0
auto_red_tea_level =1
strict_bc =0
auto_sell_card =1
auto_fp_gacha =1
auto_build =1
auto_fairy_rewards =1
fp_gacha_bulk =1
sell_card_warning =1
fairy_final_kill_hp=30000
display_ani =1
del_friend_day =5
greet_words=你好!
factor_getnew=1
auto_explore = 1
auto_green_tea = 0
auto_red_tea = 0
auto_red_tea_level = 1
strict_bc = 0
auto_sell_card = 1
auto_fp_gacha = 1
auto_build = 1
auto_fairy_rewards = 0
fp_gacha_bulk = 1
sell_card_warning = 1
del_friend_day = 5
fairy_final_kill_hp = 0
auto_greet = 1
greet_words = ¹þ¹þ¹þ
factor_getnew = 1

[account_tw]
username =
password =
userid =
user_id =
session =

[carddeck]
min = 124
factor = 124,89,8

[fairy]
[account_cn]

[account_cn2]
username =
password =
userid =
session =
[account_cn]

[account_cn3]
username =
password =
userid =
session =

[account_cn]
username =
password =
userid =
session =
[fairy]

[carddeck]min = 124factor = 124,89,8
[condition]
fairy_select =fairy.NOT_BATTLED
explore_floor =floor.NOT_FINNISHED|
fairy_select_carddeck =fairy.IS_WAKE and (fairy.IS_MINE and (fairy.TIME_LIMIT<1200 and 'full' or 'min') or 'min') or (BC>50 and (fairy.hp<100000 and 'fast' or 'min') or 'min')
factor =star in [1,2]
explore_area =area.NOT_FINNISHED and area.name in ['女神的到访','林荫道中漫步的静谧','更衣室','游泳池中的追逐','女舍外','校门口的约会','希望喷泉','蔚蓝的约定','校篮球馆']|area.NOT_FINNISHED and area.IS_EVENT
select_card_to_sell =card.star in [1,2] and card.lv<=3 and not card.mid in [124,49,8]
fairy_select = fairy.NOT_BATTLED
explore_area = not FAIRY_ALIVE and area.NOT_FINNISHED and area.IS_EVENT
explore_floor = not FAIRY_ALIVE and floor.NOT_FINNISHED
fairy_select_carddeck = 'min'
factor = deck_rank<=20
select_card_to_sell = card.star in [1,2] and card.lv<=3 and not card.mid in [124,49,8]
factor_limit = BC>20

[record]
last_set_card =
last_set_bc =
last_set_card = 0
last_set_bc = 0

[plugin]
disabled = bgm


9 changes: 5 additions & 4 deletions cross_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@
PYTHON3 = sys.version.startswith('3')
IRONPYTHON = sys.platform == 'cli'
EXEBUNDLE = opath.split(sys.argv[0])[1].find('py') == -1

LOCALE = locale.getdefaultlocale()[0]
CODEPAGE = locale.getdefaultlocale()[1]
convhans = lambda x:x
try:
import ZhConversion
except ImportError:
pass
else:
chans = ZhConversion.convHans()
if locale.getdefaultlocale()[0] == 'zh_TW':
if LOCALE == 'zh_TW':
convhans = chans.toTW
elif locale.getdefaultlocale()[0] == 'zh_HK':
elif LOCALE == 'zh_HK':
convhans = chans.toHK

getPATH0 = (not EXEBUNDLE or IRONPYTHON) and \
Expand All @@ -37,4 +38,4 @@
raw_inputd = PYTHON3 and \
(lambda s:input(s)) \
or \
(lambda s:raw_input(du8(s).encode(locale.getdefaultlocale()[1] or 'utf-8')).decode(locale.getdefaultlocale()[1] or 'utf-8').encode('utf-8'))
(lambda s:raw_input(du8(s).encode(CODEPAGE or 'utf-8')).decode(CODEPAGE or 'utf-8').encode('utf-8'))
Loading

0 comments on commit ff740cc

Please sign in to comment.