[Blocks&Items][FEATURE] Add the possibility to edit items quickly #6

Open
opened 2022-11-11 12:19:16 +01:00 by beu · 0 comments
Owner

It was possible to edit embedded item with a Moski's pattern.

#name "Edit Embed"
#author "Moski"
#category "Cheats"

bool Patched = false;
string item_instruction = "90 90 90 90 90";
string block_instruction = "90 90 90 90 90";

uint64 item_asm_addr;
uint64 block_asm_addr;

void OnDestroyed()
{
    if(Patched)
    {
        Dev::Patch(item_asm_addr, item_instruction);
        Dev::Patch(block_asm_addr, block_instruction);
    }
}

void Main()
{
    item_asm_addr = Dev::FindPattern("0F 84 ?? ?? ?? 00 48 8B 97 ?? ?? 00 00 4C 8D 87 ?? ?? 00 00 48 8B 89 ?? ?? ?? 00") + 0x1B;
    print(Text::FormatPointer(item_asm_addr));
    block_asm_addr = Dev::FindPattern("0F 84 ?? ?? ?? 00 48 8B 97 ?? ?? 00 00 4C 8D 87 08 01 00 00 48 8B 49 28")+ 0x18;
}
void RenderMenu()
{
    if(UI::MenuItem("Edit Any item", "", Patched)) {
        Patched = !Patched;
        item_instruction = Dev::Patch(item_asm_addr, item_instruction);
        block_instruction = Dev::Patch(block_asm_addr, block_instruction);
    }
}
It was possible to edit embedded item with a Moski's pattern. ```angelscript #name "Edit Embed" #author "Moski" #category "Cheats" bool Patched = false; string item_instruction = "90 90 90 90 90"; string block_instruction = "90 90 90 90 90"; uint64 item_asm_addr; uint64 block_asm_addr; void OnDestroyed() { if(Patched) { Dev::Patch(item_asm_addr, item_instruction); Dev::Patch(block_asm_addr, block_instruction); } } void Main() { item_asm_addr = Dev::FindPattern("0F 84 ?? ?? ?? 00 48 8B 97 ?? ?? 00 00 4C 8D 87 ?? ?? 00 00 48 8B 89 ?? ?? ?? 00") + 0x1B; print(Text::FormatPointer(item_asm_addr)); block_asm_addr = Dev::FindPattern("0F 84 ?? ?? ?? 00 48 8B 97 ?? ?? 00 00 4C 8D 87 08 01 00 00 48 8B 49 28")+ 0x18; } void RenderMenu() { if(UI::MenuItem("Edit Any item", "", Patched)) { Patched = !Patched; item_instruction = Dev::Patch(item_asm_addr, item_instruction); block_instruction = Dev::Patch(block_asm_addr, block_instruction); } } ```
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: beu/Openplanet-Plugins#6
No description provided.