A script that is semi-functioning

Jormungandr

Member
Joined
Oct 23, 2023
Messages
20
Hello there.

I was looking for a script that lets sub-leaders and leaders use the raid summon rune, and @Cups sent me one from another topic.

I applied the script on the server, which seems to work half. Some players manage to summon as sub-leaders, and some others can not.

Here's the script:

[ENABLE]
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(success)
label(failed)
label(exit)

newmem:
call ps_game.exe+4ECF0
//esi=target player,edi=source player
originalcode:
pushad

// Check if players are the some faction
movzx eax,byte ptr [esi+0x12d]
movzx ebx,byte ptr [edi+0x12d]
cmp eax,ebx
jne failed

// If the item item is a regular summon rune, exit and use the normal summon proc
mov eax,dword ptr ds:[edi+0x58FC] // bag
mov ecx,dword ptr ds:[edi+0x5900] // slot
lea eax,dword ptr ds:[eax+eax*2] // eax=bag, ecx=slot
lea edx,dword ptr ds:[ecx+eax*8]
imul edx,edx,4
mov eax,dword ptr ds:[edi+edx+0x1C0]
mov eax,dword ptr ds:[eax+30] // eax=stItemInfo
cmp [eax],(int)100045 // original item id
je exit

// Check if the source player is the leader
push eax
push ecx
push ebx
mov eax,[edi+17F4] // party table of the leader
mov ecx,[eax+0C] // leader index
mov ebx,[eax+110] // sub-leader index

imul ecx,ecx,8
add ecx,18
mov ecx,[eax+ecx] // leader player address

imul ebx,ebx,8
add ebx,18
mov ebx,[eax+ebx] // sub-leader player address

// If the source player is the leader or sub-leader, jump to success
cmp edi,ecx
je success
cmp edi,ebx
je success
pop ecx
pop eax
pop ebx
jmp failed

success:
pop ecx
pop eax
pop ebx
popad
jmp 0049e4ea

exit:
popad
jmp returnhere

failed:
popad
jmp 0049E517



"ps_game.exe"+9E4E1:

jmp newmem

returnhere:

[DISABLE]

//code from here till the end of the code will be used to disable the cheat

dealloc(newmem)

"ps_game.exe"+9E4E1:

call ps_game.exe+4ECF0

//Alt: db E8 0A 08 FB FF

I hope that someone can come up with a solution, have a nice day!
 
Back
Top