Author Topic: Left 4 Dead script (solo/co-op) (270c)  (Read 6298 times)

0 Members and 1 Guest are viewing this topic.

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Left 4 Dead script (solo/co-op) (270c)
« on: February 04, 2010, 10:26:45 pm »
Script Name: Left 4 Dead

Core Version: 270c

Script Description:
Just something I've been writing on and off for a few weeks. Basically its as close to Left 4 Dead that is possible in a Soldat script.

I assume anybody that is reading this is familiar with Left 4 Dead so I'll just point out the differences (pros and cons).

-There are no survivor bots when you are alone...just less zombies to deal with
-Verses and cooperative have been combined into one mode - after you have died you spawn as zombies until all other survivors are dead (or they all reach the flag spawn area in extraction point mode)
-There is no 'down' time...if you're dead you're dead
-You can play as a normal zombie while you wait for a special zombie to spawn
-All of the special zombies have different names
-I couldn't exactly recreate the Smoker so instead there is the Flasher that flashes instead of smoking and drags you towards it with a flame thrower but without latching on and constricting you
-There is no count down to zombie respawn (because restrictive numbers interfere with the randomness of the spawning)
-There are only normal grenades

Suggested server settings:
-game mode: 2 (team match)
-time limit: 0 (never ending)
-kill limit: 65535 (maximum)
-grenades: max 1 (so zombies don't get any)
-survival and advanced modes disabled, realistic is acceptable and may be more appropriate for Extraction Point mode.
-map list: Maps with plenty of spawn points (of any kind) for zombies to adopt when spawning so they can always pick ones near survivors. If using Extraction Point mode I suggest tweaking the zombie spawn rates to make up for the fact that players will be running past a lot of them.

Quote from: Todo List
-add team management for when a human leaves or dies and a spec can take their place done but untested
-pill, med kit and grenade pickups
-save high scores of most kills, longest survival and fastest time reaching extraction point
-modify extraction point mode so that it is only safe when there are no nearby zombies
-disable all but spawns closest to survivors when zombies spawn
-disable all but closest spawns when assists spawn
-make extra close spawns less likely

-remove weapon selection and force appropriate weapon when player is zombie if possible with updated client
**OR**
-rewrite onweaponchange to fix crashes and zombie weapon bugs

add messages:
-add b***h startler to b***h startle message
-explanation/commands command

Original Authors:
Me
Markus "Dual" Quär CalculationOfTime IXSplit
PerroAZUL INI Functions

Code Sample:
if (lastplayersinsafehouse < playersinsafehouse) and (playersinsafehouse <> BravoPlayers) then begin
if playersinsafehouse <> 1 then begin
WriteConsole(0,inttostr(playersinsafehouse) + ' survivors are safe (' + inttostr(BravoPlayers-playersinsafehouse) + ' remaining)',$EE81FAA1);
end
else begin
WriteConsole(0,'1 survivor is safe (' + inttostr(BravoPlayers-playersinsafehouse) + ' remaining)',$EE81FAA1);
end;
lastplayersinsafehouse := playersinsafehouse;
end;
playersinsafehouse := 0;

for i := 1 to HighestID do begin
if (GetPlayerStat(i,'Active') = true) then begin
if (GetPlayerStat(i,'Alive') = true) then begin

if (GetPlayerStat(i,'Team') = 2) then begin
if Distance(GetPlayerStat(i,'X'),GetPlayerStat(i,'Y'),RedFlagX,RedFlagY) < 75 then begin
playersinsafehouse := playersinsafehouse + 1;
end;

if (playersinsafehouse = BravoPlayers) then begin

if BravoPlayers <> 1 then begin
WriteConsole(0,'The survivors have reached safety',$EE81FAA1);
end
else begin
WriteConsole(0,'The survivor has reached safety',$EE81FAA1);
end;

for j := 1 to HighestID do begin
if (GetPlayerStat(j,'Active') = true) then begin
if (GetPlayerStat(j,'Alive') = true) then begin
if (GetPlayerStat(j,'Team') = 2) then begin

lastteam[j] := 5;
wasplaying[j] := true;

if BravoPlayers <> 1 then begin
if GetPlayerStat(j,'Kills') <> 1 then begin
WriteConsole(j,'Your team reached safety in ' + CalculationOfTime(timeonteam[j]) + ' with you killing ' + GetPlayerStat(j,'Kills') + ' zombies',$EE81FAA1);
end
else begin
WriteConsole(j,'Your team reached safety in ' + CalculationOfTime(timeonteam[j]) + ' with you killing 1 zombie',$EE81FAA1);
end;
end
else begin
if GetPlayerStat(j,'Kills') <> 1 then begin
WriteConsole(j,'You reached safety in ' + CalculationOfTime(timeonteam[j]) + ' and killed ' + GetPlayerStat(j,'Kills') + ' zombies',$EE81FAA1);
end
else begin
WriteConsole(j,'You reached safety in ' + CalculationOfTime(timeonteam[j]) + ' and killed 1 zombie',$EE81FAA1);
end;
end;

end;
end;
end;
end;

donextmap := 1;
end;

Note: the attached .rar file contains the script and two executables - ModderWithOpen.exe and ModderWithoutOpen.exe. These files will modify the soldat server process to change the name of dummy bots so that the witch equivalent will stand still without being named dummy. If you don't wish to use these while testing, rename the bot to dummy.
One of the modders opens soldatserver.exe and patches it and the other just patches the already running process (I don't think I need to explain which is which).
« Last Edit: March 25, 2010, 08:41:38 pm by xXSnowyXx »

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1902
    • TransHuman Design
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #1 on: February 05, 2010, 04:37:00 am »
I doubt executables are allowed.
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline Amida

  • Major
  • *
  • Posts: 69
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #2 on: February 05, 2010, 05:12:16 am »
I will be testing it.
------------------------------------------------------------
Edit:
  • Compiling left4dead -> l4d.pas...
  • left4dead -> [Error] (204:23): Unknown identifier 'HighestID'
  • Compiling left4dead -> Done in 0.024 secs
  • Compilation Failed.

« Last Edit: February 05, 2010, 05:34:12 am by Amida »

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #3 on: February 05, 2010, 05:41:26 am »
Quote
Core Version: 270c

That ^

Offline Amida

  • Major
  • *
  • Posts: 69
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #4 on: February 05, 2010, 07:36:12 am »
Quote
Core Version: 270c

That ^
My mistake.

I found this alot of fun, I especially like the 'Cutter'.

Anyway, for the time being i'm hosting this aswell but as infiltration: 92.9.253.34:23079 (for Soldat 1.5.1c).

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #5 on: February 05, 2010, 08:06:29 am »
Wow that was quick...but I don't expect it to really catch on until 1.5.1 becomes official (I've only once seen another person in a 1.5.1 server). People need to get testing or it will never come out!

It isn't really designed to be ran in infiltration mode...I forgot to mention that its meant to be ran in team match (without time or kill limits) so that nothing from other game modes interfere with the normal play of the script. Inf just means that zombies will be capturing the flag while the rest of the game mode is running normal. It wouldn't hurt but it just sounds kinda dumb.

...also forgot to mention to make the grenade limit 1 so that zombies don't start with any (humans can't pick up any either yet but zombies throwing grenades...well it sounds kinda dumb).

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1506
  • Also known as Curt
    • Soldat Global Account System
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #6 on: February 05, 2010, 11:11:58 am »
In regards to 1.5.1 beta, I think it would be best to host 'parties' where people meet to play all at one time for a few hours. Not necessarily specific to this mode, could work with other modes, but would probably catch more interest if u advertised it specific for this mode or something.. also mainly tell Soldat friends ^^. This could both: attract more 'attention' to 1.5.1 beta, and give ur script some attention.

