Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Copy Sprite (No time and not back to normal)


iHero
 Share

Recommended Posts

**Client~Side

In frmEditor_Spel create a chekbox with the settings:**

> **Name: chkCSprite
> Caption: Copy Sprite**

**And add this in it:** ```
    If chkCSprite.Value = 0 Then
        Spell(EditorIndex).CSprite = False
    Else
        Spell(EditorIndex).CSprite = True
    End If
``` **In Type Spellrec add at the end:** ```
CSprite as Boolean
``` **Find:** ```
        If Spell(EditorIndex).IsAoE Then
            .chkAOE.Value = 1
        Else
            .chkAOE.Value = 0
        End If
``` **Add below:** ```
        If Spell(EditorIndex).CSprite Then
            .chkCSprite.Value = 1
        Else
            .chkCSprite.Value = 0
        End If
``` **Serve~side

In Type Spellrec add at the end** ```
CSprite as Boolean
``` **Find:** ```
Public Sub CastSpell(ByVal Index As Long, ByVal spellslot As Long, ByVal target As Long, ByVal targetType As Byte)
``` **Below:** ```
    Dim SpellCastType As Long
``` **Add:** ```
    Dim NpcTarget As String, PlayerTarget As String
``` **Find:** ```
    ' find out what kind of spell it is! self cast, target or AOE
``` **Add up:** ```
    ' Copy Sprite
    If Spell(spellnum).CSprite = True Then
        If targetType = TARGET_TYPE_PLAYER Then
            Call SetPlayerSprite(Index, Player(TempPlayer(Index).target).Sprite)
            Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
            Exit Sub
        ElseIf targetType = TARGET_TYPE_NPC Then
            Call SetPlayerSprite(Index, NPC(TempPlayer(Index).target).Sprite)
            Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
            Exit Sub
        End If
    End If
``` **Credits:

iHero**
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...