From 4501736b79d40d034c7524d7e9ba9a3bf9bccd9e Mon Sep 17 00:00:00 2001 From: Resxt <55228336+Resxt@users.noreply.github.com> Date: Mon, 27 Feb 2023 14:05:04 +0100 Subject: [PATCH] Remove everything about compiled files Just a refactor that doesn't affect any script or add anything new. Plutonium T6 now supports loading source scripts so compiling them isn't needed anymore https://plutonium.pw/docs/changelog/#r3408 [Refactor] Removed all compiled scripts Moved all source scripts to the main folder instead of a source folder Renamed all source scripts to remove the source tag at the end Removed notions of compiled and source scripts in the repository's README --- README.md | 35 +- mapvote/mapvote.gsc | Bin 20133 -> 33259 bytes mapvote/mapvote_mp_extend.gsc | Bin 668 -> 614 bytes mapvote/mapvote_zm_extend.gsc | Bin 3007 -> 3470 bytes mapvote/source/mapvote-source.gsc | 1146 ------------------- mapvote/source/mapvote_mp_extend-source.gsc | 32 - mapvote/source/mapvote_zm_extend-source.gsc | 154 --- small_scripts/get_player_guid-source.gsc | 24 - small_scripts/get_player_guid.gsc | Bin 513 -> 395 bytes 9 files changed, 2 insertions(+), 1389 deletions(-) delete mode 100644 mapvote/source/mapvote-source.gsc delete mode 100644 mapvote/source/mapvote_mp_extend-source.gsc delete mode 100644 mapvote/source/mapvote_zm_extend-source.gsc delete mode 100644 small_scripts/get_player_guid-source.gsc diff --git a/README.md b/README.md index 7204667..248ea61 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,15 @@ Huge thanks to everyone who helped me learn GSC: Birchy, DoktorSAS, FutureRave a ## How do I download a script? -If you are unsure whether you should download a compiled or a source script, first read [What are compiled and source scripts?](#what-are-compiled-and-source-scripts) - - [Download this repository](https://github.com/Resxt/Plutonium-T6-Scripts/archive/refs/heads/master.zip) - Open the downloaded ZIP file - Drag and drop the script(s) you want in the folder they need to be placed in. -If no instructions are provided for the script you want then simply follow the instructions given in [How do I use a compiled script?](#how-do-i-use-a-compiled-script) +If no instructions are provided for the script you want then simply follow the instructions given in [How do I use a script?](#how-do-i-use-a-script) Just keep in mind that this downloads a copy of this repository at the moment you download it. If a script is updated after you downloaded this repository and you want the new version then you will need to download this repository again. -## How do I use a compiled script? +## How do I use a script? [Follow the instructions in the documentation](https://plutonium.pw/docs/modding/loading-mods/#loading-existing-scripts-on-t6) @@ -30,32 +28,3 @@ If the script should only be loaded for the multiplayer mode then put it in `scr If the script should only be loaded for the zombies mode then put it in `scripts\zm`. Note that you can use `map_restart` in the [console](https://plutonium.pw/docs/opening-console/) to quickly restart your current game and reload scripts. - -## How do I compile a script? - - - -- Download [GSC Tool](https://github.com/xensik/gsc-tool/releases/latest) -- Read the [instructions to compile a file](https://github.com/xensik/gsc-tool#usage) - -It should look similar to this -`gsc-tool.exe comp t6 "C:\Users\Resxt\AppData\Local\Plutonium\storage\t6\scripts\mapvote.gsc"` - -If after opening the file you see that it has a lot of non readable characters this means that it was successfully compiled. - -## What are compiled and source scripts? - -Before downloading a script it's important to understand what compiled and source scripts mean. -A source script is the script in a human readable form (a text file), this is how the script is written. -A compiled script is simply a source script that has been compiled by a compiler to make it readable by the game. -At the time of writing, T6 cannot read source scripts so you have to compile them to allow the game to read them. - -So if you only want to use a script and you don't want to edit it or review its code then -you can simply read [How do I use a compiled script?](#how-do-i-use-a-compiled-script). - -All of my scripts always come as two files: - -- script.gsc (compiled script, ready to be used) -- script-source.gsc (source script, made to read the code and eventually edit it, cannot be read by the game, needs to be compiled) diff --git a/mapvote/mapvote.gsc b/mapvote/mapvote.gsc index 11a6ed8ae809a96e27773e18a3fee329806e251f..91c997bca4fbebad1082609358e778cb2720970b 100644 GIT binary patch literal 33259 zcmd^IX>;2~n*MD43JkYuN{VIKR^nuao}^0FVQXVaE*;5a6`KW-kcgNhxBw_yIsW@T z&)X+}1`k`4o!Zr8WC7^+KDztuM&t1pYv10>&)V-%+t15*oOGi%qgk0v(%CpV|2ldQ zZ2Nl<$zD?Q^K@FK*(B;luah#Gj^eu{FQVJ5Oah1+Xs)w7ilcEnjpE558fSwfip!`R zCQ*Xx>^e%~{xG@$n?AM%8vkJw?aazym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Ed7!_`6B96{$NU_0e+fe%0)b@qWH;4>f}&40+-`!w}y(EU4Xvko4` zyL&f04L$*PFtJh0btza2o&yKLDCRx^q`*C3D|ihY1-aOx1bD%XAO-T+PbJ_H#1Q)I1q#sH&zPnn%j>cRz7sni0tMK2BD$Z$t~HX@HMaH#F@%jAtG?`7m`$vX&-l5vuE61kDQkKqT%YeBB0{(5i|1>OxFru=sJN%$zdv%oN}V6MC2 z@$kdE!cW3`3LWZ0 zcn&e(U&&jJzx*DKz@NZt;o=dz9pF-U13U@d2v3GL!&M_(#>?owGvq_a_aMKC{66x% z$iG28jC?=x?~somKY;w7$VZVMLjDW-jv+fnI*sG-3Gy1TP2NbuI6-kv@`>-Ic+7%XI5kAnZ8>^SNFgipZ5#fGtn{IT#3_?luv9fa%QLvRax7;cA; z!eRJ0oPtln>);RJe}qrN55i~RC*Y6aE%0aX4`9c1-jZ-G{4!hs{|j6MAA(20$KcWM zhj0n}F+2_)c9Eg3fG>h4z$NfR_)2&(JQbb}&w?xAI@k+0!gJso;Tkvu*TZpmA$%*` z2;Y8@LoI_hUQOH}uLJoZ_!jtaI01hLUIRZ1-wE%8?}cB0H^48$8{yaC&G6gsbMQfU zC;V^lZul7dGJF!=51)eHh5rm6f3H7|w%F!z1C3;Y(l#sQzZy<2dHLN}I zdgRf_#+MxGQRE58xyVl;PevYryd8NC@~AHv>Urc#$=eIplXn?;hmbw+Vfd@?QFsD; Y9KH%Z375kk!c*YW@N{&Xg+B)WAG2o$ssI20 diff --git a/mapvote/mapvote_mp_extend.gsc b/mapvote/mapvote_mp_extend.gsc index 174043e01739d9cf7050faca508ca300a186077f..0578e19ca6abdb72f46bb070f66129e6ee374e7c 100644 GIT binary patch literal 614 zcmb7B(Q3mm41Bh~!tJ0qF!llI+vqmR27|q}#dwJ_%p4`yN=q5}_sMPpE$pE)24itL z-JR|nR(_~KwYHDjw%?k8oOg6wO1VZyx{yCoxJKz0pw-@nHIkk)c;68iK>O)oUKCO= zN(AV=t>AgUN>6-Wwgo!&5Vz*rd0*MKEE|W`pMMAI2*SN8%XfS|0iLifmQsvzl=8Be zwJ1JG&TJi5z(i1M4}0(rm!#(45Fwm(O)V~dbOY9pHgZ#;77H~y*!X56<+@JrWP*l( zsnUJ3LKHiQHuGJc+^pyy5>EyUAD9eKlwN1yA3}Q2+n{ literal 668 zcmY*X!Dl>8p&fB%hom= zW!=bHHy;8URX55Uvhmf{G?rw&Wm-ta>xnZ&!5>)XN?oHWiGBYRApgTE+tB%HqNAy3rlZr5`^<8Q%0`Tst29utt<6$t18ZC$ z&1M_?_58&$stUd@?Uz*@TW5Jr-|=h{JaKOut3-DDK8@~O#~ElV>*I_YYY)NHvk{FJ z59HupPw+e7 JZ?MKM@PF$`m@WVS diff --git a/mapvote/mapvote_zm_extend.gsc b/mapvote/mapvote_zm_extend.gsc index c6ca7735b7924b53deef733186bc59250e9d1ff1..b564734730ed5d6e3bacd76e8d2defc8d4c640e0 100644 GIT binary patch literal 3470 zcmcIm-*4MC5Pr7)3eJ0x+thXotPg2Bpg^&q4_gOhPfH4cmS~v?MQSAFz*+mh@4F+V z*h$)#VSy1zW?zpqIsiRi=!cN3kzcz?nB z8y9!16x`rz=(D3=* zh|cPv`}6g0vfsO?RvY6st4@Zf{OT{)ZL|vbZ0hB9WLBpn;_l^>AgIZ^Sf?S zbt)?7D_KXqmr>2n1TTkP-rA~nx5^LwxR^hy*2~RCHRE!))v?}HTcamQWmH{-D197- zdgX6I)yw)uR$j^GFkieWo~?@FM{R2}ATNlqbGAz93|B+cM#saOdjZ4~uDbrJnzo9M zR>yKt{8P;IR+PW0_+c;oM;ps|4!%-WZj72Q7R3xwGp~9hYxT=u>vFVrm-2O0-F4^Z z+9HLW4naG6CeF`4S(uwvE+`}bpM5R97R3{L35-#DWtPXLko1>O;|*b5)LZ2LSb)+| z%!pK_hVc50(BiE~h5-4Xd{_p3r?CF~c@E}e_fmfbeJHge$ydkbO9GwTFS9vP*y%=n zV=Jgw8?9^{^j-(O;c9G+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ft|BLQxy=!_LD7Xucj>|vj5 zSSW%j4h;fp3`tsHs1|H*#GjcSToEVotJ-oNF@I{v>P?Eq*2IY@lY^;KfI-6$37?`l1Cce!_hMFs8fPl_uIqbd?M2qir|_XA2|N{+KBADL7Dp_JqB7Dsg#RxjwXrDIv*lR@4zPN+MY`dqLOD;aES zR6~?%PaEy#W2>6TXdh0j%Wt~N1M6@vr`ph(*0j+IFWmcllB{Pr!jjRpE}x8aIHy|I ztiCu6FP*`UAuZ`+=4Vkxv3fmPDw)<A5(Lq_2E|y*M>=m(uQW}Ppc=X26AH6W(=Z%H~Un+37=3h2H~H@XT+7OcY1HTocT@t2KCFE3~$R% z_x5TUzKzBaEy7QRw-h7V2tFC}V@*Uiz$fW_dFd>JwJAEK_yG82W!JQo;5QH7$)FOw9@DqiGw!2Nfs%UGR;HGwnF|?#M^K+Thx3#C{|4 z(fhy;#k>lBRB_TLz)!~Z*TKJ3T+_~je;4!Lz<*F&*L(3Z?bnz;3VsNg^`Ypiq_H93 zN#y3&q7}UJO|7I&jSa5UjesijIIDnz-zz&cpbP8 z>$iaWfqw%J0Cm)N7}x=v1aOCP2iKj?gVNDE>193 z0WMEy>>%(R$j*e$egY0+-v-D4?y8VzVOL;FN*%HSauM 0 && GetDvarInt("mapvote_limits_modes") == 0) - { - voteLimits = GetVoteLimits(GetDvarInt("mapvote_limits_maps"), modesArray.size); - } - else if (GetDvarInt("mapvote_limits_maps") == 0 && GetDvarInt("mapvote_limits_modes") > 0) - { - voteLimits = GetVoteLimits(mapsArray.size, GetDvarInt("mapvote_limits_modes")); - } - else - { - voteLimits = GetVoteLimits(GetDvarInt("mapvote_limits_maps"), GetDvarInt("mapvote_limits_modes")); - } - - level.mapvote["limit"]["maps"] = voteLimits["maps"]; - level.mapvote["limit"]["modes"] = voteLimits["modes"]; - } - else - { - if (GetDvarInt("mapvote_limits_maps") == 0) - { - level.mapvote["limit"]["maps"] = GetVoteLimits(mapsArray.size); - } - else - { - level.mapvote["limit"]["maps"] = GetVoteLimits(GetDvarInt("mapvote_limits_maps")); - } - } - - SetMapvoteData("map"); - - if (IsMultiplayerMode()) - { - SetMapvoteData("mode"); - } - - level.mapvote["vote"]["maps"] = []; - level.mapvote["vote"]["modes"] = []; - level.mapvote["hud"]["maps"] = []; - level.mapvote["hud"]["modes"] = []; -} - - - -/* Player section */ - -/* -This is used instead of notifyonplayercommand("mapvote_up", "speed_throw") -to fix an issue where players using toggle ads would have to press right click twice for it to register one right click. -With this instead it keeps scrolling every 0.25s until they right click again which is a better user experience -*/ -ListenForRightClick() -{ - self endon("disconnect"); - - while (true) - { - if (self AdsButtonPressed()) - { - self notify("mapvote_up"); - wait 0.25; - } - - wait 0.05; - } -} - -ListenForVoteInputs() -{ - self endon("disconnect"); - - self thread ListenForRightClick(); - - self notifyonplayercommand("mapvote_down", "+attack"); - self notifyonplayercommand("mapvote_select", "+gostand"); - self notifyonplayercommand("mapvote_unselect", "+usereload"); - self notifyonplayercommand("mapvote_unselect", "+activate"); - - if (GetDvarInt("mapvote_debug")) - { - self notifyonplayercommand("mapvote_debug", "+melee"); - } - - while(true) - { - input = self waittill_any_return("mapvote_down", "mapvote_up", "mapvote_select", "mapvote_unselect", "mapvote_debug"); - - section = self.mapvote["vote_section"]; - - if (section == "end" && input != "mapvote_unselect" && input != "mapvote_debug") - { - continue; // stop/skip execution - } - else if (section == "mode" && level.mapvote["modes"]["by_index"].size <= 1 && input != "mapvote_unselect" && input != "mapvote_debug") - { - continue; // stop/skip execution - } - - if (input == "mapvote_down") - { - if (self.mapvote[section]["hovered_index"] < (level.mapvote[section + "s"]["by_index"].size - 1)) - { - if (GetDvarInt("mapvote_sounds_menu_enabled")) - { - self playlocalsound("uin_start_count_down"); - } - - self UpdateSelection(section, (self.mapvote[section]["hovered_index"] + 1)); - } - } - else if (input == "mapvote_up") - { - if (self.mapvote[section]["hovered_index"] > 0) - { - if (GetDvarInt("mapvote_sounds_menu_enabled")) - { - self playlocalsound("uin_start_count_down"); - } - - self UpdateSelection(section, (self.mapvote[section]["hovered_index"] - 1)); - } - } - else if (input == "mapvote_select") - { - if (GetDvarInt("mapvote_sounds_menu_enabled")) - { - self playlocalsound("mpl_killconfirm_tags_pickup"); - } - - self ConfirmSelection(section); - } - else if (input == "mapvote_unselect") - { - if (section != "map") - { - if (GetDvarInt("mapvote_sounds_menu_enabled")) - { - self playlocalsound("fly_betty_jump"); - } - - self CancelSelection(section); - } - } - else if (input == "mapvote_debug" && GetDvarInt("mapvote_debug")) - { - Print("--------------------------------"); - - foreach (player in GetHumanPlayers()) - { - if (player.mapvote["map"]["selected_index"] == -1) - { - Print(player.name + " did not vote for any map"); - } - else - { - mapName = ""; - - if (IsMultiplayerMode()) - { - mapName = level.mapvote["maps"]["by_index"][player.mapvote["map"]["selected_index"]]; - } - else - { - mapName = level.mapvote["maps"]["by_index"][player.mapvote["map"]["selected_index"]][0]; - } - - Print(player.name + " voted for map [" + player.mapvote["map"]["selected_index"] +"] " + mapName); - } - - if (IsMultiplayerMode()) - { - if (player.mapvote["mode"]["selected_index"] == -1) - { - Print(player.name + " did not vote for any mode"); - } - else - { - Print(player.name + " voted for mode [" + player.mapvote["mode"]["selected_index"] + "] " + level.mapvote["modes"]["by_index"][player.mapvote["mode"]["selected_index"]]); - } - } - } - } - - wait 0.05; - } -} - -OnPlayerDisconnect() -{ - self waittill("disconnect"); - - if (self.mapvote["map"]["selected_index"] != -1) - { - level.mapvote["vote"]["maps"][self.mapvote["map"]["selected_index"]] = (level.mapvote["vote"]["maps"][self.mapvote["map"]["selected_index"]] - 1); - level.mapvote["hud"]["maps"][self.mapvote["map"]["selected_index"]] SetValue(level.mapvote["vote"]["maps"][self.mapvote["map"]["selected_index"]]); - } - - if (self.mapvote["mode"]["selected_index"] != -1) - { - level.mapvote["vote"]["modes"][self.mapvote["mode"]["selected_index"]] = (level.mapvote["vote"]["modes"][self.mapvote["mode"]["selected_index"]] - 1); - level.mapvote["hud"]["modes"][self.mapvote["mode"]["selected_index"]] SetValue(level.mapvote["vote"]["modes"][self.mapvote["mode"]["selected_index"]]); - } -} - - -/* Vote section */ - -CreateVoteMenu() -{ - spacing = 20; - hudLastPosY = 0; - - if (IsMultiplayerMode()) - { - sectionsSeparation = 0; - - if (level.mapvote["modes"]["by_index"].size > 1) - { - sectionsSeparation = 1; - } - - hudLastPosY = -((((level.mapvote["maps"]["by_index"].size + level.mapvote["modes"]["by_index"].size + sectionsSeparation) * spacing) / 2) - (spacing / 2)); - } - else - { - hudLastPosY = -(((level.mapvote["maps"]["by_index"].size * spacing) / 2) - (spacing / 2)); - } - - for (mapIndex = 0; mapIndex < level.mapvote["maps"]["by_index"].size; mapIndex++) - { - mapVotesHud = CreateHudText("", "objective", 1.5, "LEFT", "CENTER", GetDvarInt("mapvote_horizontal_spacing"), hudLastPosY, true, 0); - mapVotesHud.color = GetGscColor(GetDvar("mapvote_colors_selected")); - - level.mapvote["hud"]["maps"][mapIndex] = mapVotesHud; - - foreach (player in GetHumanPlayers()) - { - mapName = ""; - - if (IsMultiplayerMode()) - { - mapName = level.mapvote["maps"]["by_index"][mapIndex]; - } - else - { - mapName = level.mapvote["maps"]["by_index"][mapIndex][0]; - } - - player.mapvote["map"][mapIndex]["hud"] = player CreateHudText(mapName, "objective", 1.5, "LEFT", "CENTER", -(GetDvarInt("mapvote_horizontal_spacing")), hudLastPosY); - - if (mapIndex == 0) - { - player UpdateSelection("map", 0); - } - else - { - SetElementUnselected(player.mapvote["map"][mapIndex]["hud"]); - } - } - - hudLastPosY += spacing; - } - - if (IsMultiplayerMode() && level.mapvote["modes"]["by_index"].size > 1) - { - hudLastPosY += spacing; // Space between maps and modes sections - - for (modeIndex = 0; modeIndex < level.mapvote["modes"]["by_index"].size; modeIndex++) - { - modeVotesHud = CreateHudText("", "objective", 1.5, "LEFT", "CENTER", GetDvarInt("mapvote_horizontal_spacing"), hudLastPosY, true, 0); - modeVotesHud.color = GetGscColor(GetDvar("mapvote_colors_selected")); - - level.mapvote["hud"]["modes"][modeIndex] = modeVotesHud; - - foreach (player in GetHumanPlayers()) - { - player.mapvote["mode"][modeIndex]["hud"] = player CreateHudText(level.mapvote["modes"]["by_index"][modeIndex], "objective", 1.5, "LEFT", "CENTER", -(GetDvarInt("mapvote_horizontal_spacing")), hudLastPosY); - - SetElementUnselected(player.mapvote["mode"][modeIndex]["hud"]); - } - - hudLastPosY += spacing; - } - } - - foreach(player in GetHumanPlayers()) - { - player.mapvote["map"]["selected_index"] = -1; - player.mapvote["mode"]["selected_index"] = -1; - - buttonsHelpMessage = ""; - - if (GetDvar("mapvote_colors_help_accent_mode") == "standard") - { - buttonsHelpMessage = GetChatColor(GetDvar("mapvote_colors_help_text")) + "Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+attack}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to go down - Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+speed_throw}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to go up - Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+gostand}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to select - Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+activate}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to undo"; - } - else if(GetDvar("mapvote_colors_help_accent_mode") == "max") - { - buttonsHelpMessage = GetChatColor(GetDvar("mapvote_colors_help_text")) + "Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+attack}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to go " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "down " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "- Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+speed_throw}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to go " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "up " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "- Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+gostand}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "select " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "- Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+activate}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "undo"; - } - - if (GetDvarInt("mapvote_debug")) - { - if (GetDvar("mapvote_colors_help_accent_mode") == "standard") - { - buttonsHelpMessage = buttonsHelpMessage + " - Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+melee}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to debug"; - } - else if(GetDvar("mapvote_colors_help_accent_mode") == "max") - { - buttonsHelpMessage = buttonsHelpMessage + GetChatColor(GetDvar("mapvote_colors_help_text")) + " - Press " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "[{+melee}] " + GetChatColor(GetDvar("mapvote_colors_help_text")) + "to " + GetChatColor(GetDvar("mapvote_colors_help_accent")) + "debug"; - } - } - - player CreateHudText(buttonsHelpMessage, "objective", 1.5, "CENTER", "CENTER", 0, 210); - } -} - -CreateVoteTimer() -{ - soundFX = spawn("script_origin", (0,0,0)); - soundFX hide(); - - timerhud = CreateTimer(GetDvarInt("mapvote_vote_time"), &"Vote ends in: ", "objective", 1.5, "CENTER", "CENTER", 0, -210); - timerhud.color = GetGscColor(GetDvar("mapvote_colors_timer")); - for (i = GetDvarInt("mapvote_vote_time"); i > 0; i--) - { - if(i <= 5) - { - timerhud.color = GetGscColor(GetDvar("mapvote_colors_timer_low")); - - if (GetDvarInt("mapvote_sounds_timer_enabled")) - { - soundFX playSound( "mpl_ui_timer_countdown" ); - } - } - wait(1); - } - level notify("mapvote_vote_end"); -} - -StartVote() -{ - level endon("end_game"); - - for (i = 0; i < level.mapvote["maps"]["by_index"].size; i++) - { - level.mapvote["vote"]["maps"][i] = 0; - } - - if (IsMultiplayerMode()) - { - for (i = 0; i < level.mapvote["modes"]["by_index"].size; i++) - { - level.mapvote["vote"]["modes"][i] = 0; - } - } - - level thread CreateVoteMenu(); - level thread CreateVoteTimer(); - - foreach (player in GetHumanPlayers()) - { - player FreezeControlsAllowLook(1); - player SetBlur(GetDvarInt("mapvote_blur_level"), GetDvarInt("mapvote_blur_fade_in_time")); - - player thread ListenForVoteInputs(); - player thread OnPlayerDisconnect(); - } -} - -ListenForEndVote() -{ - level endon("end_game"); - level waittill("mapvote_vote_end"); - - mostVotedMapIndex = 0; - mostVotedMapVotes = 0; - mostVotedModeIndex = 0; - mostVotedModeVotes = 0; - - foreach (mapIndex in GetArrayKeys(level.mapvote["vote"]["maps"])) - { - if (level.mapvote["vote"]["maps"][mapIndex] > mostVotedMapVotes) - { - mostVotedMapIndex = mapIndex; - mostVotedMapVotes = level.mapvote["vote"]["maps"][mapIndex]; - } - } - - foreach (modeIndex in GetArrayKeys(level.mapvote["vote"]["modes"])) - { - if (level.mapvote["vote"]["modes"][modeIndex] > mostVotedModeVotes) - { - mostVotedModeIndex = modeIndex; - mostVotedModeVotes = level.mapvote["vote"]["modes"][modeIndex]; - } - } - - if (mostVotedMapVotes == 0) - { - mostVotedMapIndex = GetRandomElementInArray(GetArrayKeys(level.mapvote["vote"]["maps"])); - - if (GetDvarInt("mapvote_debug")) - { - Print("[MAPVOTE] No vote for map. Chosen random map index: " + mostVotedMapIndex); - } - } - else - { - if (GetDvarInt("mapvote_debug")) - { - Print("[MAPVOTE] Most voted map has " + mostVotedMapVotes + " votes. Most voted map index: " + mostVotedMapIndex); - } - } - - if (mostVotedModeVotes == 0) - { - mostVotedModeIndex = GetRandomElementInArray(GetArrayKeys(level.mapvote["vote"]["modes"])); - - if (GetDvarInt("mapvote_debug")) - { - Print("[MAPVOTE] No vote for mode. Chosen random mode index: " + mostVotedModeIndex); - } - } - else - { - if (GetDvarInt("mapvote_debug")) - { - Print("[MAPVOTE] Most voted mode has " + mostVotedModeVotes + " votes. Most voted mode index: " + mostVotedModeIndex); - } - } - - modeName = ""; - modeCfg = ""; - mapName = ""; - - if (IsMultiplayerMode()) - { - modeName = level.mapvote["modes"]["by_index"][mostVotedModeIndex]; - modeCfg = level.mapvote["modes"]["by_name"][level.mapvote["modes"]["by_index"][mostVotedModeIndex]]; - mapName = GetMapCodeName(level.mapvote["maps"]["by_index"][mostVotedMapIndex]); - } - else - { - modeCfg = level.mapvote["maps"]["by_index"][mostVotedMapIndex][2]; - mapName = GetMapCodeName(level.mapvote["maps"]["by_index"][mostVotedMapIndex][1]); - } - - if (GetDvarInt("mapvote_debug")) - { - Print("[MAPVOTE] mapName: " + mapName); - Print("[MAPVOTE] modeName: " + modeName); - Print("[MAPVOTE] modeCfg: " + modeCfg); - Print("[MAPVOTE] Rotating to " + mapName + " | " + modeName + " (" + modeCfg + ".cfg)"); - } - - DoRotation(modeCfg, mapName); -} - -SetMapvoteData(type) -{ - limit = level.mapvote["limit"][type + "s"]; - - availableElements = StrTok(GetDvar("mapvote_" + type + "s"), ":"); - - if (availableElements.size < limit) - { - limit = availableElements.size; - } - - if (type == "map") - { - if (IsMultiplayerMode()) - { - level.mapvote["maps"]["by_index"] = GetRandomUniqueElementsInArray(availableElements, limit); - } - else - { - zombiesArrays = GetRandomUniqueElementsInArray(availableElements, limit); - - level.mapvote["maps"]["by_index"] = []; - - foreach (element in zombiesArrays) - { - splittedElement = StrTok(element, ","); - level.mapvote["maps"]["by_index"] = AddElementToArray(level.mapvote["maps"]["by_index"], array(splittedElement[0], splittedElement[1], splittedElement[2])); - } - } - } - else if (type == "mode") - { - finalElements = []; - - foreach (mode in GetRandomUniqueElementsInArray(availableElements, limit)) - { - splittedMode = StrTok(mode, ","); - finalElements = AddElementToArray(finalElements, splittedMode[0]); - - level.mapvote["modes"]["by_name"][splittedMode[0]] = splittedMode[1]; - } - - level.mapvote["modes"]["by_index"] = finalElements; - } -} - -/* -Gets the amount of maps and modes to display on screen -This is used to get default values if the limits dvars are not set -It will dynamically adjust the amount of maps and modes to show -*/ -GetVoteLimits(mapsAmount, modesAmount) -{ - maxLimit = GetDvarInt("mapvote_limits_max"); - limits = []; - - if (!IsDefined(modesAmount)) - { - if (mapsAmount <= maxLimit) - { - return mapsAmount; - } - else - { - return maxLimit; - } - } - - if ((mapsAmount + modesAmount) <= maxLimit) - { - limits["maps"] = mapsAmount; - limits["modes"] = modesAmount; - } - else - { - if (mapsAmount >= (maxLimit / 2) && modesAmount >= (maxLimit)) - { - limits["maps"] = (maxLimit / 2); - limits["modes"] = (maxLimit / 2); - } - else - { - if (mapsAmount > (maxLimit / 2)) - { - finalMapsAmount = 0; - - if (modesAmount <= 1) - { - limits["maps"] = maxLimit; - } - else - { - limits["maps"] = (maxLimit - modesAmount); - } - - limits["modes"] = modesAmount; - } - else if (modesAmount > (maxLimit / 2)) - { - limits["maps"] = mapsAmount; - limits["modes"] = (maxLimit - mapsAmount); - } - } - } - - return limits; -} - -ShouldRotateDefault() -{ - humanPlayersCount = GetHumanPlayers().size; - - if (GetDvarInt("mapvote_default_rotation_max_players") > 0 && humanPlayersCount >= GetDvarInt("mapvote_default_rotation_min_players") && humanPlayersCount <= GetDvarInt("mapvote_default_rotation_max_players")) - { - return true; - } - - return false; -} - -RotateDefault() -{ - mapName = ""; - modeCfg = ""; - - if (IsMultiplayerMode()) - { - modeCfg = GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_modes"), ":")); - mapName = GetMapCodeName(GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_maps"), ":"))); - } - else - { - data = GetRandomElementInArray(StrTok(GetDvar("mapvote_default_rotation_maps"), ":")); - dataSplitted = StrTok(data, ","); - - modeCfg = dataSplitted[1]; - mapName = GetMapCodeName(dataSplitted[0]); - } - - DoRotation(modeCfg, mapName); -} - -DoRotation(modeCfg, mapName) -{ - SetDvar("sv_maprotationcurrent", "exec " + modeCfg + ".cfg map " + mapName); - SetDvar("sv_maprotation", "exec " + modeCfg + ".cfg map " + mapName); -} - -StartRotation() -{ - if (ShouldRotateDefault()) - { - RotateDefault(); - } - else - { - StartVote(); - ListenForEndVote(); - } -} - - - -/* HUD section */ - -UpdateSelection(type, index) -{ - if (type == "map" || type == "mode") - { - if (!IsDefined(self.mapvote[type]["hovered_index"])) - { - self.mapvote[type]["hovered_index"] = 0; - } - - self.mapvote["vote_section"] = type; - - SetElementUnselected(self.mapvote[type][self.mapvote[type]["hovered_index"]]["hud"]); // Unselect previous element - SetElementSelected(self.mapvote[type][index]["hud"]); // Select new element - - self.mapvote[type]["hovered_index"] = index; // Update the index - } - else if (type == "end") - { - self.mapvote["vote_section"] = "end"; - } -} - -ConfirmSelection(type) -{ - self.mapvote[type]["selected_index"] = self.mapvote[type]["hovered_index"]; - level.mapvote["vote"][type + "s"][self.mapvote[type]["selected_index"]] = (level.mapvote["vote"][type + "s"][self.mapvote[type]["selected_index"]] + 1); - level.mapvote["hud"][type + "s"][self.mapvote[type]["selected_index"]] SetValue(level.mapvote["vote"][type + "s"][self.mapvote[type]["selected_index"]]); - - if (type == "map") - { - modeIndex = 0; - - if (IsDefined(self.mapvote["mode"]["hovered_index"])) - { - modeIndex = self.mapvote["mode"]["hovered_index"]; - } - - self UpdateSelection("mode", modeIndex); - } - else if (type == "mode") - { - self UpdateSelection("end"); - } -} - -CancelSelection(type) -{ - typeToCancel = ""; - - if (type == "mode") - { - typeToCancel = "map"; - } - else if (type == "end") - { - typeToCancel = "mode"; - } - - level.mapvote["vote"][typeToCancel + "s"][self.mapvote[typeToCancel]["selected_index"]] = (level.mapvote["vote"][typeToCancel + "s"][self.mapvote[typeToCancel]["selected_index"]] - 1); - level.mapvote["hud"][typeToCancel + "s"][self.mapvote[typeToCancel]["selected_index"]] SetValue(level.mapvote["vote"][typeToCancel + "s"][self.mapvote[typeToCancel]["selected_index"]]); - - self.mapvote[typeToCancel]["selected_index"] = -1; - - if (type == "mode") - { - SetElementUnselected(self.mapvote["mode"][self.mapvote["mode"]["hovered_index"]]["hud"]); - self.mapvote["vote_section"] = "map"; - } - else if (type == "end") - { - self.mapvote["vote_section"] = "mode"; - } -} - -SetElementSelected(element) -{ - element.color = GetGscColor(GetDvar("mapvote_colors_selected")); -} - -SetElementUnselected(element) -{ - element.color = GetGscColor(GetDvar("mapvote_colors_unselected")); -} - -CreateHudText(text, font, fontScale, relativeToX, relativeToY, relativeX, relativeY, isServer, value) -{ - hudText = ""; - - if (IsDefined(isServer) && isServer) - { - hudText = CreateServerFontString( font, fontScale ); - } - else - { - hudText = CreateFontString( font, fontScale ); - } - - if (IsDefined(value)) - { - hudText.label = text; - hudText SetValue(value); - } - else - { - hudText SetText(text); - } - - hudText SetPoint(relativeToX, relativeToY, relativeX, relativeY); - - hudText.hideWhenInMenu = 1; - hudText.glowAlpha = 0; - - return hudText; -} - -CreateTimer(time, label, font, fontScale, relativeToX, relativeToY, relativeX, relativeY) -{ - timer = createServerTimer(font, fontScale); - timer setpoint(relativeToX, relativeToY, relativeX, relativeY); - timer.label = label; - timer.hideWhenInMenu = 1; - timer.glowAlpha = 0; - timer setTimer(time); - - return timer; -} - - - -/* Utils section */ - -SetDvarIfNotInitialized(dvar, value) -{ - if (!IsInitialized(dvar)) - { - SetDvar(dvar, value); - } -} - -IsInitialized(dvar) -{ - result = GetDvar(dvar); - return result != ""; -} - -IsBot() -{ - return IsDefined(self.pers["isBot"]) && self.pers["isBot"]; -} - -IsMultiplayerMode() -{ - return !IsDefined(level.zombiemode) || !level.zombiemode; -} - -GetHumanPlayers() -{ - humanPlayers = []; - - foreach (player in level.players) - { - if (!player IsBot()) - { - humanPlayers = AddElementToArray(humanPlayers, player); - } - } - - return humanPlayers; -} - -GetRandomElementInArray(array) -{ - return array[GetArrayKeys(array)[randomint(array.size)]]; -} - -GetRandomUniqueElementsInArray(array, limit) -{ - finalElements = []; - - for (i = 0; i < limit; i++) - { - findElement = true; - - while (findElement) - { - randomElement = GetRandomElementInArray(array); - - if (!ArrayContainsValue(finalElements, randomElement)) - { - finalElements = AddElementToArray(finalElements, randomElement); - - findElement = false; - } - } - } - - return finalElements; -} - -ArrayContainsValue(array, valueToFind) -{ - if (array.size == 0) - { - return false; - } - - foreach (value in array) - { - if (value == valueToFind) - { - return true; - } - } - - return false; -} - -AddElementToArray(array, element) -{ - array[array.size] = element; - return array; -} - -GetMapCodeName(mapName) -{ - formattedMapName = ToUpper(mapName); - - if (IsMultiplayerMode()) - { - switch(formattedMapName) - { - case "NUKETOWN": - return "mp_nuketown_2020"; - - case "HIJACKED": - return "mp_hijacked"; - - case "MELTDOWN": - return "mp_meltdown"; - - case "EXPRESS": - return "mp_express"; - - case "CARRIER": - return "mp_carrier"; - - case "OVERFLOW": - return "mp_overflow"; - - case "SLUMS": - return "mp_slums"; - - case "AFTERMATH": - return "mp_la"; - - case "CARGO": - return "mp_dockside"; - - case "TURBINE": - return "mp_turbine"; - - case "DRONE": - return "mp_drone"; - - case "RAID": - return "mp_raid"; - - case "STANDOFF": - return "mp_village"; - - case "PLAZA": - return "mp_nightclub"; - - case "YEMEN": - return "mp_socotra"; - - case "UPLINK": - return "mp_uplink"; - - case "DETOUR": - return "mp_bridge"; - - case "COVE": - return "mp_castaway"; - - case "RUSH": - return "mp_paintball"; - - case "STUDIO": - return "mp_studio"; - - case "MAGMA": - return "mp_magma"; - - case "VERTIGO": - return "mp_vertigo"; - - case "ENCORE": - return "mp_concert"; - - case "DOWNHILL": - return "mp_downhill"; - - case "GRIND": - return "mp_skate"; - - case "HYDRO": - return "mp_hydro"; - - case "MIRAGE": - return "mp_mirage"; - - case "FROST": - return "mp_frostbite"; - - case "TAKEOFF": - return "mp_takeoff"; - - case "POD": - return "mp_pod"; - - case "DIG": - return "mp_dig"; - } - } - else - { - switch(formattedMapName) - { - case "BURIED": - return "zm_buried"; - - case "DIE RISE": - return "zm_highrise"; - - case "MOB OF THE DEAD": - return "zm_prison"; - - case "NUKETOWN": - return "zm_nuked"; - - case "ORIGINS": - return "zm_tomb"; - - case "TRANZIT": - case "FARM": - case "TOWN": - case "BUS DEPOT": - return "zm_transit"; - - case "DINER": - return "zm_transit_dr"; - } - } -} - -GetGscColor(colorName) -{ - switch (colorName) - { - case "red": - return (1, 0, 0.059); - - case "green": - return (0.549, 0.882, 0.043); - - case "yellow": - return (1, 0.725, 0); - - case "blue": - return (0, 0.553, 0.973); - - case "cyan": - return (0, 0.847, 0.922); - - case "purple": - return (0.427, 0.263, 0.651); - - case "white": - return (1, 1, 1); - - case "grey": - case "gray": - return (0.137, 0.137, 0.137); - - case "black": - return (0, 0, 0); - } -} - -GetChatColor(colorName) -{ - switch(colorName) - { - case "red": - return "^1"; - - case "green": - return "^2"; - - case "yellow": - return "^3"; - - case "blue": - return "^4"; - - case "cyan": - return "^5"; - - case "purple": - return "^6"; - - case "white": - return "^7"; - - case "grey": - return "^0"; - - case "black": - return "^0"; - } -} \ No newline at end of file diff --git a/mapvote/source/mapvote_mp_extend-source.gsc b/mapvote/source/mapvote_mp_extend-source.gsc deleted file mode 100644 index 0578e19..0000000 --- a/mapvote/source/mapvote_mp_extend-source.gsc +++ /dev/null @@ -1,32 +0,0 @@ -#include maps\mp\_utility; - -Init() -{ - if (GetDvarInt("mapvote_enable")) - { - replaceFunc(maps\mp\gametypes\_killcam::finalkillcamwaiter, ::OnKillcamEnd); - } -} - -OnKillcamEnd() -{ - if (!IsDefined(level.finalkillcam_winner)) - { - if (isRoundBased() && !wasLastRound()) - return false; - - wait GetDvarInt("mapvote_display_wait_time"); - [[level.mapvote_rotate_function]](); - - return false; - } - - level waittill("final_killcam_done"); - if (isRoundBased() && !wasLastRound()) - return true; - - wait GetDvarInt("mapvote_display_wait_time"); - [[level.mapvote_rotate_function]](); - - return true; -} \ No newline at end of file diff --git a/mapvote/source/mapvote_zm_extend-source.gsc b/mapvote/source/mapvote_zm_extend-source.gsc deleted file mode 100644 index b564734..0000000 --- a/mapvote/source/mapvote_zm_extend-source.gsc +++ /dev/null @@ -1,154 +0,0 @@ -/* -All the credits for this script go to DoktorSAS for both the source code and for helping me figuring this out -https://github.com/DoktorSAS/PlutoniumT6Mapvote/blob/master/Zombies/mapvote.gsc - -menuSounds = array("zmb_meteor_activate", "zmb_spawn_powerup", "zmb_powerup_grabbed", "zmb_switch_flip", "zmb_elec_start", "zmb_perks_packa_ready"); -*/ - -#include common_scripts\utility; -#include maps\mp\_utility; - -Init() -{ - if (GetDvarInt("mapvote_enable")) - { - replaceFunc(maps\mp\zombies\_zm::intermission, ::OnIntermissionStart); - } -} - -OnIntermissionStart() -{ - level.intermission = 1; - level notify("intermission"); - - for (i = 0; i < level.players.size; i++) - { - level.players[i] thread player_intermission(); - level.players[i] hide(); - level.players[i] setclientuivisibilityflag("hud_visible", 0); - - level.players[i] setclientthirdperson(0); - level.players[i].health = 100; - level.players[i] stopsounds(); - level.players[i] stopsounds(); - } - - wait GetDvarInt("mapvote_display_wait_time"); - - [[level.mapvote_rotate_function]](); - - for (i = 0; i < level.players.size; i++) - { - level.players[i] notify("_zombie_game_over"); - level.players[i].sessionstate = "intermission"; - } - - players = get_players(); - i = 0; - while (i < players.size) - { - setclientsysstate("levelNotify", "zi", players[i]); - i++; - } - wait 0.25; - players = get_players(); - i = 0; - while (i < players.size) - { - setclientsysstate("lsm", "0", players[i]); - i++; - } - level thread maps\mp\zombies\_zm::zombie_game_over_death(); -} - -player_intermission() -{ - self closemenu(); - self closeingamemenu(); - - level endon("stop_intermission"); - self endon("disconnect"); - self endon("death"); - - self.score = self.score_total; - - self.spectatorclient = -1; - self.killcamentity = -1; - self.archivetime = 0; - self.psoffsettime = 0; - self.friendlydamage = undefined; - points = getstructarray("intermission", "targetname"); - if (!isDefined(points) || points.size == 0) - { - points = getentarray("info_intermission", "classname"); - - location = getDvar("ui_zm_mapstartlocation"); - for(i = 0;i < points.size;i++) - { - if(points[i].script_string == location) - { - points = points[i]; - } - } - - if (points.size < 1) - { - return; - } - } - if (isdefined(self.game_over_bg)) - self.game_over_bg destroy(); - org = undefined; - while (1) - { - points = array_randomize(points); - i = 0; - while (i < points.size) - { - point = points[i]; - if (!isDefined(org)) - { - self spawn(point.origin, point.angles); - } - if (isDefined(points[i].target)) - { - if (!isDefined(org)) - { - org = spawn("script_model", self.origin + vectorScale((0, 0, -1), 60)); - org setmodel("tag_origin"); - } - org.origin = points[i].origin; - org.angles = points[i].angles; - j = 0; - while (j < get_players().size) - { - player = get_players()[j]; - player camerasetposition(org); - player camerasetlookat(); - player cameraactivate(1); - j++; - } - speed = 20; - if (isDefined(points[i].speed)) - { - speed = points[i].speed; - } - target_point = getstruct(points[i].target, "targetname"); - dist = distance(points[i].origin, target_point.origin); - time = dist / speed; - q_time = time * 0.25; - if (q_time > 1) - { - q_time = 1; - } - org moveto(target_point.origin, time, q_time, q_time); - org rotateto(target_point.angles, time, q_time, q_time); - wait(time - q_time); - wait q_time; - i++; - continue; - } - i++; - } - } -} \ No newline at end of file diff --git a/small_scripts/get_player_guid-source.gsc b/small_scripts/get_player_guid-source.gsc deleted file mode 100644 index de073d8..0000000 --- a/small_scripts/get_player_guid-source.gsc +++ /dev/null @@ -1,24 +0,0 @@ -Init() -{ - level thread OnPlayerConnect(); -} - -OnPlayerConnect() -{ - for(;;) - { - level waittill("connected", player); - Print(player.name + " GUID: " + player.guid); - player thread OnPlayerSpawned(); - } -} - -OnPlayerSpawned() -{ - self endon("disconnect"); - for(;;) - { - self waittill("spawned_player"); - Print(self.name + " GUID: " + self.guid); - } -} \ No newline at end of file diff --git a/small_scripts/get_player_guid.gsc b/small_scripts/get_player_guid.gsc index 3530a8866b77605170eaa4cd21c9c4ad4023baf8..fca360ac68c955fa362433e02bd1ea6fa3bcabdf 100644 GIT binary patch literal 395 zcmZvX%?iRW5QNXkQ-qvSls(5>So1K|&a@0;F z^g)>)12-_toh?Ykc32pB2fMBjq4Y-??J51)j?${OBFmD&CYnu#oz%{0V+1dw7bw1D z&EW1`2TiyxtVSo|K1F!}wqTrX5BX;0-^Hj%PgkwxvMBh*-Z!#CPysu5_jCC7pNA(c un2G_a8Uw(67-f zP2ovay}~@rBhB`>J~wPrsfKTSwi^b1kF|RP6G}1YGi}1i?{a2brh`Z*qgh`u!?h`O zbwEN2LljEY^DlT5gi`Xrklj(dJCJQR3xPN4{GI~Nz8SGPR@u+ z$MIR?YZr>ya&mt+hDCg58l3gkC|_Knjhx-LEK;jv2VL}%uv>lmjpI~6ICC&MA>-wX zt4VqUlWg_F&VQqL4UN_uUOco&Ti{plkZuS#{R4ghr|=8bQQ+gg?UliIgJ*F4n f50rA2;fK&8QY-Ky=n3@#`~-T(><;`B-iH4HY|3Fm