Author Topic: Weapon Cycling game script, PLEASE MAKE IT :D  (Read 3247 times)

0 Members and 1 Guest are viewing this topic.

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Weapon Cycling game script, PLEASE MAKE IT :D
« on: October 17, 2008, 06:27:15 am »
Anyways, here's my idea:

The script disables all but one weapon in order of appearance on the menu.
(Developed for survival mode, preferably. I played it in R/S and it was great)

For example,
/say Current Round: Desert Eagles (automatically said by the script)
*disables all weapons before round start and enables the deagles*
*NEW ROUND START*
/say Next Round: HK MP5 (automatically said by script too)
At the end of the round all weapons are cleared up (If possible, didn't that /ro ID..ID command do that?

/say Current Round: HK MP5
*disables all weapons before round start and enables the HK*
*NEW ROUND START*
/say Next Round: AK-74
At the end of the round all weapons are cleared up (If possible, didn't that /ro ID..ID command do that?

So it would go in this order:
Deagles (No secondary weapons or grenades)
HK MP5 (No secondary weapons or grenades)
AK-74 (No secondary weapons or grenades)
Steyr AUG (No secondary weapons or grenades)
Spas (No secondary weapons or grenades)
Ruger (No secondary weapons or grenades)
M79 (No secondary weapons or grenades)
Barrett (No secondary weapons or grenades)
Minimi (No secondary weapons or grenades)
Minigun (No secondary weapons or grenades)
Ussocom (No primary weapons or grenades)
Combat Knife (No primary weapons or grenades)
Chainsaw (No primary weapons or grenades)
LAW (No primary weapons or grenades)
Fists (No primary weapons, secondary weapons or grenades)
Grenades (No primary weapons or secondary weapons)
*Back to top of list*

There must be a way to allow grenades for that one grenade round alone, right?

Now the admin commands... Probably all we need is a /on and /off command...

I played this for a few hours on a R/S server with complete strangers and they loved it, they said it should be made into a script so I've come here for help. Please help, it's too good of a game idea to just be dropped.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #1 on: October 17, 2008, 09:10:47 am »
Forcing weapon is better than disabling/enabling clearing dropped etc.
Cool idea.

[edit]
Random rounds will be better :)

[edit2]
I'm going to make it.
« Last Edit: October 17, 2008, 09:15:37 am by Gizd »

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #2 on: October 17, 2008, 09:13:00 am »
you cant really stop people grabbing grenades with out turning them off altogether unfortunately you cant take peoples grenades away through script

does sound like a good idea though ill make a small script for it


Offline SpiltCoffee

  • Veteran
  • *****
  • Posts: 1579
  • Spilt, not Split!
    • SpiltCoffee's Site
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #3 on: October 17, 2008, 09:21:48 am »
Would be easier to do if there was some kind of procedure in the script core for rounds in survival mode.
When life hands you High Fructose Corn Syrup, Citric Acid, Ascorbic Acid, Maltodextrin, Sodium Acid Pyrophosphate,
Magnesium Oxide, Calcium Fumarate, Yellow 5, Tocopherol and Less Than 2% Natural Flavour... make Lemonade!

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #4 on: October 17, 2008, 09:41:21 am »
you cant really stop people grabbing grenades with out turning them off altogether unfortunately you cant take peoples grenades away through script

you can remove all the nadespawns in the mapfile, set maxnades to 1 and spawn a nadebox at players if needed.

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #5 on: October 17, 2008, 09:42:29 am »
here i didnt fully test it but it should work fine

Code: [Select]
Const
Randomise = False;//If true each gun change is random if false it moves through each gun in order

DisabledGuns = '11 12 13';
//note that each gun whos number is less then 10 MUST have a 0 in front for example 04, 07, 02

Var
RoundType: Byte;

Function RandomGun(): Byte;
Var
Randomness: Byte;
C: String;
Begin
  Repeat
  Randomness:=Random(1, 16);
  If (Randomness >= 0) And (Randomness <= 9) Then C:='0'+IntToStr(Randomness) Else C:=IntToStr(Randomness);
  If RegExpMatch(C, DisabledGuns) Then Randomness:= RoundType;
  Until Randomness <> RoundType
  Result:=Randomness;
End;

Procedure ActivateServer();
Begin
  If Randomise = False Then RoundType:=1 Else RoundType:=RandomGun();
  WriteConsole(0, 'Next Round Is '+WeaponNameByNum(RoundType), $FF9933);
End;

Procedure OnMapChange(NewMap: String);
Var
A: String;
Done: Boolean;
Begin
  If Randomise = True Then RoundType:=RandomGun() Else Begin
    If RoundType < 16 Then Begin
    Done:=False;
    Repeat
    RoundType:=RoundType+1;
    If RoundType >= 16 Then RoundType:=1;
    If (RoundType >= 0) And (RoundType <= 9) Then A:='0'+IntToStr(RoundType) Else A:=IntToStr(RoundType);
    If Not RegExpMatch(A, DisabledGuns) Then Done:=True;
    Until Done = True
    End Else RoundType:=1;
    WriteConsole(0, 'Next Round Is '+WeaponNameByNum(RoundType), $FF9933);
  End;
End;

Procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);
Begin
  If (PrimaryNum <> RoundType) And (PrimaryNum <> 255) Then ForceWeapon(ID, RoundType, 255, 0);
