Thread Rating:
  • 8 Vote(s) - 3.88 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[14/08/09] LF2 DLL Framework
#21
HP when spawning object
Code:
    invoke JmpPatch, 00420223h, addr Max_HP
;============split============
Max_HP1        dd 00420232h
Max_HP2        dd 00420263h
;============split============
Max_HP proc
    
    cmp ecx,5 ; Check if ID is 5 (Rudolf)
    je short HP_10 ; go to the 10 HP part
    cmp ecx,52 ; Check if ID is 5 (Julian)
    je short HP_10 ; go to the 10 HP part
    cmp ecx,55 ; Put your character or object's ID here
    je short HP_125 ; go to the 125 HP part
    jmp dword ptr [Max_HP2]
    
    HP_10:
    mov ecx,10 ; 10 HP for Rudolf's Double and Julian's Mirror Image
    jmp dword ptr [Max_HP1]
    
    HP_125:
    mov ecx,125 ; 125 HP if you spawn your character or object (normal = 500)
    jmp dword ptr [Max_HP1]

Max_HP endp
Reply
Thanks given by:
#22
the itr only for a specific state :p
Code:
    invoke JmpPatch, 0042FD16h, addr Specific_state_itr_effect
;============split============
ss_r1        dd 0042FD1Bh
ss_r2        dd 0042FD7Dh
ss_c1        dd 004170B0h
;============split============
Specific_state_itr_effect proc
    
    cmp eax,30 ; itr/effect: 30
    jnz short r1
    jmp dword ptr [ss_r1]
r1:    cmp eax,33 ; itr/effect: 33 (new interaction effect)
    jnz short r2

    mov eax,dword ptr ds:[esi+edi*4+194h]
    mov ecx,dword ptr ds:[eax+78h]
    mov edx,dword ptr ds:[eax+368h]
    imul ecx,ecx,178h
    cmp dword ptr ds:[ecx+edx+7ACh],11 ; check if the state is 11
    je short ss1
    cmp dword ptr ds:[ecx+edx+7ACh],16 ; check if the state is 16
    jnz short r2
ss1:mov dword ptr ds:[eax+70h],383 ; go to the frame 383
    fstp st
    mov ecx,dword ptr ds:[esi+edi*4+194h]
    mov dword ptr ds:[ecx+88h],0
    mov edx,dword ptr ds:[esi+edi*4+194h]
    mov eax,dword ptr ds:[edx+10h]
    push 0Eh
    push eax
    call dword ptr [ss_c1]
    fldz
    add esp,8
r2:    jmp dword ptr [ss_r2]

Specific_state_itr_effect endp
But sadly I don't know the way removing the freezing sound like that play along with the itr/effect: 30.
Reply
Thanks given by:
#23
Hey, sorry I haven't been doing much lately. I promise I'll start "working" some time in july :p. For now, how about you take over :D. All you have to do is ALL upload your source files every so often :D(in a zip or rar file). I think me and you are the only two people working on this so you don't have to worry about merging other peoples stuff :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:
#24
OK.
Newest version [10/04/09]: http://www.mediafire.com/download.php?2dndxwnzf5t

3 things updated:
Sorcerer AI
Hp of opointed object
itr/effect for specific state
Reply
Thanks given by:
#25
I remade the whole davis ai in the dll + made it press DJA if the enemy ID is above 200(for the 2 level lf2 thing):

Code:
;===========Davis stuff===========
Davis_return        dd 00404DAEh
Davis_C1            dd 00403270h
Davis_C2            dd 00417190h
Davis_C3            dd 004451C0h
Davis_DP            dd 004060EEh

and

