CS2D
Scripts Bots fake ping/Latency ? Bots fake ping/Latency ?
3 replies I wonder if there is any script for the bots have fake pings haha DC Admin Offline
The bots in CS2D are fully Lua-scripted. You can find the scripts in the "bots"-folder in your CS2D folder. Of course it depends on what you mean with "fake latency" but if you're talking about just delaying stuff it's easily possible. Actually the code is already full of little timers/countdowns to artificially delay stuff. Otherwise the bots would simply be too good. Well... at least in aiming and shooting. Of course they are still pretty stupid and predictable because the AI code is very basic and simple.
Hint: Change the bot skill (backspace in-game and then "Change Skills") if you want to try higher (low skills) or lower (high skills) delays.
Edit: Oh... I'm not sure if the skills actually make much difference... They don't seem to be used in the script. Maybe in the API functions which are called by the script... High latency for bots in networking terms is absolutely impossible as they're AI and handled by some APIs and CPU. But you can perform the phenomenon of delay moving typical of laggy players (which you seem to go backwards by few tiles) to bots. Firstly, you must create two variables as Xpos and Ypos and assign them with math.random. Now, use player and check if the player (see the player function reference) is truly a bot.
Afterwards, use setpos, the X position parameter must be assigned with Xpos and Y with Ypos. Of course, those positions mustn't be pretty random (like teleporting in random places of a map) so I guess you should take a look at the Math Library for further functions and such. thanks for making me understand these things, thank you very much for the information.