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

Vilmen

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Posts posted by Vilmen

  1. It's funny how I actually just tried to post this but did not have 25posts made on this forum. I suppose a thank you is in order wicker.

    ![](http://www.key2heaven.com/screenshots/picfinal1.png) ![](http://www.key2heaven.com/screenshots/picfinal2.png) ![](http://www.key2heaven.com/screenshots/picfinal4.png) ![](http://www.key2heaven.com/screenshots/picfinal5.png)  ![](http://www.key2heaven.com/screenshots/picfinal6.png)

    <3 ZoSo, long time no see. Vet inte om du fortfarande använder msn.

    Edit: and to you scott, but you already know that I appreciate your help :)
  2. ![](http://www.key2heaven.com/k2h/newwebsite/style/images/banner.gif)

    **Introduction**
    Key To Heaven is a free 2d based medieval ORPG. PvP starts after level 5 so either you need to be very strong and fight alone or create/join a guild and fight together. The quests are never ending and the gameplay is very unique. Download it and check it out for yourself.

    **Website:** http://www.key2heaven.com/frontpage.php
    **Forum:** http://www.key2heaven.com/forum/

    **Features**
    The game features hundreds of paperdoll items of which many are very rare. It also has fishing, farming and mining which gives supplies that can be traded for items. Pets can also be obtained and they are dropped by all the monsters in the game, however they are extremely rare. You can customize your character in the creation of it by chosing different types and colors of hair, eyes, beard and body.
    ![](http://www.key2heaven.com/screenshots/picfinal1.png) ![](http://www.key2heaven.com/screenshots/picfinal2.png) ![](http://www.key2heaven.com/screenshots/picfinal4.png) ![](http://www.key2heaven.com/screenshots/picfinal5.png)  ![](http://www.key2heaven.com/screenshots/picfinal6.png)

    **Top Players:** http://www.key2heaven.com/majork2h/top100.html
    **Facebook:** http://www.facebook.com/pages/Key2Heavencom/438762572802447
    **YouTube Video:** http://www.youtube.com/watch?v=snhn3VoSkCM

    **Screenshots**

    ![](http://www.key2heaven.com/screenshots/picfinal3.png)

    ![](http://www.key2heaven.com/screenshots/newpic1.png)

    ![](http://www.key2heaven.com/screenshots/newpic2.png)

    ![](http://www.key2heaven.com/screenshots/newpic3.png)

    ![](http://www.key2heaven.com/screenshots/newpic4.png)
  3. **-Use a song with more energy**
    Would you mind giving an example?
    **-Show interaction with other players**
    Good idea.
    **-Try not to get all of the screen in the segments**
    What do you mean exactly?
    **You were creating your character for so long, I had to skip through the video.**
    Yeah I kinda felt that also.
  4. I tested the code again in a vanilla eclipse source and it worked. Just redo it and make sure you follow each step correctly. I didnt add the addon or my bug fix due to lazyness, but they should also work just fine.
  5. @ZoSo:

    > Haha i remember those pics, you posted them back at MS years ago.
    > Cool that you're collecting snes games bro!

    Yeah I guess I did. If anybody know the game King Arthurs World, I finished that a week ago. That was a really long game.

    Cool to see you again ZoSo. Nice to see old names popping up.
  6. Pretty much the same thing for me. My brother enjoys snes so sometimes I can get him to play with me. But we live in our own apartments and such so not easy. Other than that I have maybe 1 other guy to play with. But his almost always 400km away from me.

    Oh and download Super Ghouls and ghosts, such a great game.

    FIFA sucks!
  7. Is anybody here as crazy as me in super nintendo games? If so, which are your favorite games?
    Took these pictures 2 years ago. Now I have 207 games :)

    http://www.key2heaven.net/snes/PICT0019.JPG
    http://www.key2heaven.net/snes/PICT0020.JPG
    http://www.key2heaven.net/snes/PICT0021.JPG
    http://www.key2heaven.net/snes/PICT0022.JPG
    http://www.key2heaven.net/snes/PICT0023.JPG
    http://www.key2heaven.net/snes/PICT0024.JPG
    http://www.key2heaven.net/snes/PICT0025.JPG
    http://www.key2heaven.net/snes/PICT0026.JPG
    http://www.key2heaven.net/snes/PICT0027.JPG
    http://www.key2heaven.net/snes/PICT0028.JPG
    http://www.key2heaven.net/snes/PICT0029.JPG
    http://www.key2heaven.net/snes/PICT0030.JPG
    http://www.key2heaven.net/snes/PICT0031.JPG
    http://www.key2heaven.net/snes/PICT0032.JPG
    http://www.key2heaven.net/snes/PICT0033.JPG
    http://www.key2heaven.net/snes/PICT0034.JPG
    http://www.key2heaven.net/snes/PICT0035.JPG
  8. @Justn:

    > Hey William can or anyone else confirm if this is an actual bug fix? I added it but couldn't recreate the scenario you described?

    It's been confirmed now.

    And the scenario I described is hard to create. It would require perfect timing.
  9. Is there a demand for a server restarter for Eclipse?

    www.key2heaven.com/screenshots/serverrestarter.PNG
    ![](http://www.key2heaven.com/screenshots/serverrestarter.PNG)

    Basicly how it works is you first start the System Loop. After that all the other options can run. For example restart the computer every 7 days or so. And have this program in the StartUp folder, and it will automatically start the server also upon computer startup. And you can also set it so it just restarts the server. And the main part, is that it connects to the server, and if the server crashes with a error. The program will close the server, and restart it. And reconnect the connection. And it keeps tab of how many times it crashed and such.
  10. I changed it the moment I saw it. It's not a big thing really.

    _The only bug that can come from keeping it as it was, is that if you have 2 npcs next to each other horizontally. And you have target on the one on the right. And they both step to the right. And at the same time you pressed on the right npc. Then the target could switch over to the other npc. Because the loop didnt stop._

    I'm not whining about it… Im just trying to fix a small bug in the engine -_-
  11. The current is like this:
    ```
    If TempPlayer(index).target = i And TempPlayer(index).targetType = TARGET_TYPE_NPC Then
                            ' Change target
                            TempPlayer(index).target = 0
                            TempPlayer(index).targetType = TARGET_TYPE_NONE
                            ' send target to player
                            SendTarget index
                        Else
                            ' Change target
                            TempPlayer(index).target = i
                            TempPlayer(index).targetType = TARGET_TYPE_NPC
                            ' send target to player
                            SendTarget index
                            Exit Sub
                        End If
    ```
    I think it should be like this:
    ```
    If TempPlayer(index).target = i And TempPlayer(index).targetType = TARGET_TYPE_NPC Then
                            ' Change target
                            TempPlayer(index).target = 0
                            TempPlayer(index).targetType = TARGET_TYPE_NONE
                            ' send target to player
                            SendTarget index
                        Else
                            ' Change target
                            TempPlayer(index).target = i
                            TempPlayer(index).targetType = TARGET_TYPE_NPC
                            ' send target to player
                            SendTarget index
                        End If
                    Exit Sub
    ```This way, the new target is either "the same target, therefore it sets to 0" or a "new target, set it to = 1". And when 1 of those has rune. The sub should exit.
  12. I'm pretty sure I'm correct. There is no need to loop more if you either removed the old target because u pressed on the same again. Or got a new target. In both cases, the looping should stop.
  13. Mouse movement with pathfinding is a totally different feature. If you have scrolling maps. And your player is always centered. I would prefer this system way more. Pathfinding in a game where you are centered is kinda weird imo.
  14. Currently that sub looks like this:

    >! ```
    Sub HandleSearch(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
        Dim x As Long
        Dim y As Long
        Dim i As Long
        Dim Buffer As clsBuffer
        Set Buffer = New clsBuffer
        Buffer.WriteBytes Data()
        x = Buffer.ReadLong 'CLng(Parse(1))
        y = Buffer.ReadLong 'CLng(Parse(2))
        Set Buffer = Nothing
    >!     ' Prevent subscript out of range
        If x < 0 Or x > Map(GetPlayerMap(index)).MaxX Or y < 0 Or y > Map(GetPlayerMap(index)).MaxY Then
            Exit Sub
        End If
    >!     ' Check for a player
        For i = 1 To Player_HighIndex
    >!         If IsPlaying(i) Then
                If GetPlayerMap(index) = GetPlayerMap(i) Then
                    If GetPlayerX(i) = x Then
                        If GetPlayerY(i) = y Then
                            ' Change target
                            If TempPlayer(index).targetType = TARGET_TYPE_PLAYER And TempPlayer(index).target = i Then
                                TempPlayer(index).target = 0
                                TempPlayer(index).targetType = TARGET_TYPE_NONE
                                ' send target to player
                                SendTarget index
                            Else
                                TempPlayer(index).target = i
                                TempPlayer(index).targetType = TARGET_TYPE_PLAYER
                                ' send target to player
                                SendTarget index
                            End If
                            Exit Sub
                        End If
                    End If
                End If
            End If
        Next
    >!     ' Check for an npc
        For i = 1 To MAX_MAP_NPCS
            If MapNpc(GetPlayerMap(index)).Npc(i).Num > 0 Then
                If MapNpc(GetPlayerMap(index)).Npc(i).x = x Then
                    If MapNpc(GetPlayerMap(index)).Npc(i).y = y Then
                        If TempPlayer(index).target = i And TempPlayer(index).targetType = TARGET_TYPE_NPC Then
                            ' Change target
                            TempPlayer(index).target = 0
                            TempPlayer(index).targetType = TARGET_TYPE_NONE
                            ' send target to player
                            SendTarget index
                        Else
                            ' Change target
                            TempPlayer(index).target = i
                            TempPlayer(index).targetType = TARGET_TYPE_NPC
                            ' send target to player
                            SendTarget index
                            Exit Sub
                        End If
                    End If
                End If
            End If
        Next
    End Sub
    ```

    Take a look at this part:

    >! ```
    If TempPlayer(index).target = i And TempPlayer(index).targetType = TARGET_TYPE_NPC Then
                            ' Change target
                            TempPlayer(index).target = 0
                            TempPlayer(index).targetType = TARGET_TYPE_NONE
                            ' send target to player
                            SendTarget index
                        Else
                            ' Change target
                            TempPlayer(index).target = i
                            TempPlayer(index).targetType = TARGET_TYPE_NPC
                            ' send target to player
                            SendTarget index
                            Exit Sub
                        End If
    ```
    Shouldn't that Exit Sub be after the End If?
  15. **Introduction**
    This is something old I once did. If you look at this screenshot you can see that it has 4 triangles. Depending on in which you press the character will walk that way.

    Update 1: Fixed so you dont move if you press a target.
    Update 2: Option to disable mouse movement.

    ![](http://www.key2heaven.com/screenshots/ec1.png)
    **Client Side**
    At the botto of modGameLogic, add:
    ```
    ' Mouse Movement
    Public Sub CharMove(ByVal X As Single, ByVal Y As Single)
    'Finds the heading way with our mouse position
    Dim iScrX As Integer
    Dim iScrY As Integer
    Dim lAngle As Long

    iScrX = X - frmMain.picScreen.Left - (frmMain.picScreen.width / 2)
    iScrY = Y - frmMain.picScreen.top - (frmMain.picScreen.height / 2)

    iScrY = -iScrY
    If iScrY = 0 Then
        lAngle = 0
    Else
        lAngle = Atn(iScrX / iScrY) * 180 / 3.14159265
    End If

    If (lAngle >= -45 And lAngle <= 0) Or (lAngle <= 45 And lAngle >= 0) Then
        If iScrY > 0 Then
            DirUp = True
            DirDown = False
            DirLeft = False
            DirRight = False
            If CanMove = True Then
                Call SetPlayerDir(MyIndex, DIR_UP)
                Call CheckMovement
            End If
        Else
            DirUp = False
            DirDown = True
            DirLeft = False
            DirRight = False
            If CanMove = True Then
                Call SetPlayerDir(MyIndex, DIR_DOWN)
                Call CheckMovement
            End If
        End If
    ElseIf (lAngle > 45 And lAngle <= 90) Or (lAngle < -45 And lAngle >= -90) Then
        If iScrX < 0 Then
                    DirUp = False
            DirDown = False
            DirLeft = True
            DirRight = False
            If CanMove = True Then
                Call SetPlayerDir(MyIndex, DIR_LEFT)
                Call CheckMovement
            End If
        Else
            DirUp = False
            DirDown = False
            DirLeft = False
            DirRight = True
            If CanMove = True Then
                Call SetPlayerDir(MyIndex, DIR_RIGHT)
                Call CheckMovement
            End If
        End If
    End If
    End Sub
    ```
    In frmMain, add:
    ```
    Private Sub picScreen_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
        If Not InMapEditor Then
            xMouseMovement = 0
            yMouseMovement = 0
        End If
    End Sub
    ```
    In frmMain, inside the sub picScreen_MouseDown. Find this:
    ```
    If InMapEditor Then
            Call MapEditorMouseDown(Button, X, Y, False)
        Else
            ' left click
            If Button = vbLeftButton Then
    ```Below that, add:
    ```
    tempMouseX = X
    tempMouseY = Y
    ```
    In modGameLogic, find this:
    ```
    ' Process input before rendering, otherwise input will be behind by 1 frame
            If WalkTimer < Tick Then

                For i = 1 To Player_HighIndex
                    If IsPlaying(i) Then
                        Call ProcessMovement(i)
                    End If
                Next i

                ' Process npc movements (actually move them)
                For i = 1 To Npc_HighIndex
                    If Map.Npc(i) > 0 Then
                        Call ProcessNpcMovement(i)
                    End If
                Next i

                WalkTimer = Tick + 30 ' edit this value to change WalkTimer
            End If
    ```Below that, add:
    ```
    If xMouseMovement > 0 And yMouseMovement > 0 Then
                Call CharMove(xMouseMovement, yMouseMovement)
            End If
    ```Add this in any module:
    ```
    Public xMouseMovement As Long
    Public yMouseMovement As Long
    Public tempMouseX As Long
    Public tempMouseY As Long
    ```
    At the bottom of modHandleData, add:
    ```
    Private Sub HandleMouseMovement(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
        xMouseMovement = tempMouseX
        yMouseMovement = tempMouseY
        Exit Sub
    End Sub
    ```
    In sub InitMessages, at the bottom of that list, add:
    ```
    HandleDataSub(SMouseMovement) = GetAddress(AddressOf HandleMouseMovement)
    ```
    In Public Enum ServerPackets, at the bottom of that list, add:
    ```
    SMouseMovement
    ```
    **Server Side**
    In Sub HandleSearch, just before the End Sub, add:
    ```
    Call SendMouseMovement(index)
    ```
    While you are in that Sub, you might want to fix this: http://www.touchofdeathforums.com/smf/index.php/topic,75973.new.html#new

    In the bottom of modServerTCP, add:
    ```
    Sub SendMouseMovement(ByVal index As Long)
    Dim Buffer As clsBuffer, i As Long

        Set Buffer = New clsBuffer
        Buffer.WriteLong SMouseMovement
        Buffer.WriteLong index

        SendDataTo index, Buffer.ToArray()
        Set Buffer = Nothing
    End Sub

    ```Find Public Enum ServerPackets, in the bottom of that list, add:
    ```
    SMouseMovement
    ```
    **Addon**
    Do this if you want a option to disable mouse movement.

    Go to frmMain, press on picParty and move it to the side. Now press on the next black thing called picSpells and move that to the side also. Now you see the picOptions. First press on the Sound label, copy it and paste it. Dont create a array. Move it below the sound optionbuttons and name it Mouse Movement. Now the 2 optionbuttons for Sound is located in a picturebox called Picture4\. It could be tricky to press on that cause everything is black. But find it, copy it and paste it. 3 messages will appear, dont create any arrays. Change the Name on the 2 buttons to optMMOn and optMMOff. Set the "On Optionbutton" value to true. Now double click on the "On" button, and add this:
    ```
    MouseMovementDisabled = False
    ```Now press the off button and add this:
    ```
    MouseMovementDisabled = True
    ```Now, on the place you put:
    ```
    Public xMouseMovement As Long
    Public yMouseMovement As Long
    Public tempMouseX As Long
    Public tempMouseY As Long
    ```Just below that add:
    ```
    Public MouseMovementDisabled as Boolean
    ```Now search for:
    ```
    If xMouseMovement > 0 And yMouseMovement > 0 Then
                Call CharMove(xMouseMovement, yMouseMovement)
            End If
    ```Replace that with:
    ```
    If xMouseMovement > 0 And yMouseMovement > 0 Then
                If MouseMovementDisabled = False Then
                    Call CharMove(xMouseMovement, yMouseMovement)
                End If
            End If
    ```
    Now you might want it to save each time the player logs in. Well, I'm not gonna do that unless its actually requested.

    Finished, you should now have a working mouse movement in your game.
×
×
  • Create New...