Thread Rating:
  • 8 Vote(s) - 3.88 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[14/08/09] LF2 DLL Framework
#42
Bah, I got bored and decided to learn some ASM coding on my own (I'm getting tired of depending on Silva :D).

I managed to code the 'Itr: Effect' of '7XXXYYY' onto the DLL effects. I hope this helps DCers...

ID Dependent Itr/Effect:

    ASM-Code:
cmp eax,7000000
jl short r2
cmp eax,7400000
jl dependent         ; Note: Place these four lines under 'ie0' in the 'itr_effect' procedure
 
dependent:
	sub eax,7000000
	mov ebx,1000
	mov edx,0
	idiv ebx
	xor ebx,ebx
	mov ebx,eax
	xor eax,eax
	mov eax,edx
	xor edx,edx
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h] 
	cmp dword ptr ds:[edx+6F4h],eax
	jnz r2
	xor eax,eax
	mov eax,ebx
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax
	jmp r2


Copy+Paste all that junk except for the first four lines onto the 'Itr_Effect' Procedure under the 'generic.inc' file :D.

Paste the first four lines under 'ie0' in the 'itr_effect' procedure, in between the lines 'jl transform' and 'cmp eax,1000000000'.

So the 'ie0' should look something like this:

    ASM-Code:
ie0:
        cmp eax,6400
	jl short frame
	cmp eax,8000
	jl short r2
	cmp eax,9000
	jl transform
	cmp eax,7000000
	jl short r2
	cmp eax,7400000
	jl dependent
	cmp eax,1000000000
	jl short r2
	cmp eax,1400000000
	jl general	
	cmp eax,1999000000
	jl short r2
	cmp eax,2000000000
	jl general
	jmp short r2



Alright, now for the explanation:

7=Lead Number
XXX=Frame Number (0-399 only)
YYY=ID Number

Basically, the Itr will bring the enemy to the specified frame number ONLY if they are of the specified ID.

Again, I hope this brings some convenience to DCers (I'm sure it does, actually, because now you dont' have to copy+paste special bodies to like, every freaking frame :D).

Again, the itr/effect number is '7XXXYYY'.

HAHAHA, First Unaided DLL Edit (even though I admit it was easy)!! In your face, Silva!

@Silva's Signature: Hey, that's not cool, Silva. That's really not nice. I had a feeling BP's siggy was sarcastic.

_______________________________________________________________________________________________________________________


EDIT: Arrrgh, I have to end this post with another plea for help :D.

Frame Dependent Itr/Effect:

    ASM-Code:
cmp eax,8000000
jl short r2
cmp eax,8400000   ; 'Eax' limits
 
frame_dependent:
	sub eax,8000000   ; take off the '8' in front :D
	mov ebx,1000
	mov edx,0
	idiv ebx
	xor ebx,ebx
	mov ebx,eax
	xor eax,eax
	mov eax,edx
	xor edx,edx  ; separate number #8XXXYYY into #XXX, #YYY. #XXX is stored in ebx, #YYY is stored in eax, EDX is cleared.
	mov ecx,dword ptr ds:[esi+edi*4+194h] 
	mov edx,dword ptr ds:[ecx+368h]
	cmp dword ptr ds:[edx+6F8h],0
	jnz r2
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178 
	cmp dword ptr ds:[ecx+edx+7ACh],eax
	jnz r2                                                 ; detect if frame is at indicated number #YYY. If not, normalize.
	xor eax,eax
	mov eax,ebx
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax             ; if frame is at indicated number, move character to frame at indicated number #XXX.
	jmp r2


^ I checked the coding above over 20 times. I never got it to work completely. If I specify 'state: 0', then no matter what state the character was in, the effect is triggered. If I specify any other 'state', then nothing happens (even when the character is in specified state number). I'm in serious need of help :D.

Again, the itr/effect number is '8xxxyyy'.

Combination Frame/ID Dependent Itr/Effect:

    ASM-Code:
