PDA

View Full Version : Gladiator/Tyrant's Fix


Kation
12.03.2008, 21:54
Code:

Public ChargeFix

.const

.code
ChargeFix proc
;SkillInfo = r12+68h
;SkillInfo+0h - wszSkillName
;SkillInfo+8h - skillID
;RBP - pUser
;overwrited code
;.text:00000000006B8BB6 xor esi, esi ;Clear ESI
;.text:00000000006B8BB8 mov [rbp+0BACh], esi ;ZeroCharges
;.text:00000000006B8BBE mov rax, [rbp+0] ;ExitPoint

mov rax, [r12+68h] ;SkillInfo
mov eax, dword ptr [rax+8h] ;SkillID
cmp eax, 105h ;TripleSonicSlash
je FourChargesRequied
cmp eax, 5h ;DoubleSonicSlash
je ThreeChargesRequied
cmp eax, 6h ;SonicBlaster
je TwoChargesRequied
cmp eax, 11Ch ;HurricaneAssault
je TwoChargesRequied
cmp eax, 36h ;ForceBlaster
je OneChargeRequied
jmp Exit_Point

FourChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 4h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

ThreeChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 3h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

TwoChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 2h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

OneChargeRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 1h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

Exit_Point:
xor esi, esi
mov rax, 006B8BBEh
jmp rax
ChargeFix endp
end

You got 100% info where to hook and how many nops in code. Have Fun.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

humordwarf
12.03.2008, 21:54
good, but...

what if player use TripleSonicSlash but have only 3 power saved ?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

Kation
12.03.2008, 21:54
Then you got wrong settings in skilldata

Code:

operate_cond = {{equip_weapon;{dual}};{energy_saved;4}}

you can easily edit that fix to be working with 3 if you wish.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

humordwarf
12.03.2008, 21:54
ah.. i see... my is noob in that

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

Drag
12.03.2008, 21:54
I dont know why (im using zil's shared interlude src code) but this address with skillid doesnt work for me (it doesnt hold skillid at all).

r12+148h does

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

Kation
12.03.2008, 21:54
Maybe your using different exe who knows Wink, i tested this and it works with 0 problem.

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

Osito2Dancer
12.03.2008, 21:54
Nice, i was looking for a way to add your previous post (http://www.postpacific.com/forums/showthread.php?t=9400 (https://postpacific.mmorpg-game.online/showthread.php?t=9400)) into ASM or something.


A question: Can you do this?

Code:

Public ChargeFix

.const

.code
ChargeFix proc
;SkillInfo = r12+68h
;SkillInfo+0h - wszSkillName
;SkillInfo+8h - skillID
;RBP - pUser
;overwrited code
;.text:00000000006B8BB6 xor esi, esi ;Clear ESI
;.text:00000000006B8BB8 mov [rbp+0BACh], esi ;ZeroCharges
;.text:00000000006B8BBE mov rax, [rbp+0] ;ExitPoint

mov rax, [r12+68h] ;SkillInfo
mov eax, dword ptr [rax+8h] ;SkillID
cmp eax, 105h ;TripleSonicSlash
je FourChargesRequied
cmp eax, 5h ;DoubleSonicSlash
je ThreeChargesRequied
cmp eax, 6h ;SonicBlaster
je TwoChargesRequied
cmp eax, 11Ch ;HurricaneAssault
je TwoChargesRequied
cmp eax, 36h ;ForceBlaster
je OneChargeRequied
;Edit
cmp eax, 7h ;Sonic Buster
je NoChargesRequied
cmp eax, 9h ;Sonic Storm
je NoChargesRequied
cmp eax, 10h ;Force Buster
je NoChargesRequied
cmp eax, 23Ch ;Force Storm
je NoChargesRequied
;Edit
jmp Exit_Point

FourChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 4h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

ThreeChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 3h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

TwoChargesRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 2h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point

OneChargeRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 1h ;Decrease current charges
mov [rbp+0BACh], eax ;Set new charges
jmp Exit_Point
;Edit
NoChargeRequied:
mov eax, dword ptr [rbp+0BACh] ;Get current charges
sub eax, 0h ;Or just delete the line.
mov [rbp+0BACh], eax ;Same here, delete the line.
jmp Exit_Point
;Edit
Exit_Point:
xor esi, esi
mov rax, 006B8BBEh
jmp rax
ChargeFix endp
end

To add support to ranged - AOE force-using skills. Or just by going to "exit_point" you prevent the loss of charges by using those skills? Those skills dont use any charges, but they still need to know how many charges do you have to calculate the damage they do.


i'm kinda stumped on the "xor esi,esi" and what does it mean. Does that line delete the charges? or it's got nothing to do with the charge system?

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

Drag
12.03.2008, 21:54
Code:

;Edit
NoChargeRequied:
jmp Exit_Point

XD


xor esi, esi was a place where kation used to hook


i used esi as kation used eax

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

Kation
12.03.2008, 21:54
AOE force skills are supported as well as other skills ;P, this fix is for decreasing charges and aoe just dont decrease charges so i'm not changing current charges for that skills, calculating dmg is in another part of skill effect, so you dont neet do worry about that. System check skill condition (amount of charges) before skill is launched. And xor register,register (esi, esi) just clear that register. Charges are set here:

Code:

mov [rbp+0BACh], eax

i could delete that line and put that in exit_point but, then i would need add new for no charge things and new checks.(there are 4 skills that are not decreasing charges ;P so there would be just 4 not necessary checks (cmp)...).

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. Дата оценена по относительному времени в снимке (6 Days Ago); точное время не сохранилось. Открыть источник (https://web.archive.org/web/20080318235408id_/http://www.postpacific.com:80/forums/showthread.php?s=7b6c7431047e5c6b081e093b169c6088&p=124292).

yskwon79
31.03.2008, 22:00
thanx for sharing

Восстановлено из публичного снимка Wayback Machine. Тема могла сохраниться частично. В снимке указана только дата, без времени: 1 April 2008. Открыть источник (https://web.archive.org/web/20081210193639id_/http://www.postpacific.com:80/showthread.php?s=977f124c28b577fdeda22f0ed5d219ae&t=10623).