Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updated Party/Group
#13
I figured out the problem:

In :
Code:
' ::::::::::::::::::
    ' :: Party packet ::
    ' ::::::::::::::::::
    If LCase(Parse(0)) = "party" Then
        n = FindPlayer(Parse(1))
      
        ' Prevent partying with self
        If n = index Then
            Exit Sub
        End If
              
       ' Check for a previous party and if so drop it
        If Player(index).InParty = YES Then
            If Player(index).PartyStarter = YES Then
                Call PlayerMsg(index, "Party request has been sent to " & GetPlayerName(n) & ".", Pink)
                Call PlayerMsg(n, GetPlayerName(index) & " wants you to join their party.  Type /join to join, or /leave to decline.", Pink)
                Player(n).PartyPlayer = Player(index).CHAR(Player(index).CharNum).Name
            Else
                Call PlayerMsg(index, "You are already in a party!", Pink)
                Exit Sub
            End If
        End If
      
        If n > 0 Then
            ' Check if its an admin
            If GetPlayerAccess(index) > ADMIN_MONITER Then
                Call PlayerMsg(index, "You can't join a party, you are an admin!", BrightBlue)
                Exit Sub
            End If
      
            If GetPlayerAccess(n) > ADMIN_MONITER Then
                Call PlayerMsg(index, "Admins cannot join parties!", BrightBlue)
                Exit Sub
            End If
          
            ' Make sure they are in right level range
            'If GetPlayerLevel(index) + 5 < GetPlayerLevel(n) Or GetPlayerLevel(index) - 5 > GetPlayerLevel(n) Then
            '    Call PlayerMsg(index, "There is more then a 5 level gap between you two, party failed.", Pink)
            '    Exit Sub
            'End If
          
            ' Check to see if player is already in a party
            If Player(n).InParty = NO Then
                Call PlayerMsg(index, "Party request has been sent to " & GetPlayerName(n) & ".", Pink)
                Call PlayerMsg(n, GetPlayerName(index) & " wants you to join their party.  Type /join to join, or /leave to decline.", Pink)
              
                Player(index).PartyStarter = YES
                Player(index).InParty = YES
                Player(index).GroupID = CreateGroup(index)
                Player(n).PartyPlayer = index
            Else
                Call PlayerMsg(index, "Player is already in a party!", Pink)
            End If
        Else
            Call PlayerMsg(index, "Player is not online.", White)
        End If
        Exit Sub
    End If

Change:
Code:
' Check for a previous party and if so drop it
        If Player(index).InParty = YES Then
            If Player(index).PartyStarter = YES Then
                Call PlayerMsg(index, "Party request has been sent to " & GetPlayerName(n) & ".", Pink)
                Call PlayerMsg(n, GetPlayerName(index) & " wants you to join their party.  Type /join to join, or /leave to decline.", Pink)
                Player(n).PartyPlayer = Player(index).CHAR(Player(index).CharNum).Name
            Else
                Call PlayerMsg(index, "You are already in a party!", Pink)
                Exit Sub
            End If
        End If

to:
Code:
' Check for a previous party and if so drop it
        If Player(index).InParty = YES Then
            If Player(index).PartyStarter = YES Then
                Call PlayerMsg(index, "Party request has been sent to " & GetPlayerName(n) & ".", Pink)
                Call PlayerMsg(n, GetPlayerName(index) & " wants you to join their party.  Type /join to join, or /leave to decline.", Pink)
                Player(n).PartyPlayer = Player(index).Char(Player(index).CharNum).Name
                Player(n).PartyPlayer = index
                Exit Sub
            Else
                Call PlayerMsg(index, "You are already in a party!", Pink)
                Exit Sub
            End If
        End If

The problem was on the server, it kept calling CreateGroup and makeing the groupcount = 0.

You will still need to change N= N + 1 to N= N+7.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)