Mp charging - 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) +--- Thread: Mp charging (/showthread.php?tid=3508) |
||
Mp charging - naruto hyuuga - 08-26-2009 ok i am here i tried to make a state where tou charge mp without a beer and it has a limit too here is the code
please tell me whats wrong RE: Mp charging - Boop - 08-26-2009 Post the entire proc, because your code is really messed up, so I doubt you got the rest of it right. CMP EAX,6000 jl return CMP EAX,7000 jge return sub eax,6000 mov ebp,dword ptr ds:[esi+eax*4+194h] I assume the EAX contains the state number, so you make sure it is between 6000 and 7000 then subtract 6000, at this point EAX contains how much mp you want to recover. Then you try loading the character pointer, and treat EAX as the character number, which is obviously isn't. You shouldn't be using ebp - ebp and esp are special, you shouldn't be touching them unless you know what you are doing. mov ecx,dword ptr ds:[ebp+308h] You forgot the h after 308. add ecx,eax mov dword ptr ds:[ebp+308h],ecx (shouldn't be ebp) You add eax to ecx, which means now ecx contains how much mp he should have. The problem is, you never set the characters mp to what you want. cmp ecx,500 jge short no_charge no_charge: sub ecx,500 add ecx,500 You're taking 500 off, then add 500. That's pretty much like doing nothing, I don't get the point of that. If you don't want the mp to go over 500, then replace those 2 lines with mov dword ptr ds:[ebp+308h],500 You should post the rest of your code. RE: Mp charging - naruto hyuuga - 08-27-2009
i used the state8xxx proc im gonna change it a bit i guess and see RE: Mp charging - Boop - 08-27-2009 Code: charging: |