cmp eax,2000000000
jl general    ; Genevrier's Itr/Effect '1xxxyyyzzz'
cmp eax,3400000000    ; 'Eax' limits
jl superdependent
 
superdependent:
	mov ebx,1000000000
	mov edx,0
	idiv ebx
	xor ebx,ebx
	push edx     ;  separates frame AXXXYYYZZZ into 'A, XXXYYYZZZ'. Remainder 'XXXYYYZZZ' is "pushed" into temporary memory.
	cmp eax,3   
	je s1
	cmp eax,2
	je d1          ; compare A. If A=2, go to case 1. If A=3 go to case 2.
	jmp r2
 
s1:                    ; beginning of case 1 (requirements to activate effect are both 'Frame' and 'ID')
	xor eax,eax  ; clear eax (in case)
	pop eax      ; retrieve number #XXXYYYZZZ. Store into 'EAX' variable/register.
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax                          ; separate number #XXXYYYZZZ into #XXXYYY and #ZZZ. "Push" number #XXXYYY into system memory.
	xor eax,eax
	mov eax,edx
	xor edx,edx                       ; move number #ZZZ into eax. Clear 'EDX' (in case).
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h] 
	cmp dword ptr ds:[edx+6F4h],eax     ; check ID with #ZZZ, if no match then normalize.
	jnz r2                                            
        cmp eax, 999     ; check for #999, if match then omit feature by auto-enabling effect (first by going to s2 for state check).
        jnz r2
	jmp s2
 
s2:
	xor eax,eax        ; clear 'Eax'
	xor ebx,ebx
	xor edx,edx
	xor ecx,ecx
	pop eax           ; retrieve number #XXXYYY and store in 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax           ; separate number #XXXYYY into #XXX and #YYY. "Push" number #XXX into system memory.
	xor eax,eax
	mov eax,edx     
	xor edx,edx        ; move #YYY into 'Eax, and clear 'Edx'
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]	
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178
	cmp dword ptr ds:[ecx+edx+7ACh],eax  ; check state against number #YYY, if no match then normalize.
	jnz r2
        cmp eax, 999                                 ; check for 999, if match then omit feature by auto-enabling the effect
        jnz r2
	jmp s3
 
s3:
	pop eax                                              ; retrieve number #XXX and store in 'Eax'
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax               ; move character to frame indicated by #XXX
	jmp r2
 
d1:              ; beginning of case 2 (requirements to activate effect are both 'Frame' or 'ID')
    xor eax,eax              ; clear 'Eax (in case)
    pop eax                   ; retrieve number #XXXYYYZZZ and store in 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
        push eax
	mov eax,edx
	xor edx,edx           ; separate into #XXXYYY and #ZZZ, store #ZZZ in 'Eax' and "push" #XXXYYY, clear 'Edx'
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h] 
	cmp dword ptr ds:[edx+6F4h],eax        ; check ID against #ZZZ, if no match then check state, otherwise enable effect (or)
	je d4
        cmp eax, 999     ; check for #999, if match then omit feature by auto-enabling effect (first by going to d3 for state check).
        je d3
	jmp d2
 
d2:
	xor eax,eax    ; clear 'Eax' (again :D)
	xor edx,edx
	xor ecx,ecx
	xor ebx,ebx
	pop eax        ; retrieve #XXXYYY and store in 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax
	mov eax,edx
	xor edx,edx            ; separate #XXXYYY into #XXX and #YYY, store #YYY in 'Eax' and "push" #XXX into system memory. Clear 'Edx'.
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]	
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178
	cmp dword ptr ds:[ecx+edx+7ACh],eax     ; checking State against number #YYY, if no match then normalize
	je d4
	jmp r2
 