I can't test it out now, but sounds interesting.
Soldat Global Account System (SGAS): QuakeNet in #soldat.sgas
Rent Cheap Servers: contact CurryWurst

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #7 on: February 06, 2010, 11:22:15 am »
You can currently test it in the server I'm hosting: 122.105.237.92:23073 (for Soldat 1.5.1c)
Anyway, for the time being i'm hosting this aswell but as infiltration: 92.9.253.34:23079 (for Soldat 1.5.1c).
Can't join any of those.

Offline dominikkk26

  • Camper
  • ***
  • Posts: 404
    • PMGsite
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #8 on: February 06, 2010, 02:01:36 pm »
I will be testing it.
------------------------------------------------------------
Edit:
  • Compiling left4dead -> l4d.pas...
  • left4dead -> [Error] (204:23): Unknown identifier 'HighestID'
  • Compiling left4dead -> Done in 0.024 secs
  • Compilation Failed.
10-02-06 19:59:23 
  • Compiling left4dead -> l4d.pas...

10-02-06 19:59:23 
  • left4dead -> [Error] (258:23): Unknown identifier 'HighestID'

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #9 on: February 06, 2010, 02:19:33 pm »
Quote
Core Version: 270c

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #10 on: February 06, 2010, 05:08:25 pm »
You can currently test it in the server I'm hosting: 122.105.237.92:23073 (for Soldat 1.5.1c)
Anyway, for the time being i'm hosting this aswell but as infiltration: 92.9.253.34:23079 (for Soldat 1.5.1c).
Can't join any of those.

