Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object-Oriented Itr/Kind 8 !
#1
Hi,
I just managed to write some code, which could be used as object-oriented sticky ball.
Basically my code works properly only when applied to ball, cause it transfers object number to ball's mana, and then in next frames this ball can affect only character which was initially hit.

I also changed John's healball, and made it to work like poison, but of course it is possible to change it, to make it doing something else by hex. Here's the code:
In first 3 seconds, it changes it's mp value to last character that was touching it, after that it sticks to that character and makes him lose life.
When F7 is pressed, it doesn't stick anymore and just disappears. It does similar thing, when character is dead, or the timer runs up.

Edit:
Found a small bug. Just remove from 'object_hit:' these two lines:
Code:
cmp dword ptr ds:[edx+6F8h],0 ;type
    jne p2

It was causing bugs with sticky object, when weapon or other ball was nearer.


Edit:
Found out next awesome thing!
Now first frame of healball looks like this:
There's no itr in this frame, only state, which switch dark red hp with mp. Here's the code:
This is, because I made the opointed ball store creator's object number, so it will always stick to only him. Code:
I also want to ask someone to make Max_MP function, because that wouldn't require any state in first frame of the opointed ball, and I', not able to do that, cause I'm like total newb. :d
Reply
Thanks given by: YinYin , Boop
#2
I'm not entirely sure how much you know, but there is some information here: http://www.lf-empire.de/forum/showthread...ght=max+hp

About doing max MP.

You code would look something like this:

Code:
Max_MP proc
MOV DWORD PTR DS:[ESI+300],ECX ;original lines
MOV DWORD PTR DS:[ESI+308],ECX ; ^^
push eax
mov eax, dword ptr ds:[esi+368h]
mov eax, dword ptr ds:[eax+6f4h]
cmp eax,10 ; ID you are checking
jnz skip
MOV DWORD PTR DS:[ESI+300],600 ; mp
MOV DWORD PTR DS:[ESI+308],600 ; maximum mp

skip:
pop eax

push 004063E7h ;return address
retn

and have :
Quote:invoke JmpPatch, 004063DBh, addr Max_MP

in your main file.

I've not tested it, but it should work :P
[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:
#3
Thanks, maybe it should work, but not in my rarara.dll (from this thread http://www.lf-empire.de/forum/showthread.php?tid=2246). I think you're using newer version, which I don't wanna use, because there is broken mp function. :/
Unless someone fix that, I refuse to get this dll.

Edit:
Finally managed to write code by myself. This is my version of Max_HP function, since I'm not using the same version of the exe and dll.
And a question for advanced hexers. Since we can store object number in hp or mp bar, why wouldn't we do it somewhere else. There are a few addresses which I find useless (like 31C or 35C), because there won't be any weapons in my mod I'm gonna work at, so I think I can use them, but my question is:
Are there MORE addresses in which it's possible to store some values?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)