Code:
AI_Davis proc
        CMP DWORD PTR DS:[EAX+6F4h],0Bh         ;  davis
        JE DJA_1
        CMP DWORD PTR DS:[EAX+6F4h],19Bh
        JE DJA_2
        jmp return
        
        DJA_1:
        MOV EDX,DWORD PTR DS:[ESI+EBP*4+194h]
        MOV EAX,DWORD PTR DS:[EDX+368h]        
        CMP DWORD PTR DS:[EAX+6F4h],200
        jng no_DJA
        MOV BYTE PTR DS:[ECX+0DCh],3
        
        DJA_2:
        MOV EDX,DWORD PTR DS:[ESI+EBP*4+194h]
        MOV EAX,DWORD PTR DS:[EDX+368h]        
        CMP DWORD PTR DS:[EAX+6F4h],200
        jnl no_DJA
        MOV BYTE PTR DS:[ECX+0DCh],3
        
no_DJA:        
        CMP DWORD PTR DS:[ECX+308h],96h
        JLE a             ;  jmp a
        MOV EDX,DWORD PTR DS:[ESI+EBP*4+194h]
        MOV EAX,DWORD PTR DS:[EDX+10h]
        SUB EAX,DWORD PTR DS:[ECX+10h]
        PUSH EAX
        CALL [Davis_C1]
        ADD ESP,4
        CMP EAX,118h
        JGE a           ;  jmp a
        MOV EDX,DWORD PTR DS:[EDX+18h]
        SUB EDX,DWORD PTR DS:[ECX+18h]
        PUSH EDX
        CALL [Davis_C1]
        ADD ESP,4
        CMP EAX,1Eh
        JGE a              ;  jmp a
        PUSH 0Ah
        PUSH 5Dh
        CALL [Davis_C2]
        ADD ESP,8h
        TEST EAX,EAX
        JNZ a              ;  jmp a
        MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
        MOV BL,BYTE PTR DS:[EDX+80h]
        TEST BL,BL
        JNZ b             ;  jmp b
        MOV ECX,DWORD PTR DS:[ESI+EBP*4+194h]
        MOV EAX,DWORD PTR DS:[EDX+10h]
        MOV ECX,DWORD PTR DS:[ECX+10h]
        CMP ECX,EAX
        JG @c              ;  jmp c
        
        b:
        CMP BL,1                                 ;  b
        JNZ a              ;  jmp a
        MOV ECX,DWORD PTR DS:[ESI+EBP*4+194h]
        MOV EAX,DWORD PTR DS:[EDX+10h]
        MOV ECX,DWORD PTR DS:[ECX+10h]
        CMP ECX,EAX
        JGE a              ;  jmp a
        JLE d             ;  jmp d
        @c:
        MOV BYTE PTR DS:[EDX+0D7h],3   ;c
        
        d:
        POP EDI                                  ;  d
        POP EBP
        POP EBX
        MOV EAX,1
        POP ESI
        ADD ESP,8
        RETN 1Ch
        
        a:
        MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]     ;  a
        MOV EDX,DWORD PTR DS:[EAX+70h]
        MOV EAX,DWORD PTR DS:[EAX+368h]
        IMUL EDX,EDX,178h
        CMP DWORD PTR DS:[EDX+EAX+7D0h],122h
        JNZ e              ;  jmp e
        MOV ECX,DWORD PTR DS:[ESI+EBP*4+194h]
        CMP DWORD PTR DS:[ECX+14h],0
        JGE e             ;  jmp e
        MOV EDX,DWORD PTR DS:[ESI+EDI*4+194h]
        MOV BYTE PTR DS:[EDX+0CBh],0
        MOV EAX,DWORD PTR DS:[ESI+EDI*4+194h]
        
        e:
        MOV BYTE PTR DS:[EAX+0D2h],1
        PUSH 5h                                   ;  e
        PUSH 5Eh
        CALL [Davis_C2]
        ADD ESP,8h
        TEST EAX,EAX
        JE f              ;  jmp f
        MOV EAX,DWORD PTR SS:[ESP+28h]
        CMP EAX,10h
        JE f              ;  jmp f
        CMP EAX,8h
        JNZ return                    ;  jmp to end
        
        f:
        MOV ECX,DWORD PTR SS:[ESP+1Ch]            ;  f
        MOV EBX,DWORD PTR DS:[ESI+ECX*4+194h]
        MOV EBP,DWORD PTR DS:[ESI+EDI*4+194h]
        MOV EDX,DWORD PTR DS:[EBX+10h]
        FLD QWORD PTR SS:[EBP+40h]
        MOV DWORD PTR SS:[ESP+20h],EDX
        CALL [Davis_C3]
        SUB EAX,DWORD PTR SS:[EBP+10h]
        ADD EAX,DWORD PTR SS:[ESP+20h]
        PUSH EAX
        CALL [Davis_C1]
        ADD ESP,4
        CMP EAX,64h
        JGE return              ;  jmp to end
        MOV EAX,DWORD PTR DS:[EBX+18h]
        MOV ECX,EBP
        SUB EAX,DWORD PTR DS:[ECX+18h]
        PUSH EAX
        CALL [Davis_C1]
        ADD ESP,4
        CMP EAX,7
        JGE return              ;  jmp to end
        CMP DWORD PTR DS:[ECX+308h],0C8h
        JLE return              ;  jmp to end
        MOV AL,BYTE PTR DS:[ECX+80h]
        TEST AL,AL
        JNZ g              ;  jmp g    
        MOV EDX,DWORD PTR SS:[ESP+20h]
        CMP DWORD PTR DS:[ECX+10h],EDX
        JL dp
        g:
        CMP AL,1                                 ;  g
        JNZ return             ;  jmp davis 3
        MOV EAX,DWORD PTR SS:[ESP+20h]
        CMP DWORD PTR DS:[ECX+10h],EAX
        JG dp                   ;  jmp davis 3