End;

Edit: ill add this to soldat central later so you can just download the files instead ill of course give you full credit Bolt

Edit2: Recognized that on a non random change it will still change to a disabled gun now fixed and change how it reads disabled guns

Heres the link to it http://www.soldatcentral.com/index.php?page=script&f=59
« Last Edit: October 17, 2008, 11:02:13 am by Rampage_Terranius »

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #6 on: October 17, 2008, 02:28:48 pm »
Looks pretty awesome what you have there. Any chance you could add the /on, /off commands?

And maybe you could have a /random on/off command, that way it can be either style.

Also, remove the nade round, it would be better to remove nades completely.

Thanks a lot for making this, I'm definitely going to use this if it functions right, when you add those I'll get it set up at a friends server :]

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #7 on: October 17, 2008, 10:21:45 pm »
yeah ill work in some admin commands for you also i was thinking of adding something to auto change weapons every minute or so when its on

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #8 on: October 17, 2008, 10:24:41 pm »
That may be a good alternative for non-survival use, however it wouldn't affect me as I'd only use it in R/S so if you want to make the one minute script, that can be your little side project :]

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #9 on: October 17, 2008, 11:18:27 pm »
i added it as an option

TimedChange = True;
if thats true every minute it will change to a new gun

ive uploaded the new script and added 2 admin commands

/script turns the script on and off

/random turns random gun selection on and off

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #10 on: October 17, 2008, 11:44:18 pm »
The server commands don't work and it only forces deagles.

Maybe your round identification stuff ain't working and it always thinks it's the first round?

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #11 on: October 17, 2008, 11:53:21 pm »
works for me :? when the round changes its meant to move to next round what server type are you using windows or linux because i tested this on a windows based server

Edit: there is only one problem that ive seen thats with Randomize:=True it doesnt tell you the next round type but still randomly changes

Edit2: you might need to download it again it sounds like your using the older version that i hadnt added the commands into OR you need to use /adminlog either one
« Last Edit: October 18, 2008, 12:01:57 am by Rampage_Terranius »

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #12 on: October 18, 2008, 12:07:40 am »
It had the commands and I downloaded it from SoldatCentral.

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #13 on: October 18, 2008, 12:11:17 am »
hmmm it works perfect for me

 i use /script it turns the script on/off i use /random it turns random on/off

btw i did update the upload when i fixed it to have these commands so you might have downloaded the older version try downloading it and trying again

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #14 on: October 18, 2008, 12:41:05 am »
Primary weapon is weapon that you hold, or weapon that is from 1-10 ?
I'm making my own version  ;D

Offline Rampage_Terranius

  • Major
  • *
  • Posts: 69
  • The Strategist
    • Soldat Noob Servers
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #15 on: October 18, 2008, 12:57:05 am »
primary weapon is the weapon your holding can be 0 to 16 if i remember right (socom is 0 right?) and same thing with secondary weapon

btw fist is 255
« Last Edit: October 18, 2008, 01:00:11 am by Rampage_Terranius »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #16 on: October 18, 2008, 01:31:06 am »
Thx, that will reduce my script. I think fist is 17-255.

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #17 on: October 18, 2008, 06:18:40 am »
Good progress on the script, RT, it's nearly finished :D

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #18 on: October 18, 2008, 07:07:00 am »
Zakath is hosting my actual beta version.
inc2.sytes.net 63073
I will make it public when i'm sure there's no bugs  ;)

Offline Bolt

  • Major
  • *
  • Posts: 64
  • {MLP}
    • http://www.darkdemon.org/bolt/
Re: Weapon Cycling game script, PLEASE MAKE IT :D
« Reply #19 on: October 18, 2008, 04:50:36 pm »
Wow, Gizd, that's awesome! Only problem I got was that I got a violation error during the grenade round and had to shut down Soldat. When I went to re-enter I was banned from the server, that could be bad :P

Could you add /random on/off and /cycle on/off commands, random making the weapon choice random/in-order and cycle being the entire script activator/deactivator.

And maybe you could change what sets the round or not? I'm not sure whether that's a prototype for something that identifies the amount of players on the team or something else, but I'd really prefer for it to change weapons at the end of the round, once the server kills everyone.

And, RT, your version is awesome. If you can fix the two weapon problem and fix the server messages it'd be almost complete :]

And Gizd, I love what you did with the comments of the weapons, expecially the special weapons like Flame and the bows. That should definitely be in the script.

And well done sorting out the grenades. Very nice :D