Helper Kit - luthebao/vpthelper-kit GitHub Wiki
Mbox
Message Box
- title: Tiêu đề thông báo
- text: Nội dung thông báo
- Styles:
- 0 : OK
- 1 : OK | Cancel
- 2 : Abort | Retry | Ignore
- 3 : Yes | No | Cancel
- 4 : Yes | No
- 5 : Retry | No
- 6 : Cancel | Try Again | Continue
Example:
Mbox("Lỗi", "Lỗi hiển thị", 6)
MAPS_LIST
Danh sách ID Map có trong game
IMAGES_LIST
Danh sách Image dạng base64
Convert
Class convert Image sang Base64
Class HelperKit
Class chính của bộ VPTHelper
__init__(self, title: str)
title: Tiêu đề của flash lúc mở game
Ví dụ: helper = HelperKit(title="acc10x")
def distanceto(self, Cord1)
Cord1: list[int] - tính khoảng cách của nhân vật tới toạ độ x,y dưới dạng array [x, y]
Ví dụ: helper.distanceto([1000, 1200])
def getcord(self) -> list[float]
Trả về toạ độ nhân vật, chỉ số này sẽ gấp 10 lần so với số hiển thị ở trong game.
Ví dụ: Game hiển thị toạ độ 100,100 thì khi getcord
sẽ được trả về [1000.0, 1000.0]
def getmap(self) -> int
Trả về ID map đang đứng
def getlevel(self) -> int
Trả về Level của nhân vật
def inbattle(self) -> bool
Trạng thái nhân vật: Trong trận / Không trong trận
def getfps(self) -> int
Lấy FPS hiện tại của game
def isfly(self) -> bool
Trả về trạng thái bay: bay/dưới đất
def getvip(self) -> int
Trả về level VIP hiện tại
def getmana(self) -> int
Trả về số mana hiện tại
def setcord(self, x: float, y: float) -> bool
Set toạ độ của nhân vật (cần phải reload lại hoạt ảnh để game cập nhật toạ độ)
def setbattle(self, inbattle: bool) -> bool
Set trạng thái đánh của nhân vật: dùng để cho nhân vật đứng yên 1 chỗ
def setfps(self, value: int) -> bool
def setfly(self, isfly: bool) -> bool
def SearchMemory1(self, value, type:str = "string" or "int" or "double", hard: bool = True)
Search Memory từ flash game hiện tại, search các biến string, int, double Lưu ý: khi sử dụng hàm này có thể sẽ bị crash phần mềm, nên sử dụng hàm bên dưới
def SearchMemory(self, value, type:str = "string" or "int" or "double", hard: bool = True)
Search Memory từ flash game hiện tại, search các biến string, int, double
def ReadString(self, address, length: int = 50) -> str
Dùng để đọc string tại address memory
def press_number(self, strings, delay=0.01)
Gõ số vào flash game
def click(self, num: int, x: int, y: int)
Click num lần vào toạ độ (x,y) trên màn hình flash
def tesc(self)
Spam nút ESC trên bàn phím để tắt các tab trên flash
def ImgSearch(self, image_path, precision: float = 0.8, version: int = 1) -> list[int]
Search ảnh với đường dẫn image_path, với độ nét precision (max là 1), version 1 chụp ảnh bao gồm title, version 2 chụp ảnh không bao gồm tiêu đề. Khuyến khích sử dụng version 2. Khi sử dụng version 1, toạ độ sẽ bao gồm cả phần tiêu đề nên cần phải trừ đi độ dày của thanh tiêu đề. Kết quả [-1,-1] là không thể tìm thấy
def ImgSearchB64(self, img_base64, precision: float = 0.8, version: int = 1) -> list[int]
Search ảnh với img_base64 là định dạng base64, có thể lấy từ Dev Helper
def ImgSearchB64_area(self, img_base64, cord1: list[int], cord2: list[int], precision: float = 0.8, version: int = 1) -> list[int]
Search ảnh với img_base64 là định dạng base64, trong 1 vùng từ toạ độ cord1 tới toạ độ cord2. Khuyến khích sử dụng version = 2.
def ImgSearchB64All(self, img_base64, precision: float = 0.8, version: int = 1) -> list[int]
Search trả về toàn bộ toạ độ của ảnh Base 64.
def click_img_b64(self, image, num = 1, precision: float = 0.8, version: int = 1) -> int
Click vào ảnh base64. Kết quả trả về 1/0 tương ứng với click/không có để click
def teleport(self, x=1000, y=1000, reload_loop=3, click_num=3)
Teleport tới toạ độ [x,y] trong game, với số reload_loop lần loop nếu không tele được.
Ví dụ: helper.teleport(1200, 1300)
tele tới toạ độ [120,130]
def hide(self)
/ def show(self)
Ẩn/hiện flash xuống thanh windows
Class AccountInfo
def __init__(self, link: str = "", username: str = "") -> None
Tạo class Account từ link, hoặc từ username lấy từ file "acc.txt"
def logbig(self)
Login tài khoản vào flash dưới dạng đã Expand
def flash(self)
Tắt flash trùng tên và mở lại flash
def getlink(self, user: str) -> str
Lấy link flash từ username trong file "acc.txt". Các bạn có thể chỉnh sửa hàm này để lấy link theo ý muốn