d3:
	xor eax,eax          ; clear 'Eax', 'Edx', 'Ecx', 'Ebx'
	xor edx,edx
	xor ecx,ecx
	xor ebx,ebx
	pop eax                ; retrieve #XXXYYY and store into 'Eax'
	mov ebx,1000
	idiv ebx
	xor ebx,ebx
	push eax
	mov eax,edx        
	xor edx,edx            ; separating #XXXYYY into #XXX and #YYY. #YYY stored in 'Eax'. #XXX "pushed" to temporary memory.
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]
	mov ecx,dword ptr ds:[ecx+78h]
	imul ecx,ecx,178
	cmp dword ptr ds:[ecx+edx+7ACh],eax     ; checking state against #YYY, if no match then normalize, otherwise enable effect (or)
	je d4
        cmp eax, 999                ; check for #999, if match then omit feature by auto-enabling effect, otherwise normalize
        je d4
	jmp r2
 
d4:
	pop eax                          ; retrieve number #XXX
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov edx,dword ptr ds:[ecx+368h]
	mov ecx,dword ptr ds:[esi+edi*4+194h]
	mov dword ptr ds:[ecx+70h],eax                  ; moving character to indicated frame #XXX
	jmp r2


^ I must've checked this coding above over 100 times. I never got it to work at all. I'm in serious need of help :D.

Again, the itr/effect number is '2xxxyyyzzz' or '3xxxyyyzzz'.

These two itr/effects are definitely coded right by my concepts. I checked them over 20 times. I need a second eye on them. Silva, can you lend a hand (again :D)? I included explanations with the coding.

BTW, since we're on the 'request' topic, have you made any headway on my request?
Have you managed to copy the itr/kind 8 effect onto 'centery' as well as 'centerx' <-- (ok, I officially posted this request on the forum as a question, happy?)

Oh, and update the DLL, Silva, will you? The last update was at April (2 months ago), and we've had some DLL developments since then (like itr/effect 9, and my new itr/effect 7xxxyyyzzz).

Thanks...


~Solomon Leung
<div style="background-image:url('http://f.imagehost.org/0086/Fill.png'); filter:alpha(opacity=70); border-top:1px solid #000000; border-right:1px solid #000000; border-left: 1px solid #000000; border-bottom: 1px solid #000000"> <table border="0" width="100%"><tr><td width="500"><img src=http://g.imagehost.org/0170/FORUM_SIGNATURE.png opacity="1" alt="Little Fighter Code Lyoko"></td><td width="30"><img src="http://www.antoninasdesigns.com/images/real-gray-square.gif" width="1" height="100"></td><td><font face=monotype corsiva><font color=#0A298F><font size="4"><b><i>~Solomon Leung</size><br><font size="2">P.S. I Just Lost <a href="http://www.losethegame.org" target="_blank" style="text-decoration: none"><font color=#0A298F>The Game</font></a></b></i></font></font></size></td></tr></table></div>
Reply
Thanks given by:


