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

Helladen

Members
  • Posts

    2272
  • Joined

  • Last visited

    Never

Posts posted by Helladen

  1. I'm just doing some hardcore testing while I wait for 1.0.4\. I little too much if I say so myself.

    It wasn't a bug though, just my imagination. D:

    I still think 3.5 seconds is a long time to wait if the server is dowwn. XD
  2. This fixes a small overflow bug and adds an extra message if you are trying to set your own access. Easily implementation.

    If you try to say /setaccess playername -1 or lower it would crash the client and say overflow.

    **Difficulty:** (1/5)

    **Server**

    Replace HandleSetAccess with this:

    ```
    Sub HandleSetAccess(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
        Dim n As Long
        Dim I As Long
        Dim Buffer As clsBuffer
        Set Buffer = New clsBuffer
        Buffer.WriteBytes Data()

        ' Prevent hacking
        If GetPlayerAccess(index) < ADMIN_CREATOR Then
            Exit Sub
        End If

        ' The index
        n = FindPlayer(Buffer.ReadString) 'Parse(1))
        ' The access
        I = Buffer.ReadLong 'CLng(Parse(2))
        Set Buffer = Nothing

        ' Check for invalid access level
        If I >= 0 Or I <= 3 Then

            ' Check if player is on
            If n > 0 Then

                'check to see if same level access is trying to change another access of the very same level and boot them if they are.
                If GetPlayerName(n) = GetPlayerName(index) Then
                  Call PlayerMsg(index, "You can't change your own access!", Red)
                  Exit Sub
                End If

                If GetPlayerAccess(n) = GetPlayerAccess(index) Then
                    Call PlayerMsg(index, "Invalid access level.", Red)
                    Exit Sub
                End If

                If GetPlayerAccess(n) <= 0 Then
                    Call GlobalMsg(GetPlayerName(n) & " has been blessed with administrative access.", BrightBlue)
                End If

                Call SetPlayerAccess(n, I)
                Call SendPlayerData(n)
                Call AddLog(GetPlayerName(index) & " has modified " & GetPlayerName(n) & "'s access.", ADMIN_LOG)
            Else
                Call PlayerMsg(index, "Player is not online.", White)
            End If

        Else
            Call PlayerMsg(index, "Invalid access level.", Red)
        End If

    End Sub
    ```
    **Client**

    Commands:

     ```
    Case "/setaccess"

                        If GetPlayerAccess(MyIndex) < ADMIN_CREATOR Then
                            AddText "You need to be a high enough staff member to do this!", AlertColor
                            GoTo Continue
                        End If

                        If UBound(Command) < 2 Then
                            AddText "Usage: /setaccess playername #", AlertColor
                            GoTo Continue
                        End If

                        If IsNumeric(Command(1)) Or Not IsNumeric(Command(2)) Then
                            AddText "Usage: /setaccess playername #", AlertColor
                            GoTo Continue
                        End If

                        If Command(2) < 0 Then
                          AddText "Invalid access level.", AlertColor
                          GoTo Continue
                        End If

                        SendSetAccess Command(1), CLng(Command(2))
    ```
  3. @Cheshire:

    > @Martin:
    >
    > > All this "games are not fun anymore" shit is funny. Games are fun, that's why people are buying it. When you actualy take a little bit of time to check it or think about it - those old "classics" cannot be even compared to present games. I hear people saying how awesome, sandbox and vast Daggerfall was… Daggerfall is pice of shit, I tried it recently and it's unpleyable. I hear how people diss Fallout 3 and say how awesome previous Fallouts were... but previous fallouts are pices of shit - I launched Fallout 2 recently and it was unpleyable... and I don't really want to imagine how the first one looked.
    > >
    > > As much as I loved to play CivilizationI when I was 6 years old - it's a pice of shit, as much as I loved Doom - I don't like it anymore. Saying that "oooh... I remember the days when games were fun..." is like to compare friggin PACMAN with Quake1 or Quake1 with MassEffect2\. Those oldies were awesome when they were the only thing you could play. Even KOTOR seems to archaic to me, I recently tried to launch it but gameplay wasn't what I remember and I couldn't play it for too long. How can you say that story was better in the 1990? TES before Morowind had shit story. Games were shit back then but people tend to remember only the pros, because a) they were young b) that was everything they could expect back then. Number of games that doesn't age is incredibly small.
    > >
    > > I dare you:
    > > Play TES Oblivion for a week and then launch Daggerfall or Arena and tell me that Oblivion sucks.
    > > Play Fallout 3 for a couple of days, then launch Fallout or Fallout 2 - and tell me that Fallout 3 suck ass compared to them.
    >
    > That's kinda where I was getting at. Of course games are still fun to play, unless you're boring as hell.

    Are you saying this because of the graphics? Because in my opinion graphics should come absolutely last.
  4. @YamYam:

    > There, fixed your little stun bug.. :)
    >
    > In Function CanNpcAttackPlayer you never checked whether the NPC was stunned or not.. simply allowing him to attack anyways regardless of stunstatus and direction when the player would stand next to the NPC in question.. Here's a minor fix that works which I made up real quick, I'm sure you can make a more in-depth fix but it's 10am, I'm tired and I honestly can't be bothered writing up a proper fix.
    >
    > So in Function CanNpcAttackPlayer under
    > ```
    > ' Check for subscript out of range
    >     If MapNpcNum <= 0 Or MapNpcNum > MAX_MAP_NPCS Or Not IsPlaying(Index) Then
    >         Exit Function
    >     End If
    >
    >     ' Check for subscript out of range
    >     If MapNpc(GetPlayerMap(Index)).Npc(MapNpcNum).Num <= 0 Then
    >         Exit Function
    >     End If
    > ```
    > Add the following, and it works like stuns work in every game. :) (disabling the NPC completely, rather then just making it unable to move)
    > ```
    > 'Check if the NPC isn't stunned.
    >     If MapNpc(GetPlayerMap(Index)).Npc(MapNpcNum).StunDuration > 0 Then
    >         CanNpcAttackPlayer = False
    >         Exit Function
    >     End If
    > ```
    > If you want me to post this in the tutorials forum, sorry.. But it seemed more relevant to add a bugfix in here then there.

    Robin the item editor scroll-bar needs to be raised or changed to the max amount of items, I can do it, but I am just informing you of the bug.

    Crash bug, need to disable users from setting the icon to 0 for items.
  5. @Making:

    > @Helladen:
    >
    > > Yes and learn the basic structure of EO. Which is all MS engines base.
    >
    > where specificly can I learn about MS engines? sorry for the many questions I really want to learn.

    Just the way the engine is setup. You need to mess with it and learn the fundamentals of VB6 to be able to do anything.
×
×
  • Create New...