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

[EA] Dash Spell Type [Akash47 Short Warp Tutorial as a spell Type]


Elihu
 Share

Recommended Posts

**Hey everyone, this is my first tutorial and I'll be teaching you how to turn Akash47's Tutorial about how to turn warp skills into jumping skills into a brand new spell type called Dashing for Eclipse Advanced.**

**Original Topic here: [http://www.touchofdeathforums.com/community/index.php?/topic/132021-short-range-warpjump/](http://www.touchofdeathforums.com/community/index.php?/topic/132021-short-range-warpjump/)**

**All credits go to Akash47.**

**Server**

```

In modCombat, under this:

Public Sub CastSpell(ByVal Index As Long, ByVal spellslot As Long, ByVal target As Long, ByVal targetType As Byte)

Dim spellnum As Long

Dim MPCost As Long

Dim LevelReq As Long

Dim mapnum As Long

Dim Vital As Long

Dim DidCast As Boolean

Dim ClassReq As Long

Dim AccessReq As Long

Dim i As Long

Dim AoE As Long

Dim Range As Long

Dim VitalType As Byte

Dim increment As Boolean

Dim x As Long, y As Long

```

**Add**

```

Dim xt As Long

Dim yt As Long

```

**Then in the same Module, find this.**

```

Case SPELL_TYPE_WARP

SendAnimation mapNum, Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, index

SendEffect mapNum, Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)

PlayerWarp index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).y

SendAnimation GetPlayerMap(index), Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, index

SendEffect GetPlayerMap(index), Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)

DidCast = True

```

**Paste This Under It**

```

Case SPELL_TYPE_DASH

SendAnimation mapNum, Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, index

SendEffect mapNum, Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)

PlayerWarp index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).y

SendAnimation GetPlayerMap(index), Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, index

SendEffect GetPlayerMap(index), Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)

DidCast = True
```

**Now Under Spell_Type_ Dash's line of code called "PlayerWarp Index, Spell(spellNum).Map, Spell(spellNum).x, Spell(spellNum).y" Place this.**

```

'Code to warp short distances, using x as forward and y as backwards, while map is set to 0 (in warp spells).

If Spell(spellNum).Map = 0 Then

If Player(Index).Dir = 0 Then

xt = Player(Index).x

yt = Player(Index).y - (Spell(spellNum).x) + (Spell(spellNum).y)

If xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxX

If yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxY

If xt < 1 Then xt = 1

If yt < 1 Then yt = 1

If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

Else

If yt < Player(Index).y Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

yt = yt + 1

Loop

If yt < Player(Index).y Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

Else

If yt > Player(Index).y Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

yt = yt - 1

Loop

If yt > Player(Index).y Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

End If

End If

End If

End If

If Player(Index).Dir = 1 Then

xt = Player(Index).x

yt = Player(Index).y + (Spell(spellNum).x) - (Spell(spellNum).y)

If xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxX

If yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxY

If xt < 1 Then xt = 1

If yt < 1 Then yt = 1

If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

Else

If yt < Player(Index).y Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

yt = yt + 1

Loop

If yt < Player(Index).y Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

Else

If yt > Player(Index).y Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

yt = yt - 1

Loop

If yt > Player(Index).y Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

End If

End If

End If

End If

If Player(Index).Dir = 2 Then

xt = Player(Index).x - (Spell(spellNum).x) + (Spell(spellNum).y)

yt = Player(Index).y

If xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxX

If yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxY

If xt < 1 Then xt = 1

If yt < 1 Then yt = 1

If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

Else

If xt < Player(Index).x Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

xt = xt + 1

Loop

If xt < Player(Index).x Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

Else

If xt > Player(Index).x Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

xt = xt - 1

Loop

If xt > Player(Index).x Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

End If

End If

End If

End If

If Player(Index).Dir = 3 Then

xt = Player(Index).x + (Spell(spellNum).x) - (Spell(spellNum).y)

yt = Player(Index).y

If xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxX

If yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxY

If xt < 1 Then xt = 1

If yt < 1 Then yt = 1

If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

Else

If xt < Player(Index).x Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

xt = xt + 1

Loop

If xt < Player(Index).x Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

Else

If xt > Player(Index).x Then

Do Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE

xt = xt - 1

Loop

If xt > Player(Index).x Then

SetPlayerX Index, xt

SetPlayerY Index, yt

SendPlayerXYToMap Index

End If

End If

End If

End If

End If

End If
```

**In Mod Enumerations, Find Public Enum SpellType and under SPELL_TYPE_WARP add**

```
SPELL_TYPE_DASH
```

**DEV SUITE**

**In Mod Constants find**

```
Public Const SPELL_TYPE_WARP As Byte = 4
```

**And add under it**

```

Public Const SPELL_TYPE_DASH As Byte = 5

```

**In Public Sub DrawSpellDesc under Case SPELL_TYPE_WARP**

**sInfo(I) = "Warp", Add.**

```

Case SPELL_TYPE_DASH

sInfo(I) = "Dash"
```

**In frmEditor_Spell find the cmbType![](http://www.freemmorpgmaker.com/files/imagehost/pics/09430ccb5afbf7c93fe647a9f69eece3.jpg)**

**and look for List, click it then add Dash right under the word Warp.**

**![](http://www.freemmorpgmaker.com/files/imagehost/pics/183387df652976d81055c55b0b8bf1d8.jpg)**

**Client**

**In Mod Constants find**

```
Public Const SPELL_TYPE_WARP As Byte = 4
```

**And add under it**

```
Public Const SPELL_TYPE_DASH As Byte = 5
```

**In Public Sub DrawSpellDesc under Case SPELL_TYPE_WARP**

**sInfo(I) = "Warp", Add**

.```

Case SPELL_TYPE_DASH

sInfo(I) = "Dash"

```

**And Finished! It should work 100% Perfectly now. When you make a Dash spell, The X value will make you go forwards and the Y will make you go backwards. Enjoy dashing around your maps XD. If any problems you can ask me, I tested this and it 100% Works so I doubt you'll find errors but if you do, don't be afraid to ask me and i'll edit it.**
Link to comment
Share on other sites

> Ahm you just made an new Spell Type all other is the same… if i dont overlooked something...
>
> If yes... for what xD Warp is enough

I made a new spell type because some people might want it that way, might be better to separate them for less confusion. And come to think about it, I don't think people knew it worked with EA.
Link to comment
Share on other sites

  • 1 year later...
  • 2 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...