Skip to content

Commit 15ef772

Browse files
authored
Merge pull request #23 from lanjuzi/master
Update ==> 增加游戏作弊功能 by @lanjuzi
2 parents 6ba96bf + 3c8e635 commit 15ef772

27 files changed

+1924
-9
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ include $(THEOS)/makefiles/common.mk
99

1010
TWEAK_NAME = robot
1111
robot_FILES = $(wildcard src/*.m) src/Tweak.xm
12+
robot_CFLAGS = -fobjc-arc
13+
robot_OBJCFLAGS = -Wno-error
1214

1315
include $(THEOS_MAKE_PATH)/tweak.mk
1416

Others/ScreenShots/Setting-03.png

106 KB
Loading

Others/ScreenShots/Setting-cheat.jpg

68.4 KB
Loading

Others/ScreenShots/dice.png

140 KB
Loading

Others/ScreenShots/jsb.png

124 KB
Loading

Others/autoInsertDylib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ app_path="${shell_path}/extracted/Payload/${APPLICATION}"
4747
# cp -R ${app_path} ./
4848

4949
# rm -rf ~/Desktop/temp/extracted/Payload/$APPLICATION/*Watch*
50-
50+
cp "${shell_path}/popup_close_btn.png" ${app_path}
5151
cp ${dylib_path} ${libsubstrate_path} ${app_path}
5252

5353
# echo "删除" ${APPLICATION##*/} "中 watch 相关文件"

Others/popup_close_btn.png

1.37 KB
Loading

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
## WeChatPlugin-iOS
22

3-
微信小助手-iOS版 v1.0.0
3+
微信小助手-iOS版 v1.0.0
44

