Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MP Descrease [help]
#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:


Messages In This Thread
MP Descrease [help] - by Bender_EX - 06-07-2013, 06:52 AM
RE: MP Descrease [help] - by A-Man - 06-07-2013, 07:34 AM
RE: MP Descrease [help] - by Bender_EX - 06-07-2013, 12:12 PM
RE: MP Descrease [help] - by Boop - 06-07-2013, 04:55 PM
RE: MP Descrease [help] - by Bender_EX - 06-08-2013, 08:52 AM
RE: MP Descrease [help] - by Boop - 06-08-2013, 09:01 AM
RE: MP Descrease [help] - by Bender_EX - 06-08-2013, 03:16 PM



Users browsing this thread: 1 Guest(s)