Get paperdoll in Rasbek source

This post is deleted!
This post is deleted!
This post is deleted!

what do u mean with auras?

This post is deleted!

Want to take some screenshots of what you’re talking about? I’m not sure about everyone else, but I can picture what you’re saying

This post is deleted!

you could coppy the code from renewel 😄

This post is deleted!

you mean how to use inside the editors?

This post is deleted!
This post is deleted!

Are you asking how to preview the paperdoll in the editor? You just have to increase the size of the picbox, then find where in the code the image is given and add some for the weapon, armor, helmet, and shield (just make sure to use the tex_paperdoll and set the scrlbar max to NumPaperdoll)

This post is deleted!

Go to the DrawPaperdoll sub and you should see a “/ 6”, change it to “/ 8” (it is actually “/ 3 / 2” but that = “/ 6” to find the middle of the texture). This will give you 4 rows instead of 3, but only 3 of those rows will ever be used. This will only make the paperdolls compatible, but not used.

Once you finish that, find the Call DrawPaperdoll and see where it has Anim in that line and change it to (Anim + 1). This way that DrawPaperdoll sub draws the correct column of the paperdoll

This post is deleted!

Find Public Sub EditorItem_DrawPaperdoll() and replace that sub with

! ```
Public Sub EditorItem_DrawPaperdoll()
Dim Sprite As Long, srcRect As D3DRECT, destRect As D3DRECT
Dim sRECT As RECT
Dim dRect As RECT

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo ErrorHandler

! 'frmEditor_Item.picPaperdoll.Cls
If frmEditor_Item.cmbType.ListIndex = ITEM_TYPE_AURA Then
Sprite = frmEditor_Item.scrlPaperdoll.Value

    If Sprite < 1 Or Sprite > NumAuras Then
        frmEditor_Item.picPaperdoll.Cls
        Exit Sub
    End If

    ' rect for source
    sRECT.Top = 0
    sRECT.Bottom = Tex_Aura(Sprite).height
    sRECT.Left = 0
    sRECT.Right = Tex_Aura(Sprite).width
    ' same for destination as source
    dRect = sRECT

    Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 0), 1#, 0
    Direct3D_Device.BeginScene
    RenderTextureByRects Tex_Aura(Sprite), sRECT, dRect, D3DColorARGB(255 - frmEditor_Item.scrlA, 255 - frmEditor_Item.ScrlR, 255 - frmEditor_Item.ScrlG, 255 - frmEditor_Item.ScrlB)

    With destRect
        .x1 = 0
        .x2 = Tex_Aura(Sprite).width
        .y1 = 0
        .y2 = Tex_Aura(Sprite).height
    End With
Else
    Sprite = frmEditor_Item.scrlPaperdoll.Value

    If Sprite < 1 Or Sprite > NumPaperdolls Then
        frmEditor_Item.picPaperdoll.Cls
        Exit Sub
    End If

    ' rect for source
    sRECT.Top = 0
    sRECT.Bottom = Tex_Paperdoll(Sprite).height
    sRECT.Left = 0
    sRECT.Right = Tex_Paperdoll(Sprite).width
    ' same for destination as source
    dRect = sRECT

    Direct3D_Device.Clear 0, ByVal 0, D3DCLEAR_TARGET, D3DColorRGBA(0, 0, 0, 0), 1#, 0
    Direct3D_Device.BeginScene
    RenderTextureByRects Tex_Paperdoll(Sprite), sRECT, dRect, D3DColorARGB(255 - frmEditor_Item.scrlA, 255 - frmEditor_Item.ScrlR, 255 - frmEditor_Item.ScrlG, 255 - frmEditor_Item.ScrlB)

    With destRect
        .x1 = 0
        .x2 = Tex_Paperdoll(Sprite).width
        .y1 = 0
        .y2 = Tex_Paperdoll(Sprite).height
    End With
End If

Direct3D_Device.EndScene
Direct3D_Device.Present destRect, destRect, frmEditor_Item.picPaperdoll.hWnd, ByVal (0)

' Error handler
Exit Sub

ErrorHandler:
HandleError “EditorItem_DrawPaperdoll”, “modGraphics”, Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

! ```

For good measure, replace Private Sub scrlPaperdoll_Change() with

! ```
Private Sub scrlPaperdoll_Change()
’ If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo ErrorHandler

If cmbType.ListIndex = ITEM_TYPE_AURA Then
    scrlPaperdoll.max = NumAuras
Else
    scrlPaperdoll.max = NumPaperdolls
End If

If EditorIndex = 0 Or EditorIndex > MAX_ITEMS Then Exit Sub
lblPaperdoll.Caption = "Aura: " & scrlPaperdoll.Value
Item(EditorIndex).Paperdoll = scrlPaperdoll.Value

' Error handler
Exit Sub

ErrorHandler:
HandleError “scrlPaperdoll_Change”, “frmEditor_Item”, Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub

This post is deleted!

Change the DrawPlayer Sub to

! ```
Public Sub DrawPlayer(ByVal Index As Long)
Dim Anim As Byte, I As Long, X As Long, y As Long
Dim Sprite As Long, spritetop As Long
Dim Rec As RECT, Rec_Pos As RECT
Dim attackspeed As Long, slashon As Boolean

' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo ErrorHandler

! Sprite = GetPlayerSprite(Index)
! If Sprite < 1 Or Sprite > NumCharacters Then Exit Sub
! ’ speed from weapon
If GetPlayerEquipment(Index, Weapon) > 0 Then
attackspeed = Item(GetPlayerEquipment(Index, Weapon)).speed
Else
attackspeed = 1000
End If

If Not isAnimated(GetPlayerSprite(Index)) Then
    ' Reset frame
    Anim = 0

    ' Check for attacking animation
    If TempPlayer(Index).AttackTimer + (attackspeed / 2) > GetTickCount Then
        If TempPlayer(Index).Attacking = 1 Then
            slashon = True
            Anim = 1
        End If
    Else
        ' If not attacking, walk normally
        Select Case GetPlayerDir(Index)
            Case DIR_UP
                If (TempPlayer(Index).yOffset > 8) Then Anim = TempPlayer(Index).Step + 1
            Case DIR_DOWN
                If (TempPlayer(Index).yOffset < -8) Then Anim = TempPlayer(Index).Step + 1
            Case DIR_LEFT
                If (TempPlayer(Index).xOffset > 8) Then Anim = TempPlayer(Index).Step + 1
            Case DIR_RIGHT
                If (TempPlayer(Index).xOffset < -8) Then Anim = TempPlayer(Index).Step + 1
        End Select
    End If
Else
    If TempPlayer(Index).AttackTimer + (attackspeed / 2) > GetTickCount Then
        If TempPlayer(Index).Attacking = 1 Then
            slashon = True
        End If
    End If

    If TempPlayer(Index).AnimTimer + 100 <= GetTickCount Then
        TempPlayer(Index).Anim = TempPlayer(Index).Anim + 1
        If TempPlayer(Index).Anim >= 3 Then TempPlayer(Index).Anim = 0
        TempPlayer(Index).AnimTimer = GetTickCount
    End If
    Anim = TempPlayer(Index).Anim
End If

! ’ Check to see if we want to stop making him attack
With TempPlayer(Index)
If .AttackTimer + attackspeed < GetTickCount Then
.Attacking = 0
.AttackTimer = 0
End If
End With
! ’ Set the left
Select Case GetPlayerDir(Index)
Case DIR_UP
spritetop = 3
Case DIR_RIGHT
spritetop = 2
Case DIR_DOWN
spritetop = 0
Case DIR_LEFT
spritetop = 1
End Select
! With Rec
.Top = spritetop * (Tex_Character(Sprite).height / 4)
.Bottom = .Top + (Tex_Character(Sprite).height / 4)
.Left = Anim * (Tex_Character(Sprite).width / 4)
.Right = .Left + (Tex_Character(Sprite).width / 4)
End With
! ’ Calculate the X
X = GetPlayerX(Index) * PIC_X + TempPlayer(Index).xOffset - ((Tex_Character(Sprite).width / 3 - 32) / 2)
! ’ Is the player’s height more than 32…?
If (Tex_Character(Sprite).height) > 32 Then
’ Create a 32 pixel offset for larger sprites
y = GetPlayerY(Index) * PIC_Y + TempPlayer(Index).yOffset - ((Tex_Character(Sprite).height / 4) - 32)
Else
’ Proceed as normal
y = GetPlayerY(Index) * PIC_Y + TempPlayer(Index).yOffset
End If

' render player shadow
Call DrawShadow(Sprite, X, y + 5)

' render the actual sprite
If GetTickCount > TempPlayer(Index).StartFlash Then
    Call DrawSprite(Sprite, X, y, Rec)
    TempPlayer(Index).StartFlash = 0
Else
    Call DrawSprite(Sprite, X, y, Rec, , , , , True)
End If

If Item(GetPlayerEquipment(Index, Shield)).Type = ITEM_TYPE_AURA Then Call DrawPlayerAccessories(Index, Shield, X, y, Sprite, Rec, Anim, spritetop)
Call DrawPlayerAccessories(Index, Armor, X, y, Sprite, Rec, Anim, spritetop)
Call DrawPlayerAccessories(Index, Helmet, X, y, Sprite, Rec, Anim, spritetop)
If Item(GetPlayerEquipment(Index, Shield)).Type = ITEM_TYPE_Shield Then Call DrawPlayerAccessories(Index, Shield, X, y, Sprite, Rec, Anim, spritetop)
Call DrawPlayerAccessories(Index, Weapon, X, y, Sprite, Rec, Anim, spritetop)

! If slashon Then Call DrawSlash(X, y, Index)

' Error handler
Exit Sub

ErrorHandler:
HandleError “DrawPlayer”, “modGraphics”, Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub


You're basically just changing the 3 values to 4s (starting at 0 and going to 2 is a 3 value) So where you put the Anim + 1 earlier, you want to change to just Anim
This post is deleted!
Log in to reply