Messages In This Thread
[14/08/09] LF2 DLL Framework - by Boop - 03-01-2009, 03:06 PM
RE: [Concept/Project]DLL - by Ascor - 03-01-2009, 04:54 PM
RE: [Concept/Project]DLL - by genevrier - 03-13-2009, 05:55 AM
RE: [Concept/Project]DLL - by Ramond - 03-01-2009, 09:57 PM
RE: [Concept/Project]DLL - by Yinseko - 03-02-2009, 03:56 PM
RE: [12/3/09] LF2 DLL Framework - by Boop - 03-12-2009, 04:49 PM
RE: [12/3/09] LF2 DLL Framework - by Boop - 03-13-2009, 01:03 PM
RE: [12/3/09] LF2 DLL Framework - by genevrier - 03-18-2009, 03:10 AM
RE: [12/3/09] LF2 DLL Framework - by Boop - 03-18-2009, 06:42 AM
RE: [21/3/09] LF2 DLL Framework - by Boop - 03-21-2009, 07:47 PM
RE: [21/3/09] LF2 DLL Framework - by genevrier - 03-25-2009, 04:41 PM
RE: [28/3/09] LF2 DLL Framework - by Boop - 03-29-2009, 07:59 AM
RE: [28/3/09] LF2 DLL Framework - by genevrier - 03-29-2009, 10:34 AM
RE: [28/3/09] LF2 DLL Framework - by Yinseko - 03-29-2009, 11:48 AM
RE: [28/3/09] LF2 DLL Framework - by Boop - 03-31-2009, 03:31 PM
RE: [28/3/09] LF2 DLL Framework - by Boop - 04-01-2009, 03:40 PM
RE: [28/3/09] LF2 DLL Framework - by Yinseko - 04-01-2009, 09:31 AM
RE: [28/3/09] LF2 DLL Framework - by Yinseko - 04-01-2009, 06:16 PM
RE: [28/3/09] LF2 DLL Framework - by Boop - 04-01-2009, 07:16 PM
RE: [28/3/09] LF2 DLL Framework - by Yinseko - 04-01-2009, 07:21 PM
RE: [28/3/09] LF2 DLL Framework - by genevrier - 04-03-2009, 03:11 AM
RE: [28/3/09] LF2 DLL Framework - by genevrier - 04-10-2009, 08:26 AM
RE: [28/3/09] LF2 DLL Framework - by Boop - 04-10-2009, 08:58 AM
RE: [28/3/09] LF2 DLL Framework - by genevrier - 04-10-2009, 09:37 AM
RE: [10/04/09] LF2 DLL Framework - by Boop - 04-15-2009, 08:49 PM
RE: [10/04/09] LF2 DLL Framework - by genevrier - 04-16-2009, 01:49 PM
RE: [10/04/09] LF2 DLL Framework - by Boop - 04-16-2009, 05:24 PM
RE: [16/04/09] LF2 DLL Framework - by genevrier - 04-17-2009, 03:11 PM
RE: [17/04/09] LF2 DLL Framework - by Sharingan - 04-25-2009, 11:25 AM
RE: [17/04/09] LF2 DLL Framework - by Boop - 04-25-2009, 11:38 AM
RE: [17/04/09] LF2 DLL Framework - by Azriel - 04-25-2009, 01:10 PM
RE: [17/04/09] LF2 DLL Framework - by Boop - 04-25-2009, 01:19 PM
RE: [17/04/09] LF2 DLL Framework - by Yuan - 05-17-2009, 10:11 AM
RE: [17/04/09] LF2 DLL Framework - by genevrier - 05-17-2009, 12:58 PM
RE: [17/04/09] LF2 DLL Framework - by Boop - 05-17-2009, 10:25 AM
RE: [17/04/09] LF2 DLL Framework - by Yuan - 05-17-2009, 02:07 PM
RE: [17/04/09] LF2 DLL Framework - by 1477 - 05-25-2009, 03:48 AM
RE: [17/04/09] LF2 DLL Framework - by Boop - 05-25-2009, 07:29 AM
RE: [17/04/09] LF2 DLL Framework - by Boop - 06-01-2009, 01:00 PM
RE: [17/04/09] LF2 DLL Framework - by hkmnhkmn - 06-20-2009, 09:22 AM
RE: [17/04/09] LF2 DLL Framework - by Boop - 06-20-2009, 09:37 AM
RE: [17/04/09] LF2 DLL Framework - by 1477 - 06-22-2009, 02:33 AM
RE: [17/04/09] LF2 DLL Framework - by 1477 - 06-29-2009, 05:21 AM
RE: [17/04/09] LF2 DLL Framework - by Boop - 06-29-2009, 03:22 PM
RE: [17/04/09] LF2 DLL Framework - by hkmnhkmn - 07-03-2009, 12:28 PM
RE: [17/04/09] LF2 DLL Framework - by Boop - 07-03-2009, 12:35 PM
RE: [17/04/09] LF2 DLL Framework - by Boop - 07-21-2009, 01:21 PM
RE: [17/04/09] LF2 DLL Framework - by TheNave - 07-21-2009, 03:04 PM
RE: [17/04/09] LF2 DLL Framework - by genevrier - 07-30-2009, 07:29 PM
RE: [17/04/09] LF2 DLL Framework - by TheNave - 07-30-2009, 09:19 PM
RE: [17/04/09] LF2 DLL Framework - by genevrier - 08-01-2009, 03:22 AM
RE: [17/04/09] LF2 DLL Framework - by TheNave - 08-01-2009, 09:00 AM
RE: [01/08/09] LF2 DLL Framework - by Boop - 08-02-2009, 04:16 PM
RE: [01/08/09] LF2 DLL Framework - by 1477 - 08-03-2009, 05:26 AM
RE: [02/08/09] LF2 DLL Framework - by Boop - 08-09-2009, 07:17 PM
RE: [02/08/09] LF2 DLL Framework - by SortaGuy - 08-10-2009, 06:56 PM
RE: [02/08/09] LF2 DLL Framework - by Boop - 08-10-2009, 09:36 PM
RE: [02/08/09] LF2 DLL Framework - by hkmnhkmn - 08-11-2009, 01:47 AM
RE: [02/08/09] LF2 DLL Framework - by Boop - 08-12-2009, 04:27 PM
RE: [12/08/09] LF2 DLL Framework - by Silverthorn - 08-13-2009, 04:06 PM
RE: [14/08/09] LF2 DLL Framework - by Boop - 08-16-2009, 01:17 PM
RE: [14/08/09] LF2 DLL Framework - by Buxie - 08-25-2009, 03:57 PM
RE: [14/08/09] LF2 DLL Framework - by Boop - 08-29-2009, 07:05 AM
RE: [14/08/09] LF2 DLL Framework - by hkmnhkmn - 08-29-2009, 06:00 AM
RE: [14/08/09] LF2 DLL Framework - by Buxie - 08-29-2009, 08:10 AM
RE: [14/08/09] LF2 DLL Framework - by Boop - 08-29-2009, 08:13 AM
RE: [14/08/09] LF2 DLL Framework - by TheNave - 09-02-2009, 06:50 AM
RE: [14/08/09] LF2 DLL Framework - by George - 09-10-2009, 05:06 PM
RE: [14/08/09] LF2 DLL Framework - by TheNave - 09-10-2009, 05:38 PM
RE: [14/08/09] LF2 DLL Framework - by George - 09-10-2009, 05:51 PM
RE: [14/08/09] LF2 DLL Framework - by George - 09-12-2009, 09:31 AM
RE: [14/08/09] LF2 DLL Framework - by hkmnhkmn - 09-18-2009, 12:09 PM
RE: [14/08/09] LF2 DLL Framework - by Divisor - 09-22-2009, 07:13 PM
RE: [14/08/09] LF2 DLL Framework - by Hax0r - 09-18-2009, 10:32 PM
RE: [14/08/09] LF2 DLL Framework - by Buxie - 09-19-2009, 04:24 AM
RE: [14/08/09] LF2 DLL Framework - by RenanDez - 09-19-2009, 06:39 AM
RE: [14/08/09] LF2 DLL Framework - by Hax0r - 09-22-2009, 07:04 PM
RE: [14/08/09] LF2 DLL Framework - by Kiba - 01-03-2010, 06:48 AM
RE: [14/08/09] LF2 DLL Framework - by vandesdelca - 01-30-2010, 11:03 PM
RE: [14/08/09] LF2 DLL Framework - by TheNave - 01-31-2010, 12:01 AM
RE: [14/08/09] LF2 DLL Framework - by vandesdelca - 02-01-2010, 08:06 AM
RE: [14/08/09] LF2 DLL Framework - by hkmnhkmn - 01-11-2011, 07:01 AM
RE: [14/08/09] LF2 DLL Framework - by Boop - 01-11-2011, 07:58 PM
RE: [14/08/09] LF2 DLL Framework - by hkmnhkmn - 01-17-2011, 02:25 PM
RE: [14/08/09] LF2 DLL Framework - by Boop - 01-17-2011, 06:05 PM
RE: [14/08/09] LF2 DLL Framework - by hkmnhkmn - 01-18-2011, 09:41 AM



Users browsing this thread: 15 Guest(s)