Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo >Lese Customslots ...
- echo " _____ _ _ _"
- echo " / ____| | | | | | |"
- echo " | | _ _ ___| |_ ___ _ __ ___ ___| | ___ | |_ ___"
- echo " | | | | | / __| __/ _ \| '_ ` _ \/ __| |/ _ \| __/ __|"
- echo " | |___| |_| \__ \ || (_) | | | | | \__ \ | (_) | |_\__ \"
- echo " \_____\__,_|___/\__\___/|_| |_| |_|___/_|\___/ \__|___/"
- echo ""
- echo " Original Script /u/genemilder and /u/Flapadiddle"
- echo " Retouched and documented by /u/NanashiSC"
- echo " Version: 2019-02-19"
- echo " for updates, go visit pastebin.com/JuTtcj2S"
- //----------------------------------------------------------------------------------------------------------------------------------
- // Source(1): https://pastebin.com/7beau8BP by /u/genemilder
- // Source(2): https://pastebin.com/NV4qhDaU by /u/Flapadiddle
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Vorwort / EN: Preamble
- //----------------------------------------------------------------------------------------------------------------------------------
- // Nanashi DE: Das Original stammt von /u/genemilder und war an Team Fortress Spieler gerichtet, /u/Flapdadiddle hat es später an CSGO angepasst.
- // Ich habe mir gedacht, das Skript aufbohren und optimieren zu können, doch musste mir schließlich eingestehen, dass ich nicht über den Intellekt
- // verfüge, diesem Biest eins draufzusetzen. Da ich mich aber bereits in die Funktionsweise eingenerdet und während des Re-Engeneerings diverse
- // Notizen verfasst hatte und das Original zudem nur dürftig kommentiert und mit streitaren Variablen-Namen veröffentlicht worden war, habe ich
- // mich dazu entschieden eben genannte Mängel auszuräumen.
- //----------------------------------------------------------------------------------------------------------------------------------
- // Nanashi EN: The orignal script has been created by /u/genemilder for Team Fortress and later been modified by /u/Flapadiddle to match CSGO
- // I've decided to reengineer the script, hoping I could reduce the code or simplify things, just to realize, that the script itself
- // is a marvellous piece of art and has no room for such insults. BUT typically, for the work of a genius, it's naming convention
- // and overall documentation has been quite poor. So I started digging deeper and came up with a documentation that hopefully
- // some of you, will find helpful as well.
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Bekannte Probleme und Limitierungen / EN: Known Issues and limitations:
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Das Skript ist nicht in der Lage zu erkennen wenn ein Gegenstand fallen gelassen, gekauft (über das Kaufmenue), oder aufgehoben
- // worden ist. Es weiß nicht und kann nicht wissen, weiviele Gegenstände Du in Deinem Inventar hast und ist deshalb auch nicht in der
- // Lage sich entsprechend anzupassen. Wenn Du beispielsweise eine Blendgranate wirfst, weiß Customslots nicht ob Du noch über eine weitere verfügst.
- //
- // Merke: Danger Zone Spieler sollten Ihre Hände von Customslots lassen, oder es zumindest für die Dauer des Spiels deaktivieren.
- // Neue Gegenstände, wie der Medishot zum Beispiel, oder die Fähigkeit sein Messer, Nahkampfwaffen und Granaten fallen lassen zu können,
- // kreieren neue Herausforderungen, die noch nicht angegangen worden sind und vielleicht auch zu viel des Guten sind.
- //----------------------------------------------------------------------------------------------------------------------------------
- // EN: The script is not able to recognice if an item has been dropped, bought (via buymenu), or picked.
- // It does and can not now how many items you have in your inventory, and therefore won't be able to adjust itself accordingly
- // If you throw a flash for example, customslots, wont know if you have another in you pocket or not.
- //
- // Note: Danger Zone players should keep their hands off customlots, or at least disable it, whilest playing Danger Zone.
- // New items, like medishot f.e., or the ability to drop your knife, melee weapons and grenades create new challanges that have not
- // been targetted yet and might be too to adress at all.
- //----------------------------------------------------------------------------------------------------------------------------------
- // Script Idea:
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: imitiere lastinv, nextinv und previnv, um eine Anpassung der einzelnen Slots zu ermoeglichen
- // EN: Recreate lastinv, nextinv and previnv to enable the customization of individual slots
- //----------------------------------------------------------------------------------------------------------------------------------
- // Script Functions:
- //----------------------------------------------------------------------------------------------------------------------------------
- // exec_qs = q (lastinv)
- // next_slot = select next weapon (nextinv)
- // prev_slot = select previous weapon (previnv)
- //
- // cust_slot1 = primary
- // cust_slot2 = secondary
- // cust_slot3 = melee
- // cust_slot5 = bomb
- // cust_slot6 = HE grenade
- // cust_slot7 = flash
- // cust_slot8 = smoke
- // cust_slot9 = decoy
- // cust_slot10 = molotov/incendiary
- //
- // alias crosshair_primary
- // alias crosshair_secondary
- // alias crosshair_melee
- //----------------------------------------------------------------------------------------------------------------------------------
- // Basic Setup:
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE
- // cust_slot = imitiert die regulaere Slot-Funktion und schreibt die Variable curr_slot
- // curr_slot = zeigt auf den aktuellen Slot; loest einen weiteren lese/schreib Prozess aus
- // next_slot = zeigt auf den jeweils naechsten Slot, ausgehen von der Position von curr_slot
- // prev_slot = zeigt auf den jeweils vorherigen Slot, ausgehen von der Position von curr_slot
- // last_slot = lässt exec_qs auf den Slot zeigen, der noch vor curr_slot in Benutzung war
- // set_qs_slot = überschreibt die bestehende Matrix abhängig vom angewählten Slot
- // exec_qs = gibt den zuletzt bekannten vorausgegangenen Inventargegenstand zurück
- //----------------------------------------------------------------------------------------------------------------------------------
- // EN
- // cust_slot = imitates the regular slot functionality and writes curr_slot
- // curr_slot = points towards the current slot; triggers another read/write process
- // next_slot = points towards the next slot, depends on curr_slot
- // prev_slot = points towards the previous slot, depends on curr_slot
- // last_slot = makes exec_qs point towards the slot which has been in use prior to curr_slot
- // set_qs_slot = overwrites whole matrix depending on triggered slot
- // exec_qs = returns the last known previous inventory item
- //----------------------------------------------------------------------------------------------------------------------------------
- // Script --->
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Erstelle cust_slotX, lasse es slotX ausführen und curr_slotX schreiben (optional: lade Slot-spezifisches Fadenkreuz)
- // EN: Create cust_slotX, make it call slotX and write curr_slotX (optional: load slot specific crosshair settings)
- //----------------------------------------------------------------------------------------------------------------------------------
- alias cust_slot1 "slot1; curr_slot1; crosshair_primary"
- alias cust_slot2 "slot2; curr_slot2; crosshair_secondary"
- alias cust_slot3 "slot3; curr_slot3; crosshair_melee"
- alias cust_slot5 "slot5; curr_slot5"
- alias cust_slot6 "slot6; curr_slot6"
- alias cust_slot7 "slot7; curr_slot7"
- alias cust_slot8 "slot8; curr_slot8"
- alias cust_slot9 "slot9; curr_slot9"
- alias cust_slot10 "slot10; curr_slot10"
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Schreibe next_slot und prev_slot, wechsel auf last_slot, schreibe den aufgerufenen slot in last_slot
- // EN: Write next_slot and prev_slot; switch to last_slot; write the called slot in last_slot
- //----------------------------------------------------------------------------------------------------------------------------------
- //
- // DE: Wenn wir einen Slot anwaehlen, muessen wir neben diversen anderen Variablen vor allem auch die Variable qs_slot ueberschreiben - und das fuer jeden einzelnen Slot.
- // Hierzu lasst uns folgende Matrix vorstellen:
- // EN: If we select a slot - in addition to various other variables - we especially have to overwrite qs_slot. And this must be done for each individual slot.
- // For this let us imagine an empty matrix:
- //
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | qs_slot1 | qs_slot2 | qs_slot3 | qs_slot5 | qs_slot6 | qs_slot7 | qs_slot8 | qs_slot9 | qs_slot10 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
- // +----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- //
- // DE: Jetzt betaetigen wir Taste 1
- // EN: Now we tap key 1
- //
- // >1 -> cust_slot1
- // cust_slot1 -> slot1; curr_slot1; (crosshair primary) //DE: lassen wir das crosshair mal aussen vor
- // //EN: let us ignore the crosshair for now
- // curr_slot1 ->
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | INPUT | qs_slot1 | qs_slot2 | qs_slot3 | qs_slot5 | qs_slot6 | qs_slot7 | qs_slot8 | qs_slot9 | qs_slot10 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- // | 1 |curr_slot1| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+
- //
- // DE: Was ist passiert?
- // Durch das Druecken der Taste-1 loesen wir einen Domino-Effekt aus:
- // Taste-1 ist an cust_slot1 gebunden welcher Slot1 oeffnet und die Funktion curr_slot1 aufruft.
- // curr_slot1 sorgt nun dafuer, dass die set_qs_slot-Variablen aller anderen Slots auf die Hauseigene set_qs_slot1-Funktion zeigen
- // EN: What did just happen?
- // By pressing key 1 we trigger a domino-effect:
- // Key 1, which is bound to cust_slot1, will open slot1 and exec curr_slot1.
- // curr_slot1 will than make sure that every other set_qs_slot-variable will point towards it's very own set_qs_slot1-function.
- //
- // DE: Bevor wir eine weitere Taste betaetigen, lasst uns noch einen Blick auf unsere anderen Variablen werfen
- // EN: Before we press another key, let us have a look at our other variables too
- //
- //+-----------+-----------+-----------+---------+--------+
- //| curr_slot | next_slot | prev_slot | qs_exec | qs_set |
- //+-----------+-----------+-----------+---------+--------+
- //| 1 | 2 | 10 | -* | 1 |
- //+-----------+-----------+-----------+---------+--------+
- // -* = this would point towards a starting parameter, if any has been set, otherwise it would point towards nothing at this point.
- //
- // DE: Soweit so gut.
- // EN: So far so good.
- //
- // DE: Zur weiteren Veranschaulichung, hier mal ein Beispiel für die Tastenfolge 1-3-3-Q-2
- // EN: For further illustration, here is an example for the key sequence 1-3-3-Q-2
- //
- // +---------+---------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+
- // | | SLOTS | VARIABLES |
- // | | | |
- // + +---------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------+
- // | INPUT | qs_slot1 | qs_slot2 | qs_slot3 | qs_slot4 | qs_slot5 | qs_slot6 | qs_slot7 | qs_slot8 | qs_slot9 | qs_slot10 | curr_slot | next_slot | prev_slot | qs_exec | qs_set |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- // | Default | 3 | 3 | X | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 5 | 2 | 2 | 3 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- // | 1 | X | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 10 | 3 | 1 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- // | 3 | 3 | 3 | X | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 4 | 2 | 1 | 3 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- // | 3 | 3 | 3 | X | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 4 | 2 | 1 | 3 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- // | Q | X | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 10 | 3 | 1 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- // | 2 | 2 | X | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 1 | 1 | 2 |
- // +---------+----------+----------+----------+----------+----------+----------+----------+----------+-----------+-----------+-----------+-----------+-----------+-----------+-----------+
- //
- //----------------------------------------------------------------------------------------------------------------------------------
- // Matrix Magic
- //----------------------------------------------------------------------------------------------------------------------------------
- alias set_qs_slot1 "alias next_slot cust_slot2; alias prev_slot cust_slot10; last_slot; alias last_slot alias exec_qs cust_slot1; alias curr_slot1 ; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot2 "alias next_slot cust_slot3; alias prev_slot cust_slot1; last_slot; alias last_slot alias exec_qs cust_slot2; alias curr_slot1 set_qs_slot1; alias curr_slot2 ; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot3 "alias next_slot cust_slot5; alias prev_slot cust_slot2; last_slot; alias last_slot alias exec_qs cust_slot3; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 ; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot5 "alias next_slot cust_slot6; alias prev_slot cust_slot3; last_slot; alias last_slot alias exec_qs cust_slot5; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 ; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot6 "alias next_slot cust_slot7; alias prev_slot cust_slot5; last_slot; alias last_slot alias exec_qs cust_slot6; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 ; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot7 "alias next_slot cust_slot8; alias prev_slot cust_slot6; last_slot; alias last_slot alias exec_qs cust_slot7; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 ; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot8 "alias next_slot cust_slot9; alias prev_slot cust_slot7; last_slot; alias last_slot alias exec_qs cust_slot8; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 ; alias curr_slot9 set_qs_slot9; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot9 "alias next_slot cust_slot10; alias prev_slot cust_slot8; last_slot; alias last_slot alias exec_qs cust_slot9; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 ; alias curr_slot10 set_qs_slot10"
- alias set_qs_slot10 "alias next_slot cust_slot1; alias prev_slot cust_slot9; last_slot; alias last_slot alias exec_qs cust_slot10; alias curr_slot1 set_qs_slot1; alias curr_slot2 set_qs_slot2; alias curr_slot3 set_qs_slot3; alias curr_slot5 set_qs_slot5; alias curr_slot6 set_qs_slot6; alias curr_slot7 set_qs_slot7; alias curr_slot8 set_qs_slot8; alias curr_slot9 set_qs_slot9; alias curr_slot10 "
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Schreibe Startwerte
- // EN: Write Starting Parameters
- //----------------------------------------------------------------------------------------------------------------------------------
- curr_slot2
- set_qs_slot3
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Setze Standard Fadenkreuz Einstellungen
- // (!) - Erstelle/Ueberschreibe die unten stehenden Config-Dateien
- //----------------------------------------------------------------------------------------------------------------------------------
- // EN: Set default crosshair settings:
- // (!) - Create/Replace the config files below
- //----------------------------------------------------------------------------------------------------------------------------------
- alias crosshair_primary "exec crosshair_nanashi_dynamic.cfg"
- alias crosshair_secondary "exec crosshair_nanashi_dot_dynamic.cfg"
- alias crosshair_melee "exec crosshair_nanashi_dynamic.cfg"
- //----------------------------------------------------------------------------------------------------------------------------------
- // <--- Script
- //----------------------------------------------------------------------------------------------------------------------------------
- // O P T I O N A L (DE: aber empfohlen / EN: but recommended)
- //----------------------------------------------------------------------------------------------------------------------------------
- // Overwrite Config Binds --->
- //----------------------------------------------------------------------------------------------------------------------------------
- // DE: Um Deine eigentliche Config-Datei zu schützen empfiehlt es sich an dieser Stelle alle zutreffenden Binds neu zu schreiben.
- // Merke: Ich habe die Befehle an dieser Stelle bereits auf meine Config-Datei angepasst und vertraue darauf, dass Du über das nötige
- // Wissen verfügst, diese Anpassungen zu erkennen, sie zu entfernen und oder ggf. durch Deine eigenen Befehle zu ersetzen.
- //----------------------------------------------------------------------------------------------------------------------------------
- // EN: To protect your original config file it is recommended to rewrite all the bindings which apply.
- // Note: I have already adapted the commands to my config file at this point and trust that you have the necessary knowledge
- // to recognize these adjustments, remove them and/or replace them with your own commands if necessary.
- //----------------------------------------------------------------------------------------------------------------------------------
- bind 1 "cust_slot1; reset_collection" //primary
- bind 2 "cust_slot2; reset_collection" //secondary
- bind 3 "cust_slot3; reset_collection" //melee
- bind 5 "cust_slot5; reset_collection" //bomb
- bind 6 "cust_slot6; reset_collection" //HE grenade
- bind 7 "cust_slot7; reset_collection" //flash
- bind 8 "cust_slot8; reset_collection" //smoke
- bind 9 "cust_slot9; reset_collection" //decoy
- bind 0 "cust_slot10; reset_collection" //molotov/incendiary
- //bind MWHEELUP cs_next //select next slot
- //bind MWHEELDOWN cs_prev //select prev slot
- //----------------------------------------------------------------------------------------------------------------------------------
- bind f "buy flashbang; cust_slot7; reset_collection"
- bind g "drop; reset_togreload"
- bind q exec_qs //lastinv
- bind x "buy smokegrenade; cust_slot8; reset_collection"
- //----------------------------------------------------------------------------------------------------------------------------------
- // <--- Overwrite Config Binds
- //----------------------------------------------------------------------------------------------------------------------------------
- // Overwrite Config Scripts --->
- //----------------------------------------------------------------------------------------------------------------------------------
- //DE: Selbiges Prozedere gilt natuerlich auch fuer Skripte die mit "slot"-Befehlen arbeiten
- //EN: Of course the same procedure also applies for scripts that work with "slot" commands
- alias moloinc "buy molotov; buy incgrenade; cust_slot10; alias toggle_explosives he"
- alias he "buy hegrenade; cust_slot6; alias toggle_explosives moloinc"
- alias toggle_explosives moloinc
- alias reset_explosives "alias toggle_explosives moloinc"
- bind c "toggle_explosives; reset_togreload"
- //----------------------------------------------------------------------------------------------------------------------------------
- // <--- Overwrite Config Scripts
- //----------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment