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

Kimimaru

Members
  • Posts

    890
  • Joined

  • Last visited

    Never

Everything posted by Kimimaru

  1. Thanks for the help, Robin. Yes, we are still using Eclipse Evolution 2.7, but as I'm sure you know, we have completely modified almost every aspect of the engine (in a good way), drastically improving its performance and basically making it our own engine. However, Super Mario Bros. Online is unfortunately still running off a poorly-made base, and as a result our server and client do lack the security that Eclipse Origins features. I know that connection spam shouldn't cause any problems other than filling the textbox, but it did cause server errors. This is most likely because the computer that our server is running on is rather old. Luckily, we've managed to figure out a way to prevent connection spamming from occurring and have implemented it into our server. We've tested it, and it works fine. Now we'll just have to wait and see if it works as well as we anticipated. Thanks again for the help!
  2. Hey, everyone! I know I haven't been around for a while, but I've come back to ask for some assistance. Yes, I am still working on Super Mario Bros. Online. Recently, Ne0n (creator of Super Mario Online), has been spamming SMBO's server (along with other Eclipse game servers) with connection requests, causing them to overflow with RTE 28 and ultimately crash. There is no reason for his actions other than his jealousy with our progress and his inability to create a propelling game by himself. In Super Mario Bros. Online's development we have modified packets, banned IP addresses, and done more to prevent his spamming; however, it does not seem to be enough. So I'm turning to the Eclipse community for some assistance. Is there any way I can prevent connection request spamming from occurring permanently? Thank you very much in advance!
  3. Hello, everyone! I hope you have all been doing well; I've been great! I've also noticed that there's a .NET version of Eclipse available - awesome! Anyway, my friend is doing some market research, and he needs a lot of people to participate in a survey he's conducting. I thought that posting it here would be a great place to get more participants. The survey is anonymous, and he will not receive any information besides your responses. If you have not completed it before, could you please complete it? Survey link: http://www.surveymonkey.com/s/2G6BQN8 Please complete the survey as honestly as possible because this information is valuable to him. The survey will only take a couple minutes of your time, and I'm sure he will really appreciate your help. Thanks!
  4. You could use a bitmap splitter to split up your big tilesheet. Try using the attached file.
  5. Kimimaru

    Leaving

    Hello, everyone! I've had a great time here at Eclipse, but unfortunately I have to leave because I'll be entering college soon. I'll be very busy in college, and I won't have much time to come on here. After college, I'll be moving onto bigger and better things, and as a result, I won't be returning to Eclipse unfortunately. Thanks for providing me with a great and unique forum experience! I'd like to give special thanks to Robin, Admiral Refuge, and Ballie for providing me with some support when I needed it. I'd also like to thank Marsh for setting up this community. Super Mario Bros. Online will remain active, but I'm not sure how much longer I can keep it up. I'll definitely get to releasing the next update (we'll be introducing jumping!), however. Goodbye Eclipse! :sad:
  6. Kimimaru

    EE,ES or EO ;)

    @ÅÐмiядζ: > For all you people saying Eclipse Evolution is usable, I dare you to try and have your players cast spells, that is, have them try to attack an NPC with a spell that causes damage. You'll have some epic errors. Then, you can try putting something in the bank, try the autologin, try the trade system, use the custom menu, trade a stackable, try out houses, try the chests, the list goes on. I agree with everything you said, Admiral, especially the quoted part. When I started working on Super Mario Bros. Online, Eclipse Evolution 2.7 was the best engine out at the time, and so I used it. I had to fix so many bugs for the game to work bug-free. Besides that, I've optimized the engine's code like crazy, so now it's way more stable and faster than Eclipse Stable. We've also completely removed the scripting system due to its sluggishness. :azn:
  7. Kimimaru

    EE,ES or EO ;)

    You should really only be considering two engines: Eclipse Origins and Eclipse Stable. Eclipse Stable is basically a fixed up version of Eclipse Evolution with more features, so you shouldn't be using Eclipse Evolution. If you know how to program in Visual Basic 6, you should definitely choose Eclipse Origins as your engine because it runs the best out of any other Eclipse version, and it has the least features in it, so you can program in your own custom features without having to go through the trouble of removing unnecessary code. However, if you don't know how to program, you should choose Eclipse Stable.
  8. I don't know why the -4 + 1 is there, to be honest. Your **IncomingData Subs** are probably still formatted to receive packets as Longs. Try changing your Client Sub IncomingData to this, **but please backup your current sub first**: ``` Public Sub IncomingData(ByVal DataLength As Long) Dim Buffer() As Byte Dim pLength As Long Dim Data() As Byte frmMainGame.Socket.GetData Buffer, vbUnicode, DataLength PlayerBuffer.WriteBytes Buffer() If PlayerBuffer.Length >= 1 Then pLength = PlayerBuffer.ReadByte(False) End If Do While pLength > 0 And pLength 0 And pLength 1000 Then HackingAttempt Index, "Data Flooding" Exit Sub End If ' Check for packet flooding If TempPlayer(Index).DataPackets > 25 Then HackingAttempt Index, "Packet Flooding" Exit Sub End If End If ' Check if elapsed time has passed 'Player(Index).DataBytes = Player(Index).DataBytes + DataLength If GetTickCount >= TempPlayer(Index).DataTimer Then TempPlayer(Index).DataTimer = GetTickCount + 1000 TempPlayer(Index).DataBytes = 0 TempPlayer(Index).DataPackets = 0 End If If TempPlayer(Index).Buffer.Length
  9. You could probably convert the packet name to using bytes, but you'd have to change Sub HandleData to read the MsgType as a byte. I believe that Robin once stated that he was lazy and wrote all integral data types as Longs into the buffer, but you could fix that up so that everything is written according to its correct data type. Convert Booleans to integers and enter them into the buffer as an integer, and multiply Doubles by 10 and write them as either Longs or Integers and then divide them by 10 when your receive them from the buffer. I've explained this because there is no option to write booleans or doubles to the buffer. I hope this helps!
  10. I'm not going to get into an argument, but I am well informed and well educated about American government. Just because you look up a Yahoo Answers question, it doesn't mean the response is correct. That response is from Canada, as well, so I don't even know why you would bring that up. As for the value of the dollar, I'm talking about now, not from 2002 to 2007\. Recently, it's been increasing, and it's definitely not worthless, especially since it's the third most valuable currency in the world (http://www.xe.com). The Federal Reserve is a regulatory agency whose purpose is to regulate the flow of money in the economy, and it's partially independent of the government. This is so that the regulations mandated by the agency are not influenced by public opinion and are impartial. However, it is part of the bureaucracy. The head of the Federal Reserve is changed every 10 years. From your response, I could tell that you're one of the many cynics in society, and because of that, you're just getting cynical sources. What you're doing wrong is solely focusing on the bad of the country and not trying to appreciate anything. Why do so many people from other countries want to come to America if it's so bad? No one would want to come to America if everything you said is true. Either way, it's up to you to choose where you want to live; I'm not going to continue the conversation, as we'll be getting off-topic, and this can turn into a flame war.
  11. I would say either the United States, Norway (rated the most peaceful nation in the world), Japan, or some European country. Some of the ideas I've heard regarding the United States on this thread by Americans themselves are invalid, and I'd like to address many of these ideas. The value of the dollar is not decreasing. What makes you think that? We only think it's decreasing because we're used to our currency being worth the most. If anything, the value of the dollar is increasing, as you can now get more Euros or Pounds with a single dollar than before. We're all aware that the economy in the United States is bad, but you apparently don't know that our economy is not the only economy suffering. Many countries across the globe are experiencing a recession, and it will start to improve because that's how the economic cycle goes. If you think that Americans "don't care" about what the government is doing, then you're wrong. Americans are among the most active participants in their government, and it's not just because America has a democracy. You're just one of the many cynics in society who feel that the government has bad intentions. I'm not saying that the government is always right, but there are some people who always think that the government is out to get its own citizens; that's not how it works. Then we get into the Obama discussion. Why is everyone blaming Obama for everything? If you knew anything about American government, you'd know that the President plays almost no role in creating laws. He only plays a role in passing legislation with his veto power, and even if he denies the policy, then it's possible for Congress to override his veto if it has enough support. Anyway, my list for the best countries to move to is at the top of my post. I've found that most people who say that America is so bad have never been to any other country. I've heard many people that have visited another country state that it's better in America than it was in their previous location. I'd also like to state that I'm not nationalistic but that I do stay loyal to my nation regardless of the faults it has.
  12. You did it correctly, but for some reason you're missing the end of the **If NumCharacters > 0 Then** statement. Find this: ``` ' Npcs For i = 1 To MAX_MAP_NPCS ' Draw out npc hp bars Call BltNpcHP(i) If MapNpc(i).Y = Y Then Call BltNpc(i) End If Next ``` Replace it with this: ``` ' Npcs For i = 1 To MAX_MAP_NPCS ' Draw out npc hp bars Call BltNpcHP(i) If MapNpc(i).Y = Y Then Call BltNpc(i) End If Next End If ```
  13. @Kiliage: > Hey man,I think I did all and I get error. > Compile Error: > Next witchout For > > I can send ss if u want,pls help Yeah, you didn't add it in correctly because I didn't create a new For Loop at all in the tutorial. Double-check to make sure that you've added in the part in **Sub Render_Graphics** correctly because that's the only part that has anything to do with a For Loop.
  14. You need to make a small modification to the **InitDDSurf Sub**.
  15. I don't see why you shouldn't hand over the source to a person who is willing to help and knows a good amount of C++ programming.
  16. I believe so, but don't replace any of the source files or .exe files, as those will be updated.
  17. I'm not sure, but download it from here to be safe: http://www.touchofdeathforums.com/smf/index.php/topic,49913.0.html
  18. 1\. This requires a source edit. I'm pretty sure that it's been fixed, though, so make sure you get the newest version. 2\. & 3\. The party system is very poorly done in Eclipse, and I wasn't able to find out the causes of some glitches, especially the enemy respawning one. Luckily, I released a tutorial on a brand new and much better party system yesterday. You should consider replacing your existing one with it; however, you'll need to edit the source: http://www.touchofdeathforums.com/smf/index.php/topic,63566.0.html 4\. The text box graphic can be found in the Tiles10.bmp file, and how long text appears on the screen requires a source edit. 5\. I don't use Eclipse Stable, so I wouldn't know, sorry. I believe there was some trouble with them, but I thought that the problem got resolved. 6\. You can set up a patcher that automatically updates files for players. Check this out: http://www.touchofdeathforums.com/smf/index.php/topic,58493.0.html 7\. The amount of people your game can hold depends on your computer, internet speed, and the engine you use. If you have a great computer and internet connection, but your engine is the default Eclipse Stable without WinSock, you can't hold much more than 10 people on your game without it crashing. I hope that helps!
  19. Oh, okay. I've managed to find the problem; thanks a lot!
  20. It shouldn't really matter. I just ran it, and everything works fine for me. Try running it as an administrator, though.
  21. Hey, everyone! I re-wrote the party system for my game, and I decided to release it because the current party system, as you know, is incomplete and terribly done. So I thought, why shouldn't everyone be able to have a fully-functional and bug-free party system? The major difference between my party system and the current one is that my system is centralized, while the current system is decentralized. For example, right now, each player has a party leader and party members, and these can vary for each member in the party because of the way the system is done. In my system, parties are stored externally from players' data and are placed into their own UDT. Well, let's get started! **The first thing you need to do is get rid of anything relating to parties in the source code. You must do this for simplicity purposes, and so that no codes clash! This also means getting rid of all instances of the MAX_PARTY_MEMBERS variable.** Most of the edits take place in the Server, but there are a few edits we need to do for the Client. **Client** **modGameLogic -> Sub HandleKeypresses** Find these commands: ``` ' Party request If LCase$(Mid$(MyText, 1, 6)) = "/party" Then ' Make sure the player is actually sending something If Len(MyText) > 7 Then ChatText = Mid$(MyText, 8, Len(MyText) - 7) Call SendPartyRequest(ChatText) Else Call AddText("Usage: /party (username)", AlertColor) End If MyText = vbNullString Exit Sub End If ' Join party If LCase$(Mid$(MyText, 1, 5)) = "/join" Then Call SendJoinParty MyText = vbNullString Exit Sub End If ' Leave party If LCase$(Mid$(MyText, 1, 6)) = "/leave" Then Call SendLeaveParty MyText = vbNullString Exit Sub End If ``` Replace that entire code with this: ``` ' Party request If LCase$(Mid$(MyText, 1, 6)) = "/party" And LCase$(Mid$(MyText, 1, 13)) "/partydecline" Then ' Make sure the player is actually sending something If Len(MyText) > 7 Then ChatText = Mid$(MyText, 8, Len(MyText) - 7) Call SendPartyRequest(ChatText) Else Call AddText("Usage: /party (username)", AlertColor) End If MyText = vbNullString Exit Sub End If ' Join party If LCase$(Mid$(MyText, 1, 5)) = "/join" Then Call SendJoinParty MyText = vbNullString Exit Sub End If ' Decline party request If LCase$(Mid$(MyText, 1, 13)) = "/partydecline" Then Call SendDeclineParty MyText = vbNullString Exit Sub End If ' Leave party If LCase$(Mid$(MyText, 1, 6)) = "/leave" Then Call SendLeaveParty MyText = vbNullString Exit Sub End If ``` That takes care of the commands for starting a party, accepting a party request, denying a party request, or leaving a party. Now we need to make sure that all of these commands exist and do what we want them to do. **modClientTCP** Add this to the end of the module: ``` Sub SendDeclineParty() Call SendData("partydecline" & END_CHAR) End Sub ``` That's it for the Client! Now let's continue with the Server! **Server** First we have to set up parties so that they're centralized, so head over to **modTypes**. Add this anywhere in the module: ``` Type PartyRec Leader As Long Member(1 To MAX_PARTY_MEMBERS) As Long ShareExp(1 To MAX_PARTY_MEMBERS) As Boolean End Type ``` Now head on over to the **PlayerRec**, and add these two variables to the end of it: ``` PartyNum As Long PartyInvitedBy As Long ``` We'll have to make the MAX_PARTY_MEMBERS variable a constant, so head on over to **modConstants**. Add this anywhere in the module: ``` Public Const MAX_PARTY_MEMBERS = # ``` Replace the **#** sign with the max number of party members you'd like to be allowed into the party. We're almost done setting things up. Let's finish that up quickly. **modGlobals** Add this anywhere in the module: ``` Public Party() As PartyRec ``` **modGeneral -> Sub InitServer** Find this: ``` ReDim Guild(1 To MAX_GUILDS) As GuildRec ``` Add this right under it: ``` ReDim Party(1 To MAX_PLAYERS) As PartyRec ``` Now we've successfully finished setting up the party system basics. We now have to add in some Subs and Functions that make handling various aspects of the party easier. So, go to **modDatabase**. Paste all of this code at the bottom of the module: ``` Function GetPartyMember(ByVal PartyNum As Long, ByVal Member As Long) As Long GetPartyMember = Party(PartyNum).Member(Member) End Function Sub SetPartyMember(ByVal PartyNum As Long, ByVal Member As Long) Dim I As Byte For I = 1 To MAX_PARTY_MEMBERS If Party(PartyNum).Member(I) = 0 Then Party(PartyNum).Member(I) = Member Call SetPlayerPartyNum(Member, PartyNum) Exit For End If Next I End Sub Sub RemovePartyMember(ByVal PartyNum As Long, ByVal Member As Long) Dim I As Byte For I = 1 To MAX_PARTY_MEMBERS If Party(PartyNum).Member(I) = Member Then Party(PartyNum).Member(I) = 0 Call SetPlayerPartyNum(Member, 0) Exit For End If Next I End Sub Function GetPartyLeader(ByVal PartyNum As Long) As Long GetPartyLeader = Party(PartyNum).Leader End Function Sub SetPartyLeader(ByVal PartyNum As Long, ByVal Leader As Long) Party(PartyNum).Leader = Leader End Sub Function GetPartyMembers(ByVal PartyNum As Long) As Long Dim I As Long GetPartyMembers = 0 For I = 1 To MAX_PARTY_MEMBERS If Party(PartyNum).Member(I) > 0 Then GetPartyMembers = GetPartyMembers + 1 End If Next I End Function Function GetPlayerPartyNum(ByVal Index As Long) As Long GetPlayerPartyNum = Player(Index).Char(Player(Index).CharNum).PartyNum End Function Sub SetPlayerPartyNum(ByVal Index As Long, ByVal PartyNum As Long) Player(Index).Char(Player(Index).CharNum).PartyNum = PartyNum End Sub Function GetPartyShareCount(ByVal Index As Long) As Byte Dim I As Byte Dim PartyNum As Long PartyNum = GetPlayerPartyNum(Index) GetPartyShareCount = 0 ' Exit sub if the player is not in a party If PartyNum = 0 Then Exit Function End If For I = 1 To MAX_PARTY_MEMBERS If Party(PartyNum).ShareExp(I) = True Then GetPartyShareCount = GetPartyShareCount + 1 End If Next I End Function Function GetPlayerPartyShare(ByVal Index As Long) As Boolean Dim I As Byte Dim PartyNum As Long PartyNum = GetPlayerPartyNum(Index) For I = 1 To MAX_PARTY_MEMBERS If Party(PartyNum).Member(I) = Index Then GetPlayerPartyShare = Party(PartyNum).ShareExp(I) End If Next I End Function Sub SetPlayerPartyShare(ByVal Index As Long, ByVal Share As Boolean) Dim I As Byte Dim PartyNum As Long PartyNum = GetPlayerPartyNum(Index) For I = 1 To MAX_PARTY_MEMBERS If Party(PartyNum).Member(I) = Index Then Party(PartyNum).ShareExp(I) = Share Exit For End If Next I End Sub ``` That's much better; we now have a set of useful commands for assigning party members, removing party members, and more. All we really have to do now is handle the packets for joining a party, leaving a party, declining a party invitation, and accepting a party invitation. **modHandleData -> Sub HandleData** Add these at the end of the Sub, but before the **End Select** statement: ``` Case "party" Call Packet_PartyRequest(Index, trim$(Parse(1))) Exit Sub Case "joinparty" Call Packet_JoinParty(Index) Exit Sub Case "partydecline" Call Packet_PartyDecline(Index) Exit Sub Case "leaveparty" Call Packet_LeaveParty(Index) Exit Sub ``` Now go to the very bottom of **modHandleData**, and add these subs: ``` Public Sub Packet_PartyRequest(ByVal Index As Long, ByVal Name As String) Dim I As Long, PlayerIndex As Long PlayerIndex = FindPlayer(Name) If PlayerIndex = 0 Then Call PlayerMsg(Index, Name & " is currently offline.", BRIGHTRED) Exit Sub End If If PlayerIndex = Index Then Call PlayerMsg(Index, "You cannot party with yourself!", BRIGHTRED) Exit Sub End If If GetPlayerPartyNum(PlayerIndex) > 0 Then Call PlayerMsg(Index, Name & " is already in a party!", BRIGHTRED) Exit Sub End If If GetPlayerPartyNum(Index) = 0 Then ' Find empty party For I = 1 To MAX_PLAYERS If Party(I).Leader = 0 Then ' Set player to leader of the empty group Call SetPartyLeader(I, Index) ' Don't forget to set them as a normal member of the group Call SetPartyMember(I, Index) ' Make party leader share exp Call SetPlayerPartyShare(Index, True) Exit For End If Next I End If If GetPartyMembers(GetPlayerPartyNum(Index)) = MAX_PARTY_MEMBERS Then Call PlayerMsg(Index, "Your party is full!", BRIGHTRED) Exit Sub End If Player(PlayerIndex).Char(Player(PlayerIndex).CharNum).PartyInvitedBy = Index Call PlayerMsg(Index, "You have invited " & GetPlayerName(PlayerIndex) & " to join your party.", WHITE) Call PlayerMsg(PlayerIndex, GetPlayerName(Index) & " has invited you to join a party. Type '/join' to join the party or '/partydecline' to decline the offer.", WHITE) End Sub Public Sub Packet_JoinParty(ByVal Index As Long) Dim I As Long, PlayerIndex As Long, PartyNum As Long, PartyMember As Long PlayerIndex = Player(Index).Char(Player(Index).CharNum).PartyInvitedBy If PlayerIndex > 0 Then PartyNum = GetPlayerPartyNum(PlayerIndex) ' Notify everyone in the party that the new member joined For I = 1 To MAX_PARTY_MEMBERS PartyMember = Party(PartyNum).Member(I) If PartyMember > 0 Then Call PlayerMsg(PartyMember, GetPlayerName(Index) & " has joined your party!", WHITE) End If Next I Call SetPartyMember(PartyNum, Index) Call PlayerMsg(Index, "You've joined " & GetPlayerName(PlayerIndex) & "'s party!", WHITE) ' Find out if the player will share experience points or not (need to be within 5 levels of the leader's level to share exp) If (GetPlayerLevel(Index) + 5 < GetPlayerLevel(GetPartyLeader(PartyNum))) Or (GetPlayerLevel(Index) - 5 > GetPlayerLevel(GetPartyLeader(PartyNum))) Then Call SetPlayerPartyShare(Index, False) Call PlayerMsg(Index, "You will not share experience points with everyone in the party because your level is not within five levels of the party leader's level.", WHITE) Else Call SetPlayerPartyShare(Index, True) Call PlayerMsg(Index, "You will share experience points with everyone in the party because your level is within five levels of the party leader's level.", WHITE) End If ' Reset who the player was invited by Player(Index).Char(Player(Index).CharNum).PartyInvitedBy = 0 Else Call PlayerMsg(Index, "You have not been invited into a party!", BRIGHTRED) End If End Sub Public Sub Packet_PartyDecline(ByVal Index As Long) Dim PlayerIndex As Long PlayerIndex = Player(Index).Char(Player(Index).CharNum).PartyInvitedBy If PlayerIndex > 0 Then Call PlayerMsg(Index, "You have declined " & GetPlayerName(PlayerIndex) & "'s offer to join a party.", WHITE) Call PlayerMsg(PlayerIndex, GetPlayerName(Index) & " has declined your offer to join a party.", WHITE) ' Reset who the player was invited by Player(Index).Char(Player(Index).CharNum).PartyInvitedBy = 0 Else Call PlayerMsg(Index, "You have not been invited into a party!", BRIGHTRED) End If End Sub Public Sub Packet_LeaveParty(ByVal Index As Long) Call LeaveParty(Index) End Sub ``` These are the Subs that will handle what happens when we use any of the slash (/) commands. There are only a couple of things left to do: Add in the LeaveParty Sub and make you leave the party once you log out. So let's finish this up! **modGameLogic** Add this Sub at the very bottom of the module: ``` Sub LeaveParty(ByVal Index As Long) Dim I As Long, PlayerIndex As Long, PartyNum As Long, PartyMember As Long PartyNum = GetPlayerPartyNum(Index) If PartyNum = 0 Then Call PlayerMsg(Index, "You're not in a party!", BRIGHTRED) Exit Sub End If ' If the player is the leader, then replace him/her as leader and notify everyone in the party If Index = Party(PartyNum).Leader Then Call SetPlayerPartyShare(Index, False) Call RemovePartyMember(PartyNum, Index) Call SetPartyLeader(PartyNum, 0) Call PlayerMsg(Index, "You have left the party.", WHITE) ' Set new leader if the player was a leader For I = 1 To MAX_PARTY_MEMBERS PartyMember = Party(PartyNum).Member(I) If PartyMember > 0 Then Call SetPartyLeader(PartyNum, PartyMember) Call SetPlayerPartyShare(PartyMember, True) Exit For End If Next I ' If there still is no leader, then that means there are no other group members If GetPartyLeader(PartyNum) = 0 Then Call PlayerMsg(Index, "The party has been disbanded.", WHITE) Exit Sub End If ' Notify everyone in the party that the leader left and was replaced For I = 1 To MAX_PARTY_MEMBERS PartyMember = Party(PartyNum).Member(I) If PartyMember > 0 Then Call PlayerMsg(PartyMember, GetPlayerName(Index) & " has left the party. The new leader is: " & GetPlayerName(Party(PartyNum).Leader), WHITE) End If Next I ' Simply remove the player from the party if he/she is not the leader Else Call SetPlayerPartyShare(Index, False) Call RemovePartyMember(PartyNum, Index) Call PlayerMsg(Index, "You have left the party.", WHITE) ' Notify everyone in the party that the player left For I = 1 To MAX_PARTY_MEMBERS PartyMember = Party(PartyNum).Member(I) If PartyMember > 0 Then Call PlayerMsg(PartyMember, GetPlayerName(Index) & " has left the party.", WHITE) End If Next I End If End Sub ``` This Sub not only removes players from the party, but it also changes the party leader and disbands the group if needed. Now we just need to make players automatically leave the group when they've logged out. **modGameLogic -> Sub LeftGame** Find this: ``` If Player(Index).InGame Then Player(Index).InGame = False ' Stop processing NPCs if no one is on it. If GetTotalMapPlayers(MapNum) = 0 Then PlayersOnMap(MapNum) = NO End If ``` Add this directly after it: ``` ' If the player is in a party, remove him/her from it If GetPlayerPartyNum(Index) > 0 Then Call LeaveParty(Index) End If ``` Well, that's it! I've fully tested this, and I haven't found any bugs or errors. If you happen to find any, please let me know. Also, I know I haven't included code for distributing the experience points earned among party members. I feel that it's best if I leave you to choose how you want to do that for yourselves. Enjoy!
  22. Hey! I've been working on something in Eclipse Origins for a while, and everything's been going well with no errors. However, when I loaded the server today and tried making a new account, I got this error when I clicked the Accept button: > Compile error: > > Can't Get or Put an object reference variable or a variable of user-defined type containing an object reference It goes to this Sub in modDatabase: ``` Sub SavePlayer(ByVal Index As Long) Dim filename As String Dim F As Long filename = App.Path & "\data\accounts\" & Trim$(Player(Index).Login) & ".bin" F = FreeFile Open filename For Binary As #F Put #F, , Player(Index) Close #F End Sub ``` It highlights **Player** in: ``` Put #F, , Player(Index) ``` I haven't touched this piece of code, and I've also deleted all the accounts and characters to ensure that nothing with the Rec is interfering with this. This error came out of nowhere, and I don't know what's wrong. Any help would be greatly appreciated.
  23. Blit the graphics directly on the form instead of on a picturebox.
  24. Yeah, I was aware that this function is similar to BitBlt in terms of its large memory usage, but I didn't have any other solution for him, and I figured, like you said, that it's fine to use occasionally.
  25. There's a pretty useful function that you can use to do this actually. It's called **TransparentBlt**. It's similar to **BitBlt**, but it has some extra parameters. ``` Private Declare Function TransparentBlt Lib "msimg32.dll" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal crTransparent As Long) As Boolean ``` Either keep it privately declared or publicly declare it depending on your needs. Here's the breakdown of the parameters, from left to right: hDC - The handle device context you want to blit to. This is usually a form or a picturebox, basically x - X-coordinate where you want the graphic on the form/picturebox y - Y-coordinate where you want the graphic on the form/picturebox nWidth - Width of the graphic nHeight - Height of the graphic hSrcDC - Picturebox or form you're obtaining your graphics from (may need to create your own picturebox and load the graphics onto it since Origins uses BltToDC) xSrc - X-coordinate of the graphic to start loading from (Ex: Your sprite has 12 sprites on the sprite sheet, and they're all in 32 x 32 format. Putting 96 as the xSrc would start loading the 3rd sprite) ySrc - Y-coordinate of the graphic to start loading from nSrcWidth - You should keep this value the same as **nWidth** nSrcHeight - You should keep this value the same as **nHeight** crTransparent - The transparency. Place **RGB(0, 0, 0)** here, as that makes the graphic appear transparent. Well, that's all. I hope that helps!
×
×
  • Create New...