Wortel Angels Posted January 19, 2013 Author Share Posted January 19, 2013 I posted [here](http://www.touchofdeathforums.com/community/index.php?/topic/131391-linear-spell/) an Linear spell system :-)Now i made an tutorial for an friend how to do it and decided to share it with allFirst add this :[Linear](http://www.mmorpgbr.com/t11758-tutorialspell-linear-100-funcional)Then **Client Side**SpellEditor![](http://www10.pic-upload.de/19.01.13/cnf8fhfvfq6k.png)Search```Private Sub scrlAnim_Change()```And replace that sub with```Private Sub scrlAnim_Change()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerIf Not cmbType.text = "Linear" ThenIf scrlAnim.Value > 0 Then lblAnim.Caption = "Animation: " & Trim$(Animation(scrlAnim.Value).Name)Else lblAnim.Caption = "Animation: None"End IfElse If scrlAnim.Value > 0 Then lblAnim.Caption = "Up Animation: " & Trim$(Animation(scrlAnim.Value).Name)Else lblAnim.Caption = "Up Animation: None"End IfEnd IfSpell(EditorIndex).SpellAnim = scrlAnim.Value' Error handlerExit Suberrorhandler:HandleError "scrlAnim_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```Then add at bottom```Private Sub scrlAnimDown_Change()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerIf scrlAnim.Value > 0 Then lblAnimDown.Caption = "Down Animation: " & Trim$(Animation(scrlAnimDown.Value).Name)Else lblAnimDown.Caption = "Down Animation: None"End IfSpell(EditorIndex).SpellAnimDown = scrlAnimDown.Value' Error handlerExit Suberrorhandler:HandleError "scrlAnimDown_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPrivate Sub scrlAnimLeft_Change()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerIf scrlAnimLeft.Value > 0 Then lblAnimLeft.Caption = "Left Animation: " & Trim$(Animation(scrlAnimLeft.Value).Name)Else lblAnimLeft.Caption = "Animation: None"End IfSpell(EditorIndex).SpellAnimLeft = scrlAnimLeft.Value' Error handlerExit Suberrorhandler:HandleError "scrlAnimLeft_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd SubPrivate Sub scrlAnimRight_Change()' If debug mode, handle error then exit outIf Options.Debug = 1 Then On Error GoTo errorhandlerIf scrlAnimRight.Value > 0 Then lblAnimRight.Caption = "Right Animation: " & Trim$(Animation(scrlAnimRight.Value).Name)Else lblAnimRight.Caption = "Right Animation: None"End IfSpell(EditorIndex).SpellAnimRight = scrlAnimRight.Value' Error handlerExit Suberrorhandler:HandleError "scrlAnimRight_Change", "frmEditor_Spell", Err.Number, Err.Description, Err.Source, Err.HelpContextErr.ClearExit SubEnd Sub```Then at```Private Type SpellRec```add under```SpellAnim As Long```that```SpellAnimRight As LongSpellAnimDown As LongSpellAnimLeft As Long```**Server Side**At```Private Type SpellRec```add under```SpellAnim As Long```that```SpellAnimRight As LongSpellAnimDown As LongSpellAnimLeft As Long```Now search```Function IsUseLinear(ByVal index As Integer, ByVal SpellNum As Integer, ByVal Mapa As Integer, ByVal x As Byte, ByVal y As Byte)```and replace it by```Function IsUseLinear(ByVal index As Integer, ByVal SpellNum As Integer, ByVal Mapa As Integer, ByVal x As Byte, ByVal y As Byte) Dim i As Long Select Case GetPlayerDir(index) Case DIR_UP SendAnimation Mapa, Spell(SpellNum).SpellAnim, x, y Case DIR_RIGHT SendAnimation Mapa, Spell(SpellNum).SpellAnimRight, x, y Case DIR_DOWN SendAnimation Mapa, Spell(SpellNum).SpellAnimDown, x, y Case DIR_LEFT SendAnimation Mapa, Spell(SpellNum).SpellAnimLeft, x, y End Select 'Loop Global Npc For i = 1 To MAX_MAP_NPCS If MapNpc(Mapa).Npc(i).Num > 0 And MapNpc(Mapa).Npc(i).x = x And MapNpc(Mapa).Npc(i).y = y And MapNpc(Mapa).Npc(i).Vital(HP) > 0 Then PlayerAttackNpc index, i, Spell(SpellNum).Vital, SpellNum Next 'Loop Global Player For i = 1 To Player_HighIndex If GetPlayerMap(i) = Mapa And GetPlayerX(i) = x And GetPlayerY(i) = y Then PlayerAttackPlayer index, i, Spell(SpellNum).Vital, SpellNum NextEnd Function```**Finish**I hope i dont forgot something :-) but i think it should workCreditsBlizzardMe Link to comment Share on other sites More sharing options...
abhi2011 Posted January 20, 2013 Share Posted January 20, 2013 What does Linear Spells mean? Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 20, 2013 Author Share Posted January 20, 2013 That the spell is linear in 1 direction and drawed on every tile no target needed ;-)You can download at the first link an version with this included Link to comment Share on other sites More sharing options...
Fuyuumi Posted January 22, 2013 Share Posted January 22, 2013 > That the spell is linear in 1 direction and drawed on every tile no target needed ;-)> > You can download at the first link an version with this includedSo basically I can shoot fireballs from inside the city and hit mobs outside?Will the spell stop on things like buildings?The range of the spell shows how far my fireball can go? Link to comment Share on other sites More sharing options...
Wortel Angels Posted January 22, 2013 Author Share Posted January 22, 2013 there is an try version download it and youll see it ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/wink.png) 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