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

[EO] Transformation spell


iHero
 Share

Recommended Posts

**Client~Side**

In frmEditor_Spell cmbTyppe add to the end of the list

> Trans

Now create a frame with the following settings:

> Name: fraTrans
> Caption: Transformation
> Visible: False

And inside a scrollbox and create a label with the settings:

> Label
>
> Name: lblTrans
> Caption: Sprite Transformation: None
>
> ScrollBox
>
> Name: scrlTrans

And within the scrlTrans add:

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

    lblTrans.Caption = "Sprite da Transformação: " & scrlTrans.Value
    Spell(EditorIndex).trans = scrlTrans.Value

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "scrlTrans_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
```
In 2 clicks in cmbType and add this inside:

```
    If cmbType.ListIndex = SPELL_TYPE_TRANFORMATION Then
        scrlRange.Value = 0
        chkAOE.Value = 1
        fraTrans.Visible = True
    End If
```
Look for:

```
        .scrlRange.Value = Spell(EditorIndex).Range
```
Add bellow:

```
        .scrlTrans.Value = Spell(EditorIndex).Trans
```
At the end of Private Type End Type SpellRec before add:

```
    Trans As Long
```
Look for:

```
Public Const SPELL_TYPE_WARP As Byte = 4
```
Add below:

```
Public Const SPELL_TYPE_TRANFORMATION As Byte = 5
```
**Serve~Side**

At the end of Private Type End Type SpellRec before add:

```
    Trans As Long
```
Look for:

```
Public Const SPELL_TYPE_WARP As Byte = 4
```
Add below:

```
Public Const SPELL_TYPE_TRANFORMATION As Byte = 5
```
Look for:

```
    ' find out what kind of spell it is! self cast, target or AOE
```
Add up:

```
    ' Transformation
    With Spell(SpellNum)
        If .Type = SPELL_TYPE_TRANFORMATION Then
            Call SetPlayerSprite(Index, Spell(Index).Trans)
            Call SetPlayerStat(Index, Stats.Strength, GetPlayerRawStat(Index, Stats.Strength) * 2)
            Call SetPlayerStat(Index, Stats.Endurance, GetPlayerRawStat(Index, Stats.Endurance) * 2)
            Call PlayerWarp(Index, GetPlayerMap(Index), GetPlayerX(Index), GetPlayerY(Index))
        End If
    End With
```
Credits:

iHero
Link to comment
Share on other sites

  • 7 months later...
  • 3 months later...

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...