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

Gohan

Members
  • Posts

    699
  • Joined

  • Last visited

    Never

Everything posted by Gohan

  1. Could anybody tell me what command I can use to see if a file is already in use. If it matters, I'm trying to make the server check if a .bat file is running before opening it. Thanks :)
  2. Gohan

    EE,ES or EO ;)

    I get the feeling Robin is gonna have a fit when he sees this…
  3. @Fuu: > Because Americans are **stupid**. I'm sure you've said it yourself plenty of times. While I am insulted I find myself agreeing. The world has a lot of stupid people but most of them seem to be over here in USA.
  4. I may be misinformed on the games being shut down, I had never really looked into that. I think you should take another look at everything they have done since they're first game. A great company would not alter a dungeon so that every douche on the server can come kill low levels who are trying to do quests even if they are not in PK mode. A great company wouldn't implement pay-to-win to an extent that the game is reduced to idiot levels. A great company would listen to it's customers. A great company would fix bugs instead of leaving a ton of the ones that seriously impede gameplay unfixed for years. If you truly know the people who started that company, which I doubt I think your just bullshitting, you are not exactly an unbiased party.
  5. I had a job but I quit thinking I'd get money from this thread. DX
  6. Gohan

    VB6 Search Feature

    For some reason the search function in VB6 doesn't work at all. I could live without it but it would make it so much easier if I could make it work. It doesn't error or anything, as soon as I press Find the search window closes, that's it. Any ideas? :confused:
  7. I played it for awhile. It's a good game at first but the way it's run you'd think the whole company is on drugs. In fact I'm 100% convinced the whole company is on drugs, the really ducked up kind of drugs. I played for a whole year and watched while that company drove itself into the ground, in fact they recently were forced to close down 2 of their newer, "successful" games. PWE should be applauded for the best character creator I've ever seen. After that, I want to punch them for every extremely stupid decision they've made since the game's launch, and they'd drift into a coma long before I'm done.
  8. Gohan

    VB6 Help X_X

    Nope, that didn't help at all :/ EDIT: While this site was down I was doing random crap until it eventually fixed itself. No idea what happened here :confused:
  9. Gohan

    VB6 Help X_X

    I ran a backup to before I had vb6 installed, and when I go to reinstall it I have no problems, followed every step in Robins tut to the letter. I load up my project, get no errors, but when I try to compile, even if I changed absolutely nothing I get a compile error. It highlights ``` frmMain.Socket.RemoteHost = Options.IP ``` And says "Method or data member not found" EDIT: And when opening the server project it says error accessing the system registry.
  10. I'm obviously still learning, I just wanted to share something I had done. As soon as I know a better way to do this I'll update the thread, but right now I don't so that's why in God's name I have separate packets and duplicated stuff.
  11. Gohan

    Recentering Sprite?

    @Patrick0809: > CS:DE is the EO with directx8 and big other features ;-D In other words its too complicated for my current skill level xD Think I'll to EO for now.
  12. Gohan

    Recentering Sprite?

    Here it is, EO. What the crap is CS:DE
  13. Gohan

    Recentering Sprite?

    It's just a normal sprite sheet. 32x32 sprite, 4 directions, 12 frames. I changed this part of the code so that the sprite would not be a jumbled mess ``` With rec .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 12) .Right = .Left + (DDSD_Character(Sprite).lWidth / 12) End With ``` And now the sprite gets drawn a whole tile away from where it actually is ![](http://www.freemmorpgmaker.com/files/imagehost/pics/6fd71554a735b915491b5c5f22ca3ada.jpg)
  14. Gohan

    Recentering Sprite?

    Of course, I'm not aware of any other working engine on this site, not anymore at least :P (R.I.P. ES)
  15. Gohan

    Recentering Sprite?

    Due to the size of my character sheet, my sprite is rendered a whole tile over from where it actually is. Where in the source can I recenter it?
  16. Updated to include animations that are… actually animated... instead of 1 crappy frame... thanks donovanvaught :)
  17. Very nice *proceeds to work this into my tut*
  18. @-Jake-: > Thanks for the idea. I'll be trying to edit this (and da_gad_pader's tut) to actually work in an online setting. Right now its more of a single player rpg kind of code. Thanks :) Let me know when you figure it out so I can update this tut.
  19. @Suppositoire: > Nice ^^ > Can you post a sample of sprite ? And in your code, have you put the paperdoll ? > > Thanks Posted, and no I didn't touch paperdoll.
  20. If your on arrow key movement, change the controls in this tutorial from OP to ZX or something, otherwise the controls will be awkward ;)
  21. When you first download EO you have Ctrl for attacking but nothing else. This tutorial helps you add another one with separate controls. Of course it doesn't have to be punching and kicking, it could be vertical sword slash/horizontal sword slash or Punch, headbutt, whatever you decide to put on your sprite sheet. However there's no special effect to the extra attack, it just looks cool, mixes up the combat a bit. You'd have to add to it, which I will leave up to your own imagination.
  22. This is my first tutorial, go easy on me :P **Note: This feature uses da_gad_pader's [[EO 2.0]'How to make an attack animation/frame'](http://www.touchofdeathforums.com/smf/index.php/topic,72272.0.html) so other players will be unable to see you punching/kicking, until the issue on that tutorial gets fixed.** Client: In modGameLogic Replace Public Sub CheckAttack with 2 subs ``` Public Sub CheckAttack1() Dim Buffer As clsBuffer Dim attackspeed As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If GetKeyState(vbKeyP) < 0 Then If SpellBuffer > 0 Then Exit Sub ' currently casting a spell, can't attack If StunDuration > 0 Then Exit Sub ' stunned, can't attack ' speed from weapon If GetPlayerEquipment(MyIndex, Weapon) > 0 Then attackspeed = Item(GetPlayerEquipment(MyIndex, Weapon)).Speed Else attackspeed = 1000 End If If Player(MyIndex).AttackTimer + attackspeed < GetTickCount Then If Player(MyIndex).Attacking1 = 0 Then With Player(MyIndex) .Attacking1 = 1 .AttackTimer = GetTickCount End With Set Buffer = New clsBuffer Buffer.WriteLong CAttack1 SendData Buffer.ToArray() Set Buffer = Nothing End If End If End If ' Error handler Exit Sub errorhandler: HandleError "CheckAttack1", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` ``` Public Sub CheckAttack2() Dim Buffer As clsBuffer Dim attackspeed As Long ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler If GetKeyState(vbKeyO) < 0 Then If SpellBuffer > 0 Then Exit Sub ' currently casting a spell, can't attack If StunDuration > 0 Then Exit Sub ' stunned, can't attack ' speed from weapon If GetPlayerEquipment(MyIndex, Weapon) > 0 Then attackspeed = Item(GetPlayerEquipment(MyIndex, Weapon)).Speed Else attackspeed = 1000 End If If Player(MyIndex).AttackTimer + attackspeed < GetTickCount Then If Player(MyIndex).Attacking2 = 0 Then With Player(MyIndex) .Attacking2 = 1 .AttackTimer = GetTickCount End With Set Buffer = New clsBuffer Buffer.WriteLong CAttack2 SendData Buffer.ToArray() Set Buffer = Nothing End If End If End If ' Error handler Exit Sub errorhandler: HandleError "CheckAttack2", "modGameLogic", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` And in GameLoop ``` Call CheckAttack ' Check to see if player is trying to attack ``` To ``` Call CheckAttack1 ' Check to see if player is trying to attack Call CheckAttack2 ' Check to see if player is trying to attack ``` In ModTypes Private Type PlayerRec ``` Attacking As Byte ``` To ``` Attacking1 As Byte Attacking2 As Byte ``` In ModTypes Private Type MapNpcRec ``` Attacking As Byte ``` To ``` Attacking1 As Byte Attacking2 As Byte ``` In ModDirectDraw7 BltPlayer Add``` Dim AtkTimer As Long ```At the top ``` ' Check for attacking animation If Player(Index).AttackTimer + (attackspeed / 2) > GetTickCount Then If Player(Index).Attacking = 1 Then Anim = 4 End If ```To ``` ' Check for attacking animation If Player(Index).AttackTimer + (attackspeed / 2) > GetTickCount Then If Player(Index).Attacking1 = 1 Then AtkTimer = (GetTickCount - Player(Index).AttackTimer) If AtkTimer < 250 Then Anim = 4 End If If AtkTimer < 500 And AtkTimer >= 250 Then ' Add or remove with same pattern to change frame number Anim = 5 End If If AtkTimer < 750 And AtkTimer >= 500 Then ' Add or remove with same pattern to change frame number Anim = 6 End If If AtkTimer < 1000 And AtkTimer >= 750 Then ' Add or remove with same pattern to change frame number Anim = 7 End If If AtkTimer >= 1000 Then Anim = 0 End If End If If Player(Index).Attacking2 = 1 Then AtkTimer = (GetTickCount - Player(Index).AttackTimer) If AtkTimer < 250 Then Anim = 8 End If If AtkTimer < 500 And AtkTimer >= 250 Then ' Add or remove with same pattern to change frame number Anim = 9 End If If AtkTimer < 750 And AtkTimer >= 500 Then ' Add or remove with same pattern to change frame number Anim = 10 End If If AtkTimer < 1000 And AtkTimer >= 750 Then ' Add or remove with same pattern to change frame number Anim = 11 End If If AtkTimer >= 1000 Then Anim = 0 End If End If ``` And ``` With Player(Index) If .AttackTimer + attackspeed < GetTickCount Then .Attacking = 0 .AttackTimer = 0 End If End With ``` To ``` With Player(Index) If .AttackTimer + attackspeed < GetTickCount Then .Attacking1 = 0 .Attacking2 = 0 .AttackTimer = 0 End If End With ``` And ``` With rec .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 4) .Right = .Left + (DDSD_Character(Sprite).lWidth / 4) End With ``` To ``` With rec .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 12) ' Number of frames on char sheet .Right = .Left + (DDSD_Character(Sprite).lWidth / 12) ' Number of frames on char sheet End With ``` And ``` ' Calculate the X x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 32) / 2) ``` To ``` ' Calculate the X x = GetPlayerX(Index) * PIC_X + Player(Index).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 96) / 2) ' adjust sprite displacement ``` In ModDirectDraw7 BltNpc Add``` Dim AtkTimer As Long ```At the top ``` ' Check for attacking animation If MapNpc(MapNpcNum).AttackTimer + (attackspeed / 2) > GetTickCount Then If MapNpc(MapNpcNum).Attacking1 = 1 Then Anim = 4 End If ``` To ``` ' Check for attacking animation If MapNpc(MapNpcNum).AttackTimer + (attackspeed / 2) > GetTickCount Then If MapNpc(MapNpcNum).Attacking1 = 1 Then AtkTimer = (GetTickCount - MapNpc(MapNpcNum).AttackTimer) If AtkTimer < 250 Then Anim = 4 End If If AtkTimer < 500 And AtkTimer >= 250 Then ' Add or remove with same pattern to change frame number Anim = 5 End If If AtkTimer < 750 And AtkTimer >= 500 Then ' Add or remove with same pattern to change frame number Anim = 6 End If If AtkTimer < 1000 And AtkTimer >= 750 Then ' Add or remove with same pattern to change frame number Anim = 7 End If If AtkTimer >= 1000 Then Anim = 0 End If End If If MapNpc(MapNpcNum).Attacking2 = 1 Then AtkTimer = (GetTickCount - MapNpc(MapNpcNum).AttackTimer) If AtkTimer < 250 Then Anim = 8 End If If AtkTimer < 500 And AtkTimer >= 250 Then ' Add or remove with same pattern to change frame number Anim = 9 End If If AtkTimer < 750 And AtkTimer >= 500 Then ' Add or remove with same pattern to change frame number Anim = 10 End If If AtkTimer < 1000 And AtkTimer >= 750 Then ' Add or remove with same pattern to change frame number Anim = 11 End If If AtkTimer >= 1000 Then Anim = 0 End If End If ``` And ``` ' Check to see if we want to stop making him attack With MapNpc(MapNpcNum) If .AttackTimer + attackspeed < GetTickCount Then .Attacking = 0 .AttackTimer = 0 End If ``` To ``` With MapNpc(MapNpcNum) If .AttackTimer + attackspeed < GetTickCount Then .Attacking1 = 0 .Attacking2 = 0 .AttackTimer = 0 End If End With ``` And ``` With rec .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 4) .Right = .Left + (DDSD_Character(Sprite).lWidth / 4) End With ``` To ``` With rec .top = spritetop * (DDSD_Character(Sprite).lHeight / 4) .Bottom = .top + (DDSD_Character(Sprite).lHeight / 4) .Left = Anim * (DDSD_Character(Sprite).lWidth / 12) ' Number of frames on char sheet .Right = .Left + (DDSD_Character(Sprite).lWidth / 12) ' Number of frames on char sheet End With ``` And ``` ' Calculate the X x = MapNpc(MapNpcNum).x * PIC_X + MapNpc(MapNpcNum).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 32) / 2) ``` To ``` ' Calculate the X x = MapNpc(MapNpcNum).x * PIC_X + MapNpc(MapNpcNum).XOffset - ((DDSD_Character(Sprite).lWidth / 4 - 96) / 2) ' adjust sprite displacement ``` In modHandleData change Sub HandleAttack to 2 subs ``` Private Sub HandleAttack1(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim i As Long Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() i = Buffer.ReadLong ' Set player to attacking Player(i).Attacking1 = 1 Player(i).AttackTimer = GetTickCount ' Error handler Exit Sub errorhandler: HandleError "HandleAttack", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` ``` Private Sub HandleAttack2(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim i As Long Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() i = Buffer.ReadLong ' Set player to attacking Player(i).Attacking2 = 1 Player(i).AttackTimer = GetTickCount ' Error handler Exit Sub errorhandler: HandleError "HandleAttack", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` And Sub HandleNpcAttack To ``` Private Sub HandleNpcAttack1(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim i As Long Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() i = Buffer.ReadLong ' Set player to attacking MapNpc(i).Attacking1 = 1 MapNpc(i).AttackTimer = GetTickCount ' Error handler Exit Sub errorhandler: HandleError "HandleNpcAttack", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` ``` Private Sub HandleNpcAttack2(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim i As Long Dim Buffer As clsBuffer ' If debug mode, handle error then exit out If Options.Debug = 1 Then On Error GoTo errorhandler Set Buffer = New clsBuffer Buffer.WriteBytes Data() i = Buffer.ReadLong ' Set player to attacking MapNpc(i).Attacking2 = 1 MapNpc(i).AttackTimer = GetTickCount ' Error handler Exit Sub errorhandler: HandleError "HandleNpcAttack", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext Err.Clear Exit Sub End Sub ``` And ``` HandleDataSub(SAttack) = GetAddress(AddressOf HandleAttack) HandleDataSub(SNpcAttack = GetAddress(AddressOf HandleNpcAttack) ``` To ``` HandleDataSub(SAttack1) = GetAddress(AddressOf HandleAttack1) HandleDataSub(SAttack2) = GetAddress(AddressOf HandleAttack2) HandleDataSub(SNpcAttack1) = GetAddress(AddressOf HandleNpcAttack1) HandleDataSub(SNpcAttack2) = GetAddress(AddressOf HandleNpcAttack2) ``` In modEnumerations replaced ``` SAttack SNpcAttack ``` With ``` SAttack1 SAttack2 SNpcAttack1 SNpcAttack2 ``` And ``` CAttack ``` With ``` CAttack1 CAttack2 ``` Server: in modHandleData change ``` HandleDataSub(CAttack) = GetAddress(AddressOf HandleAttack) ``` To ``` HandleDataSub(CAttack1) = GetAddress(AddressOf HandleAttack1) HandleDataSub(CAttack2) = GetAddress(AddressOf HandleAttack2) ``` Sub HandleAttack replaced with 2 subs ``` ' :::::::::::::::::::::::::: ' :: Player attack packet :: ' :::::::::::::::::::::::::: Sub HandleAttack1(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim i As Long Dim n As Long Dim Damage As Long Dim TempIndex As Long Dim x As Long, y As Long ' can't attack whilst casting If TempPlayer(index).spellBuffer.Spell > 0 Then Exit Sub ' can't attack whilst stunned If TempPlayer(index).StunDuration > 0 Then Exit Sub ' Send this packet so they can see the person attacking 'SendAttack Index ' Try to attack a player For i = 1 To Player_HighIndex TempIndex = i ' Make sure we dont try to attack ourselves If TempIndex index Then TryPlayerAttackPlayer index, i End If Next ' Try to attack a npc For i = 1 To MAX_MAP_NPCS TryPlayerAttackNpc index, i Next ' Check tradeskills Select Case GetPlayerDir(index) Case DIR_UP If GetPlayerY(index) = 0 Then Exit Sub x = GetPlayerX(index) y = GetPlayerY(index) - 1 Case DIR_DOWN If GetPlayerY(index) = Map(GetPlayerMap(index)).MaxY Then Exit Sub x = GetPlayerX(index) y = GetPlayerY(index) + 1 Case DIR_LEFT If GetPlayerX(index) = 0 Then Exit Sub x = GetPlayerX(index) - 1 y = GetPlayerY(index) Case DIR_RIGHT If GetPlayerX(index) = Map(GetPlayerMap(index)).MaxX Then Exit Sub x = GetPlayerX(index) + 1 y = GetPlayerY(index) End Select CheckResource index, x, y End Sub ``` ``` ' :::::::::::::::::::::::::: ' :: Player attack packet :: ' :::::::::::::::::::::::::: Sub HandleAttack2(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long) Dim i As Long Dim n As Long Dim Damage As Long Dim TempIndex As Long Dim x As Long, y As Long ' can't attack whilst casting If TempPlayer(index).spellBuffer.Spell > 0 Then Exit Sub ' can't attack whilst stunned If TempPlayer(index).StunDuration > 0 Then Exit Sub ' Send this packet so they can see the person attacking 'SendAttack Index ' Try to attack a player For i = 1 To Player_HighIndex TempIndex = i ' Make sure we dont try to attack ourselves If TempIndex index Then TryPlayerAttackPlayer index, i End If Next ' Try to attack a npc For i = 1 To MAX_MAP_NPCS TryPlayerAttackNpc index, i Next ' Check tradeskills Select Case GetPlayerDir(index) Case DIR_UP If GetPlayerY(index) = 0 Then Exit Sub x = GetPlayerX(index) y = GetPlayerY(index) - 1 Case DIR_DOWN If GetPlayerY(index) = Map(GetPlayerMap(index)).MaxY Then Exit Sub x = GetPlayerX(index) y = GetPlayerY(index) + 1 Case DIR_LEFT If GetPlayerX(index) = 0 Then Exit Sub x = GetPlayerX(index) - 1 y = GetPlayerY(index) Case DIR_RIGHT If GetPlayerX(index) = Map(GetPlayerMap(index)).MaxX Then Exit Sub x = GetPlayerX(index) + 1 y = GetPlayerY(index) End Select CheckResource index, x, y End Sub ``` In ModEnumerations ``` SAttack SNpcAttack ``` To ``` SAttack1 SAttack2 SNpcAttack1 SNpcAttack2 ``` And ``` CAttack ``` To ``` CAttack1 CAttack2 ``` In ModCombat ``` ' Send this packet so they can see the npc attacking Set Buffer = New clsBuffer Buffer.WriteLong SNpcAttack ``` To``` ' Send this packet so they can see the npc attacking Set Buffer = New clsBuffer Buffer.WriteLong SNpcAttack1 Buffer.WriteLong SNpcAttack2 ```
×
×
  • Create New...