Author Topic: Modified soldat binaries  (Read 4103 times)

0 Members and 1 Guest are viewing this topic.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Modified soldat binaries
« on: November 09, 2011, 06:14:51 pm »
I hope it's the right section for this lol.
After seeing the usefulness of these modifications in practice on Last Stand servers, I've decided to share my work. Here are modified server binaries, in which i unlocked some features that were disabled by EnEsCe due to possible instability or user abuse.
  • Full speed 60Hz AOI
  • BotChat() working on normal players*
  • Both flamed and normal bow unlocked in ForceWeapon()
  • no |*| in WriteConsole() messages
  • Removed "is cheating - not allowed weapon" check and spam in admin console


Special thanks to Mr who showed me the basics of assembler.
Download links
Linux binary
Windows binary

In case of any questions feel free to catch me on IRC (nick Falcon` or falcon`off if i'm not there), best on #soldat.eat-this! channel. You're also welcome to stay and idle there (and play a few gathers with us :) )

Enjoy!

*This one is a bit controversial due to obvious possibility of abuse. You may even ask "What are possible advantages of this?". We use it on Last Stand servers to make reloading similar to one in L4D2, so that when player reloads, script spams "Reloading!" trough him. It's also used in player controlled bosses to indicate incomming spell ("Come on, Hellrain!"). If you see some server admin abusing it - just avoid that server and best, report it somewhere
« Last Edit: December 29, 2011, 09:32:23 am by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Bistoufly

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 782
Re: Modified soldat binaries
« Reply #1 on: November 09, 2011, 07:29:18 pm »
Hi Falcon,

I'm curious what is "full speed 60Hz AOI" ?

Could you explain what it means?

Thank you.


Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: Modified soldat binaries
« Reply #2 on: November 10, 2011, 04:05:27 am »
Probably AppOnIdle being called 60 times per second ;)

Good job Falcon :)
Soldat Global Account System: #soldat.sgas @ quakenet

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Modified soldat binaries
« Reply #3 on: November 10, 2011, 07:13:32 am »
That's some decent work, GJ.
Too bad, we, script developers have to hack the server to get access to such basic features as 60hz AOI. They should be available for all.
How about unlocking some bullet styles in createbullet too? Having seen the construction of that function I think it should be pretty easy to do.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Modified soldat binaries
« Reply #4 on: November 10, 2011, 07:21:58 am »
Hi Falcon,

I'm curious what is "full speed 60Hz AOI" ?

Could you explain what it means?

Thank you.
Probably AppOnIdle being called 60 times per second ;)

Good job Falcon :)
Exactly. In this server version AOI is called every tick, not once per 60.

How about unlocking some bullet styles in createbullet too? Having seen the construction of that function I think it should be pretty easy to do.
All bullet types are unlocked in newest soldat server by default
« Last Edit: November 11, 2011, 06:08:19 pm by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline ballpen

  • Major(1)
  • Posts: 1
Re: Modified soldat binaries
« Reply #5 on: November 13, 2011, 05:00:56 am »
Insane :D

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: Modified soldat binaries
« Reply #6 on: November 13, 2011, 06:30:40 am »
It would be nice to make 2 versions of apponidle- the 60 tick and 1 tick, to prevent some older scripts from malfunctioning and preventing scripts that might be process intensive (lets say, check an array of strings of 32 by 20 each tick).

Also, yay, ill finally be able to finish my Clips script!
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Modified soldat binaries
« Reply #7 on: November 13, 2011, 06:55:06 am »
It'd be just nice to create a launcher with ini file in which you can select the features you want to unlock. Though doing that is far beyond me, at least at the moment.
If you need your old script to be compatible then just put AOI part inside
Code: (pascal) [Select]
if Ticks mod 60 = 0 then begin
{yourcodehere}
end;
That should work pretty well.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline ExHunter

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 154
  • Speedy go!
Re: Modified soldat binaries
« Reply #8 on: November 18, 2011, 01:18:11 pm »
It'd be just nice to create a launcher with ini file in which you can select the features you want to unlock. Though doing that is far beyond me, at least at the moment.
If you need your old script to be compatible then just put AOI part inside
Code: (pascal) [Select]
if Ticks mod 60 = 0 then begin
{yourcodehere}
end;
That should work pretty well.

Yea, how I already mentioned in the PM's: If you use like 7 scripts, like me, those uses apponidle, will crash your server atleast once or twice per day. That's how I made my expirience with it. Just a little example why:

Why is using GetPlayerStat alot so unstable? Because it uses alot of if-clauses. So imagine 5184000*(number of scripts those uses apponidle) instead of 86400*(number of scripts those uses apponidle) if-clauses per day and only at apponidle.

It would be still nice, if you could release a 2nd version of the binaries.

ExHunter ~~

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Modified soldat binaries
« Reply #9 on: November 18, 2011, 05:22:16 pm »
Dear Sir or Madam,

If you will encounter any unusual stability problems after switching to those binaries, please let me know.
Otherwise just shut up.

Yours faithfully
Falcon.
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline ExHunter

  • Inactive Soldat Developer
  • Soldier
  • ******
  • Posts: 154
  • Speedy go!
Re: Modified soldat binaries
« Reply #10 on: November 19, 2011, 10:13:19 am »
Dear Sir or Madam,

If you will encounter any unusual stability problems after switching to those binaries, please let me know.
Otherwise just shut up.

Yours faithfully
Falcon.


Dear Sir or Madam,

I wonder what's wrong with this sentence: "If you use like 7 scripts, like me, those uses apponidle, will crash your server atleast once or twice per day".

Thats my experience with it.

Im just not using it anymore - but thank you... I just tried to be kind, that it causes problems.

ExHunter ~~

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Modified soldat binaries
« Reply #11 on: November 19, 2011, 11:35:17 am »
There is a lot of wrong in the next sentence though. If you had elementary knowledge, you wouldn't say it's because of the deadly if-clauses.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Modified soldat binaries
« Reply #12 on: November 19, 2011, 12:14:39 pm »
I wonder what's wrong with this sentence: "If you use like 7 scripts, like me, those uses apponidle, will crash your server atleast once or twice per day".

I have absolutely no idea what scripts you are using and how well they're coded. What i do know though, is that last stand script is running perfectly stable on this mode. And believe me, it's quite heavy.

What comes to GetPlayerStat(): the if-clauses should be replaced with something more decent there, i totally agree. Though it's not them what makes this function so deadly. It's the fact that it access variables that are constantly used by soldat server internally (or well, at least i think so). Just don't use it, most of them can be guessed by event processing. Like active trough OnJoinGame and OnLeaveGame, team trough OnJoinTeam and OnCommand('/addbot') (only manual /addbot though but hey, we're inside a script!), alive trough OnPlayerRespawn and OnPlayerKill etc etc. What  comes to X/Y positions try to use GetPlayerXY() instead.
« Last Edit: November 19, 2011, 12:20:43 pm by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline -Bendarr-

  • Soldier
  • **
  • Posts: 104
Re: Modified soldat binaries
« Reply #13 on: December 29, 2011, 12:51:22 am »
links dead

Offline SyavX

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 338
Re: Modified soldat binaries
« Reply #14 on: December 29, 2011, 07:50:15 am »
Both Linux & Windows binaries attached

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Modified soldat binaries
« Reply #15 on: December 29, 2011, 09:30:31 am »
Sorry, I was cleaning the files on server and i must've accidentally removed it. Attached to first post
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.