5-
<img src="./Others/ScreenShots/WeChatPlugin.jpg" width="500">
5+
> 增加了游戏(石头剪刀布、骰子)作弊功能
66
7+
使用 [zhPopupController](https://github.com/snail-z/zhPopupController) 来显示作弊内容,并使用 `zhPopupController` 的 Example 模板
8+
9+
<img src="./Others/ScreenShots/WeChatPlugin.jpg" width="500"> <img src="./Others/ScreenShots/Setting-cheat.jpg" width="500">
710

811
**mac OS 版请戳→_[WeChatPlugin-MacOS](https://github.com/TKkk-iOSer/WeChatPlugin-MacOS)**
912

@@ -19,6 +22,7 @@
1922
- [x] 敏感词自动踢人
2023
- [x] 入群欢迎语
2124
- [x] 群消息自动回复
25+
- [x] 游戏作弊(石头剪刀布、骰子)
2226

2327
**统一设置群公告、敏感词自动踢人、入群欢迎语 仅对自己创建的群有效**
2428

@@ -52,9 +56,9 @@
5256

5357
#### 2. 生成注入的app文件
5458

55-
* 可直接通过百度云下载
56-
链接: https://pan.baidu.com/s/1c120oww 密码: 95bx(微信版本为6.5.16)
57-
链接: https://pan.baidu.com/s/1bL1oei 密码: grbi (微信版本 6.5.17)
59+
* 可直接通过百度云下载
60+
链接: https://pan.baidu.com/s/1c120oww 密码: 95bx(微信版本为6.5.16)
61+
链接: https://pan.baidu.com/s/1bL1oei 密码: grbi (微信版本 6.5.17)
5862

5963
* 若想修改源码,生成新的dylib,可在修改之后执行`make`,之后拷贝生成的dylib(~~路径为`./theos/obj/debug/robot.dylib`~~),最后执行 `./Others/autoInsertDylib.sh ipa文件路径 dylib文件路径` 即可获得注入dylib的app文件。
6064

@@ -95,5 +99,5 @@
9599
---
96100

97101
#### 听说你想请我喝下午茶?😏
98-
102+
99103
<img src="http://upload-images.jianshu.io/upload_images/965383-8e2af8fe607eee62.jpeg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1024" height="300" hspace="7" style="display: inline-block">

src/EmoticonGameCheat.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// EmoticonGameCheat.h
3+
//
4+
// Created by lanjuzi on 2017/9/22.
5+
// Copyright © 2017年 lanjuzi. All rights reserved.
6+
//
7+
8+
#import <Foundation/Foundation.h>
9+
#import "zhPopupController.h"
10+
#import "zhFullView.h"
11+
#import "zhIconLabel.h"
12+
13+
@interface EmoticonGameCheat : NSObject
14+
15+
+ (void)showEoticonCheat:(NSInteger)uiGameType callback:(void (^)(NSInteger random))callback;
16+
17+
@end
18+

src/EmoticonGameCheat.m

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
//
2+
// EmoticonGameCheat.m
3+
//
4+
// Created by lanjuzi on 2017/9/22.
5+
// Copyright © 2017年 lanjuzi. All rights reserved.
6+
//
7+
8+
#import "EmoticonGameCheat.h"
9+
10+
@implementation EmoticonGameCheat
11+
12+
+ (void)showEoticonCheat:(NSInteger)uiGameType callback:(void (^)(NSInteger random))callback {
13+
NSArray *array;
14+
if (uiGameType == 1) {
15+
array = @[@[@1, @"剪刀"], @[@2, @"石头"], @[@3, @""]];
16+
} else if (uiGameType == 2) {
17+
array = @[@[@4, @"1"], @[@5, @"2"], @[@6, @"3"], @[@7, @"4"], @[@8, @"5"], @[@9, @"6"]];
18+
} else {
19+
NSLog(@"不支持的 uiGameType 类型: %ld", (long)uiGameType);
20+
return;
21+
}
22+
23+
CGRect frame = [[UIApplication sharedApplication] keyWindow].rootViewController.view.frame;
24+
zhFullView *fullView = [[zhFullView alloc] initWithFrame:frame andRows:uiGameType];
25+
26+
NSMutableArray *models = [NSMutableArray arrayWithCapacity:array.count];
27+
for (NSArray *arr in array) {
28+
zhIconLabelModel *item = [zhIconLabelModel new];
29+
30+
if ([arr[0] intValue] > 0) {
31+
if ([arr[0] intValue] > 3) {
32+
NSString *imagePath = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"dice_%@", arr[1]] ofType:@"pic"];
33+
item.icon = [UIImage imageWithContentsOfFile:imagePath];
34+
} else {
35+
NSString *jsb;
36+
switch ([arr[0] intValue]) {
37+
case 1:
38+
jsb = @"JSB_J";
39+
break;
40+
case 2:
41+
jsb = @"JSB_S";
42+
break;
43+
case 3:
44+
jsb = @"JSB_B";
45+
break;
46+
default:
47+
jsb = @"JSB_S";
48+
break;
49+
}
50+
NSString *imagePath = [[NSBundle mainBundle] pathForResource:jsb ofType:@"pic"];
51+
item.icon = [UIImage imageWithContentsOfFile:imagePath];
52+
}
53+
}
54+
item.text = arr[1];
55+
[models addObject:item];
56+
}
57+
fullView.models = models;
58+
59+
fullView.didClickFullView = ^(zhFullView * _Nonnull fullView) {
60+
[self.zh_popupController dismiss];
61+
};
62+
63+
fullView.didClickItems = ^(zhFullView *fullView, NSInteger index) {
64+
self.zh_popupController.didDismiss = ^(zhPopupController * _Nonnull popupController) {
65+
callback([array[index][0] intValue]);
66+
};
67+
68+
[fullView endAnimationsCompletion:^(zhFullView *fullView) {
69+
[self.zh_popupController dismiss];
70+
}];
71+
};
72+
73+
self.zh_popupController = [zhPopupController popupControllerWithMaskType:zhPopupMaskTypeWhiteBlur];
74+
self.zh_popupController.allowPan = YES;
75+
[self.zh_popupController presentContentView:fullView];
76+
}
77+
78+
@end
79+

0 commit comments

Comments
 (0)