from FFxivPythonTrigger.memory import scan_address from FFxivPythonTrigger.Logger import Logger from FFxivPythonTrigger.Storage import get_module_storage from FFxivPythonTrigger.AddressManager import AddressManager _logger = Logger("XivMem/AddressManager") _storage = get_module_storage("XivMem") _am = AddressManager(_storage.data, _logger) ########## # actor table ########## actor_table_sig = "48 8d ?? ?? ?? ?? ?? e8 ?? ?? ?? ?? 48 8b ?? 48 8b ?? 48 8d ?? ?? ?? ?? ?? " \ "e8 ?? ?? ?? ?? 48 8d ?? ?? ?? ?? ?? ba ?? ?? ?? ?? e8 ?? ?? ?? ?? 89 2f" actor_table_addr = _am.get("actor table", scan_address, actor_table_sig, cmd_len=7) ########## # combat data ########## combo_state_sig = "f3 0f ?? ?? ?? ?? ?? ?? f3 0f ?? ?? ?? e8 ?? ?? ?? ?? 48 8b ?? 48 8b ?? 0f b7" combo_state_addr = _am.get("combo state", scan_address, combo_state_sig, cmd_len=8) skill_queue_sig = "44 89 2d ?? ?? ?? ?? f3 0f 11 05 ?? ?? ?? ??" skill_queue_addr = _am.get("skill queue", scan_address,
# effect: 函数,获取buff层数/回合 e.g.effect("內静") ############### import re from itertools import chain from FFxivPythonTrigger.Logger import Logger from FFxivPythonTrigger.Storage import get_module_storage from FFxivPythonTrigger.MacroParser import Macro, MacroFinish from pathlib import Path from .. import Solver from ...simulator.Craft import CheckUnpass _logger = Logger("CraftMacroSolver") _storage = get_module_storage("MacroCraft") macro_dir = Path(__file__).parent / 'macros' macro_craft_tag_regex = re.compile( r"#CraftMacro:\[(?P<key>[^]]+)]:(?P<arg>[^\n]+)\n") macro_max_size = 100 macro_pairing = dict() macros = list() recipe_pair_id = dict() recipe_pair_name = dict() macro_file = "*.macro" class MacroOversize(Exception): pass
from FFxivPythonTrigger.memory import scan_pattern, StructFactory, write_bytes, read_memory from FFxivPythonTrigger.Logger import Logger from FFxivPythonTrigger.Storage import get_module_storage from FFxivPythonTrigger.AddressManager import AddressManager from FFxivPythonTrigger import FFxiv_Version, PluginBase, api from ctypes import c_ubyte, addressof """ patch code to skip cutscene in some zone command: @cutscene format: /e @cutscene [p(patch)/d(dispatch)] """ command = "@cutscene" _logger = Logger("CutsceneSkipper") _storage = get_module_storage("CutsceneSkipper") sig = "75 33 48 8B 0D ?? ?? ?? ?? BA ?? 00 00 00 48 83 C1 10 E8 ?? ?? ?? ?? 83 78" addr = AddressManager(_storage.data, _logger).get("addr", scan_pattern, sig) _storage.save() _ver_storage = _storage.data[FFxiv_Version] _code = read_memory( StructFactory.OffsetStruct({ "mark1": (c_ubyte * 2, 0), "mark2": (c_ubyte * 2, 0x1b) }), addr) def is_patched(): return _code.mark1[:] == [0x90, 0x90]
from FFxivPythonTrigger.memory import scan_address, scan_pattern from FFxivPythonTrigger.Logger import Logger from FFxivPythonTrigger.Storage import get_module_storage from FFxivPythonTrigger.AddressManager import AddressManager _logger = Logger("XivMagic/AddressManager") _storage = get_module_storage("XivMagic") _am = AddressManager(_storage.data, _logger) ########## # do text command ########## do_text_command_sig = "48 89 5C 24 ?? 57 48 83 EC 20 48 8B FA 48 8B D9 45 84 C9" do_text_command_addr = _am.get("text command function", scan_pattern, do_text_command_sig) text_command_ui_module_ptr_sig = "48 8B 05 ?? ?? ?? ?? 48 8B D9 8B 40 14 85 C0" text_command_ui_module_ptr_addr = _am.get("text command ui module pointer", scan_address, text_command_ui_module_ptr_sig, cmd_len=7) ########## # do action ########## do_action_func_sig = "40 53 55 57 41 54 41 57 48 83 EC ? 83 BC 24 ? ? ? ? ?" do_action_func_addr = _am.get("do action func", scan_pattern, do_action_func_sig) do_action_location_sig = "44 89 44 24 ? 89 54 24 ? 55 53 57" do_action_location_addr = _am.get("do action location", scan_pattern,
from FFxivPythonTrigger.AddressManager import AddressManager from FFxivPythonTrigger import PluginBase, api """ change the jump value to let you jump higher -- or lower command: @sjump format: /e @sjump [func] [args]... functions (*[arg] is optional args): [get]: get current jump value [set]: set current jump value format: /e @sjump set [value(float) / "default"] """ command = "@sjump" _logger = Logger("SuperJump") _storage = get_module_storage("SuperJump") sig = "66 66 26 41" addr = AddressManager(_storage.data, _logger).get("addr", scan_pattern, sig) _storage.save() default = 10.4 class SuperJump(PluginBase): name = "Super Jumper" def __init__(self): super().__init__() api.command.register(command, self.process_command) def _onunload(self):
import math import random from time import time, perf_counter from typing import Type from json import dumps from FFxivPythonTrigger.Logger import Logger from FFxivPythonTrigger.Storage import get_module_storage from .simulator.Craft import Craft from .simulator.Models import Recipe, Player from .solvers import Solver from .simulator.Status import * _storage = get_module_storage("SkyBuilderTest") _logger = Logger("SkyBuilderTest") class CustomRecipe(Recipe): def __init__(self, name, rlv, status_flag, suggest_craft, suggest_control, max_difficulty, max_quality, max_durability): self.recipe_row = None self.name = name self.rlv = rlv self.status_flag = status_flag self.suggest_craft = suggest_craft self.suggest_control = suggest_control self.max_difficulty = max_difficulty self.max_quality = max_quality self.max_durability = max_durability