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

JadeCurt1ss

Members
  • Posts

    195
  • Joined

  • Last visited

    Never

Everything posted by JadeCurt1ss

  1. such as? It adds the list for friends, the option to select either or if you have them on top of eachother, it sends your data etc… what seems to be missing?
  2. @Zuleloan: > I get really paranoid when I am angry or upset. > > To get over it I take a couple deep breaths and do the powers of 2. > > Ie > 2 > 4 > 8 > 16 > 32 > etc > until I can't go any further than by that time I've pushed it out of my mind. > > Or play a FPS and kill everything. The FPS thing is a good idea.
  3. No its from… there. The island in the desert that doesnt exist...
  4. And.. and…. Oh wait, I'm already a demi-god. Damnit.
  5. Guilty as charged. I did plan to add my own features to it, but I did want to see if it was viable.
  6. I'd have a lynch mob after me if I told you…
  7. By: smchronos http://web.miragesource.com/forums/viewtopic.php?f=75&t=1858 Hunting some things up I found this: Adding a player list and/or friend list [client-side] Control Requirements: CommandButton Controls (2) Listbox Controls (2) Frame Control (1) OptionButton Controls (2) Label (1) -Open up frmMirage and add the following controls: CommandButton Controls (2) -cmdAdd -cmdRemove Listbox Controls (2) -lstPlayers -lstFriends Frame Control (1) -Any Name OptionButton Controls (2) -optPlayers -optFriends Label (1) -lblPNumber -Open up frmMirage's code and add the following: Code: Select all Private Sub cmdAdd_Click() If lstPlayers.ListIndex = -1 Then Exit Sub Call SendData("ADDFRIEND" & SEP_CHAR & lstPlayers.List(lstPlayers.ListIndex) & SEP_CHAR & END_CHAR) End Sub Private Sub cmdRemove_Click() If lstFriends.ListIndex = -1 Then Exit Sub Call SendData("REMOVEFRIEND" & SEP_CHAR & lstFriends.List(lstFriends.ListIndex) & SEP_CHAR & END_CHAR) End Sub Private Sub optFriends_Click() cmdAdd.Enabled = False cmdRemove.Enabled = True lstPlayers.Visible = False 'Only needed if you put one listbox ontop of the other lstFriends.Visible = True 'Only needed if you put one listbox ontop of the other End Sub Private Sub optPlayers_Click() cmdAdd.Enabled = True cmdRemove.Enabled = False lstPlayers.Visible = True 'Only needed if you put one listbox ontop of the other lstFriends.Visible = False 'Only needed if you put one listbox ontop of the other End Sub -Open up Constants.bas and add: Code: Select all 'Constant for Player Friends Public Const MAX_FRIENDS = 5 -Open up Types.bas and find Type PlayerRec -At the end of this type, before closing it with End Type, add: Code: Select all 'Friends Friend(1 To MAX_FRIENDS) As String -Open up HandleData.bas and add: Code: Select all Dim p as Integer -Then, at the bottom of the HandleData subroutine, add the following: Code: Select all ' ::::::::::::::::::::::: ' :: PlayerJoin packet :: -smchronos ' ::::::::::::::::::::::: If (LCase(Parse(0)) = "playerjoin") Then frmMirage.lstPlayers.AddItem Parse(1) If IsFriend(MyIndex, Parse(1)) Then frmMirage.lstFriends.AddItem Parse(1) End If lblPNumber.Caption = CStr(CInt(lblPNumber.Caption) + 1) Exit Sub End If ' :::::::::::::::::::::::: ' :: PlayerLeave packet :: -smchronos ' :::::::::::::::::::::::: If (LCase(Parse(0)) = "playerleave") Then n = Parse(1) frmMirage.lblPNumber.Caption = n If n = "0" Then Exit Sub End If frmMirage.lstPlayers.Clear frmMirage.lstFriends.Clear For p = 2 To (n + 1) frmMirage.lstPlayers.AddItem Parse(p) If IsFriend(MyIndex, Parse(p)) Then frmMirage.lstFriends.AddItem Parse(p) End If Next p Exit Sub End If ' ::::::::::::::::::::::: ' :: PlayerList packet :: -smchronos ' ::::::::::::::::::::::: If (LCase(Parse(0)) = "plist") Then n = Parse(1) frmMirage.lblPNumber.Caption = n If n = "0" Then Exit Sub End If For p = 2 To (n + 1) frmMirage.lstPlayers.AddItem Parse(p) If IsFriend(MyIndex, Parse(p)) Then frmMirage.lstFriends.AddItem Parse(p) End If Next p Exit Sub End If ' :::::::::::::::::::: ' :: Friend packets :: -smchronos ' :::::::::::::::::::: If (LCase(Parse(0)) = "addfriend") Then frmMirage.lstFriends.AddItem Parse(1) End If If (LCase(Parse(0)) = "remfriend") Then For p = 0 To frmMirage.lstFriends.ListCount If frmMirage.lstFriends.List(p) = Parse(1) Then frmMirage.lstFriends.RemoveItem (p) Exit Sub End If Next p End If ' ::::::::::::::::::::::::: ' :: Friends Load packet :: ' ::::::::::::::::::::::::: If LCase(Parse(0)) = "playerfriends" Then For n = 1 To MAX_FRIENDS Player(MyIndex).Friend(n) = Parse(n) Next n Exit Sub End If -Lastly, add this to nearly any module. I placed my in the GameLogic near the bottom: Code: Select all Function IsFriend(ByVal Index As Long, ByVal Name As String) As Boolean Dim n As Integer IsFriend = False For n = 1 To MAX_FRIENDS If Player(Index).Friend(n) = Name Then IsFriend = True Exit Function End If Next n End Function [server-side] -Open up Constants.bas and add: Code: Select all 'Constant for Player Friends Public Const MAX_FRIENDS = 5 -Open up Types.bas find Type PlayerRec and add within: Code: Select all 'Friends Friend(1 To MAX_FRIENDS) As String -Open up HandleData.bas and add within the HandleData subroutine Code: Select all ' :::::::::::::::::::::::::: ' :: Remove Friend packet :: ' :::::::::::::::::::::::::: If LCase(Parse(0)) = "removefriend" Then For n = 1 To MAX_FRIENDS If Player(Index).Char(Player(Index).CharNum).Friend(n) = Parse(1) Then Player(Index).Char(Player(Index).CharNum).Friend(n) = "" Packet = "REMFRIEND" & SEP_CHAR & Parse(1) & SEP_CHAR & END_CHAR Call SendDataToAll(Packet) Exit Sub End If Next n End If ' ::::::::::::::::::::::: ' :: Add Friend packet :: ' ::::::::::::::::::::::: If LCase(Parse(0)) = "addfriend" Then For n = 1 To MAX_FRIENDS If Player(Index).Char(Player(Index).CharNum).Friend(n) = "" Then Player(Index).Char(Player(Index).CharNum).Friend(n) = Parse(1) Packet = "ADDFRIEND" & SEP_CHAR & Parse(1) & SEP_CHAR & END_CHAR Call SendDataToAll(Packet) Exit Sub ElseIf n = MAX_FRIENDS Then Call PlayerMsg(Index, "Too many friends!", Red) Exit Sub End If Next n End If -Open up GameLogic.bas and find the JoinGame subroutine and add with the other sendblah subroutines: Code: Select all Call SendFriends(Index) -This can be placed in nearly any module, but I prefered adding it in the ServerTCP: Code: Select all Sub SendFriends(ByVal Index As Long) Dim Packet As String Dim n As Integer Packet = "PLAYERFRIENDS" & SEP_CHAR For n = 1 To MAX_FRIENDS Packet = Packet & Player(Index).Char(Player(Index).CharNum).Friend(n) & SEP_CHAR Next n Packet = Packet & END_CHAR Call SendDataTo(Index, Packet) End Sub (This is only needed if you are still using .ini files to save account data. Binary methods will need to be deleted and remade, but no extra code is necessary) -Open up Database.bas and find the SavePlayer subroutine. It doesn't matter where in here you add the following, but I placed it under the position putvars Code: Select all 'Set Friends For n = 1 To MAX_FRIENDS Call PutVar(FileName, "CHAR" & i, "Friend" & n, Player(Index).Char(i).Friend(n)) Next n -Still within Database.bas, find the LoadPlayer subroutine and add anywhere: Code: Select all 'Get Friends For n = 1 To MAX_FRIENDS Player(Index).Char(i).Friend(n) = GetVar(FileName, "CHAR" & i, "Friend" & n) Next n -Still within Database.bas, find the ClearPlayer subroutine and add anywhere: Code: Select all For n = 1 To MAX_FRIENDS Player(Index).Char(i).Friend(n) = "" Next n Problem is whenever I go to add the "types" portion I always get an error message. Anyone wanna take a look at this and see what's up?
  8. Hey Eclipse: I'm not having the best of days for a number of reasons. What do you all do to pull yourselves out of a slump and get back into the game full throttle. inb4 an hero.
  9. Bulls on Parade - Rage Against the Machine
  10. Brackets yes, but I had the order of operations wrong. =[ Back to calculus hw for me… > Call SetPlayerHP(Index, GetPlayerHP(Index) + GetPlayerMaxHP(Index) * (Item(Player(Index).Char(CharNum).Inv(InvNum).num).Data1) / 100) That's how it should have been.
  11. In modHandledata Server-Side, I changed the potion formula from > Call SetPlayerHP(Index, GetPlayerHP(Index) + Item(Player(Index).Char(CharNum).Inv(InvNum).num).Data1) to this > Call SetPlayerHP(Index, GetPlayerHP(Index) + Item(Player(Index).Char(CharNum).Inv(InvNum).num).Data1) /100) * GetPlayerMaxHP(index) But I kept getting an "Expected: end of statement." Compile Error The theory behind this is to turn the vital mod into a percentage of HP restored. So say I put 25 as the vital mod, the game would divide that by 100, giving me .25, and then multiply that by the Player's max HP, giving me a number = to 25% of the Player's max health, and restoring them by it.
  12. Yeah, offers like this are usually too good to be true. Requesting LOCK.
  13. I'll drink to that :occasion14: Ok, drinking's over. I get an RTE 380 every time I try and re-edit the new item type I created (I made a separate Weapon type for Bows.) Any thoughts on what causes this? If anything, can I send you my source and you can take a look at it?
  14. Bump: Thanks to unnown again, I now have different weapon types, and separate damage formulas for each. That was the last planned major source edit. I will now be more focusing on mapping, but I am still looking at ways to make the game unique and interesting. This game is going places people: It's been 3 weeks and I have all the planned source edits complete.
  15. Born to Run by Bruce Springsteen
  16. Guilty as charged! :embarrassed: But seriously. This is stuff I've wanted to do for an eternety BTW: It's kiss-ass. If you're going to insult me, do it properly. =p
  17. unnown should be knighted, made god, and given the earth as a gift.
  18. Do tell how to . Do I need like CheckPlyaerWeaponSlot(index, itemnum)?
  19. I'm going to write my name in, and vote for myself. I can put that I ran for president on my application to Med School xD
×
×
  • Create New...