mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-07-05 02:32:08 +00:00
Compare commits
136 Commits
Author | SHA1 | Date | |
---|---|---|---|
0b50f51ed4 | |||
6755cc3b43 | |||
c21f2d5a38 | |||
cae7c993f5 | |||
119f9bccf9 | |||
918bb4020a | |||
f64ba9cccf | |||
f3b58c5966 | |||
a51fa98d02 | |||
5392d3152e | |||
c372229b6a | |||
ae2b16fb47 | |||
d9c5cbac3e | |||
16c813ed53 | |||
27422d01a5 | |||
9984878a25 | |||
05bb24f587 | |||
6ff815d10e | |||
7a9e28f03d | |||
5f44a7b455 | |||
f58e91b762 | |||
835b3d597c | |||
17e36e08c7 | |||
89c2abb5f1 | |||
e71722bbe9 | |||
15ec54bfd4 | |||
b6e06f73f4 | |||
551e01326d | |||
d851ad1ebc | |||
d740ae15f6 | |||
8ee6e9888c | |||
78cba84b75 | |||
5e2c90b1d2 | |||
ebfba23513 | |||
569388324b | |||
cc30a756cb | |||
0690a9703d | |||
a06c33823b | |||
e73c553308 | |||
c42a72f742 | |||
f234ef2023 | |||
d8dbd975db | |||
7664f491de | |||
9b8627ba4b | |||
fd5d1272fe | |||
a015aed62a | |||
395a991b6f | |||
9ac9df8db1 | |||
94142d7aa9 | |||
a28db1e2fd | |||
c4bf34d1ff | |||
26d2d487b8 | |||
893dfa5bf0 | |||
590d5091fa | |||
1706cef05e | |||
ea39456fd9 | |||
72d9223f48 | |||
97236e2e5f | |||
18c67cb334 | |||
ea14b71f5b | |||
9fc6a8b56b | |||
d34c33e74b | |||
9fa8506daf | |||
af35ec3a8f | |||
7b667f511d | |||
79aa5963d5 | |||
81c3c0e5e9 | |||
c23d556d9e | |||
d4220bd70d | |||
a512fcbf45 | |||
ca2f3c8f7c | |||
e0ad486ee0 | |||
fe5f775a71 | |||
f7816d351c | |||
039b2a6aca | |||
3898e17925 | |||
5ffd3b793a | |||
c45ee94ff5 | |||
f8a2f020f5 | |||
f7016cd704 | |||
562d7f5cf5 | |||
fa14c3d77c | |||
44075bbfdb | |||
3d314cf267 | |||
53441151a8 | |||
ef21c631e0 | |||
d4480b7246 | |||
a6d7dae5b9 | |||
f8719a3b3e | |||
b76ed0995b | |||
91a7d462e1 | |||
339c6ed864 | |||
3e406c5492 | |||
0a5cf7b895 | |||
6c031612ce | |||
a202d2bba9 | |||
d755d3be01 | |||
4d3bd2603d | |||
b7053cba21 | |||
d00e230c58 | |||
46cd853c21 | |||
cc4c29c515 | |||
27be561a42 | |||
4eced4bc93 | |||
cda0902e1e | |||
59903db458 | |||
ebce2ef641 | |||
a2f9f1f9ee | |||
143b03ccf8 | |||
bd346f2df9 | |||
39136e195b | |||
b272ded713 | |||
dcbee17c25 | |||
fe4e761c64 | |||
b4bade0106 | |||
d443aab063 | |||
22fcb5f990 | |||
f109ab8fbb | |||
a18aa4c446 | |||
c115a01ea7 | |||
ee356e9b2c | |||
ca239187f4 | |||
00ca687083 | |||
06bedd0df9 | |||
40d5b03bcf | |||
6c1b6218a6 | |||
c81a4e2472 | |||
1f131d72b4 | |||
e14196e3fc | |||
7a0dc3b7f9 | |||
c2c7b94c79 | |||
5a5f5dec58 | |||
56bf257976 | |||
953d694a74 | |||
a2ef57ff50 | |||
ba24e61852 |
21
.astylerc
Normal file
21
.astylerc
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# try to mimic the original gsc provided
|
||||||
|
mode=c
|
||||||
|
style=allman
|
||||||
|
|
||||||
|
indent=tab
|
||||||
|
lineend=windows
|
||||||
|
|
||||||
|
pad-oper
|
||||||
|
pad-paren-in
|
||||||
|
pad-header
|
||||||
|
|
||||||
|
# delete-empty-lines
|
||||||
|
|
||||||
|
break-blocks
|
||||||
|
# remove-braces
|
||||||
|
|
||||||
|
indent-switches
|
||||||
|
indent-cases
|
||||||
|
indent-after-parens
|
||||||
|
|
||||||
|
remove-comment-prefix
|
11
.editorconfig
Normal file
11
.editorconfig
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 2
|
||||||
|
charset = latin1
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -2,15 +2,17 @@
|
|||||||
/*
|
/*
|
||||||
|
|
||||||
# Files to not ignore
|
# Files to not ignore
|
||||||
|
!/.vscode
|
||||||
!/.gitignore
|
!/.gitignore
|
||||||
!/z_devserver.bat
|
!/.editorconfig
|
||||||
!/z_dev.bat
|
!/.gitattributes
|
||||||
!/z_serverdev.bat
|
|
||||||
!/z_server.bat
|
!/z_server.bat
|
||||||
!/z_bots.bat
|
!/z_server_watchdog.bat
|
||||||
!/z_client.bat
|
|
||||||
!/z_server_pvbrust.bat
|
!/z_server_pvbrust.bat
|
||||||
|
!/z_server_pvbrust_watchdog.bat
|
||||||
!/z_server_pvbvote.bat
|
!/z_server_pvbvote.bat
|
||||||
|
!/z_server_pvbvote_watchdog.bat
|
||||||
|
|
||||||
# Folder to not ignore
|
# Folder to not ignore
|
||||||
!/userraw
|
!/userraw
|
||||||
@ -22,6 +24,11 @@
|
|||||||
!/README.md
|
!/README.md
|
||||||
!/out
|
!/out
|
||||||
|
|
||||||
|
!/.astylerc
|
||||||
|
!/z_deploy.bat
|
||||||
|
!/deploy.bat
|
||||||
|
!/deploy.js
|
||||||
|
|
||||||
*.zip
|
*.zip
|
||||||
*.log
|
*.log
|
||||||
*.stat
|
*.stat
|
||||||
|
15
.vscode/settings.json
vendored
Normal file
15
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"astyle.astylerc": "${workspaceRoot}/.astylerc",
|
||||||
|
"astyle.additional_languages": [
|
||||||
|
"gsc"
|
||||||
|
],
|
||||||
|
"[gsc]": {
|
||||||
|
"editor.defaultFormatter": "chiehyu.vscode-astyle",
|
||||||
|
},
|
||||||
|
"editor.quickSuggestions": {
|
||||||
|
"other": true,
|
||||||
|
"comments": true,
|
||||||
|
"strings": true
|
||||||
|
},
|
||||||
|
"vscode-codscript.use_builtin_completionItems": false
|
||||||
|
}
|
152
README.md
152
README.md
@ -73,91 +73,65 @@ You can find the ModDB release post [here](https://www.moddb.com/mods/bot-warfar
|
|||||||
- Pressing the menu button again closes menus.
|
- Pressing the menu button again closes menus.
|
||||||
|
|
||||||
### DVARs
|
### DVARs
|
||||||
- bots_manage_add - an integer amount of bots to add to the game, resets to 0 once the bots have been added.
|
| Dvar | Description | Default Value |
|
||||||
- for example: 'bots_manage_add 10' will add 10 bots to the game.
|
|----------------------------------|---------------------------------------------------------------------------------------------|--------------:|
|
||||||
|
| bots_main | Enable this mod. | true |
|
||||||
- bots_manage_fill - an integer amount of players/bots (depends on bots_manage_fill_mode) to retain on the server, it will automatically add bots to fill player space.
|
| bots_main_firstIsHost | The first player to connect will be given host. | false |
|
||||||
- for example: 'bots_manage_fill 10' will have the server retain 10 players in the server, if there are less than 10, it will add bots until that value is reached.
|
| bots_main_GUIDs | A comma separated list of GUIDs of players who will be given host. | "" |
|
||||||
|
| bots_main_waitForHostTime | How many seconds to wait for the host player to connect before adding bots to the match. | 10 |
|
||||||
- bots_manage_fill_mode - a value to indicate if the server should consider only bots or players and bots when filling player space.
|
| bots_main_menu | Enable the in-game menu for hosts. | true |
|
||||||
- 0 will consider both players and bots.
|
| bots_main_debug | Enable the in-game waypoint editor. | false |
|
||||||
- 1 will only consider bots.
|
| bots_main_kickBotsAtEnd | Kick the bots at the end of a match. | false |
|
||||||
|
| bots_main_chat | The rate bots will chat at, set to 0 to disable. | 1.0 |
|
||||||
- bots_manage_fill_kick - a boolean value (0 or 1), whether or not if the server should kick bots if the amount of players/bots (depends on bots_manage_fill_mode) exceeds the value of bots_manage_fill.
|
| bots_manage_add | Amount of bots to add to the game, once bots are added, resets back to `0`. | 0 |
|
||||||
|
| bots_manage_fill | Amount of players/bots (look at `bots_manage_fill_mode`) to maintain in the match. | 0 |
|
||||||
- bots_manage_fill_spec - a boolean value (0 or 1), whether or not if the server should consider players who are on the spectator team when filling player space.
|
| bots_manage_fill_mode | `bots_manage_fill` players/bots counting method.<ul><li>`0` - counts both players and bots.</li><li>`1` - only counts bots.</li></ul> | 0 |
|
||||||
|
| bots_manage_fill_kick | If the amount of players/bots in the match exceeds `bots_manage_fill`, kick bots until no longer exceeds. | false |
|
||||||
---
|
| bots_manage_fill_spec | If when counting players for `bots_manage_fill` should include spectators. | true |
|
||||||
|
| bots_team | One of `autoassign`, `allies`, `axis`, `spectator`, or `custom`. What team the bots should be on. | autoassign |
|
||||||
- bots_team - a string, the value indicates what team the bots should join:
|
| bots_team_amount | When `bots_team` is set to `custom`. The amount of bots to be placed on the axis team. The remainder will be placed on the allies team. | 0 |
|
||||||
- 'autoassign' will have bots balance the teams
|
| bots_team_force | If the server should force bots' teams according to the `bots_team` value. When `bots_team` is `autoassign`, unbalanced teams will be balanced. This dvar is ignored when `bots_team` is `custom`. | false |
|
||||||
- 'allies' will have the bots join the allies team
|
| bots_team_mode | When `bots_team_force` is `true` and `bots_team` is `autoassign`, players/bots counting method. <ul><li>`0` - counts both players and bots.</li><li>`1` - only counts bots</li></ul> | 0 |
|
||||||
- 'axis' will have the bots join the axis team
|
| bots_skill | Bots' difficulty.<ul><li>`0` - Random difficulty for each bot.</li><li>`1` - Easiest difficulty for all bots.</li><li>`2` to `6` - Between easy and hard difficulty for all bots.</li><li>`7` - The hardest difficulty for all bots.</li><li>`8` - custom (look at the `bots_skill_<team>_<difficulty>` dvars</li></ul> | 0 |
|
||||||
- 'custom' will have bots_team_amount bots on the axis team, the rest will be on the allies team
|
| bots_skill_axis_hard | When `bots_skill` is set to `8`, the amount of hard difficulty bots to set on the axis team. | 0 |
|
||||||
|
| bots_skill_axis_med | When `bots_skill` is set to `8`, the amount of medium difficulty bots to set on the axis team. The remaining bots on the team will be set to easy difficulty. | 0 |
|
||||||
- bots_team_amount - an integer amount of bots to have on the axis team if bots_team is set to 'custom', the rest of the bots will be placed on the allies team.
|
| bots_skill_allies_hard | When `bots_skill` is set to `8`, the amount of hard difficulty bots to set on the allies team. | 0 |
|
||||||
- for example: there are 5 bots on the server and 'bots_team_amount 3', then 3 bots will be placed on the axis team, the other 2 will be placed on the allies team.
|
| bots_skill_allies_med | When `bots_skill` is set to `8`, the amount of medium difficulty bots to set on the allies team. The remaining bots on the team will be set to easy difficulty. | 0 |
|
||||||
|
| bots_skill_min | The minimum difficulty level for the bots. | 1 |
|
||||||
- bots_team_force - a boolean value (0 or 1), whether or not if the server should enforce periodically the bot's team instead of just a single team when the bot is added to the game.
|
| bots_skill_max | The maximum difficulty level for the bots. | 7 |
|
||||||
- for example: 'bots_team_force 1' and 'bots_team autoassign' and the teams become to far unbalanced, then the server will change a bot's team to make it balanced again.
|
| bots_loadout_reasonable | If the bots should filter bad performing create-a-class selections. | false |
|
||||||
|
| bots_loadout_allow_op | If the bots should be able to use overpowered and annoying create-a-class selections. | true |
|
||||||
- bots_team_mode - a value to indicate if the server should consider only bots or players and bots when counting players on the teams.
|
| bots_loadout_rank | What rank to set the bots.<ul><li>`-1` - Average of all players in the match.</li><li>`0` - All random.</li><li>`1` or higher - Sets the bots' rank to this.</li></ul> | -1 |
|
||||||
- 0 will consider both players and bots.
|
| bots_loadout_prestige | What prestige to set the bots.<ul><li>`-1` - Same as host player in the match.</li><li>`-2` - All random.</li><li>`0` or higher - Sets the bots' prestige to this.</li></ul> | -1 |
|
||||||
- 1 will only consider bots.
|
| bots_play_move | If the bots can move. | true |
|
||||||
|
| bots_play_knife | If the bots can knife. | true |
|
||||||
---
|
| bots_play_fire | If the bots can fire. | true |
|
||||||
|
| bots_play_nade | If the bots can grenade. | true |
|
||||||
- bots_skill - value to indicate how difficult the bots should be.
|
| bots_play_take_carepackages | If the bots can take carepackages. | true |
|
||||||
- 0 will be mixed difficultly
|
| bots_play_obj | If the bots can play the objective. | true |
|
||||||
- 1 will be the most easy
|
| bots_play_camp | If the bots can camp. | true |
|
||||||
- 2-6 will be in between most easy and most hard
|
| bots_play_jumpdrop | If the bots can jump/drop shot. | true |
|
||||||
- 7 will be the most hard.
|
| bots_play_target_other | If the bots can target other entities other than players. | true |
|
||||||
- 8 will be custom.
|
| bots_play_killstreak | If the bots can call in killstreaks. | true |
|
||||||
|
| bots_play_ads | If the bots can aim down sights. | true |
|
||||||
- bots_skill_axis_hard - an integer amount of hard bots on the axis team.
|
| bots_play_aim | If the bots can aim. | true |
|
||||||
- bots_skill_axis_med - an integer amount of medium bots on the axis team.
|
|
||||||
- bots_skill_allies_hard - an integer amount of hard bots on the allies team.
|
|
||||||
- bots_skill_allies_med - an integer amount of medium bots on the allies team
|
|
||||||
- if bots_skill is 8 (custom). The remaining bots on the team will become easy bots
|
|
||||||
- for example: having 5 bots on the allies team, 'bots_skill_allies_hard 2' and 'bots_skill_allies_med 2' will have 2 hard bots, 2 medium bots, and 1 easy bot on the allies team.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
- bots_loadout_reasonable - a boolean value (0 or 1), whether or not if the bots should filter out bad create a class selections (like no miniuzi bling with acog rapidfire and hardline for example)
|
|
||||||
|
|
||||||
- bots_loadout_allow_op - a boolean value (0 or 1), whether or not if the bots are allowed to use deathstreaks, noobtubes, rpg, laststand, etc.
|
|
||||||
|
|
||||||
- bots_loadout_rank - an integer number, bots will be around this rank, -1 is average of all players in game, 0 is all random
|
|
||||||
|
|
||||||
- bots_loadout_prestige - an integer number, bots will be this prestige, -1 is the same as player, -2 is all random
|
|
||||||
|
|
||||||
- bots_play_move - a boolean value (0 or 1), whether or not if the bots will move
|
|
||||||
- bots_play_knife - a boolean value (0 or 1), whether or not if the bots will use the knife
|
|
||||||
- bots_play_fire - a boolean value (0 or 1), whether or not if the bots will fire their weapons
|
|
||||||
- bots_play_nade - a boolean value (0 or 1), whether or not if the bots will grenade
|
|
||||||
- bots_play_take_carepackages - a boolean value (0 or 1), whether or not if the bots will take carepackages
|
|
||||||
- bots_play_obj - a boolean value (0 or 1), whether or not if the bots will play the objective
|
|
||||||
- bots_play_camp - a boolean value (0 or 1), whether or not if the bots will camp
|
|
||||||
- bots_play_jumpdrop - a boolean value (0 or 1), whether or not if the bots will jump shot or drop shot
|
|
||||||
- bots_play_target_other - a boolean value (0 or 1), whether or not if the bots will target claymores, killstreaks, etc.
|
|
||||||
- bots_play_killstreak - a boolean value (0 or 1), whether or not if the bots will use killstreaks
|
|
||||||
- bots_play_ads - a boolean value (0 or 1), whether or not if the bots will ads
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
- bots_main - a boolean value (0 or 1), enables or disables the mod
|
|
||||||
|
|
||||||
- bots_main_firstIsHost - a boolean value (0 or 1), the first player to connect is considered a host
|
|
||||||
|
|
||||||
- bots_main_GUIDs - a list of GUIDs (comma separated) of players who will be considered a host
|
|
||||||
|
|
||||||
- bots_main_waitForHostTime - a float value, how long in seconds to wait for the host player to connect before adding in bots
|
|
||||||
|
|
||||||
- bots_main_menu - a boolean value (0 or 1), enables or disables the menu
|
|
||||||
|
|
||||||
- bots_main_debug - a boolean value (0 or 1), enables or disables the waypoint editor
|
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
- v2.1.0
|
||||||
|
- Bot chatter system, bots_main_chat
|
||||||
|
- Greatly reduce script variable usage
|
||||||
|
- Fix bots slowly reacting in remote streaks
|
||||||
|
- Improved bots mantling and stuck
|
||||||
|
- Improved bots aim
|
||||||
|
- Fix some runtime errors
|
||||||
|
- Fixed bots aim in third person
|
||||||
|
- Bots sprint more
|
||||||
|
- Improved bots sight on enemies
|
||||||
|
- Bots play hidden gamemodes like one-flag and arena
|
||||||
|
- Bots do random actions while waiting at an objective
|
||||||
|
- Improved bots from getting stuck
|
||||||
|
- Better bot difficulty management, bots_skill_min and bots_skill_max
|
||||||
|
|
||||||
- v2.0.1
|
- v2.0.1
|
||||||
- Reduced bots crouching
|
- Reduced bots crouching
|
||||||
- Increased bots sprinting
|
- Increased bots sprinting
|
||||||
@ -181,10 +155,20 @@ You can find the ModDB release post [here](https://www.moddb.com/mods/bot-warfar
|
|||||||
- v2.0.0
|
- v2.0.0
|
||||||
- Initial reboot release
|
- Initial reboot release
|
||||||
|
|
||||||
|
|
||||||
|
- TODOs
|
||||||
|
- A variable leak in _menu (script)
|
||||||
|
- Recoil for bots (engine, maybe script)
|
||||||
|
- Use proper activate button for bombs, carepackages, etc (script, use +activate)
|
||||||
|
- Proper weapon swaps, including altmode (engine, then script)
|
||||||
|
- Use static turrets in maps (script)
|
||||||
|
- Proper use of pred missile (script and engine)
|
||||||
|
- Fix testclient view angle clamping (messes with ac130 and chopper gunner) (engine)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
- IW4x Team - https://github.com/XLabsProject/iw4x-client
|
- IW4x Team - https://github.com/XLabsProject/iw4x-client
|
||||||
- CoD4x Team - https://github.com/callofduty4x/CoD4x_Server
|
- CoD4x Team - https://github.com/callofduty4x/CoD4x_Server
|
||||||
- INeedGames(me) - http://www.moddb.com/mods/bot-warfare
|
- INeedGames - http://www.moddb.com/mods/bot-warfare
|
||||||
- tinkie101 - https://web.archive.org/web/20120326060712/http://alteriw.net/viewtopic.php?f=72&t=4869
|
- tinkie101 - https://web.archive.org/web/20120326060712/http://alteriw.net/viewtopic.php?f=72&t=4869
|
||||||
- PeZBot team - http://www.moddb.com/mods/pezbot
|
- PeZBot team - http://www.moddb.com/mods/pezbot
|
||||||
- apdonato - http://rsebots.blogspot.ca/
|
- apdonato - http://rsebots.blogspot.ca/
|
||||||
|
6
deploy.bat
Normal file
6
deploy.bat
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
xcopy iw4x_bot_warfare\userraw\maps userraw\maps\ /Y /I /E /H /C
|
||||||
|
xcopy iw4x_bot_warfare\userraw\scripts userraw\scripts\ /Y /I /E /H /C
|
||||||
|
xcopy iw4x_bot_warfare\userraw\waypoints userraw\waypoints\ /Y /I /E /H /C
|
||||||
|
xcopy iw4x_bot_warfare\userraw\mp userraw\mp\ /Y /I /E /H /C
|
||||||
|
xcopy iw4x_bot_warfare\main main\ /Y /I /E /H /C
|
||||||
|
xcopy iw4x_bot_warfare\userraw\bots.txt userraw\ /Y /I /H /C
|
54
deploy.js
Normal file
54
deploy.js
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
// nodejs 14+
|
||||||
|
|
||||||
|
const exec = require('util').promisify(require('child_process').exec)
|
||||||
|
|
||||||
|
const repo_name = 'iw4x_bot_warfare'
|
||||||
|
const repo_url = `https://github.com/ineedbots/${repo_name}`
|
||||||
|
const deploy_check_rate = 60000
|
||||||
|
const title = 'IW4x Bot Warfare Git Deployer'
|
||||||
|
|
||||||
|
function printToConsole(what, error = false)
|
||||||
|
{
|
||||||
|
log = error ? console.error : console.log
|
||||||
|
|
||||||
|
log(`[${new Date().toISOString()}]:`, what)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function doDeploy() {
|
||||||
|
try {
|
||||||
|
const { stdout, stderr } = await exec(`cd ${repo_name} && git fetch`)
|
||||||
|
|
||||||
|
if (stderr.length <= 0)
|
||||||
|
return
|
||||||
|
|
||||||
|
if (stderr.startsWith('From '))
|
||||||
|
{
|
||||||
|
printToConsole('git fetched! Pulling...')
|
||||||
|
await exec(`cd ${repo_name} && git pull && git submodule update --init --recursive`)
|
||||||
|
printToConsole('Deploying...')
|
||||||
|
await exec('deploy.bat')
|
||||||
|
printToConsole('Deployed!')
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
printToConsole(e, true)
|
||||||
|
|
||||||
|
if (!e.stderr.startsWith('The system cannot find the path specified'))
|
||||||
|
return
|
||||||
|
|
||||||
|
printToConsole('Cloning repo...')
|
||||||
|
try {
|
||||||
|
await exec(`git clone ${repo_url} && cd ${repo_name} && git submodule update --init --recursive`)
|
||||||
|
|
||||||
|
printToConsole('Cloned!')
|
||||||
|
printToConsole('Deploying...')
|
||||||
|
await exec('deploy.bat')
|
||||||
|
printToConsole('Deployed!')
|
||||||
|
} catch (f) {
|
||||||
|
printToConsole(f, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
process.stdout.write(`${String.fromCharCode(27)}]0;${title}${String.fromCharCode(7)}`)
|
||||||
|
doDeploy()
|
||||||
|
setInterval(doDeploy, deploy_check_rate)
|
@ -48,7 +48,6 @@ set sv_wwwDownload "1"
|
|||||||
// NON-GAMEPLAY CONFIGURATION //
|
// NON-GAMEPLAY CONFIGURATION //
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set rcon_password "qazqaz" // Access to your server to change stuff remotely or ingame. empty disabled
|
|
||||||
set sv_securityLevel "23" // Configures the servers security level.
|
set sv_securityLevel "23" // Configures the servers security level.
|
||||||
set sv_customTextColor "" // custom color for ^;
|
set sv_customTextColor "" // custom color for ^;
|
||||||
set g_password "" // Password Protected Server. Leave blank if you want players to join
|
set g_password "" // Password Protected Server. Leave blank if you want players to join
|
||||||
@ -114,10 +113,10 @@ set scr_classic "0" // Enable IW3 killstreak system
|
|||||||
// //
|
// //
|
||||||
// DO NOT ABUSE! Some people like to rank. //
|
// DO NOT ABUSE! Some people like to rank. //
|
||||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||||
// Don't know what you doing? Don't touch it! //
|
// Don't know what you doing? Dont touch it! //
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_xpscale "10" // IW's way of Double XP.
|
set scr_xpscale "10" // IWs way of Double XP.
|
||||||
|
|
||||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||||
@ -203,7 +202,7 @@ set scr_airdrop_mega_nuke "1"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dm_scorelimit "10000" // Score limit to win the game.
|
set scr_dm_scorelimit "10000" // Score limit to win the game.
|
||||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dm_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_dm_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
set scr_dm_roundlimit "1" // Rounds per game.
|
set scr_dm_roundlimit "1" // Rounds per game.
|
||||||
@ -215,7 +214,7 @@ set scr_dm_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_war_scorelimit "25600" // Score limit to win the game.
|
set scr_war_scorelimit "25600" // Score limit to win the game.
|
||||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
@ -228,7 +227,7 @@ set scr_war_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dom_scorelimit "300" // Score limit to win the game.
|
set scr_dom_scorelimit "300" // Score limit to win the game.
|
||||||
set scr_dom_timelimit "30" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dom_timelimit "30" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||||
@ -241,7 +240,7 @@ set scr_dom_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||||
@ -257,7 +256,7 @@ set scr_dd_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||||
@ -276,7 +275,7 @@ set scr_sd_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||||
@ -294,7 +293,7 @@ set scr_sab_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
set scr_ctf_halftime "1" // Half-Time
|
set scr_ctf_halftime "1" // Half-Time
|
||||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||||
@ -308,7 +307,7 @@ set scr_ctf_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||||
@ -321,7 +320,7 @@ set scr_oneflag_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||||
@ -335,7 +334,7 @@ set scr_koth_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||||
@ -348,7 +347,7 @@ set scr_arena_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||||
@ -491,10 +490,11 @@ set iw4x_onelog ""
|
|||||||
|
|
||||||
// CUSTOM
|
// CUSTOM
|
||||||
set bot_pvb_helper_noPlayersOnTeam "axis"
|
set bot_pvb_helper_noPlayersOnTeam "axis"
|
||||||
set bot_pvb_helper_customBotClassTeam ""
|
set bot_pvb_helper_customBotClassTeam "allies"
|
||||||
set scr_showHP "1"
|
set scr_showHP "1"
|
||||||
set scr_allowFPSBooster "1"
|
set scr_allowFPSBooster "1"
|
||||||
set bot_sniperCheck "1"
|
set bot_sniperCheck "1"
|
||||||
|
set dom_lastFlagUseTimeMulti "4.0"
|
||||||
|
|
||||||
// _class
|
// _class
|
||||||
// set scr_allow_ "0"
|
// set scr_allow_ "0"
|
||||||
@ -529,12 +529,12 @@ set bots_manage_fill_kick "1"
|
|||||||
set bots_team "axis"
|
set bots_team "axis"
|
||||||
set bots_team_amount "0"
|
set bots_team_amount "0"
|
||||||
set bots_team_force "1"
|
set bots_team_force "1"
|
||||||
set bots_team_mode "0"
|
set bots_team_mode "1"
|
||||||
set bots_skill "0"
|
set bots_skill "8"
|
||||||
set bots_skill_axis_hard "0"
|
set bots_skill_axis_hard "0"
|
||||||
set bots_skill_axis_med "0"
|
set bots_skill_axis_med "4"
|
||||||
set bots_skill_allies_hard "0"
|
set bots_skill_allies_hard "0"
|
||||||
set bots_skill_allies_med "0"
|
set bots_skill_allies_med "4"
|
||||||
set bots_loadout_reasonable "0"
|
set bots_loadout_reasonable "0"
|
||||||
set bots_loadout_allow_op "0"
|
set bots_loadout_allow_op "0"
|
||||||
set bots_loadout_rank "-1"
|
set bots_loadout_rank "-1"
|
||||||
@ -553,7 +553,7 @@ set bots_play_ads "1"
|
|||||||
|
|
||||||
|
|
||||||
// iw4madmin
|
// iw4madmin
|
||||||
set sv_printradarupdates "1"
|
set sv_printradarupdates "0"
|
||||||
|
|
||||||
|
|
||||||
// _killcam
|
// _killcam
|
||||||
@ -592,6 +592,7 @@ set scr_deleteNadeOnTeamChange "1"
|
|||||||
// _perkfunctions
|
// _perkfunctions
|
||||||
set combathighIsJuiced "1"
|
set combathighIsJuiced "1"
|
||||||
set onemanarmyRefillsTubes "1"
|
set onemanarmyRefillsTubes "1"
|
||||||
|
set fix_onemanarmyFlareBug "0"
|
||||||
|
|
||||||
// _killstreaks
|
// _killstreaks
|
||||||
set scr_killstreak_rollover "1"
|
set scr_killstreak_rollover "1"
|
||||||
|
@ -48,7 +48,6 @@ set sv_wwwDownload "1"
|
|||||||
// NON-GAMEPLAY CONFIGURATION //
|
// NON-GAMEPLAY CONFIGURATION //
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set rcon_password "qazqaz" // Access to your server to change stuff remotely or ingame. empty disabled
|
|
||||||
set sv_securityLevel "23" // Configures the servers security level.
|
set sv_securityLevel "23" // Configures the servers security level.
|
||||||
set sv_customTextColor "" // custom color for ^;
|
set sv_customTextColor "" // custom color for ^;
|
||||||
set g_password "" // Password Protected Server. Leave blank if you want players to join
|
set g_password "" // Password Protected Server. Leave blank if you want players to join
|
||||||
@ -114,10 +113,10 @@ set scr_classic "0" // Enable IW3 killstreak system
|
|||||||
// //
|
// //
|
||||||
// DO NOT ABUSE! Some people like to rank. //
|
// DO NOT ABUSE! Some people like to rank. //
|
||||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||||
// Don't know what you doing? Don't touch it! //
|
// Don't know what you doing? Dont touch it! //
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_xpscale "10" // IW's way of Double XP.
|
set scr_xpscale "10" // IWs way of Double XP.
|
||||||
|
|
||||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||||
@ -203,7 +202,7 @@ set scr_airdrop_mega_nuke "1"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dm_scorelimit "10000" // Score limit to win the game.
|
set scr_dm_scorelimit "10000" // Score limit to win the game.
|
||||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dm_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_dm_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
set scr_dm_roundlimit "1" // Rounds per game.
|
set scr_dm_roundlimit "1" // Rounds per game.
|
||||||
@ -215,7 +214,7 @@ set scr_dm_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_war_scorelimit "25600" // Score limit to win the game.
|
set scr_war_scorelimit "25600" // Score limit to win the game.
|
||||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
@ -228,7 +227,7 @@ set scr_war_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dom_scorelimit "300" // Score limit to win the game.
|
set scr_dom_scorelimit "300" // Score limit to win the game.
|
||||||
set scr_dom_timelimit "30" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dom_timelimit "30" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||||
@ -241,7 +240,7 @@ set scr_dom_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||||
@ -257,7 +256,7 @@ set scr_dd_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||||
@ -276,7 +275,7 @@ set scr_sd_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||||
@ -294,7 +293,7 @@ set scr_sab_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
set scr_ctf_halftime "1" // Half-Time
|
set scr_ctf_halftime "1" // Half-Time
|
||||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||||
@ -308,7 +307,7 @@ set scr_ctf_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||||
@ -321,7 +320,7 @@ set scr_oneflag_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||||
@ -335,7 +334,7 @@ set scr_koth_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||||
@ -348,7 +347,7 @@ set scr_arena_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||||
@ -490,11 +489,12 @@ set iw4x_onelog ""
|
|||||||
|
|
||||||
|
|
||||||
// CUSTOM
|
// CUSTOM
|
||||||
set bot_pvb_helper_noPlayersOnTeam "allies"
|
set bot_pvb_helper_noPlayersOnTeam "axis"
|
||||||
set bot_pvb_helper_customBotClassTeam "axis"
|
set bot_pvb_helper_customBotClassTeam ""
|
||||||
set scr_showHP "1"
|
set scr_showHP "1"
|
||||||
set scr_allowFPSBooster "1"
|
set scr_allowFPSBooster "1"
|
||||||
set bot_sniperCheck "1"
|
set bot_sniperCheck "1"
|
||||||
|
set dom_lastFlagUseTimeMulti "4.0"
|
||||||
|
|
||||||
// _class
|
// _class
|
||||||
// set scr_allow_ "0"
|
// set scr_allow_ "0"
|
||||||
@ -521,20 +521,20 @@ set bots_main "1"
|
|||||||
set bots_main_GUIDs ""
|
set bots_main_GUIDs ""
|
||||||
set bots_main_firstIsHost "0"
|
set bots_main_firstIsHost "0"
|
||||||
set bots_main_waitForHostTime "10"
|
set bots_main_waitForHostTime "10"
|
||||||
set bots_manage_add "10"
|
set bots_manage_add "9"
|
||||||
set bots_manage_fill "10"
|
set bots_manage_fill "9"
|
||||||
set bots_manage_fill_spec "0"
|
set bots_manage_fill_spec "0"
|
||||||
set bots_manage_fill_mode "1"
|
set bots_manage_fill_mode "1"
|
||||||
set bots_manage_fill_kick "1"
|
set bots_manage_fill_kick "1"
|
||||||
set bots_team "custom"
|
set bots_team "axis"
|
||||||
set bots_team_amount "1"
|
set bots_team_amount "0"
|
||||||
set bots_team_force "1"
|
set bots_team_force "1"
|
||||||
set bots_team_mode "1"
|
set bots_team_mode "0"
|
||||||
set bots_skill "8"
|
set bots_skill "8"
|
||||||
set bots_skill_axis_hard "1"
|
set bots_skill_axis_hard "0"
|
||||||
set bots_skill_axis_med "0"
|
set bots_skill_axis_med "3"
|
||||||
set bots_skill_allies_hard "0"
|
set bots_skill_allies_hard "0"
|
||||||
set bots_skill_allies_med "3"
|
set bots_skill_allies_med "0"
|
||||||
set bots_loadout_reasonable "0"
|
set bots_loadout_reasonable "0"
|
||||||
set bots_loadout_allow_op "0"
|
set bots_loadout_allow_op "0"
|
||||||
set bots_loadout_rank "-1"
|
set bots_loadout_rank "-1"
|
||||||
@ -592,6 +592,7 @@ set scr_deleteNadeOnTeamChange "1"
|
|||||||
// _perkfunctions
|
// _perkfunctions
|
||||||
set combathighIsJuiced "1"
|
set combathighIsJuiced "1"
|
||||||
set onemanarmyRefillsTubes "1"
|
set onemanarmyRefillsTubes "1"
|
||||||
|
set fix_onemanarmyFlareBug "0"
|
||||||
|
|
||||||
// _killstreaks
|
// _killstreaks
|
||||||
set scr_killstreak_rollover "1"
|
set scr_killstreak_rollover "1"
|
||||||
|
@ -48,7 +48,6 @@ set sv_wwwDownload "1"
|
|||||||
// NON-GAMEPLAY CONFIGURATION //
|
// NON-GAMEPLAY CONFIGURATION //
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set rcon_password "qazqaz" // Access to your server to change stuff remotely or ingame. empty disabled
|
|
||||||
set sv_securityLevel "23" // Configures the servers security level.
|
set sv_securityLevel "23" // Configures the servers security level.
|
||||||
set sv_customTextColor "" // custom color for ^;
|
set sv_customTextColor "" // custom color for ^;
|
||||||
set g_password "" // Password Protected Server. Leave blank if you want players to join
|
set g_password "" // Password Protected Server. Leave blank if you want players to join
|
||||||
@ -114,10 +113,10 @@ set scr_classic "0" // Enable IW3 killstreak system
|
|||||||
// //
|
// //
|
||||||
// DO NOT ABUSE! Some people like to rank. //
|
// DO NOT ABUSE! Some people like to rank. //
|
||||||
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
// DON'T BE A DICK! Warn HIGH XP via hostname. //
|
||||||
// Don't know what you doing? Don't touch it! //
|
// Don't know what you doing? Dont touch it! //
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_xpscale "10" // IW's way of Double XP.
|
set scr_xpscale "10" // IWs way of Double XP.
|
||||||
|
|
||||||
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
//set scr_war_score_kill "0" // Amount of XP by each kill.
|
||||||
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
//set scr_war_score_headshot "0" // Amount of XP by each headshot.
|
||||||
@ -203,7 +202,7 @@ set scr_airdrop_mega_nuke "1"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dm_scorelimit "10000" // Score limit to win the game.
|
set scr_dm_scorelimit "10000" // Score limit to win the game.
|
||||||
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dm_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dm_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dm_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_dm_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
set scr_dm_roundlimit "1" // Rounds per game.
|
set scr_dm_roundlimit "1" // Rounds per game.
|
||||||
@ -215,7 +214,7 @@ set scr_dm_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_war_scorelimit "25600" // Score limit to win the game.
|
set scr_war_scorelimit "25600" // Score limit to win the game.
|
||||||
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_war_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_war_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_war_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_war_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
@ -228,7 +227,7 @@ set scr_war_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dom_scorelimit "300" // Score limit to win the game.
|
set scr_dom_scorelimit "300" // Score limit to win the game.
|
||||||
set scr_dom_timelimit "30" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dom_timelimit "30" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dom_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_dom_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
set scr_dom_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||||
@ -241,7 +240,7 @@ set scr_dom_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_dd_scorelimit "1" // Score limit needed to win.
|
set scr_dd_scorelimit "1" // Score limit needed to win.
|
||||||
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_dd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_dd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_dd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
set scr_dd_numlives "0" // Number of lives per player per game. 0 is unlimited.
|
||||||
@ -257,7 +256,7 @@ set scr_dd_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
set scr_sd_scorelimit "1" // Score limit required to win the game.
|
||||||
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_sd_timelimit "2.5" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
set scr_sd_playerrespawndelay "0" // How long player will wait until respawn.
|
||||||
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
set scr_sd_waverespawndelay "0" // Duration is seconds before the first respawn in each round.
|
||||||
set scr_sd_numlives "1" // Number of lives per player per game.
|
set scr_sd_numlives "1" // Number of lives per player per game.
|
||||||
@ -276,7 +275,7 @@ set scr_sd_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_sab_scorelimit "0" // Score limit to win the match.
|
set scr_sab_scorelimit "0" // Score limit to win the match.
|
||||||
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_sab_timelimit "20" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
set scr_sab_bombtimer "30" // Duration in seconds the bomb takes to detonate.
|
||||||
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
set scr_sab_defusetime "5" // Time taken to defuse the bomb.
|
||||||
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
set scr_sab_hotpotato "0" // One bomb that the teams must fight over. One defending and one have to plant at the site.
|
||||||
@ -294,7 +293,7 @@ set scr_sab_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
set scr_ctf_scorelimit "0" // Target score before the round ends.
|
||||||
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_ctf_timelimit "10" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
set scr_ctf_numlives "0" // Number of lives per player 0 for unlimited.
|
||||||
set scr_ctf_halftime "1" // Half-Time
|
set scr_ctf_halftime "1" // Half-Time
|
||||||
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
set scr_ctf_roundlimit "1" // How many rounds match would last.
|
||||||
@ -308,7 +307,7 @@ set scr_ctf_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
set scr_oneflag_scorelimit "1" // Target score before the round ends.
|
||||||
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isn't reached.
|
set scr_oneflag_timelimit "3" // Duration in minutes for the game to end if the score limit isnt reached.
|
||||||
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
set scr_oneflag_numlives "0" // number of lives per player 0 for unlimited.
|
||||||
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
set scr_oneflag_playerrespawndelay "0" // Respawn wait in seconds.
|
||||||
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
set scr_oneflag_roundlimit "1" // How many rounds match would last.
|
||||||
@ -321,7 +320,7 @@ set scr_oneflag_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_koth_scorelimit "250" // Score limit to win the game.
|
set scr_koth_scorelimit "250" // Score limit to win the game.
|
||||||
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_koth_timelimit "15" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
set scr_koth_numlives "0" // Number of lives per game. 0 for unlimited.
|
||||||
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
set scr_koth_playerrespawndelay "0" // Players respawn wait.
|
||||||
set scr_koth_roundlimit "1" // Rounds to be played.
|
set scr_koth_roundlimit "1" // Rounds to be played.
|
||||||
@ -335,7 +334,7 @@ set scr_koth_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_arena_scorelimit "1" // Score limit to win the game.
|
set scr_arena_scorelimit "1" // Score limit to win the game.
|
||||||
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_arena_timelimit "2.5" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
set scr_arena_numlives "1" // Number of lives per game 0 for unlimited.
|
||||||
set scr_arena_roundlimit "0" // Rounds to be played.
|
set scr_arena_roundlimit "0" // Rounds to be played.
|
||||||
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
set scr_arena_roundswitch "3" // Rounds before the teams switch sides.
|
||||||
@ -348,7 +347,7 @@ set scr_arena_promode "0"
|
|||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
|
|
||||||
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
set scr_gtnw_scorelimit "101" // Score limit to win the game.
|
||||||
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isn't reached.
|
set scr_gtnw_timelimit "10" // Duration in minutes the game will continue if the score isnt reached.
|
||||||
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
set scr_gtnw_numlives "0" // Number of lives per game 0 for unlimited.
|
||||||
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
set scr_gtnw_playerrespawndelay "0" // Players respawn wait.
|
||||||
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
set scr_gtnw_roundlimit "1" // Rounds to be played.
|
||||||
@ -591,6 +590,7 @@ set scr_deleteNadeOnTeamChange "1"
|
|||||||
// _perkfunctions
|
// _perkfunctions
|
||||||
set combathighIsJuiced "1"
|
set combathighIsJuiced "1"
|
||||||
set onemanarmyRefillsTubes "1"
|
set onemanarmyRefillsTubes "1"
|
||||||
|
set fix_onemanarmyFlareBug "0"
|
||||||
|
|
||||||
// _killstreaks
|
// _killstreaks
|
||||||
set scr_killstreak_rollover "1"
|
set scr_killstreak_rollover "1"
|
||||||
|
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
# IW4x Bot Warfare v2.0.0
|
# IW4x Bot Warfare v2.1.0
|
||||||
Bot Warfare is a GSC mod for the IW4x project.
|
Bot Warfare is a GSC mod for the IW4x project.
|
||||||
|
|
||||||
It aims to add playable AI to the multiplayer games of Modern Warfare 2.
|
It aims to add playable AI to the multiplayer games of Modern Warfare 2.
|
||||||
@ -23,6 +23,21 @@ You can find the GitHub containing more info at https://github.com/ineedbots/iw4
|
|||||||
- Pressing the menu button again closes menus.
|
- Pressing the menu button again closes menus.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
- v2.1.0
|
||||||
|
- Bot chatter system, bots_main_chat
|
||||||
|
- Greatly reduce script variable usage
|
||||||
|
- Fix bots slowly reacting in remote streaks
|
||||||
|
- Improved bots mantling and stuck
|
||||||
|
- Improved bots aim
|
||||||
|
- Fix some runtime errors
|
||||||
|
- Fixed bots aim in third person
|
||||||
|
- Bots sprint more
|
||||||
|
- Improved bots sight on enemies
|
||||||
|
- Bots play hidden gamemodes like one-flag and arena
|
||||||
|
- Bots do random actions while waiting at an objective
|
||||||
|
- Improved bots from getting stuck
|
||||||
|
- Better bot difficulty management, bots_skill_min and bots_skill_max
|
||||||
|
|
||||||
- v2.0.1
|
- v2.0.1
|
||||||
- Reduced bots crouching
|
- Reduced bots crouching
|
||||||
- Increased bots sprinting
|
- Increased bots sprinting
|
||||||
@ -46,6 +61,16 @@ You can find the GitHub containing more info at https://github.com/ineedbots/iw4
|
|||||||
- v2.0.0
|
- v2.0.0
|
||||||
- Initial reboot release
|
- Initial reboot release
|
||||||
|
|
||||||
|
|
||||||
|
- TODOs
|
||||||
|
- A variable leak in _menu (script)
|
||||||
|
- Recoil for bots (engine, maybe script)
|
||||||
|
- Use proper activate button for bombs, carepackages, etc (script, use +activate)
|
||||||
|
- Proper weapon swaps, including altmode (engine, then script)
|
||||||
|
- Use static turrets in maps (script)
|
||||||
|
- Proper use of pred missile (script and engine)
|
||||||
|
- Fix testclient view angle clamping (messes with ac130 and chopper gunner) (engine)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
- IW4x Team - https://github.com/XLabsProject/iw4x-client
|
- IW4x Team - https://github.com/XLabsProject/iw4x-client
|
||||||
- CoD4x Team - https://github.com/callofduty4x/CoD4x_Server
|
- CoD4x Team - https://github.com/callofduty4x/CoD4x_Server
|
||||||
|
BIN
out/ss.jpg
Normal file
BIN
out/ss.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
BIN
out/ss.png
BIN
out/ss.png
Binary file not shown.
Before Width: | Height: | Size: 3.5 MiB |
@ -1,26 +1,26 @@
|
|||||||
a
|
bota
|
||||||
b
|
botb
|
||||||
c
|
botc
|
||||||
d
|
botd
|
||||||
e
|
bote
|
||||||
f
|
botf
|
||||||
g
|
botg
|
||||||
h
|
both
|
||||||
i
|
boti
|
||||||
j
|
botj
|
||||||
k
|
botk
|
||||||
l
|
botl
|
||||||
m
|
botm
|
||||||
n
|
botn
|
||||||
o
|
boto
|
||||||
p
|
botp
|
||||||
q
|
botq
|
||||||
r
|
botr
|
||||||
s
|
bots
|
||||||
t
|
bott
|
||||||
u
|
botu
|
||||||
v
|
botv
|
||||||
w
|
botw
|
||||||
x
|
botx
|
||||||
y
|
boty
|
||||||
z
|
botz
|
@ -15,7 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
level.bw_VERSION = "2.0.1";
|
level.bw_VERSION = "2.1.0";
|
||||||
|
|
||||||
if ( getDvar( "bots_main" ) == "" )
|
if ( getDvar( "bots_main" ) == "" )
|
||||||
setDvar( "bots_main", true );
|
setDvar( "bots_main", true );
|
||||||
@ -28,74 +28,112 @@ init()
|
|||||||
|
|
||||||
if ( getDvar( "bots_main_GUIDs" ) == "" )
|
if ( getDvar( "bots_main_GUIDs" ) == "" )
|
||||||
setDvar( "bots_main_GUIDs", "" ); //guids of players who will be given host powers, comma seperated
|
setDvar( "bots_main_GUIDs", "" ); //guids of players who will be given host powers, comma seperated
|
||||||
|
|
||||||
if ( getDvar( "bots_main_firstIsHost" ) == "" )
|
if ( getDvar( "bots_main_firstIsHost" ) == "" )
|
||||||
setDvar( "bots_main_firstIsHost", false ); //first play to connect is a host
|
setDvar( "bots_main_firstIsHost", false ); //first play to connect is a host
|
||||||
|
|
||||||
if ( getDvar( "bots_main_waitForHostTime" ) == "" )
|
if ( getDvar( "bots_main_waitForHostTime" ) == "" )
|
||||||
setDvar( "bots_main_waitForHostTime", 10.0 ); //how long to wait to wait for the host player
|
setDvar( "bots_main_waitForHostTime", 10.0 ); //how long to wait to wait for the host player
|
||||||
|
|
||||||
|
if ( getDvar( "bots_main_kickBotsAtEnd" ) == "" )
|
||||||
|
setDvar( "bots_main_kickBotsAtEnd", false ); //kicks the bots at game end
|
||||||
|
|
||||||
if ( getDvar( "bots_manage_add" ) == "" )
|
if ( getDvar( "bots_manage_add" ) == "" )
|
||||||
setDvar( "bots_manage_add", 0 ); //amount of bots to add to the game
|
setDvar( "bots_manage_add", 0 ); //amount of bots to add to the game
|
||||||
|
|
||||||
if ( getDvar( "bots_manage_fill" ) == "" )
|
if ( getDvar( "bots_manage_fill" ) == "" )
|
||||||
setDvar( "bots_manage_fill", 0 ); //amount of bots to maintain
|
setDvar( "bots_manage_fill", 0 ); //amount of bots to maintain
|
||||||
|
|
||||||
if ( getDvar( "bots_manage_fill_spec" ) == "" )
|
if ( getDvar( "bots_manage_fill_spec" ) == "" )
|
||||||
setDvar( "bots_manage_fill_spec", true ); //to count for fill if player is on spec team
|
setDvar( "bots_manage_fill_spec", true ); //to count for fill if player is on spec team
|
||||||
|
|
||||||
if ( getDvar( "bots_manage_fill_mode" ) == "" )
|
if ( getDvar( "bots_manage_fill_mode" ) == "" )
|
||||||
setDvar( "bots_manage_fill_mode", 0 ); //fill mode, 0 adds everyone, 1 just bots, 2 maintains at maps, 3 is 2 with 1
|
setDvar( "bots_manage_fill_mode", 0 ); //fill mode, 0 adds everyone, 1 just bots, 2 maintains at maps, 3 is 2 with 1
|
||||||
|
|
||||||
if ( getDvar( "bots_manage_fill_kick" ) == "" )
|
if ( getDvar( "bots_manage_fill_kick" ) == "" )
|
||||||
setDvar( "bots_manage_fill_kick", false ); //kick bots if too many
|
setDvar( "bots_manage_fill_kick", false ); //kick bots if too many
|
||||||
|
|
||||||
if ( getDvar( "bots_team" ) == "" )
|
if ( getDvar( "bots_team" ) == "" )
|
||||||
setDvar( "bots_team", "autoassign" ); //which team for bots to join
|
setDvar( "bots_team", "autoassign" ); //which team for bots to join
|
||||||
|
|
||||||
if ( getDvar( "bots_team_amount" ) == "" )
|
if ( getDvar( "bots_team_amount" ) == "" )
|
||||||
setDvar( "bots_team_amount", 0 ); //amount of bots on axis team
|
setDvar( "bots_team_amount", 0 ); //amount of bots on axis team
|
||||||
|
|
||||||
if ( getDvar( "bots_team_force" ) == "" )
|
if ( getDvar( "bots_team_force" ) == "" )
|
||||||
setDvar( "bots_team_force", false ); //force bots on team
|
setDvar( "bots_team_force", false ); //force bots on team
|
||||||
|
|
||||||
if ( getDvar( "bots_team_mode" ) == "" )
|
if ( getDvar( "bots_team_mode" ) == "" )
|
||||||
setDvar( "bots_team_mode", 0 ); //counts just bots when 1
|
setDvar( "bots_team_mode", 0 ); //counts just bots when 1
|
||||||
|
|
||||||
if ( getDvar( "bots_skill" ) == "" )
|
if ( getDvar( "bots_skill" ) == "" )
|
||||||
setDvar( "bots_skill", 0 ); //0 is random, 1 is easy 7 is hard, 8 is custom, 9 is completely random
|
setDvar( "bots_skill", 0 ); //0 is random, 1 is easy 7 is hard, 8 is custom, 9 is completely random
|
||||||
|
|
||||||
if ( getDvar( "bots_skill_axis_hard" ) == "" )
|
if ( getDvar( "bots_skill_axis_hard" ) == "" )
|
||||||
setDvar( "bots_skill_axis_hard", 0 ); //amount of hard bots on axis team
|
setDvar( "bots_skill_axis_hard", 0 ); //amount of hard bots on axis team
|
||||||
|
|
||||||
if ( getDvar( "bots_skill_axis_med" ) == "" )
|
if ( getDvar( "bots_skill_axis_med" ) == "" )
|
||||||
setDvar( "bots_skill_axis_med", 0 );
|
setDvar( "bots_skill_axis_med", 0 );
|
||||||
|
|
||||||
if ( getDvar( "bots_skill_allies_hard" ) == "" )
|
if ( getDvar( "bots_skill_allies_hard" ) == "" )
|
||||||
setDvar( "bots_skill_allies_hard", 0 );
|
setDvar( "bots_skill_allies_hard", 0 );
|
||||||
|
|
||||||
if ( getDvar( "bots_skill_allies_med" ) == "" )
|
if ( getDvar( "bots_skill_allies_med" ) == "" )
|
||||||
setDvar( "bots_skill_allies_med", 0 );
|
setDvar( "bots_skill_allies_med", 0 );
|
||||||
|
|
||||||
|
if ( getDvar( "bots_skill_min" ) == "" )
|
||||||
|
setDvar( "bots_skill_min", 1 );
|
||||||
|
|
||||||
|
if ( getDvar( "bots_skill_max" ) == "" )
|
||||||
|
setDvar( "bots_skill_max", 7 );
|
||||||
|
|
||||||
if ( getDvar( "bots_loadout_reasonable" ) == "" ) //filter out the bad 'guns' and perks
|
if ( getDvar( "bots_loadout_reasonable" ) == "" ) //filter out the bad 'guns' and perks
|
||||||
setDvar( "bots_loadout_reasonable", false );
|
setDvar( "bots_loadout_reasonable", false );
|
||||||
|
|
||||||
if ( getDvar( "bots_loadout_allow_op" ) == "" ) //allows jug, marty and laststand
|
if ( getDvar( "bots_loadout_allow_op" ) == "" ) //allows jug, marty and laststand
|
||||||
setDvar( "bots_loadout_allow_op", true );
|
setDvar( "bots_loadout_allow_op", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_loadout_rank" ) == "" ) // what rank the bots should be around, -1 is around the players, 0 is all random
|
if ( getDvar( "bots_loadout_rank" ) == "" ) // what rank the bots should be around, -1 is around the players, 0 is all random
|
||||||
setDvar( "bots_loadout_rank", -1 );
|
setDvar( "bots_loadout_rank", -1 );
|
||||||
|
|
||||||
if ( getDvar( "bots_loadout_prestige" ) == "" ) // what pretige the bots will be, -1 is the players, -2 is random
|
if ( getDvar( "bots_loadout_prestige" ) == "" ) // what pretige the bots will be, -1 is the players, -2 is random
|
||||||
setDvar( "bots_loadout_prestige", -1 );
|
setDvar( "bots_loadout_prestige", -1 );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_move" ) == "" ) //bots move
|
if ( getDvar( "bots_play_move" ) == "" ) //bots move
|
||||||
setDvar( "bots_play_move", true );
|
setDvar( "bots_play_move", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_knife" ) == "" ) //bots knife
|
if ( getDvar( "bots_play_knife" ) == "" ) //bots knife
|
||||||
setDvar( "bots_play_knife", true );
|
setDvar( "bots_play_knife", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_fire" ) == "" ) //bots fire
|
if ( getDvar( "bots_play_fire" ) == "" ) //bots fire
|
||||||
setDvar( "bots_play_fire", true );
|
setDvar( "bots_play_fire", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_nade" ) == "" ) //bots grenade
|
if ( getDvar( "bots_play_nade" ) == "" ) //bots grenade
|
||||||
setDvar( "bots_play_nade", true );
|
setDvar( "bots_play_nade", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_take_carepackages" ) == "" ) //bots take carepackages
|
if ( getDvar( "bots_play_take_carepackages" ) == "" ) //bots take carepackages
|
||||||
setDvar( "bots_play_take_carepackages", true );
|
setDvar( "bots_play_take_carepackages", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_obj" ) == "" ) //bots play the obj
|
if ( getDvar( "bots_play_obj" ) == "" ) //bots play the obj
|
||||||
setDvar( "bots_play_obj", true );
|
setDvar( "bots_play_obj", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_camp" ) == "" ) //bots camp and follow
|
if ( getDvar( "bots_play_camp" ) == "" ) //bots camp and follow
|
||||||
setDvar( "bots_play_camp", true );
|
setDvar( "bots_play_camp", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_jumpdrop" ) == "" ) //bots jump and dropshot
|
if ( getDvar( "bots_play_jumpdrop" ) == "" ) //bots jump and dropshot
|
||||||
setDvar( "bots_play_jumpdrop", true );
|
setDvar( "bots_play_jumpdrop", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_target_other" ) == "" ) //bot target non play ents (vehicles)
|
if ( getDvar( "bots_play_target_other" ) == "" ) //bot target non play ents (vehicles)
|
||||||
setDvar( "bots_play_target_other", true );
|
setDvar( "bots_play_target_other", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_killstreak" ) == "" ) //bot use killstreaks
|
if ( getDvar( "bots_play_killstreak" ) == "" ) //bot use killstreaks
|
||||||
setDvar( "bots_play_killstreak", true );
|
setDvar( "bots_play_killstreak", true );
|
||||||
|
|
||||||
if ( getDvar( "bots_play_ads" ) == "" ) //bot ads
|
if ( getDvar( "bots_play_ads" ) == "" ) //bot ads
|
||||||
setDvar( "bots_play_ads", true );
|
setDvar( "bots_play_ads", true );
|
||||||
|
|
||||||
|
if ( getDvar( "bots_play_aim" ) == "" )
|
||||||
|
setDvar( "bots_play_aim", true );
|
||||||
|
|
||||||
if ( !isDefined( game["botWarfare"] ) )
|
if ( !isDefined( game["botWarfare"] ) )
|
||||||
game["botWarfare"] = true;
|
game["botWarfare"] = true;
|
||||||
|
|
||||||
@ -176,6 +214,16 @@ handleBots()
|
|||||||
wait 0.05;
|
wait 0.05;
|
||||||
|
|
||||||
setDvar( "bots_manage_add", getBotArray().size );
|
setDvar( "bots_manage_add", getBotArray().size );
|
||||||
|
|
||||||
|
if ( !getDvarInt( "bots_main_kickBotsAtEnd" ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
bots = getBotArray();
|
||||||
|
|
||||||
|
for ( i = 0; i < bots.size; i++ )
|
||||||
|
{
|
||||||
|
kick( bots[i] getEntityNumber(), "EXE_PLAYERKICKED" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -231,6 +279,7 @@ fixGamemodes()
|
|||||||
{
|
{
|
||||||
for ( i = 0; i < level.bombZones.size; i++ )
|
for ( i = 0; i < level.bombZones.size; i++ )
|
||||||
level.bombZones[i].onUse = ::onUsePlantObjectFix;
|
level.bombZones[i].onUse = ::onUsePlantObjectFix;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,20 +358,14 @@ fixKoth()
|
|||||||
/*
|
/*
|
||||||
Adds a notify when the airdrop is dropped
|
Adds a notify when the airdrop is dropped
|
||||||
*/
|
*/
|
||||||
addNotifyOnAirdrops()
|
addNotifyOnAirdrops_loop()
|
||||||
{
|
{
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
wait 1;
|
|
||||||
dropCrates = getEntArray( "care_package", "targetname" );
|
dropCrates = getEntArray( "care_package", "targetname" );
|
||||||
|
|
||||||
for ( i = dropCrates.size - 1; i >= 0; i-- )
|
for ( i = dropCrates.size - 1; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
airdrop = dropCrates[i];
|
airdrop = dropCrates[i];
|
||||||
|
|
||||||
if (!isDefined(airdrop.owner))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ( isDefined( airdrop.doingPhysics ) )
|
if ( isDefined( airdrop.doingPhysics ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -330,6 +373,17 @@ addNotifyOnAirdrops()
|
|||||||
airdrop thread doNotifyOnAirdrop();
|
airdrop thread doNotifyOnAirdrop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Adds a notify when the airdrop is dropped
|
||||||
|
*/
|
||||||
|
addNotifyOnAirdrops()
|
||||||
|
{
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 1;
|
||||||
|
addNotifyOnAirdrops_loop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -341,7 +395,26 @@ doNotifyOnAirdrop()
|
|||||||
self waittill( "physics_finished" );
|
self waittill( "physics_finished" );
|
||||||
|
|
||||||
self.doingPhysics = false;
|
self.doingPhysics = false;
|
||||||
|
|
||||||
|
if ( isDefined( self.owner ) )
|
||||||
self.owner notify( "crate_physics_done" );
|
self.owner notify( "crate_physics_done" );
|
||||||
|
|
||||||
|
self thread onCarepackageCaptured();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Waits to be captured
|
||||||
|
*/
|
||||||
|
onCarepackageCaptured()
|
||||||
|
{
|
||||||
|
self endon( "death" );
|
||||||
|
|
||||||
|
self waittill( "captured", player );
|
||||||
|
|
||||||
|
if ( isDefined( self.owner ) && self.owner is_bot() )
|
||||||
|
{
|
||||||
|
self.owner BotNotifyBotEvent( "crate_cap", "captured", self, player );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -353,6 +426,8 @@ onPlayerConnect()
|
|||||||
{
|
{
|
||||||
level waittill( "connected", player );
|
level waittill( "connected", player );
|
||||||
|
|
||||||
|
player.bot_isScrambled = false;
|
||||||
|
|
||||||
player thread onGrenadeFire();
|
player thread onGrenadeFire();
|
||||||
player thread onWeaponFired();
|
player thread onWeaponFired();
|
||||||
|
|
||||||
@ -363,12 +438,8 @@ onPlayerConnect()
|
|||||||
/*
|
/*
|
||||||
Watches players with scrambler perk
|
Watches players with scrambler perk
|
||||||
*/
|
*/
|
||||||
watchScrabler()
|
watchScrabler_loop()
|
||||||
{
|
{
|
||||||
for (;;)
|
|
||||||
{
|
|
||||||
wait 1;
|
|
||||||
|
|
||||||
for ( i = level.players.size - 1; i >= 0; i-- )
|
for ( i = level.players.size - 1; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -402,6 +473,18 @@ watchScrabler()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Watches players with scrambler perk
|
||||||
|
*/
|
||||||
|
watchScrabler()
|
||||||
|
{
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 1;
|
||||||
|
|
||||||
|
watchScrabler_loop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -446,6 +529,26 @@ connected()
|
|||||||
self thread onDisconnect();
|
self thread onDisconnect();
|
||||||
|
|
||||||
level notify( "bot_connected", self );
|
level notify( "bot_connected", self );
|
||||||
|
|
||||||
|
self thread watchBotDebugEvent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
DEBUG
|
||||||
|
*/
|
||||||
|
watchBotDebugEvent()
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
self waittill( "bot_event", msg, str, b, c, d, e, f, g );
|
||||||
|
|
||||||
|
if ( msg == "debug" && GetDvarInt( "bots_main_debug" ) )
|
||||||
|
{
|
||||||
|
PrintConsole( "Bot Warfare debug: " + self.name + ": " + str );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -477,12 +580,8 @@ add_bot()
|
|||||||
/*
|
/*
|
||||||
A server thread for monitoring all bot's difficulty levels for custom server settings.
|
A server thread for monitoring all bot's difficulty levels for custom server settings.
|
||||||
*/
|
*/
|
||||||
diffBots()
|
diffBots_loop()
|
||||||
{
|
{
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
wait 1.5;
|
|
||||||
|
|
||||||
var_allies_hard = getDVarInt( "bots_skill_allies_hard" );
|
var_allies_hard = getDVarInt( "bots_skill_allies_hard" );
|
||||||
var_allies_med = getDVarInt( "bots_skill_allies_med" );
|
var_allies_med = getDVarInt( "bots_skill_allies_med" );
|
||||||
var_axis_hard = getDVarInt( "bots_skill_axis_hard" );
|
var_axis_hard = getDVarInt( "bots_skill_axis_hard" );
|
||||||
@ -497,6 +596,7 @@ diffBots()
|
|||||||
if ( var_skill == 8 )
|
if ( var_skill == 8 )
|
||||||
{
|
{
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -542,6 +642,7 @@ diffBots()
|
|||||||
else if ( var_skill != 0 && var_skill != 9 )
|
else if ( var_skill != 0 && var_skill != 9 )
|
||||||
{
|
{
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -552,17 +653,40 @@ diffBots()
|
|||||||
player.pers["bots"]["skill"]["base"] = var_skill;
|
player.pers["bots"]["skill"]["base"] = var_skill;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
playercount = level.players.size;
|
||||||
|
min_diff = GetDvarInt( "bots_skill_min" );
|
||||||
|
max_diff = GetDvarInt( "bots_skill_max" );
|
||||||
|
|
||||||
|
for ( i = 0; i < playercount; i++ )
|
||||||
|
{
|
||||||
|
player = level.players[i];
|
||||||
|
|
||||||
|
if ( !player is_bot() )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
player.pers["bots"]["skill"]["base"] = int( clamp( player.pers["bots"]["skill"]["base"], min_diff, max_diff ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
A server thread for monitoring all bot's difficulty levels for custom server settings.
|
||||||
|
*/
|
||||||
|
diffBots()
|
||||||
|
{
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 1.5;
|
||||||
|
|
||||||
|
diffBots_loop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
A server thread for monitoring all bot's teams for custom server settings.
|
A server thread for monitoring all bot's teams for custom server settings.
|
||||||
*/
|
*/
|
||||||
teamBots()
|
teamBots_loop()
|
||||||
{
|
{
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
wait 1.5;
|
|
||||||
teamAmount = getDvarInt( "bots_team_amount" );
|
teamAmount = getDvarInt( "bots_team_amount" );
|
||||||
toTeam = getDvar( "bots_team" );
|
toTeam = getDvar( "bots_team" );
|
||||||
|
|
||||||
@ -572,6 +696,7 @@ teamBots()
|
|||||||
axisplayers = 0;
|
axisplayers = 0;
|
||||||
|
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -613,6 +738,7 @@ teamBots()
|
|||||||
if ( abs( axis - allies ) > 1 )
|
if ( abs( axis - allies ) > 1 )
|
||||||
{
|
{
|
||||||
toTeam = "axis";
|
toTeam = "axis";
|
||||||
|
|
||||||
if ( axis > allies )
|
if ( axis > allies )
|
||||||
toTeam = "allies";
|
toTeam = "allies";
|
||||||
}
|
}
|
||||||
@ -621,6 +747,7 @@ teamBots()
|
|||||||
if ( toTeam != "autoassign" )
|
if ( toTeam != "autoassign" )
|
||||||
{
|
{
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -640,6 +767,7 @@ teamBots()
|
|||||||
player thread [[level.axis]]();
|
player thread [[level.axis]]();
|
||||||
else
|
else
|
||||||
player thread [[level.spectator]]();
|
player thread [[level.spectator]]();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -648,6 +776,7 @@ teamBots()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -682,21 +811,24 @@ teamBots()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
A server thread for monitoring all bot's teams for custom server settings.
|
||||||
|
*/
|
||||||
|
teamBots()
|
||||||
|
{
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 1.5;
|
||||||
|
teamBots_loop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
A server thread for monitoring all bot's in game. Will add and kick bots according to server settings.
|
A server thread for monitoring all bot's in game. Will add and kick bots according to server settings.
|
||||||
*/
|
*/
|
||||||
addBots()
|
addBots_loop()
|
||||||
{
|
{
|
||||||
level endon("game_ended");
|
|
||||||
|
|
||||||
bot_wait_for_host();
|
|
||||||
|
|
||||||
for(;;)
|
|
||||||
{
|
|
||||||
wait 1.5;
|
|
||||||
|
|
||||||
botsToAdd = GetDvarInt( "bots_manage_add" );
|
botsToAdd = GetDvarInt( "bots_manage_add" );
|
||||||
|
|
||||||
if ( botsToAdd > 0 )
|
if ( botsToAdd > 0 )
|
||||||
@ -725,6 +857,7 @@ addBots()
|
|||||||
spec = 0;
|
spec = 0;
|
||||||
|
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -751,6 +884,7 @@ addBots()
|
|||||||
alliesplayers = 0;
|
alliesplayers = 0;
|
||||||
|
|
||||||
playercount = level.players.size;
|
playercount = level.players.size;
|
||||||
|
|
||||||
for ( i = 0; i < playercount; i++ )
|
for ( i = 0; i < playercount; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
@ -783,8 +917,10 @@ addBots()
|
|||||||
}
|
}
|
||||||
|
|
||||||
amount = bots;
|
amount = bots;
|
||||||
|
|
||||||
if ( fillMode == 0 || fillMode == 2 )
|
if ( fillMode == 0 || fillMode == 2 )
|
||||||
amount += players;
|
amount += players;
|
||||||
|
|
||||||
if ( getDVarInt( "bots_manage_fill_spec" ) )
|
if ( getDVarInt( "bots_manage_fill_spec" ) )
|
||||||
amount += spec;
|
amount += spec;
|
||||||
|
|
||||||
@ -793,10 +929,27 @@ addBots()
|
|||||||
else if ( amount > fillAmount && getDvarInt( "bots_manage_fill_kick" ) )
|
else if ( amount > fillAmount && getDvarInt( "bots_manage_fill_kick" ) )
|
||||||
{
|
{
|
||||||
tempBot = random( getBotArray() );
|
tempBot = random( getBotArray() );
|
||||||
|
|
||||||
if ( isDefined( tempBot ) )
|
if ( isDefined( tempBot ) )
|
||||||
kick( tempBot getEntityNumber(), "EXE_PLAYERKICKED" );
|
kick( tempBot getEntityNumber(), "EXE_PLAYERKICKED" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
A server thread for monitoring all bot's in game. Will add and kick bots according to server settings.
|
||||||
|
*/
|
||||||
|
addBots()
|
||||||
|
{
|
||||||
|
level endon( "game_ended" );
|
||||||
|
|
||||||
|
bot_wait_for_host();
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 1.5;
|
||||||
|
|
||||||
|
addBots_loop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -805,9 +958,14 @@ addBots()
|
|||||||
onGrenadeFire()
|
onGrenadeFire()
|
||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill ( "grenade_fire", grenade, weaponName );
|
self waittill ( "grenade_fire", grenade, weaponName );
|
||||||
|
|
||||||
|
if ( !isDefined( grenade ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
grenade.name = weaponName;
|
grenade.name = weaponName;
|
||||||
|
|
||||||
if ( weaponName == "smoke_grenade_mp" )
|
if ( weaponName == "smoke_grenade_mp" )
|
||||||
@ -878,6 +1036,7 @@ thinkSmoke()
|
|||||||
self.state = "moving";
|
self.state = "moving";
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.state = "smoking";
|
self.state = "smoking";
|
||||||
wait 11.5;
|
wait 11.5;
|
||||||
|
|
||||||
@ -891,6 +1050,7 @@ onWeaponFired()
|
|||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
self.bots_firing = false;
|
self.bots_firing = false;
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "weapon_fired" );
|
self waittill( "weapon_fired" );
|
||||||
|
3003
userraw/maps/mp/bots/_bot_chat.gsc
Normal file
3003
userraw/maps/mp/bots/_bot_chat.gsc
Normal file
File diff suppressed because it is too large
Load Diff
@ -105,6 +105,7 @@ getLinesFromUrl(url, filename)
|
|||||||
fileWrite( filename, data, "write" );
|
fileWrite( filename, data, "write" );
|
||||||
|
|
||||||
line = "";
|
line = "";
|
||||||
|
|
||||||
for ( i = 0; i < data.size; i++ )
|
for ( i = 0; i < data.size; i++ )
|
||||||
{
|
{
|
||||||
c = data[i];
|
c = data[i];
|
||||||
@ -119,6 +120,7 @@ getLinesFromUrl(url, filename)
|
|||||||
|
|
||||||
line += c;
|
line += c;
|
||||||
}
|
}
|
||||||
|
|
||||||
result.lines[result.lines.size] = line;
|
result.lines[result.lines.size] = line;
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -119,9 +119,11 @@ watchPlayerOpenMenu()
|
|||||||
self endon ( "bots_kill_menu" );
|
self endon ( "bots_kill_menu" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "bots_open_menu", "+actionslot 2" );
|
self notifyOnPlayerCommand( "bots_open_menu", "+actionslot 2" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "bots_open_menu" );
|
self waittill( "bots_open_menu" );
|
||||||
|
|
||||||
if ( !self.menuOpen )
|
if ( !self.menuOpen )
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_click" );
|
self playLocalSound( "mouse_click" );
|
||||||
@ -130,11 +132,13 @@ watchPlayerOpenMenu()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_click" );
|
self playLocalSound( "mouse_click" );
|
||||||
|
|
||||||
if ( self.SubMenu != "Main" )
|
if ( self.SubMenu != "Main" )
|
||||||
self ExitSub();
|
self ExitSub();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
self ExitMenu();
|
self ExitMenu();
|
||||||
|
|
||||||
if ( !gameFlag( "prematch_done" ) || level.gameEnded )
|
if ( !gameFlag( "prematch_done" ) || level.gameEnded )
|
||||||
self freezeControls( true );
|
self freezeControls( true );
|
||||||
else
|
else
|
||||||
@ -150,12 +154,15 @@ MenuSelect()
|
|||||||
self endon ( "bots_kill_menu" );
|
self endon ( "bots_kill_menu" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "bots_select", "+gostand" );
|
self notifyOnPlayerCommand( "bots_select", "+gostand" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "bots_select" );
|
self waittill( "bots_select" );
|
||||||
|
|
||||||
if ( self.MenuOpen )
|
if ( self.MenuOpen )
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_click" );
|
self playLocalSound( "mouse_click" );
|
||||||
|
|
||||||
if ( self.SubMenu == "Main" )
|
if ( self.SubMenu == "Main" )
|
||||||
self thread [[self.Option["Function"][self.SubMenu][self.Curs["Main"]["X"]]]]( self.Option["Arg1"][self.SubMenu][self.Curs["Main"]["X"]], self.Option["Arg2"][self.SubMenu][self.Curs["Main"]["X"]] );
|
self thread [[self.Option["Function"][self.SubMenu][self.Curs["Main"]["X"]]]]( self.Option["Arg1"][self.SubMenu][self.Curs["Main"]["X"]], self.Option["Arg2"][self.SubMenu][self.Curs["Main"]["X"]] );
|
||||||
else
|
else
|
||||||
@ -170,9 +177,11 @@ LeftMenu()
|
|||||||
self endon ( "bots_kill_menu" );
|
self endon ( "bots_kill_menu" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "bots_left", "+moveleft" );
|
self notifyOnPlayerCommand( "bots_left", "+moveleft" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "bots_left" );
|
self waittill( "bots_left" );
|
||||||
|
|
||||||
if ( self.MenuOpen && self.SubMenu == "Main" )
|
if ( self.MenuOpen && self.SubMenu == "Main" )
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_over" );
|
self playLocalSound( "mouse_over" );
|
||||||
@ -192,9 +201,11 @@ RightMenu()
|
|||||||
self endon ( "bots_kill_menu" );
|
self endon ( "bots_kill_menu" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "bots_right", "+moveright" );
|
self notifyOnPlayerCommand( "bots_right", "+moveright" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "bots_right" );
|
self waittill( "bots_right" );
|
||||||
|
|
||||||
if ( self.MenuOpen && self.SubMenu == "Main" )
|
if ( self.MenuOpen && self.SubMenu == "Main" )
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_over" );
|
self playLocalSound( "mouse_over" );
|
||||||
@ -214,9 +225,11 @@ UpMenu()
|
|||||||
self endon ( "bots_kill_menu" );
|
self endon ( "bots_kill_menu" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "bots_up", "+forward" );
|
self notifyOnPlayerCommand( "bots_up", "+forward" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "bots_up" );
|
self waittill( "bots_up" );
|
||||||
|
|
||||||
if ( self.MenuOpen && self.SubMenu != "Main" )
|
if ( self.MenuOpen && self.SubMenu != "Main" )
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_over" );
|
self playLocalSound( "mouse_over" );
|
||||||
@ -236,9 +249,11 @@ DownMenu()
|
|||||||
self endon ( "bots_kill_menu" );
|
self endon ( "bots_kill_menu" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "bots_down", "+back" );
|
self notifyOnPlayerCommand( "bots_down", "+back" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "bots_down" );
|
self waittill( "bots_down" );
|
||||||
|
|
||||||
if ( self.MenuOpen && self.SubMenu != "Main" )
|
if ( self.MenuOpen && self.SubMenu != "Main" )
|
||||||
{
|
{
|
||||||
self playLocalSound( "mouse_over" );
|
self playLocalSound( "mouse_over" );
|
||||||
@ -287,6 +302,7 @@ OpenSub(menu, menu2)
|
|||||||
self.MenuText[i] = self createfontstring( "default", 1.6 );
|
self.MenuText[i] = self createfontstring( "default", 1.6 );
|
||||||
self.MenuText[i] setpoint( "CENTER", "CENTER", -300 + ( i * 100 ), -226 );
|
self.MenuText[i] setpoint( "CENTER", "CENTER", -300 + ( i * 100 ), -226 );
|
||||||
self.MenuText[i] settext( self.Option["Name"][self.SubMenu][i] );
|
self.MenuText[i] settext( self.Option["Name"][self.SubMenu][i] );
|
||||||
|
|
||||||
if ( logOldi )
|
if ( logOldi )
|
||||||
self.oldi = i;
|
self.oldi = i;
|
||||||
|
|
||||||
@ -296,6 +312,7 @@ OpenSub(menu, menu2)
|
|||||||
x = i - self.oldi;
|
x = i - self.oldi;
|
||||||
self.MenuText[i] setpoint( "CENTER", "CENTER", ( ( ( -300 ) - ( i * 100 ) ) + ( i * 100 ) ) + ( x * 100 ), -196 );
|
self.MenuText[i] setpoint( "CENTER", "CENTER", ( ( ( -300 ) - ( i * 100 ) ) + ( i * 100 ) ) + ( x * 100 ), -196 );
|
||||||
}
|
}
|
||||||
|
|
||||||
self.MenuText[i].alpha = 1;
|
self.MenuText[i].alpha = 1;
|
||||||
self.MenuText[i].sort = 999;
|
self.MenuText[i].sort = 999;
|
||||||
}
|
}
|
||||||
@ -336,6 +353,7 @@ OpenSub(menu, menu2)
|
|||||||
CursMove( direction )
|
CursMove( direction )
|
||||||
{
|
{
|
||||||
self notify( "scrolled" );
|
self notify( "scrolled" );
|
||||||
|
|
||||||
if ( self.SubMenu == "Main" )
|
if ( self.SubMenu == "Main" )
|
||||||
{
|
{
|
||||||
self.Menu["X"]["Scroller"].x = self.MenuText[self.Curs["Main"]["X"]].x;
|
self.Menu["X"]["Scroller"].x = self.MenuText[self.Curs["Main"]["X"]].x;
|
||||||
@ -413,8 +431,10 @@ ShowOptionOn(variable)
|
|||||||
self.MenuText[self.Curs[self.SubMenu][variable]].fontscale = 2.0;
|
self.MenuText[self.Curs[self.SubMenu][variable]].fontscale = 2.0;
|
||||||
//self.MenuText[self.Curs[self.SubMenu][variable]].color = (randomInt(256)/255, randomInt(256)/255, randomInt(256)/255);
|
//self.MenuText[self.Curs[self.SubMenu][variable]].color = (randomInt(256)/255, randomInt(256)/255, randomInt(256)/255);
|
||||||
color = ( 6 / 255, 69 / 255, 173 + randomIntRange( -5, 5 ) / 255 );
|
color = ( 6 / 255, 69 / 255, 173 + randomIntRange( -5, 5 ) / 255 );
|
||||||
|
|
||||||
if ( int( time * 4 ) % 2 )
|
if ( int( time * 4 ) % 2 )
|
||||||
color = ( 11 / 255, 0 / 255, 128 + randomIntRange( -10, 10 ) / 255 );
|
color = ( 11 / 255, 0 / 255, 128 + randomIntRange( -10, 10 ) / 255 );
|
||||||
|
|
||||||
self.MenuText[self.Curs[self.SubMenu][variable]].color = color;
|
self.MenuText[self.Curs[self.SubMenu][variable]].color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -434,8 +454,10 @@ ShowOptionOn(variable)
|
|||||||
self.MenuTextY[self.Curs[self.SubMenu][variable]].fontscale = 2.0;
|
self.MenuTextY[self.Curs[self.SubMenu][variable]].fontscale = 2.0;
|
||||||
//self.MenuTextY[self.Curs[self.SubMenu][variable]].color = (randomInt(256)/255, randomInt(256)/255, randomInt(256)/255);
|
//self.MenuTextY[self.Curs[self.SubMenu][variable]].color = (randomInt(256)/255, randomInt(256)/255, randomInt(256)/255);
|
||||||
color = ( 6 / 255, 69 / 255, 173 + randomIntRange( -5, 5 ) / 255 );
|
color = ( 6 / 255, 69 / 255, 173 + randomIntRange( -5, 5 ) / 255 );
|
||||||
|
|
||||||
if ( int( time * 4 ) % 2 )
|
if ( int( time * 4 ) % 2 )
|
||||||
color = ( 11 / 255, 0 / 255, 128 + randomIntRange( -10, 10 ) / 255 );
|
color = ( 11 / 255, 0 / 255, 128 + randomIntRange( -10, 10 ) / 255 );
|
||||||
|
|
||||||
self.MenuTextY[self.Curs[self.SubMenu][variable]].color = color;
|
self.MenuTextY[self.Curs[self.SubMenu][variable]].color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -566,34 +588,43 @@ AddOptions()
|
|||||||
self AddMenu( "man_bots", 6, "Kick all bots", ::man_bots, "kick", getBotArray().size );
|
self AddMenu( "man_bots", 6, "Kick all bots", ::man_bots, "kick", getBotArray().size );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_manage_fill_kick" );
|
_tempDvar = getDvarInt( "bots_manage_fill_kick" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "man_bots", 7, "Toggle auto bot kicking: " + _temp, ::man_bots, "autokick", _tempDvar );
|
self AddMenu( "man_bots", 7, "Toggle auto bot kicking: " + _temp, ::man_bots, "autokick", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_manage_fill_mode" );
|
_tempDvar = getDvarInt( "bots_manage_fill_mode" );
|
||||||
|
|
||||||
switch ( _tempDvar )
|
switch ( _tempDvar )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
_temp = "everyone";
|
_temp = "everyone";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
_temp = "just bots";
|
_temp = "just bots";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
_temp = "everyone, adjust to map";
|
_temp = "everyone, adjust to map";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
_temp = "just bots, adjust to map";
|
_temp = "just bots, adjust to map";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
_temp = "bots used as team balance";
|
_temp = "bots used as team balance";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_temp = "out of range";
|
_temp = "out of range";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
self AddMenu( "man_bots", 8, "Change bot_fill_mode: " + _temp, ::man_bots, "fillmode", _tempDvar );
|
self AddMenu( "man_bots", 8, "Change bot_fill_mode: " + _temp, ::man_bots, "fillmode", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_manage_fill" );
|
_tempDvar = getDvarInt( "bots_manage_fill" );
|
||||||
@ -601,10 +632,12 @@ AddOptions()
|
|||||||
self AddMenu( "man_bots", 10, "Decrease bots to keep in-game: " + _tempDvar, ::man_bots, "filldown", _tempDvar );
|
self AddMenu( "man_bots", 10, "Decrease bots to keep in-game: " + _tempDvar, ::man_bots, "filldown", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_manage_fill_spec" );
|
_tempDvar = getDvarInt( "bots_manage_fill_spec" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "man_bots", 11, "Count players for fill on spectator: " + _temp, ::man_bots, "fillspec", _tempDvar );
|
self AddMenu( "man_bots", 11, "Count players for fill on spectator: " + _temp, ::man_bots, "fillspec", _tempDvar );
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -620,56 +653,72 @@ AddOptions()
|
|||||||
self AddMenu( "man_team", 2, "Decrease bots to be on axis team: " + _tempDvar, ::bot_teams, "teamdown", _tempDvar );
|
self AddMenu( "man_team", 2, "Decrease bots to be on axis team: " + _tempDvar, ::bot_teams, "teamdown", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_team_force" );
|
_tempDvar = getDvarInt( "bots_team_force" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "man_team", 3, "Toggle forcing bots on team: " + _temp, ::bot_teams, "teamforce", _tempDvar );
|
self AddMenu( "man_team", 3, "Toggle forcing bots on team: " + _temp, ::bot_teams, "teamforce", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_team_mode" );
|
_tempDvar = getDvarInt( "bots_team_mode" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "only bots";
|
_temp = "only bots";
|
||||||
else
|
else
|
||||||
_temp = "everyone";
|
_temp = "everyone";
|
||||||
|
|
||||||
self AddMenu( "man_team", 4, "Toggle bot_team_bot: " + _temp, ::bot_teams, "teammode", _tempDvar );
|
self AddMenu( "man_team", 4, "Toggle bot_team_bot: " + _temp, ::bot_teams, "teammode", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getdvarint( "bots_skill" );
|
_tempDvar = getdvarint( "bots_skill" );
|
||||||
|
|
||||||
switch ( _tempDvar )
|
switch ( _tempDvar )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
_temp = "random for all";
|
_temp = "random for all";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
_temp = "too easy";
|
_temp = "too easy";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
_temp = "easy";
|
_temp = "easy";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
_temp = "easy-medium";
|
_temp = "easy-medium";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
_temp = "medium";
|
_temp = "medium";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
_temp = "hard";
|
_temp = "hard";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
_temp = "very hard";
|
_temp = "very hard";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
_temp = "hardest";
|
_temp = "hardest";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
_temp = "custom";
|
_temp = "custom";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 9:
|
case 9:
|
||||||
_temp = "complete random";
|
_temp = "complete random";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
_temp = "out of range";
|
_temp = "out of range";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
self AddMenu( "man_team", 5, "Change bot difficulty: " + _temp, ::bot_teams, "skill", _tempDvar );
|
self AddMenu( "man_team", 5, "Change bot difficulty: " + _temp, ::bot_teams, "skill", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_skill_axis_hard" );
|
_tempDvar = getDvarInt( "bots_skill_axis_hard" );
|
||||||
@ -694,94 +743,120 @@ AddOptions()
|
|||||||
self AddBack( "set1", "Main" );
|
self AddBack( "set1", "Main" );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_loadout_reasonable" );
|
_tempDvar = getDvarInt( "bots_loadout_reasonable" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 0, "Bots use only good class setups: " + _temp, ::bot_func, "reasonable", _tempDvar );
|
self AddMenu( "set1", 0, "Bots use only good class setups: " + _temp, ::bot_func, "reasonable", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_loadout_allow_op" );
|
_tempDvar = getDvarInt( "bots_loadout_allow_op" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 1, "Bots can use op and annoying class setups: " + _temp, ::bot_func, "op", _tempDvar );
|
self AddMenu( "set1", 1, "Bots can use op and annoying class setups: " + _temp, ::bot_func, "op", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_move" );
|
_tempDvar = getDvarInt( "bots_play_move" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 2, "Bots can move: " + _temp, ::bot_func, "move", _tempDvar );
|
self AddMenu( "set1", 2, "Bots can move: " + _temp, ::bot_func, "move", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_knife" );
|
_tempDvar = getDvarInt( "bots_play_knife" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 3, "Bots can knife: " + _temp, ::bot_func, "knife", _tempDvar );
|
self AddMenu( "set1", 3, "Bots can knife: " + _temp, ::bot_func, "knife", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_fire" );
|
_tempDvar = getDvarInt( "bots_play_fire" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 4, "Bots can fire: " + _temp, ::bot_func, "fire", _tempDvar );
|
self AddMenu( "set1", 4, "Bots can fire: " + _temp, ::bot_func, "fire", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_nade" );
|
_tempDvar = getDvarInt( "bots_play_nade" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 5, "Bots can nade: " + _temp, ::bot_func, "nade", _tempDvar );
|
self AddMenu( "set1", 5, "Bots can nade: " + _temp, ::bot_func, "nade", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_take_carepackages" );
|
_tempDvar = getDvarInt( "bots_play_take_carepackages" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 6, "Bots can take carepackages: " + _temp, ::bot_func, "care", _tempDvar );
|
self AddMenu( "set1", 6, "Bots can take carepackages: " + _temp, ::bot_func, "care", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_obj" );
|
_tempDvar = getDvarInt( "bots_play_obj" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 7, "Bots play the objective: " + _temp, ::bot_func, "obj", _tempDvar );
|
self AddMenu( "set1", 7, "Bots play the objective: " + _temp, ::bot_func, "obj", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_camp" );
|
_tempDvar = getDvarInt( "bots_play_camp" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 8, "Bots can camp: " + _temp, ::bot_func, "camp", _tempDvar );
|
self AddMenu( "set1", 8, "Bots can camp: " + _temp, ::bot_func, "camp", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_jumpdrop" );
|
_tempDvar = getDvarInt( "bots_play_jumpdrop" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 9, "Bots can jump and dropshot: " + _temp, ::bot_func, "jump", _tempDvar );
|
self AddMenu( "set1", 9, "Bots can jump and dropshot: " + _temp, ::bot_func, "jump", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_target_other" );
|
_tempDvar = getDvarInt( "bots_play_target_other" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 10, "Bots can target other script objects: " + _temp, ::bot_func, "targetother", _tempDvar );
|
self AddMenu( "set1", 10, "Bots can target other script objects: " + _temp, ::bot_func, "targetother", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_killstreak" );
|
_tempDvar = getDvarInt( "bots_play_killstreak" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 11, "Bots can use killstreaks: " + _temp, ::bot_func, "killstreak", _tempDvar );
|
self AddMenu( "set1", 11, "Bots can use killstreaks: " + _temp, ::bot_func, "killstreak", _tempDvar );
|
||||||
|
|
||||||
_tempDvar = getDvarInt( "bots_play_ads" );
|
_tempDvar = getDvarInt( "bots_play_ads" );
|
||||||
|
|
||||||
if ( _tempDvar )
|
if ( _tempDvar )
|
||||||
_temp = "true";
|
_temp = "true";
|
||||||
else
|
else
|
||||||
_temp = "false";
|
_temp = "false";
|
||||||
|
|
||||||
self AddMenu( "set1", 12, "Bots can ads: " + _temp, ::bot_func, "ads", _tempDvar );
|
self AddMenu( "set1", 12, "Bots can ads: " + _temp, ::bot_func, "ads", _tempDvar );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -793,50 +868,62 @@ bot_func(a, b)
|
|||||||
setDvar( "bots_loadout_reasonable", !b );
|
setDvar( "bots_loadout_reasonable", !b );
|
||||||
self iPrintln( "Bots using reasonable setups: " + !b );
|
self iPrintln( "Bots using reasonable setups: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "op":
|
case "op":
|
||||||
setDvar( "bots_loadout_allow_op", !b );
|
setDvar( "bots_loadout_allow_op", !b );
|
||||||
self iPrintln( "Bots using op setups: " + !b );
|
self iPrintln( "Bots using op setups: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "move":
|
case "move":
|
||||||
setDvar( "bots_play_move", !b );
|
setDvar( "bots_play_move", !b );
|
||||||
self iPrintln( "Bots move: " + !b );
|
self iPrintln( "Bots move: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "knife":
|
case "knife":
|
||||||
setDvar( "bots_play_knife", !b );
|
setDvar( "bots_play_knife", !b );
|
||||||
self iPrintln( "Bots knife: " + !b );
|
self iPrintln( "Bots knife: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "fire":
|
case "fire":
|
||||||
setDvar( "bots_play_fire", !b );
|
setDvar( "bots_play_fire", !b );
|
||||||
self iPrintln( "Bots fire: " + !b );
|
self iPrintln( "Bots fire: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "nade":
|
case "nade":
|
||||||
setDvar( "bots_play_nade", !b );
|
setDvar( "bots_play_nade", !b );
|
||||||
self iPrintln( "Bots nade: " + !b );
|
self iPrintln( "Bots nade: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "care":
|
case "care":
|
||||||
setDvar( "bots_play_take_carepackages", !b );
|
setDvar( "bots_play_take_carepackages", !b );
|
||||||
self iPrintln( "Bots take carepackages: " + !b );
|
self iPrintln( "Bots take carepackages: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "obj":
|
case "obj":
|
||||||
setDvar( "bots_play_obj", !b );
|
setDvar( "bots_play_obj", !b );
|
||||||
self iPrintln( "Bots play the obj: " + !b );
|
self iPrintln( "Bots play the obj: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "camp":
|
case "camp":
|
||||||
setDvar( "bots_play_camp", !b );
|
setDvar( "bots_play_camp", !b );
|
||||||
self iPrintln( "Bots camp: " + !b );
|
self iPrintln( "Bots camp: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "jump":
|
case "jump":
|
||||||
setDvar( "bots_play_jumpdrop", !b );
|
setDvar( "bots_play_jumpdrop", !b );
|
||||||
self iPrintln( "Bots jump: " + !b );
|
self iPrintln( "Bots jump: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "targetother":
|
case "targetother":
|
||||||
setDvar( "bots_play_target_other", !b );
|
setDvar( "bots_play_target_other", !b );
|
||||||
self iPrintln( "Bots target other: " + !b );
|
self iPrintln( "Bots target other: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "killstreak":
|
case "killstreak":
|
||||||
setDvar( "bots_play_killstreak", !b );
|
setDvar( "bots_play_killstreak", !b );
|
||||||
self iPrintln( "Bots use killstreaks: " + !b );
|
self iPrintln( "Bots use killstreaks: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "ads":
|
case "ads":
|
||||||
setDvar( "bots_play_ads", !b );
|
setDvar( "bots_play_ads", !b );
|
||||||
self iPrintln( "Bots ads: " + !b );
|
self iPrintln( "Bots ads: " + !b );
|
||||||
@ -855,36 +942,45 @@ bot_teams(a, b)
|
|||||||
setdvar( "bots_team", "allies" );
|
setdvar( "bots_team", "allies" );
|
||||||
self iPrintlnBold( "Changed bot team to allies." );
|
self iPrintlnBold( "Changed bot team to allies." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "allies":
|
case "allies":
|
||||||
setdvar( "bots_team", "axis" );
|
setdvar( "bots_team", "axis" );
|
||||||
self iPrintlnBold( "Changed bot team to axis." );
|
self iPrintlnBold( "Changed bot team to axis." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "axis":
|
case "axis":
|
||||||
setdvar( "bots_team", "custom" );
|
setdvar( "bots_team", "custom" );
|
||||||
self iPrintlnBold( "Changed bot team to custom." );
|
self iPrintlnBold( "Changed bot team to custom." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
setdvar( "bots_team", "autoassign" );
|
setdvar( "bots_team", "autoassign" );
|
||||||
self iPrintlnBold( "Changed bot team to autoassign." );
|
self iPrintlnBold( "Changed bot team to autoassign." );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "teamup":
|
case "teamup":
|
||||||
setdvar( "bots_team_amount", b + 1 );
|
setdvar( "bots_team_amount", b + 1 );
|
||||||
self iPrintln( ( b + 1 ) + " bot(s) will try to be on axis team." );
|
self iPrintln( ( b + 1 ) + " bot(s) will try to be on axis team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "teamdown":
|
case "teamdown":
|
||||||
setdvar( "bots_team_amount", b - 1 );
|
setdvar( "bots_team_amount", b - 1 );
|
||||||
self iPrintln( ( b - 1 ) + " bot(s) will try to be on axis team." );
|
self iPrintln( ( b - 1 ) + " bot(s) will try to be on axis team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "teamforce":
|
case "teamforce":
|
||||||
setDvar( "bots_team_force", !b );
|
setDvar( "bots_team_force", !b );
|
||||||
self iPrintln( "Forcing bots to team: " + !b );
|
self iPrintln( "Forcing bots to team: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "teammode":
|
case "teammode":
|
||||||
setDvar( "bots_team_mode", !b );
|
setDvar( "bots_team_mode", !b );
|
||||||
self iPrintln( "Only count bots on team: " + !b );
|
self iPrintln( "Only count bots on team: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "skill":
|
case "skill":
|
||||||
switch ( b )
|
switch ( b )
|
||||||
{
|
{
|
||||||
@ -892,72 +988,90 @@ bot_teams(a, b)
|
|||||||
self iPrintlnBold( "Changed bot skill to easy." );
|
self iPrintlnBold( "Changed bot skill to easy." );
|
||||||
setDvar( "bots_skill", 1 );
|
setDvar( "bots_skill", 1 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
self iPrintlnBold( "Changed bot skill to easy-med." );
|
self iPrintlnBold( "Changed bot skill to easy-med." );
|
||||||
setDvar( "bots_skill", 2 );
|
setDvar( "bots_skill", 2 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
self iPrintlnBold( "Changed bot skill to medium." );
|
self iPrintlnBold( "Changed bot skill to medium." );
|
||||||
setDvar( "bots_skill", 3 );
|
setDvar( "bots_skill", 3 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
self iPrintlnBold( "Changed bot skill to med-hard." );
|
self iPrintlnBold( "Changed bot skill to med-hard." );
|
||||||
setDvar( "bots_skill", 4 );
|
setDvar( "bots_skill", 4 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
self iPrintlnBold( "Changed bot skill to hard." );
|
self iPrintlnBold( "Changed bot skill to hard." );
|
||||||
setDvar( "bots_skill", 5 );
|
setDvar( "bots_skill", 5 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5:
|
case 5:
|
||||||
self iPrintlnBold( "Changed bot skill to very hard." );
|
self iPrintlnBold( "Changed bot skill to very hard." );
|
||||||
setDvar( "bots_skill", 6 );
|
setDvar( "bots_skill", 6 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
self iPrintlnBold( "Changed bot skill to hardest." );
|
self iPrintlnBold( "Changed bot skill to hardest." );
|
||||||
setDvar( "bots_skill", 7 );
|
setDvar( "bots_skill", 7 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
self iPrintlnBold( "Changed bot skill to custom. Base is easy." );
|
self iPrintlnBold( "Changed bot skill to custom. Base is easy." );
|
||||||
setDvar( "bots_skill", 8 );
|
setDvar( "bots_skill", 8 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
self iPrintlnBold( "Changed bot skill to complete random. Takes effect at restart." );
|
self iPrintlnBold( "Changed bot skill to complete random. Takes effect at restart." );
|
||||||
setDvar( "bots_skill", 9 );
|
setDvar( "bots_skill", 9 );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
self iPrintlnBold( "Changed bot skill to random. Takes effect at restart." );
|
self iPrintlnBold( "Changed bot skill to random. Takes effect at restart." );
|
||||||
setDvar( "bots_skill", 0 );
|
setDvar( "bots_skill", 0 );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "axishardup":
|
case "axishardup":
|
||||||
setdvar( "bots_skill_axis_hard", ( b + 1 ) );
|
setdvar( "bots_skill_axis_hard", ( b + 1 ) );
|
||||||
self iPrintln( ( ( b + 1 ) ) + " hard bots will be on axis team." );
|
self iPrintln( ( ( b + 1 ) ) + " hard bots will be on axis team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "axisharddown":
|
case "axisharddown":
|
||||||
setdvar( "bots_skill_axis_hard", ( b - 1 ) );
|
setdvar( "bots_skill_axis_hard", ( b - 1 ) );
|
||||||
self iPrintln( ( ( b - 1 ) ) + " hard bots will be on axis team." );
|
self iPrintln( ( ( b - 1 ) ) + " hard bots will be on axis team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "axismedup":
|
case "axismedup":
|
||||||
setdvar( "bots_skill_axis_med", ( b + 1 ) );
|
setdvar( "bots_skill_axis_med", ( b + 1 ) );
|
||||||
self iPrintln( ( ( b + 1 ) ) + " med bots will be on axis team." );
|
self iPrintln( ( ( b + 1 ) ) + " med bots will be on axis team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "axismeddown":
|
case "axismeddown":
|
||||||
setdvar( "bots_skill_axis_med", ( b - 1 ) );
|
setdvar( "bots_skill_axis_med", ( b - 1 ) );
|
||||||
self iPrintln( ( ( b - 1 ) ) + " med bots will be on axis team." );
|
self iPrintln( ( ( b - 1 ) ) + " med bots will be on axis team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "allieshardup":
|
case "allieshardup":
|
||||||
setdvar( "bots_skill_allies_hard", ( b + 1 ) );
|
setdvar( "bots_skill_allies_hard", ( b + 1 ) );
|
||||||
self iPrintln( ( ( b + 1 ) ) + " hard bots will be on allies team." );
|
self iPrintln( ( ( b + 1 ) ) + " hard bots will be on allies team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "alliesharddown":
|
case "alliesharddown":
|
||||||
setdvar( "bots_skill_allies_hard", ( b - 1 ) );
|
setdvar( "bots_skill_allies_hard", ( b - 1 ) );
|
||||||
self iPrintln( ( ( b - 1 ) ) + " hard bots will be on allies team." );
|
self iPrintln( ( ( b - 1 ) ) + " hard bots will be on allies team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "alliesmedup":
|
case "alliesmedup":
|
||||||
setdvar( "bots_skill_allies_med", ( b + 1 ) );
|
setdvar( "bots_skill_allies_med", ( b + 1 ) );
|
||||||
self iPrintln( ( ( b + 1 ) ) + " med bots will be on allies team." );
|
self iPrintln( ( ( b + 1 ) ) + " med bots will be on allies team." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "alliesmeddown":
|
case "alliesmeddown":
|
||||||
setdvar( "bots_skill_allies_med", ( b - 1 ) );
|
setdvar( "bots_skill_allies_med", ( b - 1 ) );
|
||||||
self iPrintln( ( ( b - 1 ) ) + " med bots will be on allies team." );
|
self iPrintln( ( ( b - 1 ) ) + " med bots will be on allies team." );
|
||||||
@ -971,6 +1085,7 @@ man_bots(a, b)
|
|||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
setdvar( "bots_manage_add", b );
|
setdvar( "bots_manage_add", b );
|
||||||
|
|
||||||
if ( b == 1 )
|
if ( b == 1 )
|
||||||
{
|
{
|
||||||
self iPrintln( "Adding " + b + " bot." );
|
self iPrintln( "Adding " + b + " bot." );
|
||||||
@ -979,13 +1094,16 @@ man_bots(a, b)
|
|||||||
{
|
{
|
||||||
self iPrintln( "Adding " + b + " bots." );
|
self iPrintln( "Adding " + b + " bots." );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "kick":
|
case "kick":
|
||||||
result = false;
|
result = false;
|
||||||
|
|
||||||
for ( i = 0; i < b; i++ )
|
for ( i = 0; i < b; i++ )
|
||||||
{
|
{
|
||||||
tempBot = random( getBotArray() );
|
tempBot = random( getBotArray() );
|
||||||
|
|
||||||
if ( isDefined( tempBot ) )
|
if ( isDefined( tempBot ) )
|
||||||
{
|
{
|
||||||
kick( tempBot getEntityNumber(), "EXE_PLAYERKICKED" );
|
kick( tempBot getEntityNumber(), "EXE_PLAYERKICKED" );
|
||||||
@ -997,11 +1115,14 @@ man_bots(a, b)
|
|||||||
|
|
||||||
if ( !result )
|
if ( !result )
|
||||||
self iPrintln( "No bots to kick" );
|
self iPrintln( "No bots to kick" );
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "autokick":
|
case "autokick":
|
||||||
setDvar( "bots_manage_fill_kick", !b );
|
setDvar( "bots_manage_fill_kick", !b );
|
||||||
self iPrintln( "Kicking bots when bots_fill is exceeded: " + !b );
|
self iPrintln( "Kicking bots when bots_fill is exceeded: " + !b );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "fillmode":
|
case "fillmode":
|
||||||
switch ( b )
|
switch ( b )
|
||||||
{
|
{
|
||||||
@ -1009,32 +1130,40 @@ man_bots(a, b)
|
|||||||
setdvar( "bots_manage_fill_mode", 1 );
|
setdvar( "bots_manage_fill_mode", 1 );
|
||||||
self iPrintln( "bot_fill will now count only bots." );
|
self iPrintln( "bot_fill will now count only bots." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
setdvar( "bots_manage_fill_mode", 2 );
|
setdvar( "bots_manage_fill_mode", 2 );
|
||||||
self iPrintln( "bot_fill will now count everyone, adjusting to map." );
|
self iPrintln( "bot_fill will now count everyone, adjusting to map." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
setdvar( "bots_manage_fill_mode", 3 );
|
setdvar( "bots_manage_fill_mode", 3 );
|
||||||
self iPrintln( "bot_fill will now count only bots, adjusting to map." );
|
self iPrintln( "bot_fill will now count only bots, adjusting to map." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
setdvar( "bots_manage_fill_mode", 4 );
|
setdvar( "bots_manage_fill_mode", 4 );
|
||||||
self iPrintln( "bot_fill will now use bots as team balance." );
|
self iPrintln( "bot_fill will now use bots as team balance." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
setdvar( "bots_manage_fill_mode", 0 );
|
setdvar( "bots_manage_fill_mode", 0 );
|
||||||
self iPrintln( "bot_fill will now count everyone." );
|
self iPrintln( "bot_fill will now count everyone." );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "fillup":
|
case "fillup":
|
||||||
setdvar( "bots_manage_fill", b + 1 );
|
setdvar( "bots_manage_fill", b + 1 );
|
||||||
self iPrintln( "Increased to maintain " + ( b + 1 ) + " bot(s)." );
|
self iPrintln( "Increased to maintain " + ( b + 1 ) + " bot(s)." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "filldown":
|
case "filldown":
|
||||||
setdvar( "bots_manage_fill", b - 1 );
|
setdvar( "bots_manage_fill", b - 1 );
|
||||||
self iPrintln( "Decreased to maintain " + ( b - 1 ) + " bot(s)." );
|
self iPrintln( "Decreased to maintain " + ( b - 1 ) + " bot(s)." );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "fillspec":
|
case "fillspec":
|
||||||
setDvar( "bots_manage_fill_spec", !b );
|
setDvar( "bots_manage_fill_spec", !b );
|
||||||
self iPrintln( "Count players on spectator for bots_fill: " + !b );
|
self iPrintln( "Count players on spectator for bots_fill: " + !b );
|
||||||
|
@ -59,6 +59,7 @@ init()
|
|||||||
onPlayerSpawned()
|
onPlayerSpawned()
|
||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "spawned_player" );
|
self waittill( "spawned_player" );
|
||||||
@ -124,6 +125,7 @@ watchAstarCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "astar", "+gostand" );
|
self notifyOnPlayerCommand( "astar", "+gostand" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "astar" );
|
self waittill( "astar" );
|
||||||
@ -176,6 +178,7 @@ updateWaypointsStats()
|
|||||||
closest = -1;
|
closest = -1;
|
||||||
myEye = self getEye();
|
myEye = self getEye();
|
||||||
myAngles = self GetPlayerAngles();
|
myAngles = self GetPlayerAngles();
|
||||||
|
|
||||||
for ( i = 0; i < level.waypointCount; i++ )
|
for ( i = 0; i < level.waypointCount; i++ )
|
||||||
{
|
{
|
||||||
if ( closest == -1 || closer( self.origin, level.waypoints[i].origin, level.waypoints[closest].origin ) )
|
if ( closest == -1 || closer( self.origin, level.waypoints[i].origin, level.waypoints[closest].origin ) )
|
||||||
@ -185,7 +188,7 @@ updateWaypointsStats()
|
|||||||
|
|
||||||
if ( distance( level.waypoints[i].origin, self.origin ) < getDvarFloat( "bots_main_debug_distance" ) && ( bulletTracePassed( myEye, wpOrg, false, self ) || getDVarint( "bots_main_debug_drawThrough" ) ) )
|
if ( distance( level.waypoints[i].origin, self.origin ) < getDvarFloat( "bots_main_debug_distance" ) && ( bulletTracePassed( myEye, wpOrg, false, self ) || getDVarint( "bots_main_debug_drawThrough" ) ) )
|
||||||
{
|
{
|
||||||
for(h = 0; h < level.waypoints[i].childCount; h++)
|
for ( h = level.waypoints[i].children.size - 1; h >= 0; h-- )
|
||||||
line( wpOrg, level.waypoints[level.waypoints[i].children[h]].origin + ( 0, 0, 25 ), ( 1, 0, 1 ) );
|
line( wpOrg, level.waypoints[level.waypoints[i].children[h]].origin + ( 0, 0, 25 ), ( 1, 0, 1 ) );
|
||||||
|
|
||||||
if ( getConeDot( wpOrg, myEye, myAngles ) > getDvarFloat( "bots_main_debug_cone" ) )
|
if ( getConeDot( wpOrg, myEye, myAngles ) > getDvarFloat( "bots_main_debug_cone" ) )
|
||||||
@ -210,6 +213,7 @@ updateWaypointsStats()
|
|||||||
wpToLink setText( level.wpToLink );
|
wpToLink setText( level.wpToLink );
|
||||||
|
|
||||||
infotext.x = infotext.x - 2;
|
infotext.x = infotext.x - 2;
|
||||||
|
|
||||||
if ( infotext.x <= -800 )
|
if ( infotext.x <= -800 )
|
||||||
infotext.x = 800;
|
infotext.x = 800;
|
||||||
|
|
||||||
@ -246,6 +250,7 @@ watchLoadWaypointsCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+actionslot 2}]", "+actionslot 2" );
|
self notifyOnPlayerCommand( "[{+actionslot 2}]", "+actionslot 2" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+actionslot 2}]" );
|
self waittill( "[{+actionslot 2}]" );
|
||||||
@ -259,6 +264,7 @@ watchAddWaypointCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+smoke}]", "+smoke" );
|
self notifyOnPlayerCommand( "[{+smoke}]", "+smoke" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+smoke}]" );
|
self waittill( "[{+smoke}]" );
|
||||||
@ -272,9 +278,11 @@ watchAutoLinkCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+frag}]", "+frag" );
|
self notifyOnPlayerCommand( "[{+frag}]", "+frag" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+frag}]" );
|
self waittill( "[{+frag}]" );
|
||||||
|
|
||||||
if ( level.autoLink )
|
if ( level.autoLink )
|
||||||
{
|
{
|
||||||
self iPrintlnBold( "Auto link disabled" );
|
self iPrintlnBold( "Auto link disabled" );
|
||||||
@ -296,6 +304,7 @@ watchLinkWaypointCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+melee}]", "+melee" );
|
self notifyOnPlayerCommand( "[{+melee}]", "+melee" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+melee}]" );
|
self waittill( "[{+melee}]" );
|
||||||
@ -309,6 +318,7 @@ watchUnlinkWaypointCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+reload}]", "+reload" );
|
self notifyOnPlayerCommand( "[{+reload}]", "+reload" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+reload}]" );
|
self waittill( "[{+reload}]" );
|
||||||
@ -322,6 +332,7 @@ watchDeleteWaypointCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+actionslot 3}]", "+actionslot 3" );
|
self notifyOnPlayerCommand( "[{+actionslot 3}]", "+actionslot 3" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+actionslot 3}]" );
|
self waittill( "[{+actionslot 3}]" );
|
||||||
@ -335,6 +346,7 @@ watchDeleteAllWaypointsCommand()
|
|||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+actionslot 4}]", "+actionslot 4" );
|
self notifyOnPlayerCommand( "[{+actionslot 4}]", "+actionslot 4" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+actionslot 4}]" );
|
self waittill( "[{+actionslot 4}]" );
|
||||||
@ -348,6 +360,7 @@ watchSaveWaypointsCommand()
|
|||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
self notifyOnPlayerCommand( "[{+actionslot 1}]", "+actionslot 1" );
|
self notifyOnPlayerCommand( "[{+actionslot 1}]", "+actionslot 1" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "[{+actionslot 1}]" );
|
self waittill( "[{+actionslot 1}]" );
|
||||||
@ -360,22 +373,25 @@ watchSaveWaypointsCommand()
|
|||||||
mpnm = getMapName( getdvar( "mapname" ) );
|
mpnm = getMapName( getdvar( "mapname" ) );
|
||||||
logprint( "\n\n" + mpnm + "()\n{\n/*" );
|
logprint( "\n\n" + mpnm + "()\n{\n/*" );
|
||||||
logprint( "*/waypoints = [];\n/*" );
|
logprint( "*/waypoints = [];\n/*" );
|
||||||
|
|
||||||
for ( i = 0; i < level.waypointCount; i++ )
|
for ( i = 0; i < level.waypointCount; i++ )
|
||||||
{
|
{
|
||||||
logprint( "*/waypoints[" + i + "] = spawnstruct();\n/*" );
|
logprint( "*/waypoints[" + i + "] = spawnstruct();\n/*" );
|
||||||
logprint( "*/waypoints[" + i + "].origin = " + level.waypoints[i].origin + ";\n/*" );
|
logprint( "*/waypoints[" + i + "].origin = " + level.waypoints[i].origin + ";\n/*" );
|
||||||
logprint( "*/waypoints[" + i + "].type = \"" + level.waypoints[i].type + "\";\n/*" );
|
logprint( "*/waypoints[" + i + "].type = \"" + level.waypoints[i].type + "\";\n/*" );
|
||||||
logprint("*/waypoints["+i+"].childCount = "+level.waypoints[i].childCount+";\n/*");
|
|
||||||
for(c = 0; c < level.waypoints[i].childCount; c++)
|
for ( c = 0; c < level.waypoints[i].children.size; c++ )
|
||||||
{
|
{
|
||||||
logprint( "*/waypoints[" + i + "].children[" + c + "] = " + level.waypoints[i].children[c] + ";\n/*" );
|
logprint( "*/waypoints[" + i + "].children[" + c + "] = " + level.waypoints[i].children[c] + ";\n/*" );
|
||||||
}
|
}
|
||||||
if(isDefined(level.waypoints[i].angles) && (level.waypoints[i].type == "claymore" || level.waypoints[i].type == "tube" || (level.waypoints[i].type == "crouch" && level.waypoints[i].childCount == 1) || level.waypoints[i].type == "climb" || level.waypoints[i].type == "grenade"))
|
|
||||||
|
if ( isDefined( level.waypoints[i].angles ) && ( level.waypoints[i].type == "claymore" || level.waypoints[i].type == "tube" || ( level.waypoints[i].type == "crouch" && level.waypoints[i].children.size == 1 ) || level.waypoints[i].type == "climb" || level.waypoints[i].type == "grenade" ) )
|
||||||
logprint( "*/waypoints[" + i + "].angles = " + level.waypoints[i].angles + ";\n/*" );
|
logprint( "*/waypoints[" + i + "].angles = " + level.waypoints[i].angles + ";\n/*" );
|
||||||
|
|
||||||
if ( isDefined( level.waypoints[i].jav_point ) && level.waypoints[i].type == "javelin" )
|
if ( isDefined( level.waypoints[i].jav_point ) && level.waypoints[i].type == "javelin" )
|
||||||
logprint( "*/waypoints[" + i + "].jav_point = " + level.waypoints[i].jav_point + ";\n/*" );
|
logprint( "*/waypoints[" + i + "].jav_point = " + level.waypoints[i].jav_point + ";\n/*" );
|
||||||
}
|
}
|
||||||
|
|
||||||
logprint( "*/return waypoints;\n}\n\n\n\n" );
|
logprint( "*/return waypoints;\n}\n\n\n\n" );
|
||||||
|
|
||||||
filename = "waypoints/" + getdvar( "mapname" ) + "_wp.csv";
|
filename = "waypoints/" + getdvar( "mapname" ) + "_wp.csv";
|
||||||
@ -384,6 +400,7 @@ watchSaveWaypointsCommand()
|
|||||||
PrintLn( level.waypointCount );
|
PrintLn( level.waypointCount );
|
||||||
|
|
||||||
fileWrite( filename, level.waypointCount + "\n", "write" );
|
fileWrite( filename, level.waypointCount + "\n", "write" );
|
||||||
|
|
||||||
for ( i = 0; i < level.waypointCount; i++ )
|
for ( i = 0; i < level.waypointCount; i++ )
|
||||||
{
|
{
|
||||||
str = "";
|
str = "";
|
||||||
@ -391,13 +408,14 @@ watchSaveWaypointsCommand()
|
|||||||
|
|
||||||
str += wp.origin[0] + " " + wp.origin[1] + " " + wp.origin[2] + ",";
|
str += wp.origin[0] + " " + wp.origin[1] + " " + wp.origin[2] + ",";
|
||||||
|
|
||||||
for(h = 0; h < wp.childCount; h++)
|
for ( h = 0; h < wp.children.size; h++ )
|
||||||
{
|
{
|
||||||
str += wp.children[h];
|
str += wp.children[h];
|
||||||
|
|
||||||
if (h < wp.childCount - 1)
|
if ( h < wp.children.size - 1 )
|
||||||
str += " ";
|
str += " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
str += "," + wp.type + ",";
|
str += "," + wp.type + ",";
|
||||||
|
|
||||||
if ( isDefined( wp.angles ) )
|
if ( isDefined( wp.angles ) )
|
||||||
@ -413,6 +431,7 @@ watchSaveWaypointsCommand()
|
|||||||
PrintLn( str );
|
PrintLn( str );
|
||||||
fileWrite( filename, str + "\n", "append" );
|
fileWrite( filename, str + "\n", "append" );
|
||||||
}
|
}
|
||||||
|
|
||||||
PrintLn( "\n\n\n\n\n\n" );
|
PrintLn( "\n\n\n\n\n\n" );
|
||||||
|
|
||||||
self iprintln( "Saved!!! to " + filename );
|
self iprintln( "Saved!!! to " + filename );
|
||||||
@ -446,8 +465,8 @@ checkForWarnings()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(level.waypoints[i].childCount <= 0)
|
if ( level.waypoints[i].children.size <= 0 )
|
||||||
self iprintln("WARNING: waypoint "+i+" childCount is "+level.waypoints[i].childCount);
|
self iprintln( "WARNING: waypoint " + i + " childCount is " + level.waypoints[i].children.size );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( !isDefined( level.waypoints[i].children ) || !isDefined( level.waypoints[i].children.size ) )
|
if ( !isDefined( level.waypoints[i].children ) || !isDefined( level.waypoints[i].children.size ) )
|
||||||
@ -456,10 +475,7 @@ checkForWarnings()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(level.waypoints[i].childCount != level.waypoints[i].children.size)
|
for ( h = level.waypoints[i].children.size - 1; h >= 0; h-- )
|
||||||
self iprintln("WARNING: waypoint "+i+" childCount is not "+level.waypoints[i].children.size);
|
|
||||||
|
|
||||||
for (h = 0; h < level.waypoints[i].childCount; h++)
|
|
||||||
{
|
{
|
||||||
child = level.waypoints[i].children[h];
|
child = level.waypoints[i].children[h];
|
||||||
|
|
||||||
@ -480,9 +496,26 @@ checkForWarnings()
|
|||||||
if ( level.waypoints[i].type == "javelin" && !isDefined( level.waypoints[i].jav_point ) )
|
if ( level.waypoints[i].type == "javelin" && !isDefined( level.waypoints[i].jav_point ) )
|
||||||
self iprintln( "WARNING: waypoint " + i + " jav_point is undefined" );
|
self iprintln( "WARNING: waypoint " + i + " jav_point is undefined" );
|
||||||
|
|
||||||
if(!isDefined(level.waypoints[i].angles) && (level.waypoints[i].type == "claymore" || level.waypoints[i].type == "tube" || (level.waypoints[i].type == "crouch" && level.waypoints[i].childCount == 1) || level.waypoints[i].type == "climb" || level.waypoints[i].type == "grenade"))
|
if ( !isDefined( level.waypoints[i].angles ) && ( level.waypoints[i].type == "claymore" || level.waypoints[i].type == "tube" || ( level.waypoints[i].type == "crouch" && level.waypoints[i].children.size == 1 ) || level.waypoints[i].type == "climb" || level.waypoints[i].type == "grenade" ) )
|
||||||
self iprintln( "WARNING: waypoint " + i + " angles is undefined" );
|
self iprintln( "WARNING: waypoint " + i + " angles is undefined" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// check reachability, assume bidirectional graph
|
||||||
|
|
||||||
|
wpIdx = randomInt( level.waypointCount );
|
||||||
|
|
||||||
|
for ( i = 0; i < level.waypointCount; i++ )
|
||||||
|
{
|
||||||
|
if ( i % 5 == 0 )
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
astar = AStarSearch( level.waypoints[wpIdx].origin, level.waypoints[i].origin, undefined, true );
|
||||||
|
|
||||||
|
if ( astar.size <= 0 )
|
||||||
|
self iprintln( "WARNING: waypoint " + wpIdx + " has no path to waypoint " + i );
|
||||||
|
}
|
||||||
|
|
||||||
|
self iprintln( "Waypoint warnings check completed." );
|
||||||
}
|
}
|
||||||
|
|
||||||
UnLinkWaypoint( nwp )
|
UnLinkWaypoint( nwp )
|
||||||
@ -504,9 +537,6 @@ UnLinkWaypoint(nwp)
|
|||||||
level.waypoints[nwp].children = array_remove( level.waypoints[nwp].children, level.wpToLink );
|
level.waypoints[nwp].children = array_remove( level.waypoints[nwp].children, level.wpToLink );
|
||||||
level.waypoints[level.wpToLink].children = array_remove( level.waypoints[level.wpToLink].children, nwp );
|
level.waypoints[level.wpToLink].children = array_remove( level.waypoints[level.wpToLink].children, nwp );
|
||||||
|
|
||||||
level.waypoints[nwp].childCount = level.waypoints[nwp].children.size;
|
|
||||||
level.waypoints[level.wpToLink].childCount = level.waypoints[level.wpToLink].children.size;
|
|
||||||
|
|
||||||
self iprintln( "Waypoint " + nwp + " Broken to " + level.wpToLink );
|
self iprintln( "Waypoint " + nwp + " Broken to " + level.wpToLink );
|
||||||
level.wpToLink = -1;
|
level.wpToLink = -1;
|
||||||
}
|
}
|
||||||
@ -528,7 +558,8 @@ LinkWaypoint(nwp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
weGood = true;
|
weGood = true;
|
||||||
for (i = 0; i < level.waypoints[level.wpToLink].childCount; i++)
|
|
||||||
|
for ( i = level.waypoints[level.wpToLink].children.size - 1; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
child = level.waypoints[level.wpToLink].children[i];
|
child = level.waypoints[level.wpToLink].children[i];
|
||||||
|
|
||||||
@ -541,7 +572,7 @@ LinkWaypoint(nwp)
|
|||||||
|
|
||||||
if ( weGood )
|
if ( weGood )
|
||||||
{
|
{
|
||||||
for (i = 0; i < level.waypoints[nwp].childCount; i++)
|
for ( i = level.waypoints[nwp].children.size - 1; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
child = level.waypoints[nwp].children[i];
|
child = level.waypoints[nwp].children[i];
|
||||||
|
|
||||||
@ -560,10 +591,8 @@ LinkWaypoint(nwp)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
level.waypoints[level.wpToLink].children[level.waypoints[level.wpToLink].childcount] = nwp;
|
level.waypoints[level.wpToLink].children[level.waypoints[level.wpToLink].children.size] = nwp;
|
||||||
level.waypoints[level.wpToLink].childcount++;
|
level.waypoints[nwp].children[level.waypoints[nwp].children.size] = level.wpToLink;
|
||||||
level.waypoints[nwp].children[level.waypoints[nwp].childcount] = level.wpToLink;
|
|
||||||
level.waypoints[nwp].childcount++;
|
|
||||||
|
|
||||||
self iprintln( "Waypoint " + nwp + " Linked to " + level.wpToLink );
|
self iprintln( "Waypoint " + nwp + " Linked to " + level.wpToLink );
|
||||||
level.wpToLink = -1;
|
level.wpToLink = -1;
|
||||||
@ -579,18 +608,16 @@ DeleteWaypoint(nwp)
|
|||||||
|
|
||||||
level.wpToLink = -1;
|
level.wpToLink = -1;
|
||||||
|
|
||||||
for (i = 0; i < level.waypoints[nwp].childCount; i++)
|
for ( i = level.waypoints[nwp].children.size - 1; i >= 0; i-- )
|
||||||
{
|
{
|
||||||
child = level.waypoints[nwp].children[i];
|
child = level.waypoints[nwp].children[i];
|
||||||
|
|
||||||
level.waypoints[child].children = array_remove( level.waypoints[child].children, nwp );
|
level.waypoints[child].children = array_remove( level.waypoints[child].children, nwp );
|
||||||
|
|
||||||
level.waypoints[child].childCount = level.waypoints[child].children.size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( i = 0; i < level.waypointCount; i++ )
|
for ( i = 0; i < level.waypointCount; i++ )
|
||||||
{
|
{
|
||||||
for(h = 0; h < level.waypoints[i].childCount; h++)
|
for ( h = level.waypoints[i].children.size - 1; h >= 0; h-- )
|
||||||
{
|
{
|
||||||
if ( level.waypoints[i].children[h] > nwp )
|
if ( level.waypoints[i].children[h] > nwp )
|
||||||
level.waypoints[i].children[h]--;
|
level.waypoints[i].children[h]--;
|
||||||
@ -606,10 +633,12 @@ DeleteWaypoint(nwp)
|
|||||||
level.waypoints[entry] = level.waypoints[entry + 1];
|
level.waypoints[entry] = level.waypoints[entry + 1];
|
||||||
entry++;
|
entry++;
|
||||||
}
|
}
|
||||||
|
|
||||||
level.waypoints[entry] = undefined;
|
level.waypoints[entry] = undefined;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
level.waypointCount--;
|
level.waypointCount--;
|
||||||
|
|
||||||
self iprintln( "DelWp " + nwp );
|
self iprintln( "DelWp " + nwp );
|
||||||
@ -638,7 +667,6 @@ AddWaypoint()
|
|||||||
level.waypoints[level.waypointCount].angles = self getPlayerAngles();
|
level.waypoints[level.waypointCount].angles = self getPlayerAngles();
|
||||||
|
|
||||||
level.waypoints[level.waypointCount].children = [];
|
level.waypoints[level.waypointCount].children = [];
|
||||||
level.waypoints[level.waypointCount].childCount = 0;
|
|
||||||
|
|
||||||
if ( level.waypoints[level.waypointCount].type == "javelin" )
|
if ( level.waypoints[level.waypointCount].type == "javelin" )
|
||||||
{
|
{
|
||||||
@ -665,13 +693,6 @@ DeleteAllWaypoints()
|
|||||||
{
|
{
|
||||||
level.waypoints = [];
|
level.waypoints = [];
|
||||||
level.waypointCount = 0;
|
level.waypointCount = 0;
|
||||||
level.waypointsKDTree = WaypointsToKDTree();
|
|
||||||
|
|
||||||
level.waypointsCamp = [];
|
|
||||||
level.waypointsTube = [];
|
|
||||||
level.waypointsGren = [];
|
|
||||||
level.waypointsClay = [];
|
|
||||||
level.waypointsJav = [];
|
|
||||||
|
|
||||||
self iprintln( "DelAllWps" );
|
self iprintln( "DelAllWps" );
|
||||||
}
|
}
|
||||||
@ -681,7 +702,7 @@ buildChildCountString ( wp )
|
|||||||
if ( wp == -1 )
|
if ( wp == -1 )
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
wpstr = level.waypoints[wp].childCount + "";
|
wpstr = level.waypoints[wp].children.size + "";
|
||||||
|
|
||||||
return wpstr;
|
return wpstr;
|
||||||
}
|
}
|
||||||
@ -693,7 +714,7 @@ buildChildString( wp )
|
|||||||
|
|
||||||
wpstr = "";
|
wpstr = "";
|
||||||
|
|
||||||
for(i = 0; i < level.waypoints[wp].childCount; i++)
|
for ( i = 0; i < level.waypoints[wp].children.size; i++ )
|
||||||
{
|
{
|
||||||
if ( i != 0 )
|
if ( i != 0 )
|
||||||
wpstr = wpstr + "," + level.waypoints[wp].children[i];
|
wpstr = wpstr + "," + level.waypoints[wp].children[i];
|
||||||
|
@ -1460,7 +1460,7 @@ Callback_PlayerDamage_internal( eInflictor, eAttacker, victim, iDamage, iDFlags,
|
|||||||
|
|
||||||
if ( attackerIsNPC && isDefined( eAttacker.gunner ) )
|
if ( attackerIsNPC && isDefined( eAttacker.gunner ) )
|
||||||
damager = eAttacker.gunner;
|
damager = eAttacker.gunner;
|
||||||
else if( level.extraDamageFeedback && isDefined( eAttacker.owner ) )
|
else if( level.extraDamageFeedback && isDefined( eAttacker ) && isDefined( eAttacker.owner ) )
|
||||||
damager = eAttacker.owner;
|
damager = eAttacker.owner;
|
||||||
else
|
else
|
||||||
damager = eAttacker;
|
damager = eAttacker;
|
||||||
@ -1592,17 +1592,62 @@ Callback_PlayerDamage( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
doPrintDamage(dmg, hitloc, flags)
|
||||||
|
{
|
||||||
|
self endon( "disconnect" );
|
||||||
|
|
||||||
|
huddamage = newclienthudelem(self);
|
||||||
|
huddamage.alignx = "center";
|
||||||
|
huddamage.horzalign = "center";
|
||||||
|
huddamage.x = 10;
|
||||||
|
huddamage.y = 235;
|
||||||
|
huddamage.fontscale = 1.6;
|
||||||
|
huddamage.font = "objective";
|
||||||
|
huddamage setvalue(dmg);
|
||||||
|
|
||||||
|
if ((flags & level.iDFLAGS_RADIUS) != 0)
|
||||||
|
huddamage.color = (0.25, 0.25, 0.25);
|
||||||
|
|
||||||
|
if ((flags & level.iDFLAGS_PENETRATION) != 0)
|
||||||
|
huddamage.color = (1, 1, 0.25);
|
||||||
|
|
||||||
|
if (hitloc == "head")
|
||||||
|
huddamage.color = (1, 0.25, 0.25);
|
||||||
|
|
||||||
|
huddamage moveovertime(1);
|
||||||
|
huddamage fadeovertime(1);
|
||||||
|
huddamage.alpha = 0;
|
||||||
|
huddamage.x = randomIntRange(25, 70);
|
||||||
|
|
||||||
|
val = 1;
|
||||||
|
if (cointoss())
|
||||||
|
val = -1;
|
||||||
|
|
||||||
|
huddamage.y = 235 + randomIntRange(25, 70) * val;
|
||||||
|
|
||||||
|
wait 1;
|
||||||
|
|
||||||
|
if ( isDefined( huddamage ) )
|
||||||
|
huddamage destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime, stunFraction )
|
finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeath, sWeapon, vPoint, vDir, sHitLoc, psOffsetTime, stunFraction )
|
||||||
{
|
{
|
||||||
if( level.allowPrintDamage )
|
if( level.allowPrintDamage )
|
||||||
{
|
{
|
||||||
if ( isDefined( eAttacker ) && isPlayer( eAttacker ) && eAttacker.printDamage )
|
if ( !isDefined( eAttacker ) )
|
||||||
eAttacker iPrintLnBold( iDamage );
|
{
|
||||||
|
if ( !isDefined( eInflictor ) && self.printDamage )
|
||||||
|
self thread doPrintDamage( iDamage, sHitLoc, iDFlags );
|
||||||
|
}
|
||||||
|
else if ( isPlayer( eAttacker ) && eAttacker.printDamage )
|
||||||
|
eAttacker thread doPrintDamage( iDamage, sHitLoc, iDFlags );
|
||||||
else if( isDefined( eAttacker.owner ) && isPlayer( eAttacker.owner ) && eAttacker.owner.printDamage )
|
else if( isDefined( eAttacker.owner ) && isPlayer( eAttacker.owner ) && eAttacker.owner.printDamage )
|
||||||
eAttacker.owner iPrintLnBold( iDamage );
|
eAttacker.owner thread doPrintDamage( iDamage, sHitLoc, iDFlags );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( level.extraDamageFeedback )
|
if( isDefined( eAttacker ) && level.extraDamageFeedback )
|
||||||
{
|
{
|
||||||
if( sWeapon == "nuke_mp" )
|
if( sWeapon == "nuke_mp" )
|
||||||
{
|
{
|
||||||
@ -1618,7 +1663,7 @@ finishPlayerDamageWrapper( eInflictor, eAttacker, iDamage, iDFlags, sMeansOfDeat
|
|||||||
|
|
||||||
if( sHitLoc == "head" || sHitLoc == "helmet" )
|
if( sHitLoc == "head" || sHitLoc == "helmet" )
|
||||||
{
|
{
|
||||||
if ( isDefined( eAttacker ) && isPlayer( eAttacker ) )
|
if ( isPlayer( eAttacker ) )
|
||||||
eAttacker playLocalSound( "bullet_impact_headshot_2" );
|
eAttacker playLocalSound( "bullet_impact_headshot_2" );
|
||||||
else if( isDefined( eAttacker.owner ) && isPlayer( eAttacker.owner ) )
|
else if( isDefined( eAttacker.owner ) && isPlayer( eAttacker.owner ) )
|
||||||
eAttacker.owner playLocalSound( "bullet_impact_headshot_2" );
|
eAttacker.owner playLocalSound( "bullet_impact_headshot_2" );
|
||||||
|
@ -64,6 +64,9 @@ statSet( dataName, value )
|
|||||||
if ( !self rankingEnabled() )
|
if ( !self rankingEnabled() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (getDvarInt("developer_script"))
|
||||||
|
return;
|
||||||
|
|
||||||
self SetPlayerData( dataName, value );
|
self SetPlayerData( dataName, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,6 +84,9 @@ statAdd( dataName, value )
|
|||||||
if ( !self rankingEnabled() )
|
if ( !self rankingEnabled() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (getDvarInt("developer_script"))
|
||||||
|
return;
|
||||||
|
|
||||||
curValue = self GetPlayerData( dataName );
|
curValue = self GetPlayerData( dataName );
|
||||||
self SetPlayerData( dataName, value + curValue );
|
self SetPlayerData( dataName, value + curValue );
|
||||||
}
|
}
|
||||||
@ -97,6 +103,9 @@ statSetChild( parent, child, value )
|
|||||||
if ( !self rankingEnabled() )
|
if ( !self rankingEnabled() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (getDvarInt("developer_script"))
|
||||||
|
return;
|
||||||
|
|
||||||
self SetPlayerData( parent, child, value );
|
self SetPlayerData( parent, child, value );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,6 +117,9 @@ statAddChild( parent, child, value )
|
|||||||
if ( !self rankingEnabled() )
|
if ( !self rankingEnabled() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (getDvarInt("developer_script"))
|
||||||
|
return;
|
||||||
|
|
||||||
curValue = self GetPlayerData( parent, child );
|
curValue = self GetPlayerData( parent, child );
|
||||||
self SetPlayerData( parent, child, curValue + value );
|
self SetPlayerData( parent, child, curValue + value );
|
||||||
}
|
}
|
||||||
|
@ -609,6 +609,8 @@ getSpawnpoint_NearTeam( spawnpoints, favoredspawnpoints )
|
|||||||
obj = spawnstruct();
|
obj = spawnstruct();
|
||||||
|
|
||||||
alliedDistanceWeight = 2;
|
alliedDistanceWeight = 2;
|
||||||
|
if ( getDVar( "scr_alliedDistanceWeight" ) != "" )
|
||||||
|
alliedDistanceWeight = getDVarFloat( "scr_alliedDistanceWeight" );
|
||||||
|
|
||||||
//prof_begin(" spawn_basicsumdists");
|
//prof_begin(" spawn_basicsumdists");
|
||||||
myTeam = self.team;
|
myTeam = self.team;
|
||||||
|
@ -1572,7 +1572,7 @@ setClaymoreTeamHeadIcon( team )
|
|||||||
{
|
{
|
||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
if ( self.weaponname == "claymore_mp" && !level.allowExtendedClaymoreTrace )
|
if ( isDefined( self.weaponname ) && self.weaponname == "claymore_mp" && !level.allowExtendedClaymoreTrace )
|
||||||
{
|
{
|
||||||
self waittill( "missile_stuck" );
|
self waittill( "missile_stuck" );
|
||||||
self waittill( "claymore_trace_fixed" );
|
self waittill( "claymore_trace_fixed" );
|
||||||
@ -1580,6 +1580,9 @@ setClaymoreTeamHeadIcon( team )
|
|||||||
else
|
else
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
|
|
||||||
|
if ( !isDefined( self ) )
|
||||||
|
return;
|
||||||
|
|
||||||
if ( isDefined( self.entityHeadIcon ) )
|
if ( isDefined( self.entityHeadIcon ) )
|
||||||
{
|
{
|
||||||
self.entityHeadIconTeam = "none";
|
self.entityHeadIconTeam = "none";
|
||||||
@ -2689,6 +2692,42 @@ detach_hip_weapon()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
FixHideTagList( hideTagList, stowWeapon )
|
||||||
|
{
|
||||||
|
answer = [];
|
||||||
|
|
||||||
|
for ( i = 0; i < hideTagList.size; i++ )
|
||||||
|
{
|
||||||
|
tag = hideTagList[ i ];
|
||||||
|
|
||||||
|
if ( stowWeapon == "weapon_ak74u" )
|
||||||
|
{
|
||||||
|
if ( tag == "tag_reflex_sight" || tag == "tag_acog" || tag == "tag_ak47_mount" )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if ( stowWeapon == "weapon_ak47_classic" )
|
||||||
|
{
|
||||||
|
if ( tag == "tag_reflex_sight" || tag == "tag_acog" || tag == "tag_ak47_mount" )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if ( stowWeapon == "worldmodel_bo2_peacekeeper" )
|
||||||
|
{
|
||||||
|
if ( tag == "tag_holo" || tag == "tag_reflex" || tag == "tag_silencer" )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if ( stowWeapon == "weapon_beretta" )
|
||||||
|
{
|
||||||
|
if ( tag == "tag_knife" )
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
answer[ answer.size ] = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
return answer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
stow_on_back()
|
stow_on_back()
|
||||||
{
|
{
|
||||||
prof_begin( "stow_on_back" );
|
prof_begin( "stow_on_back" );
|
||||||
@ -2779,6 +2818,8 @@ stow_on_back()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hideTagList = FixHideTagList( hideTagList, self.tag_stowed_back );
|
||||||
|
|
||||||
for ( i = 0; i < hideTagList.size; i++ )
|
for ( i = 0; i < hideTagList.size; i++ )
|
||||||
self HidePart( hideTagList[ i ], self.tag_stowed_back );
|
self HidePart( hideTagList[ i ], self.tag_stowed_back );
|
||||||
|
|
||||||
@ -2816,6 +2857,8 @@ stow_on_hip()
|
|||||||
if ( !isDefined( hideTagList ) )
|
if ( !isDefined( hideTagList ) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
hideTagList = FixHideTagList( hideTagList, self.tag_stowed_hip );
|
||||||
|
|
||||||
for ( i = 0; i < hideTagList.size; i++ )
|
for ( i = 0; i < hideTagList.size; i++ )
|
||||||
self HidePart( hideTagList[ i ], self.tag_stowed_hip );
|
self HidePart( hideTagList[ i ], self.tag_stowed_hip );
|
||||||
}
|
}
|
||||||
|
454
userraw/maps/mp/gametypes/vip.gsc
Normal file
454
userraw/maps/mp/gametypes/vip.gsc
Normal file
@ -0,0 +1,454 @@
|
|||||||
|
#include maps\mp\_utility;
|
||||||
|
#include maps\mp\gametypes\_hud_util;
|
||||||
|
/*
|
||||||
|
VIP
|
||||||
|
Objective: Escort the VIP to safety, or eliminate the VIP beofore he reaches extraction
|
||||||
|
Map ends: When one team eliminates the enemy team, or the flag is reached
|
||||||
|
Respawning: Beginning of next round
|
||||||
|
|
||||||
|
Level requirementss
|
||||||
|
------------------
|
||||||
|
Spawnpoints:
|
||||||
|
classname mp_tdm_spawn
|
||||||
|
|
||||||
|
|
||||||
|
Spectator Spawnpoints:
|
||||||
|
classname mp_global_intermission
|
||||||
|
*/
|
||||||
|
|
||||||
|
main()
|
||||||
|
{
|
||||||
|
if(getdvar("mapname") == "mp_background")
|
||||||
|
return;
|
||||||
|
|
||||||
|
maps\mp\gametypes\_globallogic::init();
|
||||||
|
maps\mp\gametypes\_callbacksetup::SetupCallbacks();
|
||||||
|
maps\mp\gametypes\_globallogic::SetupCallbacks();
|
||||||
|
|
||||||
|
registerRoundSwitchDvar( level.gameType, 0, 0, 9 );
|
||||||
|
registerTimeLimitDvar( level.gameType, 10, 0, 1440 );
|
||||||
|
registerScoreLimitDvar( level.gameType, 500, 0, 5000 );
|
||||||
|
registerRoundLimitDvar( level.gameType, 1, 0, 10 );
|
||||||
|
registerWinLimitDvar( level.gameType, 1, 0, 10 );
|
||||||
|
registerRoundSwitchDvar( level.gameType, 3, 0, 30 );
|
||||||
|
registerNumLivesDvar( level.gameType, 1, 0, 10 );
|
||||||
|
registerWatchDvarInt( "halftime", 0 );
|
||||||
|
|
||||||
|
level.teamBased = true;
|
||||||
|
level.objectiveBased = true;
|
||||||
|
|
||||||
|
level.onPrecacheGameType = ::onPrecacheGameType;
|
||||||
|
level.onStartGameType = ::onStartGameType;
|
||||||
|
level.getSpawnPoint = ::getSpawnPoint;
|
||||||
|
level.onSpawnPlayer = ::onSpawnPlayer;
|
||||||
|
level.onNormalDeath = ::onNormalDeath;
|
||||||
|
level.onPlayerKilled = ::onPlayerKilled;
|
||||||
|
level.onDeadEvent = ::onDeadEvent;
|
||||||
|
|
||||||
|
game["dialog"]["gametype"] = "VIP";
|
||||||
|
}
|
||||||
|
|
||||||
|
onPrecacheGameType()
|
||||||
|
{
|
||||||
|
precacheShader( "compass_waypoint_captureneutral" );
|
||||||
|
precacheShader( "compass_waypoint_capture" );
|
||||||
|
precacheShader( "compass_waypoint_defend" );
|
||||||
|
|
||||||
|
precacheShader( "waypoint_captureneutral" );
|
||||||
|
precacheShader( "waypoint_capture" );
|
||||||
|
precacheShader( "waypoint_defend" );
|
||||||
|
|
||||||
|
precacheString( &"MP_ELIMINATED_VIP" );
|
||||||
|
precacheString( &"MP_DEFENDED_VIP" );
|
||||||
|
precacheString( &"SPLASHES_VIP" );
|
||||||
|
|
||||||
|
game["flagmodels"] = [];
|
||||||
|
game["flagmodels"]["neutral"] = "prop_flag_neutral";
|
||||||
|
|
||||||
|
game["flagmodels"]["allies"] = maps\mp\gametypes\_teams::getTeamFlagModel( "allies" );
|
||||||
|
game["flagmodels"]["axis"] = maps\mp\gametypes\_teams::getTeamFlagModel( "axis" );
|
||||||
|
|
||||||
|
precacheModel( game["flagmodels"]["neutral"] );
|
||||||
|
precacheModel( game["flagmodels"]["allies"] );
|
||||||
|
precacheModel( game["flagmodels"]["axis"] );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
onStartGameType()
|
||||||
|
{
|
||||||
|
setClientNameMode("auto_change");
|
||||||
|
|
||||||
|
if ( !isdefined( game["switchedsides"] ) )
|
||||||
|
game["switchedsides"] = false;
|
||||||
|
|
||||||
|
if ( game["switchedsides"] )
|
||||||
|
{
|
||||||
|
oldAttackers = game["attackers"];
|
||||||
|
oldDefenders = game["defenders"];
|
||||||
|
game["attackers"] = oldDefenders;
|
||||||
|
game["defenders"] = oldAttackers;
|
||||||
|
}
|
||||||
|
|
||||||
|
setObjectiveText( "allies", &"OBJECTIVES_VIP" );
|
||||||
|
setObjectiveText( "axis", &"OBJECTIVES_VIP" );
|
||||||
|
|
||||||
|
if ( level.splitscreen )
|
||||||
|
{
|
||||||
|
setObjectiveScoreText( "allies", &"OBJECTIVES_VIP" );
|
||||||
|
setObjectiveScoreText( "axis", &"OBJECTIVES_VIP" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setObjectiveScoreText( "allies", &"OBJECTIVES_VIP_SCORE" );
|
||||||
|
setObjectiveScoreText( "axis", &"OBJECTIVES_VIP_SCORE" );
|
||||||
|
}
|
||||||
|
setObjectiveHintText( "allies", &"OBJECTIVES_VIP_HINT" );
|
||||||
|
setObjectiveHintText( "axis", &"OBJECTIVES_VIP_HINT" );
|
||||||
|
|
||||||
|
level.spawnMins = ( 0, 0, 0 );
|
||||||
|
level.spawnMaxs = ( 0, 0, 0 );
|
||||||
|
maps\mp\gametypes\_spawnlogic::placeSpawnPoints( "mp_tdm_spawn_allies_start" );
|
||||||
|
maps\mp\gametypes\_spawnlogic::placeSpawnPoints( "mp_tdm_spawn_axis_start" );
|
||||||
|
maps\mp\gametypes\_spawnlogic::addSpawnPoints( "allies", "mp_tdm_spawn" );
|
||||||
|
maps\mp\gametypes\_spawnlogic::addSpawnPoints( "axis", "mp_tdm_spawn" );
|
||||||
|
|
||||||
|
level.mapCenter = maps\mp\gametypes\_spawnlogic::findBoxCenter( level.spawnMins, level.spawnMaxs );
|
||||||
|
setMapCenter( level.mapCenter );
|
||||||
|
|
||||||
|
allowed[0] = "vip";
|
||||||
|
allowed[1] = "sd";
|
||||||
|
allowed[2] = "airdrop_pallet";
|
||||||
|
allowed[3] = "gtnw";
|
||||||
|
allowed[4] = "gtnw_zone";
|
||||||
|
//maps\mp\gametypes\_rank::registerScoreInfo( "capture", 200 );
|
||||||
|
|
||||||
|
maps\mp\gametypes\_gameobjects::main(allowed);
|
||||||
|
|
||||||
|
self thread waitToProcess();
|
||||||
|
}
|
||||||
|
|
||||||
|
waitToProcess()
|
||||||
|
{
|
||||||
|
level endon( "game_end" );
|
||||||
|
level endon( "waitSkipped" );
|
||||||
|
|
||||||
|
self thread extractionZone();
|
||||||
|
self thread skipWait();
|
||||||
|
|
||||||
|
gameFlagWait( "prematch_done" );
|
||||||
|
gameFlagWait( "graceperiod_done" );
|
||||||
|
self notify( "graceComplete" );
|
||||||
|
|
||||||
|
self thread vipSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
skipWait()
|
||||||
|
{
|
||||||
|
self endon( "graceComplete" );
|
||||||
|
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
if( level.players.size > 2 )
|
||||||
|
break;
|
||||||
|
|
||||||
|
wait( .5 );
|
||||||
|
}
|
||||||
|
|
||||||
|
self notify( "waitSkipped" );
|
||||||
|
self thread vipSelection();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getSpawnPoint()
|
||||||
|
{
|
||||||
|
spawnteam = self.pers["team"];
|
||||||
|
if ( game["switchedsides"] )
|
||||||
|
spawnteam = getOtherTeam( spawnteam );
|
||||||
|
|
||||||
|
if ( level.inGracePeriod )
|
||||||
|
{
|
||||||
|
spawnPoints = maps\mp\gametypes\_spawnlogic::getSpawnpointArray( "mp_tdm_spawn_" + spawnteam + "_start" );
|
||||||
|
spawnPoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_Random( spawnPoints );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spawnPoints = maps\mp\gametypes\_spawnlogic::getTeamSpawnPoints( spawnteam );
|
||||||
|
spawnPoint = maps\mp\gametypes\_spawnlogic::getSpawnpoint_NearTeam( spawnPoints );
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawnPoint;
|
||||||
|
}
|
||||||
|
|
||||||
|
onSpawnPlayer()
|
||||||
|
{
|
||||||
|
self.isVip = false;
|
||||||
|
self.usingObj = undefined;
|
||||||
|
level notify ( "spawned_player" );
|
||||||
|
}
|
||||||
|
|
||||||
|
onNormalDeath( victim, attacker, lifeId )
|
||||||
|
{
|
||||||
|
score = maps\mp\gametypes\_rank::getScoreInfoValue( "kill" );
|
||||||
|
assert( isDefined( score ) );
|
||||||
|
|
||||||
|
attacker maps\mp\gametypes\_gamescore::giveTeamScoreForObjective( attacker.pers["team"], score );
|
||||||
|
|
||||||
|
team = victim.team;
|
||||||
|
|
||||||
|
if ( isDefined( victim.isVip ) && victim.isVip )
|
||||||
|
{
|
||||||
|
level thread vip_endGame( game["attackers"], &"MP_ELIMINATED_VIP" );
|
||||||
|
attacker.finalKill = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onPlayerKilled(eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc, psOffsetTime, deathAnimDuration, killId)
|
||||||
|
{
|
||||||
|
thread checkAllowSpectating();
|
||||||
|
}
|
||||||
|
|
||||||
|
onTimeLimit()
|
||||||
|
{
|
||||||
|
if ( game["status"] == "overtime" )
|
||||||
|
{
|
||||||
|
winner = "forfeit";
|
||||||
|
}
|
||||||
|
else if ( game["teamScores"]["allies"] == game["teamScores"]["axis"] )
|
||||||
|
{
|
||||||
|
winner = "overtime";
|
||||||
|
}
|
||||||
|
else if ( game["teamScores"]["axis"] > game["teamScores"]["allies"] )
|
||||||
|
{
|
||||||
|
winner = "axis";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
winner = "allies";
|
||||||
|
}
|
||||||
|
|
||||||
|
thread maps\mp\gametypes\_gamelogic::endGame( winner, game["strings"]["time_limit_reached"] );
|
||||||
|
}
|
||||||
|
|
||||||
|
checkAllowSpectating()
|
||||||
|
{
|
||||||
|
wait ( 0.05 );
|
||||||
|
|
||||||
|
update = false;
|
||||||
|
if ( !level.aliveCount[ game["attackers"] ] )
|
||||||
|
{
|
||||||
|
level.spectateOverride[game["attackers"]].allowEnemySpectate = 1;
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
if ( !level.aliveCount[ game["defenders"] ] )
|
||||||
|
{
|
||||||
|
level.spectateOverride[game["defenders"]].allowEnemySpectate = 1;
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
if ( update )
|
||||||
|
maps\mp\gametypes\_spectating::updateSpectateSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
onDeadEvent( team )
|
||||||
|
{
|
||||||
|
if ( team == game["attackers"] )
|
||||||
|
{
|
||||||
|
level thread vip_endGame( game["defenders"], game["strings"][game["attackers"]+"_eliminated"] );
|
||||||
|
}
|
||||||
|
else if ( team == game["defenders"] )
|
||||||
|
{
|
||||||
|
level thread vip_endGame( game["attackers"], game["strings"][game["defenders"]+"_eliminated"] );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
vip_endGame( winningTeam, endReasonText )
|
||||||
|
{
|
||||||
|
thread maps\mp\gametypes\_gamelogic::endGame( winningTeam, endReasonText );
|
||||||
|
}
|
||||||
|
|
||||||
|
vipSelection()
|
||||||
|
{
|
||||||
|
println( "SELECTION" );
|
||||||
|
potentialVIPs = [];
|
||||||
|
abortTime = 0;
|
||||||
|
|
||||||
|
for( ;; )
|
||||||
|
{
|
||||||
|
if ( level.players.size >= 2 )
|
||||||
|
break;
|
||||||
|
|
||||||
|
if ( abortTime >= 100 )
|
||||||
|
{
|
||||||
|
iPrintlnBold( "Game mode only playable with 2 or more players" );
|
||||||
|
wait( 2 );
|
||||||
|
maps\mp\gametypes\_callbacksetup::AbortLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
abortTime++;
|
||||||
|
wait( .1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ( player in level.players )
|
||||||
|
{
|
||||||
|
if ( player.team == game["defenders"] )
|
||||||
|
potentialVIPs[ potentialVIPs.size ] = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedVIPNum = RandomIntRange( 0, potentialVIPs.size );
|
||||||
|
selectedPlayer = potentialVIPs[ selectedVIPNum ];
|
||||||
|
|
||||||
|
if ( !isAlive(selectedPlayer ) && !isSubStr( selectedPlayer.guid, "bot" ) )
|
||||||
|
selectedPlayer forceVIPSpawn();
|
||||||
|
|
||||||
|
setupVip( selectedPlayer );
|
||||||
|
}
|
||||||
|
|
||||||
|
setupVip ( vipPlayer )
|
||||||
|
{
|
||||||
|
vipPlayer TakeAllWeapons();
|
||||||
|
vipPlayer _clearPerks();
|
||||||
|
|
||||||
|
vipPlayer.isVip = true;
|
||||||
|
|
||||||
|
vipPlayer giveWeapon( "deserteagle_fmj_mp" );
|
||||||
|
vipPlayer giveStartAmmo( "deserteagle_fmj_mp" );
|
||||||
|
|
||||||
|
vipPlayer giveWeapon( "riotshield_mp" );
|
||||||
|
vipPlayer switchToWeapon( "riotshield_mp" );
|
||||||
|
|
||||||
|
vipPlayer _setPerk( "specialty_armorvest" );
|
||||||
|
vipPlayer _setPerk( "specialty_finalstand" );
|
||||||
|
|
||||||
|
vipPlayer iPrintlnBold( "You Are the VIP" );
|
||||||
|
//TO DO: add defend icon on the VIP
|
||||||
|
}
|
||||||
|
|
||||||
|
extractionZone()
|
||||||
|
{
|
||||||
|
extractionZones = getEntArray("extraction_vip", "targetname");
|
||||||
|
|
||||||
|
// check to see if zone is available.
|
||||||
|
if ( !extractionZones.size )
|
||||||
|
{
|
||||||
|
println("WARNING: no extraction zone specified" );
|
||||||
|
|
||||||
|
printLn( "^1Not enough extraction zones found in level!" );
|
||||||
|
|
||||||
|
extractionZones = getEntArray( "gtnw_zone", "targetname" );
|
||||||
|
|
||||||
|
if (!extractionZones.size)
|
||||||
|
{
|
||||||
|
maps\mp\gametypes\_callbacksetup::AbortLevel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trigger = extractionZones[0];
|
||||||
|
if ( isDefined( trigger.target ) )
|
||||||
|
{
|
||||||
|
visuals[0] = getEnt( trigger.target, "targetname" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
visuals[0] = spawn( "script_model", trigger.origin );
|
||||||
|
visuals[0].angles = trigger.angles;
|
||||||
|
}
|
||||||
|
|
||||||
|
extractionZone = maps\mp\gametypes\_gameobjects::createUseObject( game["defenders"], trigger, visuals, (0,0,100) );
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::allowUse( "friendly" );
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::setVisibleTeam( "none" );
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::setUseText( &"MP_CALLING_EXTRACTION" );
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::setUseTime( 0 );
|
||||||
|
|
||||||
|
extractionZone.onUse = ::onUse;
|
||||||
|
extractionZone.onCantUse = ::onCantUse;
|
||||||
|
|
||||||
|
traceStart = trigger.origin + (0,0,32);
|
||||||
|
traceEnd = trigger.origin + (0,0,-32);
|
||||||
|
trace = bulletTrace( traceStart, traceEnd, false, undefined );
|
||||||
|
|
||||||
|
fx = maps\mp\gametypes\_teams::getTeamFlagFX( game["defenders"] );
|
||||||
|
fxid = loadfx( fx );
|
||||||
|
|
||||||
|
upangles = vectorToAngles( trace["normal"] );
|
||||||
|
forward = anglesToForward( upangles );
|
||||||
|
right = anglesToRight( upangles );
|
||||||
|
thread spawnFxDelay( fxid, trace["position"], forward, right, 0.5 );
|
||||||
|
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::set2DIcon( "friendly", "compass_waypoint_defend");
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::set3DIcon( "friendly", "waypoint_defend");
|
||||||
|
extractionZone maps\mp\gametypes\_gameobjects::setVisibleTeam( "friendly" );
|
||||||
|
|
||||||
|
level.extractionZone = extractionZone;
|
||||||
|
}
|
||||||
|
|
||||||
|
setVIPUse()
|
||||||
|
{
|
||||||
|
foreach (player in level.players)
|
||||||
|
{
|
||||||
|
if ( ! player.isVip )
|
||||||
|
self.trigger disablePlayerUse(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onUse( player )
|
||||||
|
{
|
||||||
|
if ( !isDefined( player.isVip ) || ! player.isVip )
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
iPrintlnBold( "Extraction on its way" );
|
||||||
|
self handleTimer( player );
|
||||||
|
}
|
||||||
|
|
||||||
|
handleTimer( player )
|
||||||
|
{
|
||||||
|
player endon( "death" );
|
||||||
|
level endon( "game_end" );
|
||||||
|
|
||||||
|
level.extractionTime = 45;
|
||||||
|
maps\mp\gametypes\_gamelogic::pauseTimer();
|
||||||
|
level.timeLimitOverride = true;
|
||||||
|
setGameEndTime( int( getTime() + (level.extractionTime * 1000) ) );
|
||||||
|
wait level.extractionTime;
|
||||||
|
|
||||||
|
//call the sentry airdrops
|
||||||
|
level thread vip_endGame( game["defenders"], &"MP_DEFENDED_VIP" );
|
||||||
|
}
|
||||||
|
|
||||||
|
onEndUse( team, player, success )
|
||||||
|
{
|
||||||
|
println( "End Use" );
|
||||||
|
}
|
||||||
|
|
||||||
|
onCantUse( player )
|
||||||
|
{
|
||||||
|
// player iPrintLnBold( &"MP_CANT_PLANT_WITHOUT_BOMB" );
|
||||||
|
}
|
||||||
|
|
||||||
|
spawnFxDelay( fxid, pos, forward, right, delay )
|
||||||
|
{
|
||||||
|
wait delay;
|
||||||
|
effect = spawnFx( fxid, pos, forward, right );
|
||||||
|
triggerFx( effect );
|
||||||
|
}
|
||||||
|
|
||||||
|
forceVIPSpawn()
|
||||||
|
{
|
||||||
|
self endon ( "death" );
|
||||||
|
self endon ( "disconnect" );
|
||||||
|
self endon ( "spawned" );
|
||||||
|
|
||||||
|
if ( self.hasSpawned )
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ( !isValidClass( self.pers["class"] ) )
|
||||||
|
{
|
||||||
|
self.pers["class"] = "CLASS_CUSTOM1";
|
||||||
|
|
||||||
|
self.class = self.pers["class"];
|
||||||
|
}
|
||||||
|
|
||||||
|
self closeMenus();
|
||||||
|
self thread maps\mp\gametypes\_playerlogic::spawnClient();
|
||||||
|
}
|
@ -231,7 +231,9 @@ waitForChangeTeam()
|
|||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill ( "joined_team" );
|
self waittill ( "joined_team" );
|
||||||
clearKillstreaks();
|
self clearKillstreaks();
|
||||||
|
|
||||||
|
if ( self isUsingRemote() )
|
||||||
self clearUsingRemote();
|
self clearUsingRemote();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -702,9 +704,12 @@ giveKillstreakWeapon( weapon )
|
|||||||
self takeWeapon( item );
|
self takeWeapon( item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isDefined( weapon ) && weapon != "" )
|
||||||
|
{
|
||||||
self _giveWeapon( weapon, 0 );
|
self _giveWeapon( weapon, 0 );
|
||||||
self _setActionSlot( 4, "weapon", weapon );
|
self _setActionSlot( 4, "weapon", weapon );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getStreakCost( streakName )
|
getStreakCost( streakName )
|
||||||
@ -858,6 +863,8 @@ clearRideIntro( delay )
|
|||||||
destroyOnEvents(elem)
|
destroyOnEvents(elem)
|
||||||
{
|
{
|
||||||
self waittill_either("disconnect", "start_killstreak_hud");
|
self waittill_either("disconnect", "start_killstreak_hud");
|
||||||
|
|
||||||
|
if ( isDefined( elem ) )
|
||||||
elem destroy();
|
elem destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -629,8 +629,12 @@ selectOneManArmyClass()
|
|||||||
level endon ( "game_ended" );
|
level endon ( "game_ended" );
|
||||||
|
|
||||||
self _disableWeaponSwitch();
|
self _disableWeaponSwitch();
|
||||||
|
|
||||||
|
if (level.fix_onemanarmyFlareBug)
|
||||||
|
{
|
||||||
self _disableOffhandWeapons();
|
self _disableOffhandWeapons();
|
||||||
self _disableUsability();
|
self _disableUsability();
|
||||||
|
}
|
||||||
|
|
||||||
self openPopupMenu( game["menu_onemanarmy"] );
|
self openPopupMenu( game["menu_onemanarmy"] );
|
||||||
|
|
||||||
@ -639,23 +643,35 @@ selectOneManArmyClass()
|
|||||||
self waittill ( "menuresponse", menu, className );
|
self waittill ( "menuresponse", menu, className );
|
||||||
|
|
||||||
self _enableWeaponSwitch();
|
self _enableWeaponSwitch();
|
||||||
|
|
||||||
|
if (level.fix_onemanarmyFlareBug)
|
||||||
|
{
|
||||||
self _enableOffhandWeapons();
|
self _enableOffhandWeapons();
|
||||||
self _enableUsability();
|
self _enableUsability();
|
||||||
|
}
|
||||||
|
|
||||||
if ( className == "back" || !isOneManArmyMenu( menu ) || self isUsingRemote() )
|
if ( className == "back" || !isOneManArmyMenu( menu ) || self isUsingRemote() )
|
||||||
{
|
{
|
||||||
if ( self getCurrentWeapon() == "onemanarmy_mp" )
|
if ( self getCurrentWeapon() == "onemanarmy_mp" )
|
||||||
{
|
{
|
||||||
self _disableWeaponSwitch();
|
self _disableWeaponSwitch();
|
||||||
|
|
||||||
|
if (level.fix_onemanarmyFlareBug)
|
||||||
|
{
|
||||||
self _disableOffhandWeapons();
|
self _disableOffhandWeapons();
|
||||||
self _disableUsability();
|
self _disableUsability();
|
||||||
|
}
|
||||||
|
|
||||||
self switchToWeapon( self getLastWeapon() );
|
self switchToWeapon( self getLastWeapon() );
|
||||||
self waittill ( "weapon_change" );
|
self waittill ( "weapon_change" );
|
||||||
self _enableWeaponSwitch();
|
self _enableWeaponSwitch();
|
||||||
|
|
||||||
|
if (level.fix_onemanarmyFlareBug)
|
||||||
|
{
|
||||||
self _enableOffhandWeapons();
|
self _enableOffhandWeapons();
|
||||||
self _enableUsability();
|
self _enableUsability();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,9 @@
|
|||||||
- onemanarmyRefillsTubes <bool>
|
- onemanarmyRefillsTubes <bool>
|
||||||
false - (default) One Man Army does not refill the gl attachment
|
false - (default) One Man Army does not refill the gl attachment
|
||||||
true - it does
|
true - it does
|
||||||
|
|
||||||
|
- fix_onemanarmyFlareBug <bool>
|
||||||
|
true - (default) fixes it
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include common_scripts\utility;
|
#include common_scripts\utility;
|
||||||
@ -200,6 +203,9 @@ init()
|
|||||||
setDvarIfUninitialized( "onemanarmyRefillsTubes", false );
|
setDvarIfUninitialized( "onemanarmyRefillsTubes", false );
|
||||||
level.onemanarmyRefillsTubes = getDvarInt( "onemanarmyRefillsTubes" );
|
level.onemanarmyRefillsTubes = getDvarInt( "onemanarmyRefillsTubes" );
|
||||||
|
|
||||||
|
setDvarIfUninitialized( "fix_onemanarmyFlareBug", true );
|
||||||
|
level.fix_onemanarmyFlareBug = getDvarInt( "fix_onemanarmyFlareBug" );
|
||||||
|
|
||||||
initPerkDvars();
|
initPerkDvars();
|
||||||
|
|
||||||
level thread onPlayerConnect();
|
level thread onPlayerConnect();
|
||||||
|
4
userraw/scripts/bots_chat.gsc
Normal file
4
userraw/scripts/bots_chat.gsc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
init()
|
||||||
|
{
|
||||||
|
level thread maps\mp\bots\_bot_chat::init();
|
||||||
|
}
|
@ -30,6 +30,7 @@ watchSniper()
|
|||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
wait 15;
|
wait 15;
|
||||||
|
logPrint("keepalive\n");
|
||||||
|
|
||||||
numPlayers = 0;
|
numPlayers = 0;
|
||||||
numSnipers = 0;
|
numSnipers = 0;
|
||||||
@ -37,6 +38,7 @@ watchSniper()
|
|||||||
for ( i = 0; i < level.players.size; i++ )
|
for ( i = 0; i < level.players.size; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
|
|
||||||
if ( player is_bot() )
|
if ( player is_bot() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -62,7 +64,10 @@ watchSniper()
|
|||||||
watchNuke()
|
watchNuke()
|
||||||
{
|
{
|
||||||
setDvar( "scr_spawnpointfavorweight", "" );
|
setDvar( "scr_spawnpointfavorweight", "" );
|
||||||
|
|
||||||
|
for ( i = 0; i < 3; i++ )
|
||||||
level waittill( "nuke_death" );
|
level waittill( "nuke_death" );
|
||||||
|
|
||||||
setDvar( "scr_spawnpointfavorweight", "499999" );
|
setDvar( "scr_spawnpointfavorweight", "499999" );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -121,6 +126,7 @@ watchBotLoadout()
|
|||||||
self maps\mp\perks\_perks::givePerk( "semtex_mp" );
|
self maps\mp\perks\_perks::givePerk( "semtex_mp" );
|
||||||
|
|
||||||
twoStreak = "helicopter_minigun";
|
twoStreak = "helicopter_minigun";
|
||||||
|
|
||||||
if ( random )
|
if ( random )
|
||||||
twoStreak = "ac130";
|
twoStreak = "ac130";
|
||||||
|
|
||||||
@ -148,9 +154,11 @@ watchTeams()
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
team = getDvar( "bot_pvb_helper_noPlayersOnTeam" );
|
team = getDvar( "bot_pvb_helper_noPlayersOnTeam" );
|
||||||
|
|
||||||
for ( i = 0; i < level.players.size; i++ )
|
for ( i = 0; i < level.players.size; i++ )
|
||||||
{
|
{
|
||||||
player = level.players[i];
|
player = level.players[i];
|
||||||
|
|
||||||
if ( player is_bot() )
|
if ( player is_bot() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -168,11 +176,13 @@ watchTeams()
|
|||||||
onBotSayVar()
|
onBotSayVar()
|
||||||
{
|
{
|
||||||
SetDvar( "bot_say", "" );
|
SetDvar( "bot_say", "" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
|
|
||||||
toSay = GetDvar( "bot_say" );
|
toSay = GetDvar( "bot_say" );
|
||||||
|
|
||||||
if ( toSay == "" )
|
if ( toSay == "" )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -6,8 +6,11 @@
|
|||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
setDvarIfUninitialized( "bots_sniperLoadout", false );
|
setDvarIfUninitialized( "bots_sniperLoadout", false );
|
||||||
|
setDvarIfUninitialized( "bots_oneHardIsSniper", false );
|
||||||
|
|
||||||
level thread onBotConnected();
|
level thread onBotConnected();
|
||||||
|
|
||||||
|
level thread watchOneHardIsSniper();
|
||||||
}
|
}
|
||||||
|
|
||||||
onBotConnected()
|
onBotConnected()
|
||||||
@ -31,6 +34,34 @@ onBotGivenLoadout()
|
|||||||
if ( !getDvarInt( "bots_sniperLoadout" ) )
|
if ( !getDvarInt( "bots_sniperLoadout" ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
self give_sniper_loadout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watchOneHardIsSniper()
|
||||||
|
{
|
||||||
|
for(;;)
|
||||||
|
{
|
||||||
|
wait 1;
|
||||||
|
|
||||||
|
if ( !getDvarInt( "bots_oneHardIsSniper" ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
foreach (bot in level.bots)
|
||||||
|
{
|
||||||
|
if (bot.pers["bots"]["skill"]["base"] >= 7)
|
||||||
|
{
|
||||||
|
if (isAlive(bot) && !bot.isSniper)
|
||||||
|
bot give_sniper_loadout();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
give_sniper_loadout()
|
||||||
|
{
|
||||||
self.pers["bots"]["behavior"]["quickscope"] = true;
|
self.pers["bots"]["behavior"]["quickscope"] = true;
|
||||||
|
|
||||||
// clear perks and weapons
|
// clear perks and weapons
|
||||||
@ -60,5 +91,6 @@ onBotGivenLoadout()
|
|||||||
self [[game[self.team + "_model"]["GHILLIE"]]]();
|
self [[game[self.team + "_model"]["GHILLIE"]]]();
|
||||||
else
|
else
|
||||||
self [[game[self.team + "_model"]["SNIPER"]]]();
|
self [[game[self.team + "_model"]["SNIPER"]]]();
|
||||||
}
|
|
||||||
|
self.isSniper = true;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ onPlayerConnect()
|
|||||||
onPlayerSpawned()
|
onPlayerSpawned()
|
||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
self waittill( "spawned_player" );
|
self waittill( "spawned_player" );
|
||||||
@ -33,14 +34,23 @@ onPlayerSpawned()
|
|||||||
|
|
||||||
destoryHPdraw()
|
destoryHPdraw()
|
||||||
{
|
{
|
||||||
self waittill_either("disconnect", "death");
|
self endon( "disconnect" );
|
||||||
|
self waittill( "death" );
|
||||||
|
|
||||||
|
if ( isDefined( self.drawHP ) )
|
||||||
self.drawHP destroy();
|
self.drawHP destroy();
|
||||||
|
|
||||||
|
if ( isDefined( self.drawSpeed ) )
|
||||||
|
self.drawSpeed destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
initHPdraw()
|
initHPdraw()
|
||||||
{
|
{
|
||||||
self.drawHP = self createFontString( "default", 1.2 );
|
self.drawHP = self createFontString( "default", 1.2 );
|
||||||
self.drawHP setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -150, -20 );
|
self.drawHP setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -150, -20 );
|
||||||
|
|
||||||
|
self.drawSpeed = self createFontString( "default", 1.2 );
|
||||||
|
self.drawSpeed setPoint( "BOTTOMRIGHT", "BOTTOMRIGHT", -150, -10 );
|
||||||
self thread destoryHPdraw();
|
self thread destoryHPdraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,10 +59,14 @@ drawHP()
|
|||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
self initHPdraw();
|
self initHPdraw();
|
||||||
|
|
||||||
for ( ;; )
|
for ( ;; )
|
||||||
{
|
{
|
||||||
//self.drawHP setText("HP: "+self.health+" KS: "+self.pers["cur_kill_streak"]);
|
//self.drawHP setText("HP: "+self.health+" KS: "+self.pers["cur_kill_streak"]);
|
||||||
self.drawHP setText(self.health);
|
self.drawHP setValue( self.health );
|
||||||
|
|
||||||
|
vel = self getVelocity();
|
||||||
|
self.drawSpeed setValue( int( length( ( vel[0], vel[1], 0 ) ) ) );
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
}
|
}
|
||||||
}
|
}
|
71
userraw/scripts/spawnTest.gsc
Normal file
71
userraw/scripts/spawnTest.gsc
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
init()
|
||||||
|
{
|
||||||
|
if ( getDvarInt( "spawnpoints_test" ) )
|
||||||
|
level thread doSpawnPointTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
drawNoSight(sp)
|
||||||
|
{
|
||||||
|
newdeathicon = newHudElem();
|
||||||
|
newdeathicon.x = sp.origin[0];
|
||||||
|
newdeathicon.y = sp.origin[1];
|
||||||
|
newdeathicon.z = sp.origin[2] + 32;
|
||||||
|
newdeathicon.alpha = .61;
|
||||||
|
newdeathicon.archived = true;
|
||||||
|
newdeathicon setShader( "headicon_dead", 5, 5 );
|
||||||
|
newdeathicon setwaypoint( true, false );
|
||||||
|
|
||||||
|
if (isDefined(sp.wp))
|
||||||
|
sp.wp destroy();
|
||||||
|
|
||||||
|
sp.wp = newdeathicon;
|
||||||
|
}
|
||||||
|
|
||||||
|
drawSight(sp)
|
||||||
|
{
|
||||||
|
newdeathicon = newHudElem();
|
||||||
|
newdeathicon.x = sp.origin[0];
|
||||||
|
newdeathicon.y = sp.origin[1];
|
||||||
|
newdeathicon.z = sp.origin[2] + 32;
|
||||||
|
newdeathicon.alpha = .61;
|
||||||
|
newdeathicon.archived = true;
|
||||||
|
newdeathicon setShader( "rank_prestige1", 5, 5 );
|
||||||
|
newdeathicon setwaypoint( true, false );
|
||||||
|
|
||||||
|
if (isDefined(sp.wp))
|
||||||
|
sp.wp destroy();
|
||||||
|
|
||||||
|
sp.wp = newdeathicon;
|
||||||
|
}
|
||||||
|
|
||||||
|
doSpawnPointTest()
|
||||||
|
{
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
if ( !isdefined( level.spawnpoints ) )
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (i = 0; i < level.spawnpoints.size; i++)
|
||||||
|
{
|
||||||
|
spawnpoint = level.spawnpoints[i];
|
||||||
|
|
||||||
|
sight = false;
|
||||||
|
|
||||||
|
if (level.teamBased)
|
||||||
|
{
|
||||||
|
sight = (spawnpoint.sights["axis"] > 0);
|
||||||
|
if (!sight)
|
||||||
|
sight = (spawnpoint.sights["allies"] > 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
sight = (spawnpoint.sights > 0);
|
||||||
|
|
||||||
|
if (!sight)
|
||||||
|
drawNoSight(spawnpoint);
|
||||||
|
else
|
||||||
|
drawSight(spawnpoint);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
70
userraw/scripts/tripleDom.gsc
Normal file
70
userraw/scripts/tripleDom.gsc
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
#include common_scripts\utility;
|
||||||
|
#include maps\mp\_utility;
|
||||||
|
#include maps\mp\gametypes\_hud_util;
|
||||||
|
|
||||||
|
init()
|
||||||
|
{
|
||||||
|
setDvarIfUninitialized( "dom_lastFlagUseTimeMulti", 1.0 );
|
||||||
|
|
||||||
|
thread watchFlags();
|
||||||
|
}
|
||||||
|
|
||||||
|
watchFlags()
|
||||||
|
{
|
||||||
|
if ( getDvar( "g_gametype" ) != "dom" )
|
||||||
|
return;
|
||||||
|
|
||||||
|
while ( !isDefined( level.domFlags ) )
|
||||||
|
wait 0.05;
|
||||||
|
|
||||||
|
for ( ;; )
|
||||||
|
{
|
||||||
|
wait 1;
|
||||||
|
|
||||||
|
for ( i = 0; i < level.domFlags.size; i++ )
|
||||||
|
{
|
||||||
|
flag = level.domFlags[i];
|
||||||
|
|
||||||
|
if ( isDefined( flag.originalUseTime ) )
|
||||||
|
{
|
||||||
|
flag.useTime = flag.originalUseTime;
|
||||||
|
flag.originalUseTime = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
team = "none";
|
||||||
|
|
||||||
|
axisFlags = maps\mp\gametypes\dom::getTeamFlagCount( "axis" );
|
||||||
|
alliesFlags = maps\mp\gametypes\dom::getTeamFlagCount( "allies" );
|
||||||
|
|
||||||
|
if ( alliesFlags == 2 || axisFlags == 2 )
|
||||||
|
{
|
||||||
|
if ( alliesFlags == 2 )
|
||||||
|
team = "allies";
|
||||||
|
else
|
||||||
|
team = "axis";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( game["teamScores"]["axis"] < game["teamScores"]["allies"] && team == "axis" )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( game["teamScores"]["allies"] < game["teamScores"]["axis"] && team == "allies" )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if ( team != "none" )
|
||||||
|
{
|
||||||
|
for ( i = 0; i < level.domFlags.size; i++ )
|
||||||
|
{
|
||||||
|
flag = level.domFlags[i];
|
||||||
|
|
||||||
|
flagTeam = flag maps\mp\gametypes\_gameobjects::getOwnerTeam();
|
||||||
|
|
||||||
|
if ( flagTeam != team && ( flagTeam == "axis" || flagTeam == "allies" ) )
|
||||||
|
{
|
||||||
|
flag.originalUseTime = flag.useTime;
|
||||||
|
flag.useTime *= getDvarFloat( "dom_lastFlagUseTimeMulti" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Submodule userraw/waypoints updated: 9770210fc2...1697dbcb61
@ -1 +0,0 @@
|
|||||||
start "" "%~dp0iw4x.exe" -nosteam -scriptablehttp -console +set r_fullscreen "0" +set sv_lanonly "1" +set r_mode "1024x768" +set drawlagometer "1" +set cg_drawfps "4" +set fs_game "" +set bots_manage_fill "4" +set cg_drawsnapshot "1" +set ui_mapname "mp_rust" +set scr_game_spectatetype "2" +set scr_war_scorelimit "0" +set thereisacow "1" +set sv_cheats "1" +devmap mp_rust
|
|
@ -1 +0,0 @@
|
|||||||
start "" "%~dp0iw4x.exe" -nosteam -scriptablehttp +set r_fullscreen "1" +set sv_lanonly "1" +set r_monitor "0" +set drawlagometer "0" +set cg_drawfps "0" +set cg_drawsnapshot "0" +set r_mode "1920x1080"
|
|
1
z_deploy.bat
Normal file
1
z_deploy.bat
Normal file
@ -0,0 +1 @@
|
|||||||
|
start "" "node" deploy.js
|
@ -1 +0,0 @@
|
|||||||
start "" "%~dp0iw4x.exe" -nosteam -dump -console -scriptablehttp +set sv_lanonly "1" +set r_fullscreen "0" +set fs_game "mods/dev" +set developer "1" +set developer_script "1" +set cg_drawfps "4" +set cg_drawsnapshot "1" +set thereisacow "1" +set sv_cheats "1" +set bots_manage_add "0" +set drawlagometer "1" +set scr_game_spectatetype "2" +set r_mode "1024x768" +devmap mp_rust
|
|
@ -1 +0,0 @@
|
|||||||
start "" "%~dp0iw4x.exe" -nosteam -console -dump -scriptablehttp +set sv_lanonly "1" +set r_fullscreen "0" +set fs_game "mods/dev" +set developer "1" +set developer_script "1" +set cg_drawfps "4" +set cg_drawsnapshot "1" +set thereisacow "1" +set sv_cheats "1" +set drawlagometer "1" +set r_mode "1024x768" +connect 127.0.0.1
|
|
27
z_server.bat
27
z_server.bat
@ -1 +1,26 @@
|
|||||||
start "" "%~dp0iw4x.exe" -dedicated +set sv_lanonly "0" +set net_port "28960" +set fs_game "" +exec server.cfg +map_rotate
|
@echo off
|
||||||
|
::RemoteCONtrol password, needed for most management tools like IW4MADMIN and B3. Do not skip if you installing IW4MADMIN.
|
||||||
|
set rcon_password=
|
||||||
|
::Name of the config file the server should use.
|
||||||
|
set cfg=server.cfg
|
||||||
|
::Name of the server shown in the title of the cmd window. This will NOT bet shown ingame.
|
||||||
|
set name=IW4x Bot Warfare Server
|
||||||
|
::Port used by the server (default: 28960)
|
||||||
|
set port=28960
|
||||||
|
::What ip to bind too
|
||||||
|
set ip=0.0.0.0
|
||||||
|
::Mod name (default "")
|
||||||
|
set mod=
|
||||||
|
::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS!
|
||||||
|
set gamepath=%cd%
|
||||||
|
|
||||||
|
title IW4x MP - %name% - Server restarter
|
||||||
|
echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates!
|
||||||
|
echo Server "%name%" will load "%cfg%" and listen on port "%port%" UDP with IP "%ip%"!
|
||||||
|
echo To shut down the server close this window first!
|
||||||
|
echo (%date%) - (%time%) %name% server start.
|
||||||
|
|
||||||
|
:server
|
||||||
|
start /wait /abovenormal "%name%" "%~dp0iw4x.exe" -dedicated +set sv_lanonly "0" +set net_ip "%ip%" +set net_port "%port%" +set rcon_password "%rcon_password%" +set fs_game "%mod%" +exec "%cfg%" +map_rotate
|
||||||
|
echo (%date%) - (%time%) WARNING: %name% server closed or dropped... server restarts.
|
||||||
|
goto Server
|
||||||
|
@ -1 +1,26 @@
|
|||||||
start "" "%~dp0iw4x.exe" -dedicated +set sv_lanonly "0" +set net_port "28960" +set fs_game "" +exec pvbrust.cfg +map_rotate
|
@echo off
|
||||||
|
::RemoteCONtrol password, needed for most management tools like IW4MADMIN and B3. Do not skip if you installing IW4MADMIN.
|
||||||
|
set rcon_password=
|
||||||
|
::Name of the config file the server should use.
|
||||||
|
set cfg=pvbrust.cfg
|
||||||
|
::Name of the server shown in the title of the cmd window. This will NOT bet shown ingame.
|
||||||
|
set name=IW4x Bot Warfare PvB Rust
|
||||||
|
::Port used by the server (default: 28960)
|
||||||
|
set port=28965
|
||||||
|
::What ip to bind too
|
||||||
|
set ip=0.0.0.0
|
||||||
|
::Mod name (default "")
|
||||||
|
set mod=
|
||||||
|
::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS!
|
||||||
|
set gamepath=%cd%
|
||||||
|
|
||||||
|
title IW4x MP - %name% - Server restarter
|
||||||
|
echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates!
|
||||||
|
echo Server "%name%" will load "%cfg%" and listen on port "%port%" UDP with IP "%ip%"!
|
||||||
|
echo To shut down the server close this window first!
|
||||||
|
echo (%date%) - (%time%) %name% server start.
|
||||||
|
|
||||||
|
:server
|
||||||
|
start /wait /abovenormal "%name%" "%~dp0iw4x.exe" -dedicated +set sv_lanonly "0" +set net_ip "%ip%" +set net_port "%port%" +set rcon_password "%rcon_password%" +set fs_game "%mod%" +exec "%cfg%" +map_rotate
|
||||||
|
echo (%date%) - (%time%) WARNING: %name% server closed or dropped... server restarts.
|
||||||
|
goto Server
|
||||||
|
40
z_server_pvbrust_watchdog.bat
Normal file
40
z_server_pvbrust_watchdog.bat
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
@echo off
|
||||||
|
::Name
|
||||||
|
set name=IW4x Bot Warfare PvB Rust
|
||||||
|
::Exe of the server
|
||||||
|
set server_exe=iw4x.exe
|
||||||
|
::The regex search for the window name of the server
|
||||||
|
set server_title_regex=Bot Warfare Players vs bots 24/7 Rust 10x
|
||||||
|
::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS!
|
||||||
|
set gamepath=%cd%
|
||||||
|
::Rate to check if server is hung
|
||||||
|
set check_rate=300
|
||||||
|
::Server log location
|
||||||
|
set log_path=%gamepath%\userraw\logs\pvbrust
|
||||||
|
set log_file=games_mp.log
|
||||||
|
|
||||||
|
title IW4x MP - %name% - Server watchdog
|
||||||
|
echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates!
|
||||||
|
echo (%date%) - (%time%) %name% server watchdog start.
|
||||||
|
|
||||||
|
::https://superuser.com/questions/699769/batch-file-last-modification-time-with-seconds
|
||||||
|
dir "%log_path%"\"%log_file%" > nul
|
||||||
|
for /f "delims=" %%i in ('"forfiles /p "%log_path%" /m "%log_file%" /c "cmd /c echo @ftime" "') do set modif_time_temp=%%i
|
||||||
|
|
||||||
|
:Server
|
||||||
|
set modif_time=%modif_time_temp%
|
||||||
|
|
||||||
|
timeout /t %check_rate% /nobreak > nul
|
||||||
|
|
||||||
|
dir "%log_path%"\"%log_file%" > nul
|
||||||
|
for /f "delims=" %%i in ('"forfiles /p "%log_path%" /m "%log_file%" /c "cmd /c echo @ftime" "') do set modif_time_temp=%%i
|
||||||
|
|
||||||
|
if "%modif_time_temp%" == "%modif_time%" (
|
||||||
|
echo "(%date%) - (%time%) WARNING: %name% server hung, killing server..."
|
||||||
|
::https://stackoverflow.com/questions/26552368/windows-batch-file-taskkill-if-window-title-contains-text
|
||||||
|
for /f "tokens=2 delims=," %%a in ('
|
||||||
|
tasklist /fi "imagename eq %server_exe%" /v /fo:csv /nh
|
||||||
|
^| findstr /r /c:"%server_title_regex%"
|
||||||
|
') do taskkill /pid %%a /f
|
||||||
|
)
|
||||||
|
goto Server
|
@ -1 +1,26 @@
|
|||||||
start "" "%~dp0iw4x.exe" -dedicated +set sv_lanonly "0" +set net_port "28960" +set fs_game "mods/pvb" +exec pvbvote.cfg +map_rotate
|
@echo off
|
||||||
|
::RemoteCONtrol password, needed for most management tools like IW4MADMIN and B3. Do not skip if you installing IW4MADMIN.
|
||||||
|
set rcon_password=
|
||||||
|
::Name of the config file the server should use.
|
||||||
|
set cfg=pvbvote.cfg
|
||||||
|
::Name of the server shown in the title of the cmd window. This will NOT bet shown ingame.
|
||||||
|
set name=IW4x Bot Warfare PvB Vote
|
||||||
|
::Port used by the server (default: 28960)
|
||||||
|
set port=28966
|
||||||
|
::What ip to bind too
|
||||||
|
set ip=0.0.0.0
|
||||||
|
::Mod name (default "")
|
||||||
|
set mod=mods/pvb
|
||||||
|
::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS!
|
||||||
|
set gamepath=%cd%
|
||||||
|
|
||||||
|
title IW4x MP - %name% - Server restarter
|
||||||
|
echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates!
|
||||||
|
echo Server "%name%" will load "%cfg%" and listen on port "%port%" UDP with IP "%ip%"!
|
||||||
|
echo To shut down the server close this window first!
|
||||||
|
echo (%date%) - (%time%) %name% server start.
|
||||||
|
|
||||||
|
:server
|
||||||
|
start /wait /abovenormal "%name%" "%~dp0iw4x.exe" -dedicated +set sv_lanonly "0" +set net_ip "%ip%" +set net_port "%port%" +set rcon_password "%rcon_password%" +set fs_game "%mod%" +exec "%cfg%" +map_rotate
|
||||||
|
echo (%date%) - (%time%) WARNING: %name% server closed or dropped... server restarts.
|
||||||
|
goto Server
|
||||||
|
40
z_server_pvbvote_watchdog.bat
Normal file
40
z_server_pvbvote_watchdog.bat
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
@echo off
|
||||||
|
::Name
|
||||||
|
set name=IW4x Bot Warfare PvB Vote
|
||||||
|
::Exe of the server
|
||||||
|
set server_exe=iw4x.exe
|
||||||
|
::The regex search for the window name of the server
|
||||||
|
set server_title_regex=Bot Warfare Players vs bots Mapvote 10x
|
||||||
|
::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS!
|
||||||
|
set gamepath=%cd%
|
||||||
|
::Rate to check if server is hung
|
||||||
|
set check_rate=300
|
||||||
|
::Server log location
|
||||||
|
set log_path=%gamepath%\mods\pvb\logs\pvbvote
|
||||||
|
set log_file=games_mp.log
|
||||||
|
|
||||||
|
title IW4x MP - %name% - Server watchdog
|
||||||
|
echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates!
|
||||||
|
echo (%date%) - (%time%) %name% server watchdog start.
|
||||||
|
|
||||||
|
::https://superuser.com/questions/699769/batch-file-last-modification-time-with-seconds
|
||||||
|
dir "%log_path%"\"%log_file%" > nul
|
||||||
|
for /f "delims=" %%i in ('"forfiles /p "%log_path%" /m "%log_file%" /c "cmd /c echo @ftime" "') do set modif_time_temp=%%i
|
||||||
|
|
||||||
|
:Server
|
||||||
|
set modif_time=%modif_time_temp%
|
||||||
|
|
||||||
|
timeout /t %check_rate% /nobreak > nul
|
||||||
|
|
||||||
|
dir "%log_path%"\"%log_file%" > nul
|
||||||
|
for /f "delims=" %%i in ('"forfiles /p "%log_path%" /m "%log_file%" /c "cmd /c echo @ftime" "') do set modif_time_temp=%%i
|
||||||
|
|
||||||
|
if "%modif_time_temp%" == "%modif_time%" (
|
||||||
|
echo "(%date%) - (%time%) WARNING: %name% server hung, killing server..."
|
||||||
|
::https://stackoverflow.com/questions/26552368/windows-batch-file-taskkill-if-window-title-contains-text
|
||||||
|
for /f "tokens=2 delims=," %%a in ('
|
||||||
|
tasklist /fi "imagename eq %server_exe%" /v /fo:csv /nh
|
||||||
|
^| findstr /r /c:"%server_title_regex%"
|
||||||
|
') do taskkill /pid %%a /f
|
||||||
|
)
|
||||||
|
goto Server
|
40
z_server_watchdog.bat
Normal file
40
z_server_watchdog.bat
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
@echo off
|
||||||
|
::Name
|
||||||
|
set name=IW4x Bot Warfare Server
|
||||||
|
::Exe of the server
|
||||||
|
set server_exe=iw4x.exe
|
||||||
|
::The regex search for the window name of the server
|
||||||
|
set server_title_regex=Bot Warfare 24/7 Rust 10x
|
||||||
|
::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS!
|
||||||
|
set gamepath=%cd%
|
||||||
|
::Rate to check if server is hung
|
||||||
|
set check_rate=300
|
||||||
|
::Server log location
|
||||||
|
set log_path=%gamepath%\userraw\logs\server
|
||||||
|
set log_file=games_mp.log
|
||||||
|
|
||||||
|
title IW4x MP - %name% - Server watchdog
|
||||||
|
echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates!
|
||||||
|
echo (%date%) - (%time%) %name% server watchdog start.
|
||||||
|
|
||||||
|
::https://superuser.com/questions/699769/batch-file-last-modification-time-with-seconds
|
||||||
|
dir "%log_path%"\"%log_file%" > nul
|
||||||
|
for /f "delims=" %%i in ('"forfiles /p "%log_path%" /m "%log_file%" /c "cmd /c echo @ftime" "') do set modif_time_temp=%%i
|
||||||
|
|
||||||
|
:Server
|
||||||
|
set modif_time=%modif_time_temp%
|
||||||
|
|
||||||
|
timeout /t %check_rate% /nobreak > nul
|
||||||
|
|
||||||
|
dir "%log_path%"\"%log_file%" > nul
|
||||||
|
for /f "delims=" %%i in ('"forfiles /p "%log_path%" /m "%log_file%" /c "cmd /c echo @ftime" "') do set modif_time_temp=%%i
|
||||||
|
|
||||||
|
if "%modif_time_temp%" == "%modif_time%" (
|
||||||
|
echo "(%date%) - (%time%) WARNING: %name% server hung, killing server..."
|
||||||
|
::https://stackoverflow.com/questions/26552368/windows-batch-file-taskkill-if-window-title-contains-text
|
||||||
|
for /f "tokens=2 delims=," %%a in ('
|
||||||
|
tasklist /fi "imagename eq %server_exe%" /v /fo:csv /nh
|
||||||
|
^| findstr /r /c:"%server_title_regex%"
|
||||||
|
') do taskkill /pid %%a /f
|
||||||
|
)
|
||||||
|
goto Server
|
@ -1 +0,0 @@
|
|||||||
start "" "%~dp0iw4x.exe" -dedicated -console -dump +set sv_lanonly "1" +set fs_game "mods/dev" +set net_port "28960" +set developer "1" +set developer_script "1" +set scr_game_spectatetype "2" scr_war_scorelimit "0" +set thereisacow "1" +set sv_cheats "1" +set logfile "2" +set bots_manage_add "8" +set bots_main_firstIsHost "1" +devmap mp_rust
|
|
Reference in New Issue
Block a user