Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Dev (#4)
Browse files Browse the repository at this point in the history
* Add github CI

* implement force_open, fix warday no weapon config for t's

* move force_open out of debug

* Create pl.json

polish translation

* remove decoy workarounds for colour

* change way expirmental laser timer works

* add force_close

* Include SQL dll

* Only upload necessary files

* Fix miscellaneous typos

* tigthen is_valid checks, fix door control colours

* make get_health return 0 on invalid pawn

* implement warden time, and warden removal override

* add delay before lr can be started to prevent exploits

* fix regression with ct secondary spawn

* remove dead timer

* impl circle for laser test

* Update README.md

* add controller valid check in .slot()

* implement circle marker

* move lr stats, to be general stats

* fix wrong translation used on juggernaut

* add last man standing sound effect

* make set_ammo increase clip size limits

* give 999 bullets from sd gun menu

* Add installation to readme

* show LR name in lr menus when picking option and partner

* start stubbing more windows crashes, add clear_marker command

* update readme

* Prefix css_ on all commands

* Persist alpha

* Block pings

* Return stop?

* Block it too then

* Check warden first

* Check warden first

* Sync dev (#2)

* make sure assister cant leak T killer

* implement basic laser

* use camera z offset for eye pos

* dead mute and warden laser cfg

* update turkish translation: thanks zox

* properly purge laser on round end

---------

Co-authored-by: destoer <[email protected]>

* Require damage for rebel (#3)

* Update CI

---------

Co-authored-by: destoer <[email protected]>
Co-authored-by: kakakolaka <[email protected]>
  • Loading branch information
3 people authored Jan 7, 2024
1 parent a3a6e23 commit e09d373
Show file tree
Hide file tree
Showing 21 changed files with 703 additions and 192 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: .NET Build and Release

on:
push:
branches:
- main
- master
- dev
pull_request:
branches:
- main
- master
- dev

jobs:
build:
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/dotnet/nightly/sdk:7.0

steps:
- uses: actions/checkout@v2

- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet publish --configuration Debug

- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: net7.0-artifacts
path: |
bin/Debug/net7.0/publish/Cs2Jailbreak.deps.json
bin/Debug/net7.0/publish/Cs2Jailbreak.dll
bin/Debug/net7.0/publish/MySqlConnector.dll
bin/Debug/net7.0/publish/Cs2Jailbreak.pdb
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: net7.0-artifacts
path: bin/Debug/net7.0

- name: Create Tag
id: tag_version
run: |
DATE=$(date +'%y.%m.%d-%H%M%S')
echo "RELEASE_TAG=$DATE" >> $GITHUB_ENV
- name: Determine if Pre-release
id: prerelease
run: |
if [ "${{ github.ref }}" != "refs/heads/main" ]; then
echo "IS_PRERELEASE=true" >> $GITHUB_ENV
else
echo "IS_PRERELEASE=false" >> $GITHUB_ENV
fi
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.RELEASE_TAG }}
files: bin/Debug/net7.0/*
prerelease: ${{ env.IS_PRERELEASE }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Cs2Jailbreak
WIP Jailbreak plugin for CS2 expect bugs
WIP Jailbreak plugin for CS2 using counterstrikesharp expect bugs

rewrite of CSS plugin https://github.com/destoer/counter_strike_jailbreak

Expand All @@ -13,6 +13,12 @@ For further config and feature info please see the wiki

https://github.com/destoer/Cs2Jailbreak/wiki

# Installation
Download the latest release from the releases tab and copy it into the counterstrikesharp plugin folder

NOTE: this plugin only operates correctly on linux

windows has a couple of places where a !is_windows() check wraps buggy code

# Warden TODO
Warden Laser and T laser
Expand All @@ -25,7 +31,7 @@ Warden Ring

Player color


Refactor stat API

# LR TODO
Port crash, sumo
Expand All @@ -50,4 +56,4 @@ Call admin
https://github.com/1Mack/CS2-CallAdmin

Roll the dice
https://github.com/Quantor97/CS2-RollTheDice-Plugin
https://github.com/Quantor97/CS2-RollTheDice-Plugin
21 changes: 12 additions & 9 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@
"warden.swap_guard_desc": "Expected usage: !swap_guard <player name>",
"warden.warden_req_alive": "You must be alive to warden",
"warden.warden_req_ct": "You must be a CT to warden",
"warden.warden_taken": "{0} is allready a warden",
"warden.warday_restrict": "You must be a warden to call a warday",
"warden.warden_taken": "{0} is already the warden",
"warden.warday_restrict": "You must be the warden to call a warday",
"warden.warday_usage": "Usage !wd <location> <delay>",
"warden.warday_round_restrict": "You cannot call a warday for another {0} rounds",
"warden.wub_restrict": "You must be a warden to use wub",
"warden.wb_restrict": "You must be a warden to use wb",
"warden.wub_restrict": "You must be the warden to use wub",
"warden.wb_restrict": "You must be the warden to use wb",
"warden.guard_swap": "swapped: {0}",
"warden.took_warden": "{0} is now the warden",
"warden.wcommand": "Type !wcommands to see a full list of warden commands",
"warden.removed": "{0} is no longer the warden",
"warden.ct_gun_menu": "You must be a ct to use the gun menu!",
"warden.gun_menu_disabled": "Gun menu is disabled!",
"warden.no_warden": "Their is no warden",
"warden.time": "Warden has been active for {0} minutes",

"mute.thirty": "All t's are muted for the first 30 seconds",
"mute.speak_quietly": "T's may now speak quietly",
Expand All @@ -32,7 +34,7 @@
"rebel.kill": "{0} killed the rebel {1}",

"block.enable": "Block enabled",
"block.disable": "No block enabled",
"block.disable": "Block disabled",

"sd.fight": "Fight",
"sd.damage_enable": "Please wait {0} seconds for damage be enabled",
Expand Down Expand Up @@ -63,15 +65,16 @@
"sd.tank": "{0} is the tank!",

"lr.rebel_last": "You must be the last player alive to rebel",
"lr.riot_start": "A riot has started CT's have 15 seconds to hide",
"lr.riot_start": "A riot has started! CT's have 15 seconds to hide",
"lr.riot_active": "Riot active",
"lr.cancel": "LR cancelled",
"lr.cancel_admin": "You must be an admin or warden to cancel lr",
"lr.cancel_admin": "You must be an admin or the warden to cancel lr",
"lr.alive": "You must be alive to start an lr",
"lr.in_lr": "You are allready in a lr",
"lr.in_lr": "You are already in an lr",
"lr.req_t": "You must be on T to start an lr",
"lr.too_many": "There are too many t's alive to start an lr {0}",
"lr.player_rebel": "{0} is a rebel!",
"lr.knife_rebel": "{0} is knife a rebel!",
"lr.ready": "Last request is available type !lr",
"lr.ready": "Last request is available! Type !lr",
"lr.wait": "Please wait 15 seconds into the round before starting an lr"
}
77 changes: 77 additions & 0 deletions lang/pl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"warden.remove": "Prowadzacy usuniety",
"warden.warden_command_desc": "!w - wez prowadzacego",
"warden.warday_command_desc": "!wd - rozpocznij warday",
"warden.unwarden_command_desc": "!uw - zrezygnuj z prowadzenia",
"warden.block_command_desc": "!wb - wlacz blokowanie",
"warden.unblock_command_desc": "!wub - wylacz blokowanie",
"warden.remove_warden_command_desc": "!rw - admin zabierz prowadzacego",
"warden.swap_guard_desc": "Uzytek: !swap_guard <nick>",
"warden.warden_req_alive": "Musisz byc zywy aby wziac prowadzacego",
"warden.warden_req_ct": "Musisz byc w CT aby moc prowadzic",
"warden.warden_taken": "{0} juz jest prowadzacy",
"warden.warday_restrict": "Musisz byc prowadzacy aby wlaczyc warday",
"warden.warday_usage": "Uzytek !wd <lokalizacja> <opoznienie>",
"warden.warday_round_restrict": "Nie mozesz wlaczyc warday przez {0} round",
"warden.wub_restrict": "Musisz byc prowadzacym aby uzyc wub",
"warden.wb_restrict": "Musisz byc prowadzacym aby uzyc wb",
"warden.guard_swap": "zamienil: {0}",
"warden.took_warden": "{0} jest prowadzacym",
"warden.wcommand": "Wpisz !wcommands aby zobaczyc pelna liste komend",
"warden.removed": "{0} juz nie jest prowadzacym",
"warden.ct_gun_menu": "Musisz byc w CT aby uzyc menu broni!",
"warden.gun_menu_disabled": "Menu broni wylaczone!",

"mute.thirty": "Wszyscy wiezniowie zmutowani przez pierwsze 30 sekund ",
"mute.speak_quietly": "Wiezniowie moga juz uzywac mikrofonu",
"mute.end_round": "Jestes zmutowany do konca rundy",

"warday.live": "Warday!",
"warday.location": "warday {0}",

"rebel.kill": "{0} zabil wieznia {1}",

"block.enable": "Blokowanie wlaczone",
"block.disable": "Blokowanie wylaczone",

"sd.fight": "Start",
"sd.damage_enable": "Zaczekaj {0} sekund aby wlaczyc zadawanie dmg",
"sd.dodgeball_start": "Dodgeball rozpoczety",
"sd.dodgeball_end": "Dodgeball koniec",
"sd.ffd_start": "Friendly fire rozpoczety",
"sd.ffd_end": "Friendly fire koniec",
"sd.ffd_enable": "Friendly fire wlaczone",
"sd.grenade_start": "Grenade day rozpoczety",
"sd.grenade_end": "Grenade day koniec",
"sd.headshot_start": "Headshot only wlaczony",
"sd.t_hide": "Wiezniowie maja {0} sekund do schowania sie",
"sd.headshot_end": "Headshot only koniec",
"sd.seeker_release": "Straznicy zaczynaja szukac",
"sd.hide_start": "Chowany rozpoczety",
"sd.hide_end": "Koniec chowanego",
"sd.juggernaut_start": "Juggernaut rozpoczety",
"sd.juggernaut_end": "Juggernaut koniec",
"sd.knife_start": "Knife fight rozpoczety",
"sd.knife_end": "Knife fight koniec",
"sd.scout_start": "Scout knife rozpoczety",
"sd.scout_end": "Scout knife koniec",
"sd.spectre_start": "Spectre rozpoczety",
"sd.spectre_end": "Spectre koniec",
"sd.spectre": "{0} jest teraz spectre!",
"sd.tank_start": "Tank day rozpoczety",
"sd.tank_end": "Tank day zakonczony",
"sd.tank": "{0} zostal tankiem!",

"lr.rebel_last": "Musisz byc jako ostatni",
"lr.riot_start": "A riot has started CT's have 15 seconds to hide",
"lr.riot_active": "Zamieszki aktywowane",
"lr.cancel": "Ostatnie zyczenie anulowane",
"lr.cancel_admin": "Musisz byc adminem lub prowadzacym aby scancelowac ostatnie zyczenie",
"lr.alive": "Musisz zyc aby starac sie o ostatnie zyczenie",
"lr.in_lr": "Juz dostales ostatnie zyczenie",
"lr.req_t": "Musisz byc wiezniem aby starac sie o ostatnie zyczenie ",
"lr.too_many": "Nie jestes ostatni aby dostac zyczenie {0}",
"lr.player_rebel": "{0} jest poszukiwany!",
"lr.knife_rebel": "{0} jest poszukiwany!",
"lr.ready": "Aby starac sie o zyczenie wpisz !lr",
}
20 changes: 18 additions & 2 deletions lang/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"warden.removed": "{0} artık komutçu değildir",
"warden.ct_gun_menu": "Silah menüsünü kullanmak için CT takımında olmanız gerekiyor",
"warden.gun_menu_disabled": "Silah menüsü devre dışı",
"warden.no_warden": "Komutçu yok",
"warden.time": "Komutçu {0} dakikadır komutçuluk yapıyor.",

"mute.thirty": "Tüm T'ler ilk 30 saniye için susturuldu",
"mute.speak_quietly": "T'ler sessizce konuşabilir",
Expand Down Expand Up @@ -60,5 +62,19 @@
"sd.spectre": "{0} hayalet olarak seçildi!",
"sd.tank_start": "Tank günü başladı",
"sd.tank_end": "Tank günü bitti",
"sd.tank": "{0} tank olarak bitti!"
}
"sd.tank": "{0} tank olarak bitti!",

"lr.rebel_last": "İsyan atman için hayatta kalan son oyuncu olman gerekiyor!",
"lr.riot_start": "İsyan başlamıştır! CTnin 15 saniye içerisinde saklanması gerekiyor!",
"lr.riot_active": "İsyan aktif",
"lr.cancel": "LR iptal edildi",
"lr.cancel_admin": "Zorla LR iptal etmen için yetkili veya komutçu olman gerekiyor",
"lr.alive": "lr başlatman için hayatta olman gerekiyor",
"lr.in_lr": "Zaten bir LRdesin",
"lr.req_t": "LR başlatmak için T takımında olman gerekiyor",
"lr.too_many": "LR başlatmak için T takımında çok fazla T var {0}",
"lr.player_rebel": "{0} isimli oyuncu bir isyancı!",
"lr.knife_rebel": "{0} bir bıçak isyancı!",
"lr.ready": "LR atabilirsin! LR atmak için !lr yazabilirsin",
"lr.wait": "LR başlatmak için round başladıktan sonra 15 saniye bekleyiniz"
}
19 changes: 5 additions & 14 deletions src/Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,20 @@ public static void nuke(CCSPlayerController? invoke, CommandInfo command)
}
}

[RequiresPermissions("@jail/debug")]
public static void force_open_cmd(CCSPlayerController? invoke, CommandInfo command)
{
Lib.force_open();
}

[RequiresPermissions("@jail/debug")]
public static void test_laser(CCSPlayerController? invoke, CommandInfo command)
{
CCSPlayerPawn? pawn = invoke.pawn();

if(pawn != null && pawn.AbsOrigin != null)
{
Vector end = new Vector(pawn.AbsOrigin.X + 100.0f,pawn.AbsOrigin.Y,pawn.AbsOrigin.Z + 100.0f);
//Vector end = pawn.LookTargetPosition;
Vector mid = new Vector(pawn.AbsOrigin.X,pawn.AbsOrigin.Y,pawn.AbsOrigin.Z);
Lib.draw_marker(mid.X,mid.Y,mid.Z,30.0f);
//invoke.play_sound("sounds/vo/agents/balkan/last_unit_alive_01");
invoke.play_sound("sounds/ambient/vo/agents/sas/lastmanstanding01");
}

if(invoke != null)
{
invoke.PrintToChat($"end: {end.X} {end.Y} {end.Z}");
}

Lib.draw_laser(pawn.AbsOrigin,end,10.0f,2.0f,Lib.CYAN);
}
}

[RequiresPermissions("@jail/debug")]
Expand Down
Loading

0 comments on commit e09d373

Please sign in to comment.