Elihu Posted February 22, 2013 Author Share Posted February 22, 2013 **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 LongDim MPCost As LongDim LevelReq As LongDim mapnum As LongDim Vital As LongDim DidCast As BooleanDim ClassReq As LongDim AccessReq As LongDim i As LongDim AoE As LongDim Range As LongDim VitalType As ByteDim increment As BooleanDim x As Long, y As Long```**Add**```Dim xt As LongDim yt As Long```**Then in the same Module, find this.**```Case SPELL_TYPE_WARPSendAnimation mapNum, Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, indexSendEffect mapNum, Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)PlayerWarp index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).ySendAnimation GetPlayerMap(index), Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, indexSendEffect GetPlayerMap(index), Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)DidCast = True```**Paste This Under It**```Case SPELL_TYPE_DASHSendAnimation mapNum, Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, indexSendEffect mapNum, Spell(spellnum).Effect, GetPlayerX(index), GetPlayerY(index)PlayerWarp index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).ySendAnimation GetPlayerMap(index), Spell(spellnum).SpellAnim, GetPlayerX(index), GetPlayerY(index), TARGET_TYPE_PLAYER, indexSendEffect 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 ThenIf Player(Index).Dir = 0 Thenxt = Player(Index).xyt = Player(Index).y - (Spell(spellNum).x) + (Spell(spellNum).y)If xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxXIf yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxYIf xt < 1 Then xt = 1If yt < 1 Then yt = 1If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexElseIf yt < Player(Index).y ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLEyt = yt + 1LoopIf yt < Player(Index).y ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfElseIf yt > Player(Index).y ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLEyt = yt - 1LoopIf yt > Player(Index).y ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfEnd IfEnd IfEnd IfEnd IfIf Player(Index).Dir = 1 Thenxt = Player(Index).xyt = Player(Index).y + (Spell(spellNum).x) - (Spell(spellNum).y)If xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxXIf yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxYIf xt < 1 Then xt = 1If yt < 1 Then yt = 1If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexElseIf yt < Player(Index).y ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLEyt = yt + 1LoopIf yt < Player(Index).y ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfElseIf yt > Player(Index).y ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLEyt = yt - 1LoopIf yt > Player(Index).y ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfEnd IfEnd IfEnd IfEnd IfIf Player(Index).Dir = 2 Thenxt = Player(Index).x - (Spell(spellNum).x) + (Spell(spellNum).y)yt = Player(Index).yIf xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxXIf yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxYIf xt < 1 Then xt = 1If yt < 1 Then yt = 1If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexElseIf xt < Player(Index).x ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLExt = xt + 1LoopIf xt < Player(Index).x ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfElseIf xt > Player(Index).x ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLExt = xt - 1LoopIf xt > Player(Index).x ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfEnd IfEnd IfEnd IfEnd IfIf Player(Index).Dir = 3 Thenxt = Player(Index).x + (Spell(spellNum).x) - (Spell(spellNum).y)yt = Player(Index).yIf xt > Map(mapnum).MaxX Then xt = Map(mapnum).MaxXIf yt > Map(mapnum).MaxY Then yt = Map(mapnum).MaxYIf xt < 1 Then xt = 1If yt < 1 Then yt = 1If Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLE ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexElseIf xt < Player(Index).x ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLExt = xt + 1LoopIf xt < Player(Index).x ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfElseIf xt > Player(Index).x ThenDo Until Map(mapnum).Tile(xt, yt).Type = TILE_TYPE_WALKABLExt = xt - 1LoopIf xt > Player(Index).x ThenSetPlayerX Index, xtSetPlayerY Index, ytSendPlayerXYToMap IndexEnd IfEnd IfEnd IfEnd IfEnd IfEnd 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_DASHsInfo(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_DASHsInfo(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 More sharing options...
Wortel Angels Posted February 22, 2013 Share Posted February 22, 2013 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 Link to comment Share on other sites More sharing options...
Elihu Posted February 22, 2013 Author Share Posted February 22, 2013 > 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 enoughI 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 More sharing options...
SpiceyWolf Posted March 31, 2014 Share Posted March 31, 2014 Great fix. Personally I was going to add that shortjump as a request by a friend to my engines release but i was going to go more along the line of when map# = 0 then it would change a label name to dash and make x and y renamed forward and backward xD Link to comment Share on other sites More sharing options...
Kairos Posted June 26, 2014 Share Posted June 26, 2014 Great! =DAny chance of this work on EO 2.0? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now