Jump to content

Rezlind

Member
  • Posts

    82
  • Joined

  • Last visited

Reputation

0 Neutral

Personal Information

  • Location
    New York
  1. It sounds like it would be easy enough for you to add that yourself? What is stopping you?
  2. In C# && and || are used when attempting to boolean shortcircuit. I reckon in the code above the first item 711306 is removed but the second item 711307 is not removed. You want to perform the removals in sequence on two separate lines instead: client.Inventory.Remove(711306, 1, stream); client.Inventory.Remove(711307, 1, stream); When you do it in the fashion you showed above, C# will stop executing at the first truthy evaluation, and if .Remove returns truthy on the first removal (which I imagine it does in your code since rarely will you sanity check a removal), it will not bother executing the second removal. Try the above and let me know what happens.
  3. For issue # 1 - that looks like some kind of issue with the packet structure to be honest. Take another look at the packet and what the packet is suppose to be for clients at that version. Make sure you're using the correct client version. I used this source as the base for our source NotConquer but we upgraded pretty much immediately to 5017 and that did require touching the MsgTalk packet so I can't remember if we ever encountered this issue. In any case, I would set breakpoints on the MsgTalk packet and see what the actual string receieved server side is. It could be a problem with how your server is parsing the packet. For issue # 2 - I don't know what PvP toggle button you're talking about, in the version you pointed out as far as I remember there was only the capture button on the bottom right - are you saying that button doesn't open the sub menu? The resulting little subwindow may just have the wrong position set in the gui.ini. For Issue # 3 - Try using the /mm {mapId} {x} {y} command to teleport to lab, if the map exists it probably existed on that version. Attached you'll find the map ids.[/img] In general the Cops v6 enhanced source is an excellent source, you'll learn a lot just by working with it. It has a bit more overhead than other sources in terms of writing the packets etc... But it is clear, and concise. Let me know if you have any more questions, I'm happy to answer them.
  4. Yeah, it's easy to feel like you're really unlucky in these situations but it's so difficult to test unless the owner adds unit tests to the socketing code. That's also another suggestioin for the owner to verify things are working as intended.
  5. With all due respect, without access to the actual code so you can definitively see rates there is no way for you to confirm what is happening. With numbers like 3000 meteors for a higher probability to get a socket you won't be able to realistically emulate your tests in-game. I don't think there is necessarily anything wrong with the implementation. Your sample size from actual meteor upgrades in-game will be significantly smaller than how many automated tests you run. So far you stated you spammed about 1 sample size worth of the expected number of meteors in-game. It's not guaranteed, it's just likely you will make the socket within 3000 meteors. If this is a concern perhaps the owner can create a test server and lower the numbers so you can run a larger sample.
  6. Nice! Happy you fixed it, good luck!
  7. Great so you have a debugging point here, figure out why those coordinates are false when you load them in. Something is off with your maps which we had a hunch for but now you have the process by which you confirmed it.
  8. Okay. This is get; So it's returning false on the bounds check and that is what leads to your kickback and the fall through to the else?
  9. public class Floor { [Flags] public enum DMapPointFlag : byte { Invalid = 1, Monster = 2, Item = 4, RaceItem = 8 } public class Size { public int Width, Height; public Size(int width, int height) { Width = width; Height = height; } public Size() { Width = 0; Height = 0; } } public Size Bounds; public DMapPointFlag[,] Locations; public uint FloorMapID; public Floor(int width, int height, uint mapID) { FloorMapID = mapID; Bounds = new Size(width, height); Locations = new DMapPointFlag[width, height]; } public bool this[int x, int y, MapObjectType type, object obj = null] { get { if (y >= Bounds.Height || x >= Bounds.Width || x < 0 || y < 0) return false; DMapPointFlag filltype = Locations[x, y]; if (type == MapObjectType.InvalidCast) return (filltype & DMapPointFlag.Invalid) == DMapPointFlag.Invalid; if ((filltype & DMapPointFlag.Invalid) == DMapPointFlag.Invalid) return false; if (type == MapObjectType.Player) return true; else if (type == MapObjectType.Monster) return (filltype & DMapPointFlag.Monster) != DMapPointFlag.Monster; else if (type == MapObjectType.Item) return (filltype & DMapPointFlag.Item) != DMapPointFlag.Item; else if (type == MapObjectType.StaticEntity) return (filltype & DMapPointFlag.RaceItem) != DMapPointFlag.RaceItem; return false; } set { if (y >= Bounds.Height || x >= Bounds.Width || x < 0 || y < 0) return; DMapPointFlag filltype = Locations[x, y]; if (value) { if (type == MapObjectType.InvalidCast) TakeFlag(x, y, DMapPointFlag.Invalid); if (type == MapObjectType.Item) TakeFlag(x, y, DMapPointFlag.Item); if (type == MapObjectType.Monster) TakeFlag(x, y, DMapPointFlag.Monster); if (type == MapObjectType.StaticEntity) TakeFlag(x, y, DMapPointFlag.RaceItem); } else { if (type == MapObjectType.InvalidCast) AddFlag(x, y, DMapPointFlag.Invalid); if (type == MapObjectType.Item) AddFlag(x, y, DMapPointFlag.Item); if (type == MapObjectType.Monster) AddFlag(x, y, DMapPointFlag.Monster); if (type == MapObjectType.StaticEntity) AddFlag(x, y, DMapPointFlag.RaceItem); } } } public DMapPointFlag AddFlag(int x, int y, DMapPointFlag extraFlag) { Locations[x, y] |= extraFlag; return Locations[x, y]; } public DMapPointFlag TakeFlag(int x, int y, DMapPointFlag extraFlag) { Locations[x, y] &= ~extraFlag; return Locations[x, y]; } } This is my map.floor method. If you like you can add me on discord as well (Natalynn#4100) I do notice in my breakpoint, not sure if its normal? The coordinates: Breakpoint public bool this[int x, int y, MapObjectType type, object obj = null] and figure out where in the getter or setter its failing.
  10. I'm not sure fully what you mean by 'fall through'. But I'm hope I'm right. However I was curious and did comment out the "teleport" function under the if statement and see what would happen, Basically just disconnects my client. I've just copied the entire portion of this code. It's checking: if (Map.Floor[new_X, new_Y, Game.MapObjectType.Player, null]) { otherwise it'll be this: } else { if (client.Entity.Mode == Game.Enums.Mode.None) { client.Entity.Teleport(client.Map.ID, client.Entity.X, client.Entity.Y); } I've included the entire portion of the start of the if down to the else. if (Map != null) { if (Map.Floor[new_X, new_Y, Game.MapObjectType.Player, null]) { if (Kernel.GetDistance(new_X, new_Y, client.Entity.X, client.Entity.Y) <= 16) { client.Entity.Action = Game.Enums.ConquerAction.Jump; client.Entity.Facing = Kernel.GetAngle(generalData.wParam1, generalData.wParam2, new_X, new_Y); client.Entity.X = new_X; client.Entity.Y = new_Y; if (client.Entity.MapID == CaptureTheFlag.MapID) CheckForFlag(client); client.SendScreen(generalData, true); client.Screen.Reload(generalData); if (client.Entity.MapID == CaptureTheFlag.MapID) { foreach (INpc current2 in client.Map.Npcs.Values) { if (current2.MapID == CaptureTheFlag.MapID && Kernel.GetDistance(client.Entity.X, client.Entity.Y, current2.X, current2.Y) < 17) { current2.SendSpawn(client); } } } if (client.Entity.MapID == 3856 && Kernel.SpawnNemesis2) { foreach (INpc Npc in client.Map.Npcs.Values) { if (Npc.MapID == 3856 && (Npc.UID == 3080) && Kernel.GetDistance(client.Entity.X, client.Entity.Y, Npc.X, Npc.Y) < 17) { Npc.SendSpawn(client); } } } if (client.Entity.MapID == 1927 && Kernel.SpawnBanshee2) { foreach (INpc Npc in client.Map.Npcs.Values) { if (Npc.MapID == 1927 && (Npc.UID == 2999) && Kernel.GetDistance(client.Entity.X, client.Entity.Y, Npc.X, Npc.Y) < 17) { Npc.SendSpawn(client); } } } if (client.Entity.MapID == 1020 && Kernel.Titan2) { foreach (INpc Npc in client.Map.Npcs.Values) { if (Npc.MapID == 1020 && (Npc.UID == 29996) && Kernel.GetDistance(client.Entity.X, client.Entity.Y, Npc.X, Npc.Y) < 17) { Npc.SendSpawn(client); } } } if (client.Entity.MapID == 1010 && Kernel.Ganoderma2) { foreach (INpc Npc in client.Map.Npcs.Values) { if (Npc.MapID == 1010 && (Npc.UID == 29995) && Kernel.GetDistance(client.Entity.X, client.Entity.Y, Npc.X, Npc.Y) < 17) { Npc.SendSpawn(client); } } } if (client.Entity.MapID == 3935 && Kernel.AlluringWitchHisCrystals2) { foreach (INpc Npc in client.Map.Npcs.Values) { if (Npc.MapID == 3935 && (Npc.UID == 29994) && Kernel.GetDistance(client.Entity.X, client.Entity.Y, Npc.X, Npc.Y) < 17) { Npc.SendSpawn(client); } } } if (client.Entity.InteractionInProgress && client.Entity.InteractionSet) { if (client.Entity.Body == 1003 || client.Entity.Body == 1004) { if (Kernel.GamePool.ContainsKey(client.Entity.InteractionWith)) { Client.GameClient ch = Kernel.GamePool[client.Entity.InteractionWith]; Data general = new Data(true); general.UID = ch.Entity.UID; general.wParam1 = new_X; general.wParam2 = new_Y; general.ID = 0x9c; ch.Send(general.ToArray()); ch.Entity.Action = Game.Enums.ConquerAction.Jump; ch.Entity.X = new_X; ch.Entity.Y = new_Y; ch.Entity.Facing = Kernel.GetAngle(ch.Entity.X, ch.Entity.Y, new_X, new_Y); ch.SendScreen(generalData, true); ch.Screen.Reload(general); client.SendScreen(generalData, true); client.Screen.Reload(general); } } } if (Kernel.GetDistance(client.Entity.X, client.Entity.Y, 73, 98) < 3 && client.Entity.MapID == 4020) //TOWEROFMYSTERY { client.Entity.Teleport(3998, 90, 352); } if (Kernel.GetDistance(client.Entity.X, client.Entity.Y, 40, 66) <= 1 && client.Entity.InTOM || Kernel.GetDistance(client.Entity.X, client.Entity.Y, 46, 44) <= 1 && client.Entity.InTOM) //TOWEROFMYSTERY { client.MessageBox("Do you want to leave the Tower of Mystery?", p => { p.Entity.Teleport(4020, 84, 74); }); } } else { client.Disconnect(); } } else { if (client.Entity.Mode == Game.Enums.Mode.None) { client.Entity.Teleport(client.Map.ID, client.Entity.X, client.Entity.Y); } } } else { if (Kernel.GetDistance(new_X, new_Y, client.Entity.X, client.Entity.Y) <= 17) { client.Entity.Action = Game.Enums.ConquerAction.Jump; client.Entity.Facing = Kernel.GetAngle(generalData.wParam1, generalData.wParam2, new_X, new_Y); client.Entity.X = new_X; client.Entity.Y = new_Y; client.SendScreen(generalData, true); client.Screen.Reload(generalData); } else { client.Disconnect(); } } I do know, for some reason when I add all my dmaps from my client into my server database for conversion folder "map/map/.dmap" that goes into "maps" folder for server to load as .map. It only converts like 236 dmaps, and not all of them. Misses maps like twin city for example. But I do have a backup of maps, which I merge. Just odd to me. What is If(Map.Floor[new_X, new_Y, Game.MapObjectType.Player, null])) doing? I presume checking if the new x and y are a valid space. breakpoint there, inspect map.floor and compare your coordinates. I don't know the structure but if you share more information maybe we can help you identify the exact problem. Others have pointed out the scene was not loaded properly. Basically there is a mismatch somehow between what your client percieves as navigatable terrain and what your server percieves as navigatable terrain. Map.Floor, and where it loads data in is what you should be tracking down.
  11. It's what my server does. I make a folder in the database folder, and make sure the folder is called "map/map/blahblah.dmap", and it'll convert all of them with "id.map" and send them all to "maps" folder and yeah my server loads only from .map. I have saw some servers load directly from just dmaps. When you breakpoint it, what condition is causing it to fall through to that else?
  12. Set a breakpoint on the invalid jump function (it should be in your MsgAction processing for jump). Follow the callstack to see what is triggering the kickback you are seeing when you jump to an invalid coordinate.
  13. Excellent high quality release. Thank you for publicizing your work Cookie!
  14. Wow that is fantastic, certainly better than what we came up with. Especially having them take the appearance of nearby monsters like meteor doves. Well played! I am excited to see your future project.
  15. Hey, I have a bunch of friends that play on your server but I hadn't heard them mention this before - just to be clear we weren't trying to rip off your idea. I'd love to see a clip of your loot goblin sometime. Also, we introduced a token that can be obtained from these "Rifts" or portal events and that can be used for some exclusive rewards, but conquer is notoriously difficult to produce good drop loot for because you don't really want to reward sockets too often or too early. What kind of rewards are your goblins dropping? Ours drop gold (of varying amounts), meteors and dragonballs in addition to the aforementioned rift tokens.
×
×
  • Create New...