Little Fighter Empire - Forums
[solved] How made state with 4 variables - Printable Version

+- Little Fighter Empire - Forums (https://lf-empire.de/forum)
+-- Forum: Little Fighter 2 Zone (https://lf-empire.de/forum/forumdisplay.php?fid=7)
+--- Forum: [2.0] Exe Editing (https://lf-empire.de/forum/forumdisplay.php?fid=43)
+---- Forum: Solved Problems (https://lf-empire.de/forum/forumdisplay.php?fid=45)
+---- Thread: [solved] How made state with 4 variables (/showthread.php?tid=6111)



[solved] How made state with 4 variables - Surik - 02-13-2011

Hi guys.I have made state 5xxxyyy,but how can i make state like 5wwwxxxyyyzzz?

here's example code of state 5xxxyyy:

Code:
devHP:
        CMP EAX,9000000
        jl detectHP
        CMP EAX,9800000
        jge detectHP
        sub eax,9000000
        mov ecx,1000
        mov edx,0
        idiv ecx
        xor ecx,ecx
        mov ecx,eax
        xor eax,eax
        mov eax,edx
        xor edx,edx
        MOV EDX,DWORD PTR DS:[EBX+EDI*4+194h]
        sub dword ptr ds:[edx+2FCh],eax
        cmp dword ptr ds:[edx+2FCh],0
        jle devHP2
        jmp return
        mov dword ptr ds:[edx+2FCh],500
devHP2:
        xor eax,eax
        mov eax,ecx
        mov dword ptr ds:[edx+2FCh],10
        mov dword ptr ds:[edx+70h],eax
        jmp return



RE: How made state with 4 variables - Boop - 02-13-2011

You can't. State is parsed and stored as an integer. 5,000,000,000,000 > 2^32.

mov dword ptr ds:[edx+2FCh],500 < that line is never executed, ever.

xor ecx,ecx
xor eax,eax
xor edx,edx

those lines are useless.


RE: How made state with 4 variables - Surik - 02-13-2011

5xxxyyyzzz too?


RE: How made state with 4 variables - Boop - 02-13-2011

http://www.wolframalpha.com/input/?i=5000000000+%3E+2^32


PS: It's actually 2^31 since it is a signed value. Try putting a value like 5000000000 and then parse it with the real time data changer, you'll see lf2 trim the value.

nope I'm wrong :p


RE: How made state with 4 variables - Surik - 02-13-2011

http://www.wolframalpha.com/input/?i=500000000+%3E+2^32

5wwxxyyzz can be done! Can you say how do it?


RE: How made state with 4 variables - Boop - 02-13-2011

The same way you created 5xxxyyy? I don't understand how you can write that, but can't write 5wwxxyyzz. I'm not sure what to say to help you, it's pretty basic ASM stuff, go learn some x86 ASM and you will be fine...

You can look in itreff.inc, that has some more examples of splitting stuff up.

Edit 2:
I think you are asking me to do it, and I don't want to.
sorry :)


Edit:
Something helpful: You need to use div instead of idiv. Since idiv is for signed values, and
500,000,000 = 11101110011010110010100000000
so yeah, use div.


RE: How made state with 4 variables - Surik - 02-14-2011

(02-13-2011, 05:10 PM)Lord Silva Wrote:  I think you are asking me to do it, and I don't want to.

No, I want myself to do! Your last post was enough for me to think about! Thank you!



RE: How made state with 4 variables - Surik - 02-23-2011

Hooray! I did it! Problem Solved!