Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Effect 6 made
#2
Just from looking at the exe, I see a few possible problems.
1:
00446454 > 83F8 06 CMP EAX,6 // (effect 6)
00446457 . 74 09 JE SHORT lf2-char.00446462
00446459 . 83F8 10 CMP EAX,10 // (effect 16)
0044645C .^0F85 349AFEFF JNZ lf2-char.0042FE96 // if not 10, then execute this jmp
00446462 > 8B8CBE 9401000>MOV ECX,DWORD PTR DS:[ESI+EDI*4+194] // if 6 jump here

With this code, the effect will run when the effect is 6, or 16. So you basically replaced effect 16(if it ever existed).




2:
00446495 . 74 13 JE SHORT lf2-char.004464AA
00446497 . C740 70 960000>MOV DWORD PTR DS:[EAX+70],96
0044649E .^E9 F399FEFF JMP lf2-char.0042FE96
004464A3 00 DB 00
004464A4 00 DB 00
004464A5 00 DB 00
004464A6 00 DB 00
004464A7 00 DB 00
004464A8 00 DB 00
004464A9 00 DB 00
004464AA > 8B4C24 0C MOV ECX,DWORD PTR SS:[ESP+C]
004464AE . 0000 ADD BYTE PTR DS:[EAX],AL

You are jumping to line 004464AA, and then you aren't jumping anywhere else. This will cause the exe to crash.

Edit: For your second question, use CMP BYTE [EAX+2FC],1 to check if the HP is one. Then do a JNZ or a JG etc etc.

Example:
00446454 > 83F8 06 CMP EAX,6
00446457 . 74 09 JE SHORT lf2-char.00446462
00446459 . 83F8 10 CMP EAX,10
0044645C .^0F85 349AFEFF JNZ lf2-char.0042FE96
00446462 EB 58 JMP SHORT lf2-char.004464BC

004464BC 80B8 FC020000 >CMP BYTE PTR DS:[EAX+2FC],1
004464C3 ^7F A4 JG SHORT lf2-char.00446469
004464C5 ^E9 CC99FEFF JMP lf2-char.0042FE96

Depending on how much you care about keeping your code clean, you can just do it my way with a jump, or rewrite most of your code :D.
[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:


Messages In This Thread
Effect 6 made - by hkmnhkmn - 02-06-2009, 08:48 AM
RE: Effect 6 made - by Boop - 02-06-2009, 01:01 PM
RE: Effect 6 made - by hkmnhkmn - 02-06-2009, 03:31 PM
RE: Effect 6 made - by Boop - 02-06-2009, 03:46 PM
RE: Effect 6 made - by Jizen - 02-08-2009, 10:28 AM



Users browsing this thread: 1 Guest(s)