Qazek Posted July 22, 2010 Author Share Posted July 22, 2010 Tested, working 100%CLIENT SIDEOpen Spell Editor and add:label:name - lblSpritecaption - Transformation sprite:scroll bar:name - scrlSpriteAdd to your scrollbar:``` lblSprite.Caption = "Transformation sprite: " & scrlSprite.Value Spell(EditorIndex).Sprite = scrlSprite.Value```Go to modGameEditors, find sub:SpellEditorInitIn this sub find:``` .scrlStun.Value = Spell(EditorIndex).StunDuration```Add:``` .scrlSprite.Value = Spell(EditorIndex).Sprite```Go to modTypes, find:```Private Type SpellRec```Add to this type:``` Sprite As Long```SERVER SIDEGo to modTypes, find:```Private Type SpellRec```Add to this type:``` Sprite As Long```In modPlayer in Sub CastSpell find:``` Case 0 ' self-cast target Select Case Spell(spellnum).Type Case SPELL_TYPE_HEALHP SpellPlayer_Effect Vitals.HP, True, Index, Vital, spellnum DidCast = True Case SPELL_TYPE_HEALMP SpellPlayer_Effect Vitals.MP, True, Index, Vital, spellnum DidCast = True Case SPELL_TYPE_WARP SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index PlayerWarp Index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).y SendAnimation GetPlayerMap(Index), Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index DidCast = True End Select```Change for this:``` Case 0 ' self-cast target Select Case Spell(spellnum).Type Case SPELL_TYPE_HEALHP SpellPlayer_Effect Vitals.HP, True, Index, Vital, spellnum If Spell(spellnum).Sprite > 0 Then SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index SetPlayerSprite Index, Spell(spellnum).Sprite Call SendPlayerData(Index) End If DidCast = True Case SPELL_TYPE_HEALMP SpellPlayer_Effect Vitals.MP, True, Index, Vital, spellnum If Spell(spellnum).Sprite > 0 Then SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index SetPlayerSprite Index, Spell(spellnum).Sprite Call SendPlayerData(Index) End If DidCast = True Case SPELL_TYPE_WARP SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index PlayerWarp Index, Spell(spellnum).Map, Spell(spellnum).x, Spell(spellnum).y SendAnimation GetPlayerMap(Index), Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index DidCast = True End Select```It is all! Now when you use addhp and addmp spell and if you set sprite in spell editor > than 0 your sprite change to this what is in spell editor ;) Link to comment Share on other sites More sharing options...
Zetasis Posted July 22, 2010 Share Posted July 22, 2010 :icon_surprised:I've been wanting this for so long now! Hopefully I can get it to work. Doesn't look to hard so I will try and if I get any bugs I'll let ya know. Link to comment Share on other sites More sharing options...
Kiliage Posted August 11, 2010 Share Posted August 11, 2010 When im Compiling server,i getCompile Error:Case witchout Select Case.i did all what u said :/Pls help :| Link to comment Share on other sites More sharing options...
Sir Cid Posted August 27, 2010 Share Posted August 27, 2010 Although I appreciate this tutorial, could anybody tell me what fuction it has, other than the use with buffs or showoff appearances? Sorry, I'm just unsure as to add this code to my EO source, if there's no purpose. :azn: Link to comment Share on other sites More sharing options...
DarkSpine Posted August 27, 2010 Share Posted August 27, 2010 You could edit it to work as a completely different spell, and have classes transform and get buffs from it, really it could be used for lots of things, as can any code. You could turn it into a system where you transform into an animal and move faster, etc.~Urame Link to comment Share on other sites More sharing options...
augusto666 Posted July 23, 2011 Share Posted July 23, 2011 I'm not able to make this transformation spell (don't know why) … Can someone pass me a ready engine with this system? Thanks! Link to comment Share on other sites More sharing options...
Reflow Posted July 24, 2011 Share Posted July 24, 2011 this code works great but i see one problem. well not really a problem, once u use the spell you do not return back to your original sprite Link to comment Share on other sites More sharing options...
tsuki Posted July 24, 2011 Share Posted July 24, 2011 @Reflow:> this code works great but i see one problem. well not really a problem, once u use the spell you do not return back to your original spritecreate a way to save the player's sprite number and a counter. Link to comment Share on other sites More sharing options...
Domino_ Posted July 24, 2011 Share Posted July 24, 2011 I suggest you to add something like buff to stats if you transform to bear you will be stronger in attacks and more defense but slower. ;) Link to comment Share on other sites More sharing options...
ChrisWR Posted August 13, 2011 Share Posted August 13, 2011 I cant find the Sub CastSpell anywhere , its in the server side right? Link to comment Share on other sites More sharing options...
erkro1 Posted August 13, 2011 Share Posted August 13, 2011 @ChrisWR:> I cant find the Sub CastSpell anywhere , its in the server side right?Server side -> modCombatIts under Sub BufferSpell Link to comment Share on other sites More sharing options...
ChrisWR Posted August 13, 2011 Share Posted August 13, 2011 Thnx erwin , found the code compiled the server file but im having trouble with the client side.If frmEditor_Conv.Visible = False Then Exit SubCompile Error Variable not DefinedDid i mess up on the label and scrollbar?Nevermind , this is for the conversation system i believe , ill post the question there if i cant figure it out. XD Link to comment Share on other sites More sharing options...
Justn Posted August 13, 2011 Share Posted August 13, 2011 ~~that has nothing to do with this tutorial… are u using EO or CS:DE?~~ just saw ur edit =p Link to comment Share on other sites More sharing options...
ulqui17 Posted October 10, 2011 Share Posted October 10, 2011 There's no place to return to normal sprite, such as transformation.exSprite = 3after the term is again the sprite class Link to comment Share on other sites More sharing options...
Taegan Posted October 14, 2011 Share Posted October 14, 2011 I finished client side, and as I was compiling ".scrlSprite" got highlighted and I got an error. "Compile error: method or data member not found". I looked around and can't seem to realize why it wouldn't recognize the variable. Thoughts? Link to comment Share on other sites More sharing options...
Athagekin Posted October 14, 2011 Share Posted October 14, 2011 Did you add the scrlSprite scrollbar to the spell editor? Link to comment Share on other sites More sharing options...
Taegan Posted October 14, 2011 Share Posted October 14, 2011 Yup. Yes, I did. Link to comment Share on other sites More sharing options...
Taegan Posted October 16, 2011 Share Posted October 16, 2011 @Qazek:> In modPlayer in Sub CastSpell find:^Unrelated to my previous problem, it's modCombat and not modPlayer. Anyway, I got it. Nice edit, thanks. :3 Link to comment Share on other sites More sharing options...
Whitepinkbun Posted January 18, 2012 Share Posted January 18, 2012 Client SideGo to PlayerRec and find Sprite As Longadd below it Spriteold As LongServer SideGo to PlayerRec and find Sprite As Longadd below it Spriteold As LongGo to Sub JoinGame Place SetPlayerSpriteOld index, Player(index).Spriteafter Call SendHotbar(index)Search forSub SetPlayerSprite(ByVal index As Long, ByVal Sprite As Long)after that sub pasteSub SetPlayerSpriteOld(ByVal index As Long, ByVal Sprite As Long) Player(index).Spriteold = SpriteEnd Subreplace all the If Spell(spellnum).Sprite > 0 Then SendAnimation MapNum, Spell(spellnum).SpellAnim, 0, 0, TARGET_TYPE_PLAYER, Index SetPlayerSprite Index, Spell(spellnum).Sprite Call SendPlayerData(Index) End Ifwith If Spell(spellNum).Sprite > 0 Then If Player(index).Sprite = Player(index).Spriteold Then SetPlayerSpriteOld index, Player(index).Sprite SetPlayerSprite index, Spell(spellNum).Sprite Call SendPlayerData(index) Else SetPlayerSprite index, Player(index).Spriteold Call SendPlayerData(index) End If End IfNow when you cast the spell the second time it'll return you to your previous sprite.Works for me let me know if it works for you guys… might not being as I have Transform set as a different spell type. Link to comment Share on other sites More sharing options...
Whitepinkbun Posted January 18, 2012 Share Posted January 18, 2012 PlaceSetPlayerSprite index, Player(index).Spriteold Before' Check if player was the only player on the map and stop npc processing if soSo it sets your sprite back to what it was when you logged in, when you log out.Only problem I can think of is multiple transformations will mess with it. xDEdit: never mind its easy enough to fix have it so you change back to normal sprite before changing to next one and so it records your normal sprite before you transform - and as far as i know it now works. :) Link to comment Share on other sites More sharing options...
or3o Posted May 2, 2012 Share Posted May 2, 2012 If anyone has added the buff debuff spells and wants to use the timer to change back i figured it out!All serversidein mod player at the bottom add```Public Sub transback(ByVal index As Long) SetPlayerSprite (index), Player(index).SpriteOld Call SendPlayerData(index)End Sub```then go to mod serverloopfind ```If TempPlayer(i).BuffTimer(x) > 0 Then TempPlayer(i).BuffTimer(x) = TempPlayer(i).BuffTimer(x) - 1 If TempPlayer(i).BuffTimer(x) = 0 Then ```and paste this right after``` Call transback(i) ``` Link to comment Share on other sites More sharing options...
Justn Posted May 2, 2012 Share Posted May 2, 2012 So u have to add the stuff whitepinkbun posted too? Link to comment Share on other sites More sharing options...
erkro1 Posted May 2, 2012 Share Posted May 2, 2012 @or3o:> If anyone has added the buff debuff spells and wants to use the timer to change back i figured it out!> All serverside> in mod player at the bottom add> ```> Public Sub transback(ByVal index As Long)> SetPlayerSprite (index), Player(index).SpriteOld> Call SendPlayerData(index)> End Sub> > ```> then go to mod serverloop> find ```> If TempPlayer(i).BuffTimer(x) > 0 Then> TempPlayer(i).BuffTimer(x) = TempPlayer(i).BuffTimer(x) - 1> If TempPlayer(i).BuffTimer(x) = 0 Then > ```> and paste this right after> ```> Call transback(i) > ```Why make a whole sub for that? Link to comment Share on other sites More sharing options...
or3o Posted May 2, 2012 Share Posted May 2, 2012 yes you have to add the stuff Whitepinkbun posted also. and sorry i wasnt exactly sure how else to go about this so i made another sub :/ if you know a more efficient way please feel free to tell me. im still a noob Link to comment Share on other sites More sharing options...
erkro1 Posted May 2, 2012 Share Posted May 2, 2012 Its useless to make a whole sub if you only use code one time.Just do it like this:> then go to mod serverloop> find> ```> If TempPlayer(i).BuffTimer(x) > 0 Then> TempPlayer(i).BuffTimer(x) = TempPlayer(i).BuffTimer(x) - 1> If TempPlayer(i).BuffTimer(x) = 0 Then> ```> > and paste this right after> ```> SetPlayerSprite (index), Player(index).SpriteOld> Call SendPlayerData(index)> ``` 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