return: jmp Davis_return
dp:        jmp Davis_DP
    
AI_Davis endp

To disable the DJA stuff just replace:

CMP DWORD PTR DS:[EAX+6F4h],0Bh ; davis
JE DJA_1
CMP DWORD PTR DS:[EAX+6F4h],19Bh
JE DJA_2
jmp return

with:

CMP DWORD PTR DS:[EAX+6F4h],0Bh ; davis
JE no_DJA
CMP DWORD PTR DS:[EAX+6F4h],19Bh
JNZ return


:)
[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:
#26
Updated. :)
Newest version [16/04/09]: http://www.mediafire.com/download.php?mnon2vo4mzg

3 things updated:
Hiding shadow
State 85 and state 86 (see below)
Whole Davis AI (By Silva)

Code:
State_Turning proc
    
;This 2 states allow you control the direction in a move (both ^, v, < and >).
;Imagine you use mark's Body Attack D>J, with state 85 or 86 you can turn back without stop.

;State 86 merely allows you to use the direction key.
;State 85 does it similarly but additionally increments the frame number by 1.

;###This is mainly copy from the state of dash, I didn't understand most of it

    cmp dword ptr ds:[edx+ecx+7ACh],5
    je short r1
    cmp dword ptr ds:[edx+ecx+7ACh],85
    je short s85
    cmp dword ptr ds:[edx+ecx+7ACh],86
    je short s86
    jmp dword ptr [st_r2]
r1:    jmp dword ptr [st_r1]

s85:push ecx
    mov ecx,1
    jmp short st0
s86:push ecx
    mov ecx,0
st0:mov bl,byte ptr ds:[esi+0D0h]
    mov dl,0
    call c0
    mov dl,1
    call c0
    pop ecx
    jmp dword ptr [st_r2]

c0:    cmp byte ptr ds:[esi+0D0h],dl
    je short c1
    cmp byte ptr ds:[esi+0CFh],dl
    jnz short c1
    mov byte ptr ds:[esi+80h],dl
c1:    cmp byte ptr ds:[esi+80h],dl
    jnz short c5
    cmp dword ptr ds:[esi+70h],edi
    je short c5
    fxch st(1)
    fcom qword ptr ds:[esi+40h]
    fstsw ax
    test dl,dl
    jnz short c2
    test ah,5
    jpe short c4
    jmp short c3
c2:    test ah,41h
    jnz short c4
c3:    add dword ptr ds:[esi+70h],ecx
c4:    fxch st(1)
c5: retn

