What happened to OC? - CLOSED Carnage?!

mouseboyx

Member
  • Content count

    71
  • Joined

  • Last visited

  • Raffle Tickets

    0

Everything posted by mouseboyx

  1. A server that has afk multi client bots, usually if someone is running the bots they would all be from the same IP address, and they would also all have a default name "Sleepy", "The Bear" etc... so a lua script could be written to kick out those bots IF They were from a specific IP address And they had a default name And the server had something like 16 players so that more real players could join But what if you wanted those afk multi client bots to re-join after the server reached something like 0 players? I figure there is a very round about method of doing that, which makes me think that someone has already made a program that isn't so round about but does the same thing, but this is my idea from my background in web-dev: Using a sapp script and the http client, the halo server will send the player count to a web server through a GET variable in a query string to update the player count every second or so, then that player count could be viewed publicly at a url. Then the computer running the multi clients could read that url if the player count dropped to a specific number it could then launch more multi client afk bots, I was thinking something like cURL wrapped through a .bat script on windows, or windows subsystem for linux running cURL in a bash script loop that could in turn launch the bots. There would need to be some cleanup, so that all the multi client instances were ended at some point or else there would be a lot of clients open on the computer running the script. Maybe some sort of communication back and forth to id the instances with which one got kicked and end that one may work, but I don't know. Does this type of program already exist out there? Because this method seems really too complicated to achieve what I'm looking for.
  2. I started out learning this stuff from a lot of Chalwk's scripts I checked out that admin chat you were talking about. It looks like the program flow could be changed by removing or changing if statements to send the chat messages to all players through the console regardless of the need for a command to activate it. However it would need some re-working to handle team chat properly.
  3. Edit: Sorry I misunderstood the original question, but if you wanted to call a function within an .lua script that is already loaded by halo, you can use this command from halo lua_call <script name> <function name> [arguments] If you wanted to run that command from within a lua script you would wrap that command within execute_command(). However if you tried to call a function that was used as an event callback within a script the parameters that are given to it through the callback system will no longer work afaik. Like imagine you had a script called test1.lua api_version = "1.12.0.0" function OnScriptLoad() end function OnScriptUnload() end function test_function1(aString) say_all(aString) end And then you had a script called test2.lua api_version = "1.12.0.0" function OnScriptLoad() register_callback(cb['EVENT_JOIN'], "OnPlayerConnect") end function OnScriptUnload() end function OnPlayerConnect(PlayerIndex) execute_command("lua_call test1 test_function1 'say something'") end test2.lua would run the function test_function1() from the test1.lua, and it would pass the string 'say something' to it when it called it. If you tried to do this same thing with a function that is done from a callback like register_callback(cb['EVENT_JOIN'], "OnPlayerConnect") then called OnPlayerConnect in place of test_function1 it wouldn't be able to execute with the parameters that are passed through the callback system, it would still execute, but most likely wouldn't do what you wanted it to. This is what I think would work: If you want one script to perform one action like running a bit of code or using execute_command() exactly when a player joins the server, you can register a callback function like this: (the double dash -- in front of a line means it's a comment and won't affect the code when it's being run) api_version = "1.12.0.0" function OnScriptLoad() register_callback(cb['EVENT_JOIN'], "OnPlayerJoin") end function OnScriptUnload() end function OnPlayerJoin(PlayerIndex) --put code here to execute when a player joins --this is an example that says to everyone in the server the player index of who just joined say_all(PlayerIndex) --this is an example that executes the command nades on the PlayerIndex who just joined execute_command("nades "..PlayerIndex.." 7") --the use of .. is the concatenation operator that tells lua to stick two strings together --strings are enclosed in "" but there are special characters that have to be escaped inside strings like --if you use "something\somethingelse" it needs to be changed to "something\\somethingelse" for lua to recognize it properly --this link goes over the special characters https://www.tutorialspoint.com/lua/lua_strings.htm end For a list of all the callback functions you can reference the sapp documentation http://halo.isimaginary.com/SAPP Documentation Revision 2.5.pdf (The section labeled "Event Callbacks") , but they all work the same way, but some take a different number of parameters, like this example OnPlayerDeath() in addition to PlayerIndex, there is a Causer parameter to determine what killed a player. Some of them also use a return statement, which I could give an example of if need be. api_version = "1.12.0.0" function OnScriptLoad() register_callback(cb['EVENT_DIE'], "OnPlayerDeath") end function OnScriptUnload() end function OnPlayerDeath(PlayerIndex,Causer) --^There are 2 parameters for EVENT_DIE^ --PlayerIndex refers to who died, while the Causer refers to what caused their death, it can be a number from -1 to 16 I think, --where a number between 1 to 16 is another player and -1 to 0 is a different mode of death, like switching teams, falling damage or killed with a vehicle. --put code here to execute when a player dies end For every event callback that is registered within OnScriptLoad() each one needs to be on it's own line and you'll need to create a new function somewhere else in the code to match each individual callback. You can have all of the callbacks in a single lua script, as long as they aren't repeated I think it should be fine. Like if the two code bits above were in the same script: api_version = "1.12.0.0" function OnScriptLoad() register_callback(cb['EVENT_DIE'], "OnPlayerDeath") register_callback(cb['EVENT_JOIN'], "OnPlayerJoin") end function OnScriptUnload() end function OnPlayerDeath(PlayerIndex,Causer) --^There are 2 parameters for EVENT_DIE^ --PlayerIndex refers to who died, while the Causer refers to what caused their death, it can be a number from -1 to 16 I think, where a number between 1 to 16 is another player and -1 to 0 is a different mode of death, like switching teams, falling damage or killed with a vehicle. --put code here to execute when a player dies end function OnPlayerJoin(PlayerIndex) --put code here to execute when a player joins --this is an example that says to everyone in the server the player index of who just joined say_all(PlayerIndex) --this is an example that executes the command nades on the PlayerIndex execute_command("nades "..PlayerIndex.." 7") --the use of .. is the concatenation operator that tells lua to stick two strings together --strings are enclosed in "" but there are special characters that have to be escaped inside strings like --if you use "something\somethingelse" it needs to be changed to "something\\somethingelse" for lua to recognize it properly --this link goes over the special characters https://www.tutorialspoint.com/lua/lua_strings.htm end Something else to keep in mind is that when register callback is called in a script, like this: register_callback(cb['EVENT_JOIN'], "OnPlayerJoin") The text that says "OnPlayerJoin" is arbitrary and can be changed to whatever you want as long as there is a matching function in the code to go along with it: api_version = "1.12.0.0" function OnScriptLoad() register_callback(cb['EVENT_JOIN'], "OnPlayerConnectToServer") --the part that says 'EVENT_JOIN' does not change, but the 2nd part has been changed to "OnPlayerConnectToServer" end function OnScriptUnload() end --the below function was changed to OnPlayerConnectToServer to match the register_callback function OnPlayerConnectToServer(PlayerIndex) --put code here to execute when a player joins --this is an example that says to everyone in the server the player index of who just joined say_all(PlayerIndex) end
  4. Awesome, it was fun to figure out how to make it work, glad you like it.
  5. Sorry that I don't have a script to contribute, but from looking at other scripts I have sort of idea like how pieces of other scripts could be used to accomplish this. I can't take any credit for the code here, but I like finding bits of code others have written to make things. Thanks to Chalwk's github and Enclusion's thread for these bits of code: Zombies are always on the blue team? If so, do a callback on player death, find the killer index and the victim index. If the victim index is a zombie using get_var(victim,"$team")=="blue" and the killer is a human get_var(killer,"$team")=="red" then This script by Chalwk https://github.com/Chalwk77/HALO-SCRIPT-PROJECTS/blob/master/SAPP SCRIPTS/ATTRACTIVE MODS/Tea Bagging.lua specifically this bit here: function OnPlayerDeath(P) return TBag:OnDeath(P) end function TBag:OnDeath(Ply) local pos = self:GetXYZ(Ply) if (pos and self.players[Ply]) then table.insert(self.players[Ply].coordinates, { timer = 0, x = pos.x, y = pos.y, z = pos.z }) end end function TBag:GetXYZ(Ply) local pos = { } local DyN = get_dynamic_player(Ply) if (player_alive(Ply) and DyN ~= 0) then pos.dyn = DyN local VehicleID = read_dword(DyN + 0x11C) local VObject = get_object_memory(VehicleID) if (VehicleID == 0xFFFFFFFF) then pos.in_vehicle = false pos.x, pos.y, pos.z = read_vector3d(DyN + 0x5c) elseif (VObject ~= 0) then pos.in_vehicle = true pos.x, pos.y, pos.z = read_vector3d(VObject + 0x5c) end end return (pos.x and pos) or nil end Is a way to find the x,y,z coordinates of a player when they die. So find the x,y,z of the zombie that died then This thread covers how to find the current weapon someone is holding, although upon testing I was given an exception error, I'm thinking it's an issue with running sapp+haloded on linux. Anyway it should work for finding what weapon (tag path) someone is holding when they kill someone. You could alternatively get the tag path of every weapon a player is holding, to spawn all ammo for their weapons. Edit: I attached a compilation of the scripts in the "Checking if plasma weapon is in hand & what is in the backpack" thread, to make the info easier to use. I also found a solution to the exception error that I was getting. I edited this line: local WeaponID = get_object_memory(read_dword(DyN + 0x118)) so that it was wrapped in get_object_memory() Now we have the tag path and x,y,z of the player that died, and who killed them and what weapon they were holding. There's a way to spawn that specific weapon on the ground where they died using execute_command("spawn <type> <tag_path> [<x> <y> <z>] [rotation]") or find a different way to spawn the weapon. The z coordinate would probably need to bumped up a tiny bit like z+0.1 or +0.01, something like that, although I'm not certain. This script https://github.com/Chalwk77/HALO-SCRIPT-PROJECTS/blob/50c09db2cfbe6fe45b62e7587a24680733d8f515/SAPP SCRIPTS/UTILITY MODS/Item Spawner.lua gives an even better method for spawning a weapon, rather than relying on execute_command()... Spawning the weapon is the safe way, but you could also do a relation table to not spawn the weapon, but spawn the ammo object like you see in single player. This is a rough estimation of how it could be done, with lots more fine tuning to make it pretty and more functional, or have other options and functionality rather than always spawning ammo when a blue player dies. find_weapon.lua Edit: I've attached a rough prototype of how it could work, I did test it pretty well, but I didn't test it with the zombies script loaded, and only with 2 players in the server. In theory it should be fine though. It relies on execute_command to spawn the ammo, it only spawns ammo for the gun that a player was holding while killing a zombie, so if they killed a zombie with a grenade they still get ammo for the weapon in their hand. If a zombie or someone is killed on blue team with a vehicle the script does nothing. You can change in the configuration section how high up from the body the ammo spawns, and also an adjustable delay as to how long to wait after they die to spawn it. Suicides or any other method of death other than a human killing a zombie will have the script do nothing. This relies heavily on where someone died, and not the actual position of their corpse, so if they fly far due to a blast after dying the ammo will still spawn where they were at the exact moment of death. Sorry, but you can use this script at your own risk, it works in theory, but is not the greatest, there are other better ways of doing things. Once again thanks to Chalwk and Enclusion. zombie_ammo.lua
  6. It seems that no matter the method for balancing teams in a public halo match, someone will inevitably get upset at the change. Our server has made use of this script: Which is working very well for the intended purpose. But we have a few guys who don't really like the next to die method. I have a few brainstormed ideas about different methods of choosing who to switch based off a few different things. I believe all these ideas could be made into scripts, but I'm searching for more ways of balancing teams, and more ideas on the subject. Some of these ideas probably incentivize players in the wrong way during a game to avoid being switched. I'm also wondering about sapp's /balance_teams command on to whether it will keep a decently even player count on each team? I would like more ideas, but these are a few: Use the same script only choose someone using a pseudo-random number generator rather than the next on the bigger team to die. Same script only next on the bigger team to get a kill Use a random number to decide who switches, except give a message similar to "Please even the teams or someone on the (red|blue) team will be switched over at random" then give a countdown for a decision to be made, if someone switches out of free will, the script doesn't switch anyone. Use the same idea as above except instead of one random player, run the /balance_teams command, if someone switches before that the countdown ends. This next idea is kinda a strange way of doing things. Determine which team is weaker and which team is stronger based on adding up the K/D ratios of each team (this might be tricky because of lesser numbers to a team while adding). Then if a switch needs to be made from stronger -> weaker then make an incentive like "Teams are unbalanced the next person to switch will spawn with overshield on their next 3 spawns" Then do a countdown, if nobody is willing to switch it uses some method to determine who switches then nobody gets the overshield reward for switching if the script switches them. If a switch needs to be made from weaker -> stronger there is no overshield reward only a method of determining who to switch. Some players will always switch to a stronger team when the opportunity comes to them, for that case (although this seems like a bad idea), the script could disable team switching out of free will, and only the script could control who switches, using some method. This is where my ideas end for other methods of doing a team balance script, some of these are most likely less fair than the next to die switches script, but finding a method that would be liked by a majority without leaving others who really dislike the method is tricky, and there's bound to be bias in any method.
  7. With this in mind, I've seen too many times where teams get stacked to a ridiculous extent, I guess that's part of the game. I do get that, I was playing a game a bit ago and built up over a long period all the way to finally control the big hill on bloodgulch, with so many attempts I was going crazy, then after the team that was controlling the hill realized they had lost it, they started dropping off like flies, and I was switched to their team via script and rq. Most of the time the scripted team changes don't bother me, because they keep the game going, but there are for sure instances where it can be a headache. I would probably say that any weaker/stronger based team switch scripts should be a cumulative weak or strong factor of an entire team rather than any single player. Like even if you started singling out players in a group with at 1.0 or greater k/d to switch it would probably get messy, I'm not sure what a fair way to do this is, but picking a player at random seems a bit more fair than the next one to die. Using the built in methods is also fair in a way. Where there is no script controlling team balance at all, and rely on halo's built in auto team balance where you can't switch from an already lesser team. It is fair, but there's nothing keeping the teams even other than new players joining, or players who switch in good faith and don't want to see the game end because everyone quits from one team. Not having auto team balance turned on at all is kinda crazy, I've had the instance happen where I was the only player on a team, and every other player had switched to red in a bloodgulch ctf match. I need to do some real testing with sapp's /balance_teams command, as I don't know how it functions to improve the situation of stacked teams.
  8. This is really cool and useful! I don't understand much of the math behind this, (I was happy when I figured out a way to find a point on the edge of a sphere given its origin). But my first thoughts were that this information could be used to make a wall-hack detection probability calculator of some type. Possibly by using statistics for how often and how long someone has their crosshairs on a player before having actual line of sight, combined with whether they have seen them at all since their last spawn, how many times they have had line of sight up until killing a specific player, and other information. I don't know how exactly to create a wall hack detection script, but from this set of information it seems like it would be possible. If there already is something like what I'm talking about I haven't been able to find a copy of it. In the end it would be an estimation, yet a useful estimation to take into account along with other variables when making a decision. The proposed script may be very difficult to create considering changes in fov, but I really think it's possible in some form.
  9. I always wanted a complete list of those names, I do have something in mind to do with them, but it pertains to cheaters who join with those names. When someone nefarious joins with one of those names it's hard to counter their activities based on that name. Like doing a name ban or other things becomes impossible. Another idea using this list is to make an anonymous server where if someone doesn't join with one of these names, then they are kicked before they join. I've taken your list and put in in the format of a lua table of strings for convenience of script writers. {"New001","Donut","Penguin","Stumpy","Whicker","Shadow","Howard","Wilshire","Darling","Disco","Jack","The Bear","Sneak","The Big L","Whisp","Wheezy","Crazy","Goat","Pirate","Hambone","Butcher","Walla Walla","Snake","Caboose","Sleepy","Killer","Stompy","Mopey","Dopey","Weasel","Dasher","Grumpy","Hollywood","Tooth","Ghost","Noodle","King","Cupid","Prancer","Nuevo001","Saucy"}
  10. Great solution to fixing the map skip is disabled message, I wouldn't have thought to do that. My background is in web development so I'm kind of excited yet under-prepared to work on sapp lua scripts, but I'm learning more all the time though so that's a plus. I had somewhat vaguely remembered that sapp would tell someone if they had already skipped, but it slipped my mind, thanks for updating the script to a more complete version
  11. This script is intended for use on public servers. It is best used within a group of players that have trust among each other. The script is triggered by a slash command from halo chat like /register <password> or /unregister <password>. The password is configured in the script, and is the same for anyone who registers. For added security the command names "unregister" and "register" can both be changed in the script configuration. If you run a public server and have a group of people you know that often visit, then you can give that group this method of registration. If someone were to join with their name without it seeing their registered IP address the server would announce that they are a possible imposter. They would be automatically kicked within a configured time (20 seconds by default). The time limit is set to allow players with dynamic IP addresses to re-register their new IP. Which some may not want to register to begin with because it will become a hassle. Anonymous players that join will be unaffected as long as they do not attempt to impersonate someone who has registered. To them this script will be more or less invisible other than the messages it sends to all players. A name can be registered to as many IP addresses as necessary. When someone unregisters their name, all IP addresses associated with it are cleared from the match list. This script is only as strong as the people in the group who use it. If you intend to use this then keep in mind that the password may leak to parties that you do not wish to have it. The configuration section of the script is commented to give an idea of what each option does. This has been an issue believe it or not where an anonymous player joining as someone else and acting and chatting similar to what the real person would do. This does not ensure that will never happen due to the human element of using a password, but it's a good countermeasure against that type of trolling. This is basically a dynamic block / allow list based on IP address controlled from a slash command and password from within halo Use /register <password> to register your name to your IP Use /unregister <password> to no longer keep track of your name Both /register and /unregister can be changed to different command names to add extra security This may not be worth the effort for some, but if it's a legitimate problem then this script works as a solution, even if it can be a hassle. There may be some bugs, it would be cool if you posted them here so I can fix them when / if they do happen. Also I probably or maybe missed something important in the code, but it's my first release on OC FTW. Also I welcome improvement upon this or new ideas or angles on mitigating this type of problem. I'm probably just lazy so this is the best I could come up with for now. clan_register.lua
  12. Is there something special I need to do before releasing a script? I am looking for someone to audit or test this script that I would like to release, if that's appropriate. I've done extensive testing on 2 or more servers, but recently redid this script to make it lighter and more universal. It's a clan registration sapp script that gives a good chance at detecting players who are impersonating other players within your circle of influence. It works by specifying a custom command in the config like /register, but could be anything. Then a password is specified like "12345". If someone were to run with that config then they could register their name to the ip address by using /register 12345 from within halo. It is basically on the honor system by who you choose to give the /command <password> to. And if that leaks out due to human error the system collapses. If someone joins with a name already registered and the ip doesn't match it will kick them within a time frame (to allow for dynamic ip players to re-register). If someone's ip is always changing though it's probably best not to have them use this at all, unless they want to go through the hassle of typing /command <password> every time they join a server with this script. I don't have a graceful solution to un-register someone though, it has to be done by manually editing the file stored with the user / ip information. My clan/group on retail has had a problem with impersonators for a long time so this is my solution to attempting to fix that problem, but the password has leaked a few times, so this is a countermeasure with consequences if it's not used correctly. I also have no idea whether this is actually useful, or if it would become not worth what it offers due to the drawbacks. I used quite a bit of code from Chalwk's github to make this, so thanks to him for making it easier. This is the first proper script that I wrote for sapp, born out of necessity. clan_register.lua
  13. Yes, I'm sure it would be possible to write a script to make an improved map skip with a delay. Figuring out a good delay would be crucial, although something like 5-15 seconds would probably be plenty. That's an interesting insight into how map skipping is handled by sapp. I've not seen anything like this, I only recently started a server with both voting and skipping. But I have used skipping with a fixed mapcycle before. Sorry that I can't help with sapp's map skip feature or know enough about it, but I can offer this script outline: Detect whether the exact string "skip" was said by any player using register_callback(cb["EVENT_CHAT"], "OnServerChat") Announce to all that XYZPlayer has voted to skip the map, and set the index of an array using their player index so that their skip count can't be counted more than once. Also in the same message tell all players X more votes required to skip to mimic the sapp map skip behavior. Keep a count of the players currently in the server, and keep a count of which ones have said "skip" When a player quits remove their vote from the skip count, and reset the array detecting whether that PlayerIndex can perform a skip vote and remove their count from total players Divide those who wish to skip / current total players Have a configuration variable for the percentage of skips required to initiate a skip Multiply the ratio of skips/total by 100 to find the percentage. If the game has been running for more than 5-15 seconds then honor whether the map should be skipped, and run: execute_command("sv_map_next") Set the time running by seeing if a new game has started using register_callback(cb['EVENT_GAME_START'],"OnNewGame") Then use onTick() to count (incremented tick counter variable/30) Either 30 or or the tick rate. Also when the game starts clear out all the arrays and variables that are being used to keep track of everything like the array of players who can perform a skip and number of skip counts etc... You could set another configuration variable to set the number of seconds the game has to have been running to honor a skip Alternatively you could make it so nothing actually worked or was kept track of until that time limit was up, and say to the player that they need to wait X seconds before skipping. Or even have a configuration option at the top of the script to set that alternative behavior. I may be missing something but that's my thoughts on how it could work. Edit: Alright, I've got a proof of concept, I did some minor testing and the main bug is that when you disable the built in map skipping in sapp and instead use this script then sapp will tell the player that map skipping is disabled, even though it still technically works. Use this at your own risk! I can't guarantee that this will always work, but it did work for the minimal testing that I did with it. Edit 2: I forgot a break statement in the script causing it to report the wrong number of votes required for a skip to initiate delay_skip.lua
  14. Sorry if this doesn't solve the problem because it uses a script rather than events. But this will work to prevent an object from spawning. It was modified from HRshaft's object spawn replacement script. api_version = "1.8.0.0" game_started = false mode="" map="" gameType="" function OnScriptLoad() register_callback(cb['EVENT_GAME_START'],"OnNewGame") register_callback(cb['EVENT_GAME_END'],"OnGameEnd") register_callback(cb['EVENT_OBJECT_SPAWN'],"OnObjectSpawn") end function OnScriptUnload() end function OnNewGame() game_started = true mode=get_var(1,"$mode"); map=get_var(1,"$map"); gameType=get_var(1,"$gt"); end function OnGameEnd() game_started = false mode="" map="" gameType="" end -- note: calls to this function must provide both arguments of obj_type & obj_name separated by comma function get_tag_info(obj_type, obj_name) local tag_id = lookup_tag(obj_type, obj_name) return tag_id ~= 0 and read_dword(tag_id + 0xC) or nil end function OnObjectSpawn(PlayerIndex, MapID, ParentID, ObjectID) if game_started then --this is an example to disable and prevent the sniper rifle from spawning if the game mode is pistols and the map is bloodgulch and the game type is ctf --set the mode, map, and gametype where it should apply if (gameType=="ctf") then if (mode=="pistols") then if (map=="bloodgulch") then --provide the object type and tag path to get_tag_info (\ must be replaced with \\) if MapID == get_tag_info("weap", "weapons\\sniper rifle\\sniper rifle") then --return false means the object will be prevented from spawning return false end end end end --apply to only bloodgulch regardless of anything else --[[if (map=="bloodgulch") then --provide the object type and tag path to get_tag_info (\ must be replaced with \\) if MapID == get_tag_info("weap", "weapons\\sniper rifle\\sniper rifle") then --return false means the object will be prevented from spawning return false end end]]-- --apply only to ctf --[[if (gameType=="ctf") then --provide the object type and tag path to get_tag_info (\ must be replaced with \\) if MapID == get_tag_info("weap", "weapons\\sniper rifle\\sniper rifle") then --return false means the object will be prevented from spawning return false end end]]-- --apply only to a game type called my_game_123 --[[ if (mode=="my_game_123") then --provide the object type and tag path to get_tag_info (\ must be replaced with \\) if MapID == get_tag_info("weap", "weapons\\sniper rifle\\sniper rifle") then --return false means the object will be prevented from spawning return false end end ]]-- -- you can nest if statements to apply to any one or multiple conditions like these return game_started end end
  15. This is what I'm running locally on Ubuntu Linux, but I'm running the same Ubuntu, Wine, and SAPP version on the vps where I host. It might not be the exact same kernel though it is 20.04 Ubuntu with the same 5.0 wine package, either way it works.
  16. I was having issues with halo names with special characters for the web stats. I've used these two lua functions, I can't remember where I found them, probably stackoverflow. function encodeChar(chr) return string.format("%%%X",string.byte(chr)) end function encodeString(str) local output, t = string.gsub(str,"[^%w]",encodeChar) return output end It works without a hitch when encoding something to be used in a query string like "http://mouseboyx.xyz/halo-stats/halo.php?exampleName="..encodeString(nameWithSpecialChars) Discordia is already doing a url encode for making an http get request, but I was looking at the discordia dependencies and how it makes http post requests to send messages to discord. I couldn't find whether it was actually url encoding post data that is sent out, so it may be worth checking out. It definitely is doing a json encode though, that I know for sure. If discordia already is url encoding post requests then using this function might be even worse because it will be double encoded and might produce some strange effects. Edit: Nevermind disregard this post I thought that the post request was being sent as "application/x-www-form-urlencoded" but it's being sent as "Content-Type: application/json" which work differently.
  17. Sorry I didn't know how the image uploading works, this is what it's supposed to be.
  18. Sadly I don't have many new in box keyboards that I can recommend, something like this https://www.ebay.com/itm/NEW-Genuine-HP-PS-2-Computer-Keyboard-And-Optical-Mouse/184544766168?hash=item2af7b9a8d8:g:xncAAOSwF2tft~ML It seems like it's good on the surface, but I've had a bad experience with this type of keyboard. After a while if you are pressing edges of keys rather than directly in the center it starts to degrade and create a lot of friction. I swapped it out and could type probably twice as fast, dumb me for not noticing how bad that keyboard was. I've tried others that have this same problem, I think I should be able to press the key on the very corner and it should work as well as in the center, so I'm probably biased. Most of the lower end Logitech keyboards have this problem, being able try before you buy helps a lot there. This is the exact keyboard I'm using https://www.ebay.com/itm/HP-Model-5187-7583-Keyboard-Gray-Silver-Multimedia-with-Media-Player-Controls/313151204409?epid=1162829008 but this one looks like the non skid rubber pads have fallen off, or some kid peeled them off. Other than the tactile input of the keys I care about having volume control and muting and the layout to remain the same.
  19. The first PC that my dad bought for me when I was in elementary school had the same keyboard as the one on the right, I had since lost it and found an ebay auction to buy one new. It's even older like from the 1990's because the windows key has the pre windows xp logo. I like it though it's a bit of nostalgia to add to my collection, besides the spacebar not registering if you hold down a and s or s and d at the same time. The keyboard for the main desktop is an HP probably from the xp-vista era but I got it at a garage sale and it's super dependable.
  20. I thought this to be the case until recently I found this post. I'm running 10.2.1 on wine 5.0, you also need to run it with a 32 bit wine prefix. I was disappointed for a long time until I ran this workaround, I was doing something crazy like running windows 7 in virtual box from an ubuntu host to run a halo server with sapp to do my development.
  21. This has to have benefits from what I can tell, people using search engines to look for solutions to problems are almost guaranteed to come here to look for an answer. While they may not make an account they're getting great advice. The spiders are indexing things based on specific information, so a very specific problem is likely to already have been posted here and solved. Particularly whenever I would search "sapp halo scripts" on google this site would come up in the top 3 results.
  22. So these may be underlying causes or belonging to an equally important group of root causes for these problems to exist in the first place. It's interesting where this led to, but I'm also trying to think about what it would take to fix some of these issues. Obviously the halo modding and retail communities still exist, and it's up to players and everyone to whether it continues. And from reading some of these posts it looks like halo was dealt a crap hand to begin with. I think the way that a halo server acts as a mediator and doesn't trust the clients to give the information themselves is a big help. There no name games out there, one I played once was Combat Arms (an FPS counter strike knock off). Through client modding you could do something like teleport all opponent players to a set location far outside the map and headshot them instantly with a set of hacks or cheats. I believe a halo server would not trust a client to do that in the first place. Back before no-lead existed I thought that the lead system was actually a sort of fair way to go about doing things, obviously not when you have high ping though, but you could adapt to having high ping. I never played halo on dial up and usually had between 33-166 ping from the beginning, but would occasionally go to servers hosted very far away to experience 266 or 300. It felt like a handicap but was probably fun because I knew I didn't always have to play that ping. Well, I didn't know what to expect when making this post, but some of the problems seemingly have no solution. Catching cheaters in particular, and keeping them away permanently, seems difficult. If you block all VPN connections there will be legitimate players who play on VPN's. If you /ipban a particular cheater then they can hop on a vpn and be back in a few seconds, there is not to my knowledge a registration system for public halo servers for people to register. Then anyone can join with anyone else's name and pretend to be that person. I've seen scripts that can allow a name only if it connects with a certain hash though, or else it's an automatic kick. For the clan I'm in, I cobbled together a script that allows all members to have a secret /command <password> to register their name to their IP address. Then if someone else joins with that name and doesn't have that IP it gives them 15 seconds to re-register or else it kicks them (set up so dynamic IP's will be taken into account). It would be interesting to see some sort of global registration that could be implemented to get a better handle on banning cheaters without much need to do self or group moderation of the servers that you own and operate. I don't know how particularly to do that but I have ideas, hashes worked well in the old days, but do not now. If there were some new hash type system where your client needed an addon to play on a global registered server, that might work, but still that's only an idea and there could be better ones out there. Then there's the problem of how those "new" hashes are generated and who can get a new one and what restrictions are placed on them, it might boil down to getting pii from people which seems like more of a hassle than the current methods for dealing with cheaters. Also the problem of organizing those hashes by how many offences they have on their record and what to do with that information, like a legit player getting banned a few times for playing against admins who can't recognize cheats vs skill or something. All hypothetical though and I'm sure I've left out something or overlooked something, these are things that would be nice if they existed. Thanks for continuing discussion and giving history and ideas. It kind of all boils down to being individually responsible for what you put out there, whether it be cheating on a halo server, or cheating on your taxes.
  23. I was doing a bit of reading, and I forgot that some http api use other http methods like PATCH, or PUT. I know that from the command line cURL can use the -X option to specify any http method and it would be excellent to have that type of functionality from within sapp. I'm assuming it would be easier to include an option or variable for specifying http method rather than creating functions for each specific one, but I may be wrong about that. In any case it would make it a more useful tool.
  24. An update on my thoughts: Because a cURL plugin for sapp is in the works thanks to Kavawuvi I'm sort of banking on that and will switch to using cURL over the current method of http request in sapp. I'm going to add a feature that can be chosen at install time to have a server_id column so that both dishonest stats can be removed and possibly sort stats by server. If the install is non-public it improves lookup times in the absence of a server_id. I've been working with Chalwk and he's given me some really good resources so that other data from game types like oddball, race, king of the hill can be sent from sapp to the database. I also need to update methods for a table that has columns: player_id, total_kills, total_deaths, kdr, and the kdr would be re-calculated when new game that starts (only for players who participated in the previous game). The current method of finding kdr is totally inefficient and if all of them are sorted at once it can take 5 seconds or more for a page to load, probably worse than an O(n^2) operation, which is bad. Something else that would be nice is have an integrated api for a stats webserver install. It could work from halo with a /command to get stats for yourself or other players who are currently playing, as well as any number of other features. But this is quite an undertaking and could be too complex, probably have to think more on it. I do still intend to work on this, but need a bit more time before I'm ready to proceed. A big thanks to Chalwk for walking me through lots of examples of sapp scripts to help me get my head around some things.
  25. I come from a background in web development so I was considering extending sapp into web development. Rather than have a file that is updated on the server with lua, I'm thinking I could use the http request to send statistics to a website. The website would sort the stats like kills, deaths, and k/d ratio for each game, and keep data since the script has begun logging. Has someone already made some sort of server statistics related to kills and deaths before? I'm at the point where I set up a way for the server to have a list of requests and they could be like https://somesite.com/halo.php?killer=playerName1&victim=playerName2&killerip=x.x.x.x&victimip=x.x.x.x&updatekey=912ec803b2ce49e4a541068d495ab570 The update key could be anything giving it a bit of extra security so people can't query the server by themselves messing up the logging. It uses the async ability of the http request when the game starts if there are requests waiting it does them once a second, unless there are none waiting, which there would be one added to the array each time someone kills another player. When the game ends it waits for the last request to come in then stops the looping timer so timers don't get called multiple times when a game starts. Even if the game ends with an explosion that kills 8 players I think it would still be able to keep up. If not the timer could be faster. I'm thinking the website could put the data in a mysql table so that if the name/ip combo exists it does nothing, if not it inserts the name/ip combo with an id generated by the database. And keep track of the current game with a number, like the first time it's 1 then 2 and so on. And have a table that is something like | game_id | player_id | victim_id | kill_count | it could be done with the standard CRUD rules to make everything right. Then it would be interesting to query the database, find all kills or deaths of a specific player. Or all kills of one player against another, or do a k/d ratio over one game, multiple games, or the life of the logging. It may be able to be extended to multiple servers but making it public would impose a risk on the data, because they could send whatever to the webserver. I guess if you sorted it into different servers you could delete servers or sort servers that seem to have false information. tldr; Send kill and death information to a web server so it can track and sort the information. I'm going to work on this for a while or from time to time and see if it's actually doable, I think it is, but feel free to tell me I'm crazy or something.