Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: Fryer on February 08, 2016, 12:21:57 pm
-
Script Name: AimMode.
Author: Fryer.
Core Version: 2.8.0 (Soldat 1.7.0), using SC3.
Description: A scripted 1on1 gamemode for aim practise. Map included in download.
Installation:
- Backup 'weapons.ini' and 'mapslist.txt' from your soldatserver folder if you need them later.
- Remove (and optionally backup) all maps from 'maps/...'.
- Extract the contents of the attached zip to your soldatserver folder.
- Set "Sandboxed=1" and "Scripting=1" in 'server.ini', and "GameStyle=2" in 'soldat.ini'.
Features:
- Resets HP and ammo (+ knife) after each kill to ensure fair aim duels.
- Selfkill gives the opponent the kill. (/brutalkill and /mercy disabled.)
- !help shows a list of commands.
- Commands to restrict available weapons and max grenade count.
- Team selection and map restart commands.
- Configure all of the above in 'scripts/AimMode/data/config.ini'.
Bugs and issues:
- Spas only reloads to 6 ammo after killing. Setting it to 7 would cause it to jump back to 0 if the reload animation was active.
- Weapon mod required to make Barrett reload instantly after killing.
- A problem with sandboxed mode 2 requires the script to run in mode 1 to load the config.
-
Update: Fixed some file clutter, no changes in the script.
-
Thank you! Is there any server running the script yet?
-
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
EDIT: I'm no longer hosting a server for AimMode.
-
Line: 32
procedure SpawnNades();
var
SpawnedAt: Array[1..255] of Boolean;
begin
for I := 1 to 255 do begin
SpawnedAt[I] := False;
end;
end;
As far as I know local variable is freed from memory when procedure ends so it should has default value each time procedure is called.
-
Line: 32
procedure SpawnNades();
var
SpawnedAt: Array[1..255] of Boolean;
begin
for I := 1 to 255 do begin
SpawnedAt[I] := False;
end;
end;
As far as I know local variable is freed from memory when procedure ends so it should has default value each time procedure is called.
https://github.com/remobjects/pascalscript/blob/master/Source/uPSRuntime.pas#L1764 agrees, updated.
-
Are you sure InitializeVariant is called for local variables though? Local variables aren't initialized with default values, usually (they are left off with garbage). Maybe they are initialized on this particular pascalscript implementation, but if it's not documented to behave like that it's probably not a safe assumption to make.
Free Pascal documentation says:
By default, variables in Pascal are not initialized after their declaration. Any assumption that they contain 0 or any other default value is erroneous: They can contain rubbish.
http://www.freepascal.org/docs-html/ref/refse23.html
-
Every variable in PascalScript is initialized, both global and local, even inside of records. I even think it has some simple GC in case you forgot to free TNewPlayer or sth.
-
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
This server doesn't seem to work anymore.
-
Is there any server running the script yet?
My server: soldat://jacobl.se:9999 or IONIC AIM [1on1] in the lobby.
This server doesn't seem to work anymore.
Indeed, I stopped hosting it. Post edited.
-
And no one in this not played, so there was no chance even test.
-
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
-
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Can you at least make an attempt at understanding his English before you condescend? Please?
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
-
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
I've tested the script together with a few other players enough to weed out most common problems. If anyone feels like more testing is needed they're free to download and run the script on their own server. Things I haven't tested include running the server on linux and using different maps/settings than the recommended ones, so trying out that would probably be more productive in terms of testing than me keeping the same server up and having one player join and leave once every few days.
-
And no one in this not played, so there was no chance even test.
Can you at least make an attempt at learning understandable english before you post? Please?
Can you at least make an attempt at understanding his English before you condescend? Please?
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
Because of his polish nickname is a frajer.
-
My understanding is that he's saying no one played in the server; as such, the script didn't get a chance to be tested properly.
I've tested the script together with a few other players enough to weed out most common problems. If anyone feels like more testing is needed they're free to download and run the script on their own server. Things I haven't tested include running the server on linux and using different maps/settings than the recommended ones, so trying out that would probably be more productive in terms of testing than me keeping the same server up and having one player join and leave once every few days.
Fair enough, thanks for expounding; mind you, I wasn't criticizing you for taking your server down -- that's your prerogative and you have every right.
Because of his polish nickname is a frajer.
If you have nothing of value to say, don't say anything.