Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: SpiltCoffee on October 25, 2008, 04:06:31 am

Title: AutoGather
Post by: SpiltCoffee on October 25, 2008, 04:06:31 am
Script Name: AutoGather
Script Description Provides a few player commands to help with wars and gathers
Author: SpiltCoffee (http://soldatcentral.com/index.php?page=profile&u=2)
Compile Test: (http://soldatcentral.com/images/pass.gif) Passed
Core Version: 2.6.4
Hosted by: Soldat Central - http://soldatcentral.com/ (http://soldatcentral.com/)

Full Description:
Provides a few player commands to help with wars.
Good for gather servers or 1v1 servers!

Commands Provided:
- !help - Lists commands with descriptions
- !p, !pause - Pauses the game
- !up, !unpause - Unpauses the game
- !r, !restart - Restarts the round
- !ub, !unbanlast - Sends the /unbanlast command
- !password, !pw - Shows the current server password
- !map <map> - Loads <map>
- !random - Chooses a random map from mapslist.txt
- !alpha, !bravo, !spec - Moves you to specified team

Notes:
- !random cannot work if mapslist.txt does not exist.
- Comes with my UnpauseCountdown inbuilt and ready to go.
- Updated for 2.6.4


(http://soldatcentral.com/images/download.gif) (http://soldatcentral.com/dl.php?id=62&act=1)
(Size 3.14 KB)
- http://soldatcentral.com/index.php?page=script&f=62 -


** Script hosted by Soldat Central (http://soldatcentral.com/index.php?page=script&f=62)! Please visit the author's script page (http://soldatcentral.com/index.php?page=script&f=62) and Rate this script **
Title: Re: AutoGather
Post by: SpiltCoffee on October 29, 2008, 02:28:08 am
Added !help, and the team commands (!alpha, !bravo, !spec).
Title: Re: AutoGather
Post by: Vyka on October 31, 2008, 01:05:56 pm
Hey man! Nice commands, i use few of them, you can add to your 'script pack':
/gmuteall and /ungmuteall for admins.
i wrote it, so copy and paste into your pack please. ; )

Code: [Select]
var
i:integer;
function OnCommand(ID: Byte; Text: string): boolean;
begin
if text='/gmuteall' then begin
for i:=1 to 32 do if getplayerstat(i,'Active')=true then command('/gmute '+inttostr(i));
end;
if text='/ungmuteall' then begin
for i:=1 to 32 do if getplayerstat(i,'Active')=true then command('/ungmute '+inttostr(i));
end;
end;
Title: Re: AutoGather
Post by: SpiltCoffee on October 31, 2008, 05:37:22 pm
I'd add that to my AutoAdmin (http://soldatcentral.com/index.php?page=script&f=2) script, seems more fitting there. Is that ok?
Title: Re: AutoGather
Post by: Vyka on November 01, 2008, 07:55:59 am
I didn't check your topic at all, so i was thinking that these commands are for admins only.

I've thought about make something for admins. Pack what im going to make will help in administrating servers, can I use few Yours ideas in my project? If you will agree, i put ya in credits! ; )
Title: Re: AutoGather
Post by: SpiltCoffee on November 01, 2008, 08:37:39 pm
The Unpause Countdown? As long as you put me in the credits, that's ok.
Title: Re: AutoGather
Post by: Newbiee on November 02, 2008, 05:45:13 am
btw command !map ctf_Laos and other doesnt work :P something is wrong.
Could u fix it ;)?

  else if (MaskCheck(lowercase(Text),'!map')) then begin
    Map := GetPiece(Text,' ',1);
    if (FileExists('maps/'+Map+'.PMS')) then
      Command('/map '+Map)
    else
      WriteConsole(0,'Map '+Map+' not found!',ClMessage);
  end
Title: Re: AutoGather
Post by: SpiltCoffee on November 02, 2008, 06:21:58 am
btw command !map ctf_Laos and other doesnt work :P something is wrong.
Could u fix it ;)?

  else if (MaskCheck(lowercase(Text),'!map')) then begin
    Map := GetPiece(Text,' ',1);
    if (FileExists('maps/'+Map+'.PMS')) then
      Command('/map '+Map)
    else
      WriteConsole(0,'Map '+Map+' not found!',ClMessage);
  end
Oops. Fixed it ages ago, just forgot to reupload. :S

Should be fixed now.
Title: Re: AutoGather
Post by: Newbiee on November 02, 2008, 03:50:38 pm
Btw maybe u know why on my server after command for example ctf_Laos is info "ctf_Laos not found" o_O? Its selfkill server. On my own dedicated server that works good but on sk server no.
:)?
Title: Re: AutoGather
Post by: SpiltCoffee on November 02, 2008, 05:44:51 pm
If you're on a Linux system, then the casing of the filename is important, and it may not be able to change to the map because the L isn't capitalised or something like that.

Otherwise, I'm not sure. Make sure you can load the map with /map, though.
Title: Re: AutoGather
Post by: SpiltCoffee on April 17, 2009, 08:53:14 pm
Script updated to work with 2.6.4. Enjoy!