using this, how to make hard coded quantity for Medicine to x9 (Max for medicine) and food/ Material to x9999 (Max for Material/Food)
it's very good to hardcoded for vessel, if not you need that farming that for ages (3 for weapon awakening and 300 for last skill / weapon divine beast 2500 i heard)
update, it's seem i found it, but please check it, this my first script with this stuff (cmp and jump stuff)
{ Game : sao_lr-Win64-Shipping.exe
Version:
Date : 2023-10-07
Author : Rienfleche
This script Make Medicine to x9, Food to x9999, and Vessel to x9999
}
[ENABLE]
aobscanmodule(Items,sao_lr-Win64-Shipping.exe,66 89 5F 50 E9 40 FD FF FF) // should be unique
alloc(newmem,$1000,Items)
label(code)
label(return)
label(Medicine)
label(Food)
label(Material)
newmem:
cmp word ptr [rdi+2],#356
je Medicine
cmp word ptr [rdi+2],#358
je Food
cmp word ptr [rdi+2],#376
je Material
jmp code
Medicine:
cmp bx,#9
je code
mov bx,#9
jmp code
Material:
cmp bx,#9999
je code
mov bx,#9999
jmp code
Food:
cmp bx,#9999
je code
mov bx,#9999
jmp code
code:
mov [rdi+50],bx
jmp sao_lr-Win64-Shipping.exe+11D5AAA
jmp return
Items:
jmp newmem
nop 4
return:
registersymbol(Items)
[DISABLE]
Items:
db 66 89 5F 50 E9 40 FD FF FF
unregistersymbol(*)
dealloc(*)
{
// ORIGINAL CODE - INJECTION POINT: sao_lr-Win64-Shipping.exe+11D5D61
sao_lr-Win64-Shipping.exe+11D5D37: 0F B7 4F 50 - movzx ecx,word ptr [rdi+50]
sao_lr-Win64-Shipping.exe+11D5D3B: 44 8B C5 - mov r8d,ebp
sao_lr-Win64-Shipping.exe+11D5D3E: 88 44 24 38 - mov [rsp+38],al
sao_lr-Win64-Shipping.exe+11D5D42: 8B D3 - mov edx,ebx
sao_lr-Win64-Shipping.exe+11D5D44: C6 44 24 30 3E - mov byte ptr [rsp+30],3E
sao_lr-Win64-Shipping.exe+11D5D49: C6 44 24 28 3D - mov byte ptr [rsp+28],3D
sao_lr-Win64-Shipping.exe+11D5D4E: 48 89 74 24 20 - mov [rsp+20],rsi
sao_lr-Win64-Shipping.exe+11D5D53: E8 B8 10 EF FF - call sao_lr-Win64-Shipping.exe+10C6E10
sao_lr-Win64-Shipping.exe+11D5D58: 66 89 6F 50 - mov [rdi+50],bp
sao_lr-Win64-Shipping.exe+11D5D5C: E9 49 FD FF FF - jmp sao_lr-Win64-Shipping.exe+11D5AAA
// ---------- INJECTING HERE ----------
sao_lr-Win64-Shipping.exe+11D5D61: 66 89 5F 50 - mov [rdi+50],bx
// ---------- DONE INJECTING ----------
sao_lr-Win64-Shipping.exe+11D5D65: E9 40 FD FF FF - jmp sao_lr-Win64-Shipping.exe+11D5AAA
sao_lr-Win64-Shipping.exe+11D5D6A: CC - int 3
sao_lr-Win64-Shipping.exe+11D5D6B: CC - int 3
sao_lr-Win64-Shipping.exe+11D5D6C: CC - int 3
sao_lr-Win64-Shipping.exe+11D5D6D: CC - int 3
sao_lr-Win64-Shipping.exe+11D5D6E: CC - int 3
sao_lr-Win64-Shipping.exe+11D5D6F: CC - int 3
sao_lr-Win64-Shipping.exe+11D5D70: 40 53 - push rbx
sao_lr-Win64-Shipping.exe+11D5D72: 41 56 - push r14
sao_lr-Win64-Shipping.exe+11D5D74: 41 57 - push r15
}
a_busy_man wrote: ↑Tue Oct 10, 2023 6:08 am
Rienfleche wrote: ↑Tue Oct 10, 2023 5:41 am
That where i am worried too, if it affect key items but i am clueless how to make that cmp script.
So after this cmp it only affect food and items right?
Can you teach me how to make that cmp for items?
newmem:
cmp word ptr [rdi+2],#358
je InfiniteFoodPotions
cmp word ptr [rdi+2],#356
je InfiniteFoodPotions
jmp code
The cmp is basically ordering to compare two factors, so you need to know what you want to compare. This is the equivalent of the classical "If" in high programmign languages. Meanwhile this is Assembly, which is a low-level progamming language and as such, it is harder for humans to understand than high-level programming language, but to edit memory like cheat engine does this is necesssary
cmp word ptr [rdi+2],#358
cmp is the order to compare
word means the type of the field to be compared if 2byte.
byte would be for Byte,
dword for 4 Byte, and
qword for 8 Byte, although 4byte is the defualt, so you can omit the
dword ptr if you are using 4 byte as the type. Don't forget to add the
ptr after it.
rdi is one of the values stored in memory, in this particular function edit is always the Item ID (when you check a funciton you can click shw more to see what each thing means), and we know that Item ID +2 is the Item Type and that Item ID + 50 is the Item Quantity since we alreadey got those fields for our Highlight Item fields.
We also know that 358 and 336 are the values for Food and Potions, while the # is to make those number integer instead of hex, which would be the default otherwise.
Then we have
je which means
jump if equal if the cmp put previously has the two values being identical it executes this jump, so in our case, it is jumping to the function only when the Item Type is equal to the one for Food and Potions while on any other case it
jmp which is
jump without any conditionals to
code which is the original unaltered code.
Note that this last
jmp is very improtant, otherwise the script will continue reading from top to bottom and we don't want the values not following the conditions to trigger the function made for the Food and Potions to not diminish.