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

Party Quest?


willunited
 Share

Recommended Posts

> Public Sub Party_ShareExp(ByVal partyNum As Long, ByVal EXP As Long, ByVal Index As Long)
> Dim expShare As Long, leftOver As Long, i As Long, tmpIndex As Long
>
>     ' check if it's worth sharing
>     If Not EXP >= Party(partyNum).MemberCount Then
>         ' no party - keep exp for self
>         GivePlayerEXP Index, EXP
>         Exit Sub
>     End If
>    
>     ' find out the equal share
>     expShare = EXP \ Party(partyNum).MemberCount
>     leftOver = EXP Mod Party(partyNum).MemberCount
>    
>     ' loop through and give everyone exp
>     For i = 1 To MAX_PARTY_MEMBERS
>         tmpIndex = Party(partyNum).Member(i)
>         ' existing member?Kn
>         If tmpIndex > 0 Then
>             ' playing?
>             If IsConnected(tmpIndex) And IsPlaying(tmpIndex) Then
>                 ' give them their share
>                 GivePlayerEXP tmpIndex, expShare
>             End If
>         End If
>     Next
>    
>     ' give the remainder to a random member
>     tmpIndex = Party(partyNum).Member(RAND(1, Party(partyNum).MemberCount))
>     ' give the exp
>     GivePlayerEXP tmpIndex, leftOver
> End Sub

Is this,but idk what i do,im new,srry.
Link to comment
Share on other sites

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...