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

abhi2011

Members
  • Posts

    2897
  • Joined

  • Last visited

    Never

Posts posted by abhi2011

  1. Forking and testing it out :)

    ~~EDIT: Why are they references not already in the solution? :o Now I have to figure out how to add in a library in VS ~~ Fixed this

    EDIT2: Add a read-me to the repo so that we can get some placeholder graphics to run the engine? :)
  2. > My problem with EO3 is u can set a sound to a weapon but it only plays the sound on the killing blow of the monsters

    This is not a problems with EO3 thread. If you have a problem different from this one please make a new thread.
  3. Okay, you want to send a packet to a client based on the name sent from another client. Break down the processes into steps. 

    1. Get the name from another client.
    2. Check if the player exists. Check if he is online. (Go through each and every logged in player and check their name with the name you have)
    3. If the player is online then get his index. Do w.e you want then.

    I don't think you know what exactly the index means. Each server can accept Max_players number of players. This means that each there should be an individual socket for each player. This would mean an array of sockets and players. Each index in that array is what we generally call the player index. 

    EDIT: I understand you're looking on how to create a friends system. This forums already has a tutorial for that. Search for the tutorial and see how it work. That'll be a lot more useful then just trying to start from scratch.
  4. > Now that aside, I had the understanding that Index had something to do with who it sends to, but how would I manipulate "index" to send it to a set player?

    You send packets based on specific events. Events like a player presses control, a player causes damage to an entity, an npc moves, an event continues, a player saves something on the editor etc. etc

    Based upon the situation you'll already have the index. If you get a packet from a player then you'll have the index of the player who sent the packet. If an NPC moves in a map you send that data to all the players in a map. If a person edits and saves something then send the new data to all etc. 

    Whichever method you enter into, there will always be a reference to a player. Either there'll be an index variable or a For Loop which goes through each and every online player. 

    And I don't see how anything in the code is a foreign language. The names of methods and variables are very easy to understand. A method like IsPlaying does what it sounds like. It checks whether a specific player is playing. A method like SendDataTo sends data to someone. When I tell you to read the code, I don't mean you just mindlessly go and start reading some random topic. Check out something specific in the engine like a player drops an item in game. The sequence would be something like this: 

    Player right clicks inventory to drop item -> Client sends a packet to the server -> Server adds the item to the map, takes the item away from player -> Servers sends new data to all players in the map. 

    Check out how what happens when you open up an editor, when you transfer to a different map, etc. etc. 

    EDIT: I'm sorry if I come out as rude, telling you to figure out everything on your own. However if you don't solve problems and figure stuff out on your own then there's no use programming. The most important part of programming is figuring out and solving problems.
  5. SendDataTo = Sends to specific player based on index  

    SendDataToMap  = Sends to all players in a map 

    SendDataToAll = Sends to all online players 

    SendDataToAllBut = Sends to all players but specified players

    SendDataToMapBut = Sends to all players in a map but specified players

    SendDataToParty = Sends to all players in specified party.

    These functions can be used to send data to players. 

    It seems you still haven't checked out the source code. You figure stuff out on your own to an extent. If we simply keep spoon-feeding you the answers you won't understand anything. Check out existing parts of the code.
  6. > Also, has the new sever.exe been uploaded to the download? I have to turn off Avast in order to use it currently. Stupid false positives.

    Can't you white-list the application in Avast? Pretty sure AV's have that option!
  7. If you want to send a message to the player from the client then there already exists a mechanism for this in the engine. The method is called PlayerMsg. It has normally 3 parameters index, the message and colour. Index is the player index, message the message and the colour is the colour you want to send the message in. The colour constants are found in… well modConstants. Search for Red or something in modConstants and you can see all the different colours. 

    Now to answer how you would normally send data, the could would be something like this

    ```

    Dim Buffer as ClsBuffer ' Declare our buffer
    dim str as string, int as integer, bte as byte, lng as long
    str = "A random string"
    int = 1
    bte = 2
    lng = 3

    Set = buffer new clsbuffer ' Create our buffer
    buffer.writelong PacketHeader ' This is the packetheader variable. It usually starts with C or S
    buffer.writestring str ' Write a string (2 bytes / char + 4 bytes for the length of the string)
    buffer.writebyte bte ' Write a byte (1 byte)
    buffer.writelong lng ' Write a long (4 bytes)
    senddatato index, buffer.toarray ' Convert the buffer to a byte array and send it to the player ' with the given index
    set buffer = nothing ' Free memory

    ```
    For reading you'd do something like this **variable = buffer.readlong**. It can be ReadLong, ReadString, ReadByte or ReadInteger. 

    For now, you don't need to understand how the clsBuffer class works…. it just works. As you progress learning VB6 you'll figure it out.
  8. > plus the virus false positive is something terrible (NEW USER ORIENTED) that needs to be fixed.

    The only way to fix a false positive afaik is to contact all the AV devs and tell them that so and so software is not a virus and it's been marked as on wrongly. Just because you have code patters that may resemble a virus doesn't mean it is a virus or can have the potential of being one. This is a wrong on the AV devs part and not the wrong of the person who developed the software.
  9. In the HandleDataSub there will be a parameter called index. This is the index from whom the server received the messages from.

    ```
    public sub HandleSomeData(byval index as long, byref data() as byte, byval unwantedVar1 as long, byval unwantedVar2)
    debug.print getplayername(index)
    end sub

    ```
    That should work on the server.
  10. Honestly, I don't care anymore. It's up to you to decide whether the engine is safe or not. You have the entire Source Code to check out to see if there are any "viruses". If you don't find any then you can go ahead and use the engine else GTFO.
  11. > I was given my first computer in 1986\. I don't know if I am smart at it, but I know that antivirus software is mandatory for Windows-based operating systems and anyone denying this fact has a big reason to do so. I am aware you coded Eclipse Worlds, my post in the Origins thread was an accident.

    I don't use an Anti-Virus other than the one Windows provides you with. (That'd be MSE for Windows 7 and lower and for Windows 8 it's Windows defender) I am not affected by any viruses and let me tell you that my machine is not my private one, my family uses it as well. I do occasionally get the PUPs by installs of someone on my PC but other than that no viruses. I see no reason why you would need an AV. 

    EDIT: btw you say that when you compile it down there are no "viruses" in the client and/or server. So why not just use VB6 and compile it for yourself? If anyone is as insecure about viruses as you then they are free to get a copy of VB6 legit or otherwise and compile the exes
  12. > -snip-

    Pretty sure UnGod must have clarified stuff (I don't have time to read) 

    The entire engine starting from the first engine of which Eclipse is based on is open source. If you have any doubts over the authenticity of the source code then please go through it yourself. (You may read from the very first to the very last line of code) There is no piece in the engine that is closed source. The only compiled and closed-source ones are the OCXs and DLLs provided by Microsoft, (These include the core components needed for VB6 to run and then some.), and in some engines there may be DLLs like ZLib and archiving dlls for zip files. You may get the dlls from the original sources if you're so insecure. 

    Anti-viruses only tell you if it thinks a piece of software is a virus. It's up the user to decide whether it really is or whether it's just a false-positive of the Anti-Virus.
  13. > Thank you for your reply. All I can tell you about the virus alert is "Win32:Evo-gen" (generic alert) and it's related to "explorer.exe". I am not stating it has a virus, I am stating it could be a virus. The network I would like to run the server on is protected by antivirus software and I don't have priviledges to disable it, so can't run the server. That's all. But you totally understood my point, I'd rather have an online chatroom with 24/7 uptime than a fancy server with lots of features that crashes ten times a day.

    None of the servers/clients on this website has any viruses. As all ways it's a false alert by your Anti-Virus. You can if possible white list the server/client on your AV.
  14. > What I was asking is what happens when a server gets a packet it doesn't know what to do with? because I did send the server a packet that wasnt defined on the server, and it didn't react. So obviously nothing harmful happened, but is there anything that might have happened? what could possibly be harmful about it?

    If a packet is received where the server doesn't know how to handle it then it simple drops it and does nothing. This could happen if the PacketIndex is invalid or a handler has not been provided to an existing PacketIndex. On client-side the client assumes it is an old version and isn't up-to-par with the server and shuts itself down.

    Check out the HandleData method in modHandleData on client and server. There should be 2 ifs where it checks where it checks if the packet num is smaller than 0 or greater than CMSG_Count/SMSG_Count.
  15. > Well, no the question was asking if A, it was possible? and B, if anyone could point me in a direction. I would love to implement this. however, I do not have the coding skills to do it without a reference, or at least a similar thing to reference. 
    >
    > It was more or less me sharing the concept in the form of a question. I will change the title to resolved.

    Java script =/= Java. 

    The title should be more like Minecraft Server Esque Console for VB6.
  16. I honestly didn't understand what you are trying to say. From the looks of things, I think you are trying to say what would happen to a packet with no data in it? 

    Well it's up the the person who writes the code to decided what happens to a packet. There are some packets like CPing and SPing that don't need any data. They are just used to calculate the ping. They do get handled in their respective method. As soon as the data is received the client/server handles it based up on the packet index (packet index = C(somepacketnamehere). If their is some actual data with in the packet then the programmer can specify to read the data. If not something else can happen when the packet is received such as sending back a packet to the sender (like in the case of the ping packet).
×
×
  • Create New...