State_Turning endp

Mark, for the demonstration of state 86:

.dat   mark.dat (Size: 61.75 KB / Downloads: 132)
Reply
Thanks given by: Boop
#27
Copied the whole AI procedure into the dll.... I don't know if this should be included or not... It makes the dll file 15kb :p
rarara.asm
invoke CallPatch, 00419E24h, addr AI_Generic

ai.inc

.data:
Code:
var_50          = dword ptr -50h
var_4C          = dword ptr -4Ch
var_48          = dword ptr -48h
var_44          = dword ptr -44h
var_40          = dword ptr -40h
var_3C          = dword ptr -3Ch
var_38          = dword ptr -38h
var_34          = dword ptr -34h
var_30          = dword ptr -30h
var_2C          = dword ptr -2Ch
var_28          = dword ptr -28h
var_24          = dword ptr -24h
var_20          = dword ptr -20h
var_1C          = dword ptr -1Ch
var_18          = dword ptr -18h
var_14          = dword ptr -14h
var_10          = dword ptr -10h
var_C           = dword ptr -0Ch
var_8           = dword ptr -8
var_4           = dword ptr -4
arg_0           = dword ptr  4
arg_4           = dword ptr  8

sub_417190        dd 417190h
sub_403270        dd 403270h
sub_403A40        dd 403A40h
sub_4451C0        dd 4451C0h
sub_4034F0        dd 4034F0h
sub_408CC0        dd 408CC0h

I attached AI_Generic in the txt file... To long to post here:p.


Attached Files
.txt   Generic AI.txt (Size: 155.64 KB / Downloads: 238)
[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:
#28
Updated~
Newest version [17/04/09]: http://www.mediafire.com/?wz4xmmzwtvw

Several things updated:
Generic AI (by Silva)
itr/effect 6 - Move the enemies to frame 150. State 150 immues to it.
itr/effect 7 - Hit the enemies without bringing them to the injured frame.
itr/effect 8 - Make the enemies fall immediately.
itr/effect 6xxx - Move the enemies to frame xxx (between 0 to 339). State 6xxx immues to it.
itr/effect 8xxx - Transform the enemies to ID xxx. State 80 immues to it. ID xxx immues to it.
itr/effect 1xxxyyyzzz - Move the enemies to frame xxx (between 0 to 339). Transform the enemies to ID yyy. Only enemies in state zzz will be affected by this effect. ID yyy immues to this effect. By putting 999 in xxx or yyy or zzz, the function of each part can separately be disabled. Putting 998 in zzz can affected only the enemies in state 11 and 16 (Dance of Pain).


Sorry I found that the 'Generic AI' was missed in the release of yesterday, but I am still updating the DLL framework today.
Newest version [18/04/09]: http://www.mediafire.com/?o2jzzmlfmgd

Update:
Add back the 'Generic AI'.
Add some immue states for the itr/effect 6, 7, 8 and 1xxxyyyzzz. Now state 150 and 156 immues to the itr/effect 6, state 157 immues to the itr/effect 7, state 158 immues to the itr/effect 8, and state 6xxx immues to the frame changing part in itr/effect 1xxxyyyzzz.
ID xxx would not immues to itr/effect 1xxxyyyzzz. (They will change frame number)
State 20 - Attacks only teammates. (Enemies freezed will still be attacked. )

Maybe these days I am updating the DLL framework so frequently, but start from now I will not update it for a few days.
Reply
Thanks given by:
#29
I think u can add a new kind of itr like itr k: 8 which affects only enemies and doesn't "teleport" to nearest person so when I hit someone then I go to dvx like in k:8 and if i miss then i go to next frame.
U could also make poison like jan's heal which decreases HP slowly, transforms on time and if HP>500 then HP=500.
Reply
Thanks given by:
#30
Just a small note, somewhere in your code you manged to mess up effect 30. I don't know exactly where since I just removed all your code and it started working again :p(discovered this when I was working on the Two Level LF2 mod thing).
[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:




Users browsing this thread: 1 Guest(s)