Mine was off while I was asleep (I'll put it back up in a minute)

...and tk makes a very important point

Offline Amida

  • Major
  • *
  • Posts: 69
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #11 on: February 06, 2010, 09:12:16 pm »
You can currently test it in the server I'm hosting: 122.105.237.92:23073 (for Soldat 1.5.1c)
Anyway, for the time being i'm hosting this aswell but as infiltration: 92.9.253.34:23079 (for Soldat 1.5.1c).
Can't join any of those.

I'm currently making a big enough map to test extraction point mode which will work with infiltration. It will be back up in a couple of days.

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #12 on: March 13, 2010, 01:44:50 pm »
Includes.txt should be
Code: [Select]
IXSplit.pas
ini.pas
l4d.pas

http://www.upload.ee/image/441777/errorsol.PNG

-----------------------------------------
Why its kicking zombies randomly?
And flasher is basicly bot with flamer. I saw only one time screen flashing, most of time he kills me with this flamer.
You should make flamer not make any damage to player.

After playing sometime, script crashed:
Code: [Select]
10-03-13 22:38:25 Next map: inf_Biologic
10-03-13 22:38:30 Inf_Biologic V1.2.4 -  Wraithlike
10-03-13 22:38:30 A.K has joined spectators.
10-03-13 22:38:31 Bitch has been kicked.
10-03-13 22:38:31 Zombie has been kicked.
10-03-13 22:38:31 Zombie has been kicked.
10-03-13 22:38:31 Zombie has been kicked.
10-03-13 22:38:31 Zombie has been kicked.
10-03-13 22:38:31 A.K has joined bravo team.
10-03-13 22:38:35  [*] [Error] left4dead -> OnWeaponChange: Out of Global Vars range
10-03-13 22:38:35  [*] [Error] left4dead -> AppOnIdle: Access violation at address 00454267 in module 'soldatserver.exe'. Read of address 00000106
10-03-13 22:38:35  [*] [Error] left4dead -> OnWeaponChange: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000106
10-03-13 22:38:35  [*] [Error] left4dead -> OnWeaponChange: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000118
10-03-13 22:38:35  [*] [Error] left4dead -> OnWeaponChange: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000128
10-03-13 22:38:35  [*] [Error] left4dead -> OnWeaponChange: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000138
10-03-13 22:38:36  [*] [Error] left4dead -> AppOnIdle: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000148
10-03-13 22:38:37  [*] [Error] left4dead -> AppOnIdle: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000158
10-03-13 22:38:38  [*] [Error] left4dead -> AppOnIdle: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000168
10-03-13 22:38:39  [*] [Error] left4dead -> AppOnIdle: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000178
10-03-13 22:38:40  [*] [Error] left4dead -> AppOnIdle: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000188
10-03-13 22:38:41  [*] [Error] left4dead -> AppOnIdle: Access violation at address 004542E4 in module 'soldatserver.exe'. Write of address 00000198
« Last Edit: March 13, 2010, 03:43:06 pm by Mercury92 »
[saw]  on 1.5.1

Offline Blacksheepboy

  • Veteran
  • *****
  • Posts: 1806
  • Show me epitome, and I will show you epiphany
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #13 on: March 13, 2010, 05:13:57 pm »
Glad someone made a script. Huzzah.

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #14 on: March 15, 2010, 03:29:35 am »
Includes.txt should be
Code: [Select]
IXSplit.pas
ini.pas
l4d.pas

ah...must've forgotted to include those last update. I'll upload the latest build and fix that now.

Why its kicking zombies randomly?

Zombies that have been out of sight of all survivors for 15 seconds (adjustable in config) get kicked out to make room for ones that are closer (the latest update makes them spawn nearby so there will be less random kicks)

And flasher is basicly bot with flamer. I saw only one time screen flashing, most of time he kills me with this flamer.
You should make flamer not make any damage to player.

It flashes when you kill it (like smoker smokes when you kill) but only if you have line of sight and are looking in its direction. Damage is adjustable in the weapons config like always.

After playing sometime, script crashed:

I'm aware it sometimes crashes. It always starts with onweaponchange so I suspect that the culprit is within that procedure. I plan on rewriting that as soon as a bug is fixed that allows me to manage weapons in a different way (or I'll just rewrite it eventually if it doesn't get fixed for the final 1.5.1)

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #15 on: March 15, 2010, 07:52:09 am »
Quote from: Todo List
-add team management for when a human leaves or dies and a spec can take their place done but untested
-pill, med kit and grenade pickups
-save high scores of most kills, longest survival and fastest time reaching extraction point
-modify extraction point mode so that it is only safe when there are no nearby zombies
-disable all but spawns closest to survivors when zombies spawn
-disable all but closest spawns when assists spawn
-add cluster grenade spawns
-make extra close spawns less likely

-remove weapon selection and force appropriate weapon when player is zombie if possible with updated client
**OR**
-just rewrite onweaponchange to fix crashes and zombie weapon bugs

add messages:
-add b***h startler to b***h startle message
-explanation/commands command

Well you are doing it pretty well, fast!!
I can see you uploaded a new version today. Downloading/Testing

---------------------------------------------------------
But I don't really like to edit Weapons config. Or I will see something like this: (WM)
You should script flamer so it doesn't make so much damage.
Hey what about Boomer make like this:
If It hits you, some zombies will spawn near him. When zombie dies, autokick.
teh code: http://forums.soldat.pl/index.php?topic=20898.0

------------------------------------------------------------------------
[*] Well, new version seems very good. It's better in every way. But still its annoying when it crashes - can't properly test script.
I like how zombies are spawned near player. (Using spawnpoints near player?)
Because, maybe they are using also Bravos spawnpoint. At the beginning in safehouse i can see zombies around the house.
http://www.upload.ee/image/444784/spawnp.png
Should be fixed.
[*] When I was playing first time new script, I couldn't see at the bottom left (Time + Kit/Pills) indicators. Server restart resolved this situation.
[*] Well, I think mod should be changed to inf_. Remove Bravos flag. Set score to 65535. So I don't have to see this.
http://www.upload.ee/image/444788/solpro.png

That's for now what I wanted to say.

-------------------------------------
Well I have seen zombie carrying Deagle and shooting and me  :P (Script was working at that time)
« Last Edit: March 15, 2010, 09:41:04 am by Mercury92 »
[saw]  on 1.5.1

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #16 on: March 15, 2010, 06:10:29 pm »
It already does that (just not all at once and using spawn points rather than appearing right next to you) and the likelyhood of one spawning per second when a player has been vomited/exploded on is adjustable in the config at the top of the script.

Edit: Oh I forgot you can already change the damage done by each zombie type in the config of the script. If you want the flasher's flamer to do less damage, just change FLASHERSTR (I think) to a smaller number. There are a lot of customization options.
« Last Edit: March 19, 2010, 05:34:35 pm by xXSnowyXx »

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #17 on: March 25, 2010, 02:57:20 pm »
Seems you have updated it well. But still its very hard to test script cause of errors.
Code: [Select]
10-03-24 15:48:53  [*] [Error] left4dead -> OnWeaponChange: Out of Global Vars rangeI really hope you can fix it.
[saw]  on 1.5.1

Offline xXSnowyXx

  • Major(1)
  • Posts: 9
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #18 on: March 25, 2010, 08:41:42 pm »
Yeah they are less frequent but I still need to rewrite that part to fix them.

Offline Mercury92

  • Camper
  • ***
  • Posts: 284
Re: Left 4 Dead script (solo/co-op) (270c)
« Reply #19 on: March 31, 2010, 04:26:24 pm »
Hey, are you still working on it?
Merc
[saw]  on 1.5.1