Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MP Descrease [help]
#1
Descrease mp not work. Please help me. And How to make as: if mp 0 then transformation ID.

Big Thanks :)!!!

DecreaseMp2.0aDll (Click to View)
I am not speak english
Reply
Thanks given by:
#2
Hmph.. I can see what you did there. You're using base 10 number when you are supposed to use base 16 (hexadecimal). This should work if your code actually does it:

    ASM-Code:
.Data
;mp recover
MP_normal	dd 0041FAD8h
MP_hack 	dd 0041FAF8h
.Code
 
MP proc
 
	cmp edx,33 ; check if ID is 51 (Firzen)
	je short MP_1 ; jump to <DVZ_ME#0> if ID is 51
	cmp edx,34 ; check if ID is 52 (Julian)
	je short MP_1 ; jump to <DVZ_ME#0> if ID is 52
	cmp edx,37; check if ID is 55 (your character)
	je short MP_2 ; jump to <DVZ_ME#1> if ID is 55
	jmp dword ptr [MP_normal]
 
	MP_1: ; for Firzen & Julian
	cdq ; ignore this
	sub eax,edx  ; ignore this
	sar eax,1 ; add 1 point more compare with normal (normal = 1)
	jmp dword ptr [MP_normal]
 
	MP_2: ; for the ID 55
	cmp dword ptr ds:[ecx+308h],FA ; check if mp is greater than 250
	JG Decrease_MP
	cdq ; ignore this
	sub eax,edx ; ignore this
	sar eax,1 ; add 2 point more compare with normal
	jmp dword ptr [MP_normal]
 
	Decrease_MP: ;when mp is more than 250
	mov eax, dword ptr ds:[ecx+354h] ; move mana into eax
	sub eax,1 ; decrease eax(mana) by 1
	jmp dword ptr [MP_hack]
 
MP endp

[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by:
#3
Descrease mp not work. I think that problem this here "MP_hack dd 0041FAF8h"
I am not speak english
Reply
Thanks given by:
#4
Nope, everything is decimal. If you want to use hex then you need to put h at the end.

So cmp edx,51 == cmp edx, 33h

That was written for lf2 no_num. Not 2.0a so the offsets are outdated.
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by: A-Man
#5
What a me doing? Regen mp is work, descrease mp not work.
I am not speak english
Reply
Thanks given by:
#6
You aren't being very helpful...

What version of lf2 are you using? Are you sure you are using the right ID(55)? Does lf2 crash? Are you sure the DLL is even loaded?

Edit: NVM, your code is wrong.

mov eax, dword ptr ds:[ecx+354h] ; move mana into eax

Why did you use 354h when you knew earlier on it was 308h

Code:
mov eax, dword ptr ds:[ecx+308] ; move mana into eax
DEC eax

That should work.

I don't know why you changed the original code... It was fine:

Code:
    @Decrease_MP: ;when mp is more than 250
    mov eax, dword ptr ds:[ecx+308h] ; move mana into eax
    sub eax,1 ; decrease eax(mana) by 1
    jmp dword ptr [MP_hack]
[Image: doty7Xn.gif]

10 ʏᴇᴀʀs sɪɴᴄᴇ ɪʀᴄ ɢᴏᴏᴅ.ɪ ᴡᴀʟᴋ ᴛʜʀᴏᴜɢʜ ᴛʜᴇ ᴇᴍᴘᴛʏ sᴛʀᴇᴇᴛs ᴛʀʏɪɴɢ ᴛᴏ ᴛʜɪɴᴋ ᴏғ sᴏᴍᴇᴛʜɪɴɢ ᴇʟsᴇ ʙᴜᴛ ᴍʏ ᴘᴀᴛʜ ᴀʟᴡᴀʏs ʟᴇᴀᴅs ᴛᴏ ᴛʜᴇ ɪʀᴄ. ɪ sᴛᴀʀᴇ ᴀᴛ ᴛʜᴇ sᴄʀᴇᴇɴ ғᴏʀ ʜᴏᴜʀs ᴀɴᴅ ᴛʀʏ ᴛᴏ sᴜᴍᴍᴏɴ ᴛʜᴇ ɢᴏᴏᴅ ɪʀᴄ. ɪ ᴡᴀᴛᴄʜ ᴏᴛʜᴇʀ ɪʀᴄ ᴄʜᴀɴɴᴇʟs ʙᴜᴛ ɪᴛ ɪs ɴᴏ ɢᴏᴏᴅ. ɪ ᴘᴇsᴛᴇʀ ᴢᴏʀᴛ ᴀɴᴅ ᴛʀʏ ᴛᴏ ʀᴇsɪsᴛ ʜɪs sᴇxɪɴᴇss ʙᴜᴛ ɪᴛ ɪs ᴀʟʟ ᴍᴇᴀɴɪɴɢʟᴇss. ᴛʜᴇ ᴇɴᴅ ɪs ɴᴇᴀʀ.ɪ ᴛʜᴇɴ ᴜsᴜᴀʟʟʏ ʀᴇᴀᴅ sᴏᴍᴇ ᴏʟᴅ ɪʀᴄ ʟᴏɢs ᴀɴᴅ ᴄʀʏ ᴍʏsᴇʟғ ᴛᴏ sʟᴇᴇᴘ.


Reply
Thanks given by:
#7
Version 2.0a and dll loaded.

Hhhmm... it is not work. Сan download my dll and exe? I think problem "MP_hack dd 0041FAF8h"

Code:
0041FAEE   . 8D5402 01      LEA EDX,DWORD PTR DS:[EDX+EAX+1]
0041FAF2   . 0191 08030000  ADD DWORD PTR DS:[ECX+308],EDX
0041FAF8   > A1 60114500    MOV EAX,DWORD PTR DS:[451160]  ;this is MP_hack
0041FAFD   . 8B8CBB 9401000>MOV ECX,DWORD PTR DS:[EBX+EDI*4+194]
0041FB04   . 57             PUSH EDI
0041FB05   . 50             PUSH EAX
0041FB06   . E8 55DEFEFF    CALL lf2.0040D960
0041FB0B   . 8B8CBB 9401000>MOV ECX,DWORD PTR DS:[EBX+EDI*4+194]
I am not speak english
Reply
Thanks given by:




Users browsing this thread: 3 Guest(s)