Загрузка...

PayDay 2 Lua script v2.2.4

Тема в разделе "Другие игры", создана пользователем in boss we trust, 05.03.2014.

  1. in boss we trust

    /WORLD
    in boss we trust

    Статус:
    Оффлайн
    Регистрация:
    11.06.12
    Сообщения:
    4.771
    Репутация:
    1.696 +/-
    =This is v2.2.4 of the PayDay 2 LUA Hook=

    Чит, автоматически обнаруживает, когда вы изменили файл конфигурации и мгновенно загружает его, не нужно перезагружать игру.


    == Краткие функции==
    *Interactive Lua Interpreter
    *Global Toggle Key
    *Persistent Scripts
    *First Run Script
    *New, sexy Lua functions
    *Multithreaded init
    *Config autoreload

    ==Internal Features==

    ===Multithreaded signature search===
    All signatures are searched for in parallel with tasks automatically divided between the total number of logical processors on the system.

    ===Config File===
    The Config file is YAML format, it should be pretty self-explanatory, YAML is intended to be very simple to read and write.

    There is a config file included with the archive, it's called PD2Hook.yml - you cannot rename it.

    ===Config Autoreload===
    Not much to say here... it will notice if you've modified the config file and automatically reloads all keybindings and persistent
    scripts. If you do anything silly with the logging, it will affect that too, but the console window will not be removed. Also,
    If you happened to redefine any key bindings through Lua, altering your YAML will blow all that away just like restarting would.

    ==External Feature==

    ===Interactive Lua Interpreter===
    Provides an interactive Lua interpreter in the debug console from which you can arbitrarily write and execute Lua. Also supports history completion
    just like an actual windows command prompt. In order to enable it, you need to perform a bitwise OR of your current OutputMode with 4 (e.g. if your OutputMode
    is currently 2, it should be 6, if it's 3, make it 7). The Interpreter will not work if you do not have the console enabled (or in other words, setting it to 5
    is useless)

    ===Global Hook Toggle===
    If you define a keybinding with an empty string ("") instead of a script name, that key will be considered to be a special on/off switch that will completely disable
    all Lua scripts from running - this applies to any keys you have bound and any persistent scripts. However, it will not prevent the interactive interpreter from
    working since it is presumed that you're not stupid enough to accidentally go to the console and write out an entire piece of Lua by mistake.

    ===Run Last Script Key===
    Defining a keybinding with an asterisk (*) instead of a script name will make that key behave as a special binding that will execute the same script as the previous
    key you pressed. The asterisk needs to be encased in single or double quotes.

    ===Persistent Scripts===
    This is defined in the config of the DLL. You define both a global variable and a script file. You are then expected to set that global
    variable to something (true, false, anything OTHER than nil) in your Lua script. Failure to do so will result in the script running several
    times per second. Your script should be well-behaved about where it's appropriate for it to execute, so implement checks to make sure code
    only runs in the correct context (or use pcall if you're lazy)

    ===FirstLoad Script===
    Defines a script that will be executed as soon as the LUA VM first becomes available in the game (the title screen), essentially runs once
    and never again. see the YAML config example file for usage.

    ===pcall===
    Example: pcall(myShittyFunction, "arg1", 2, "arg3")
    A native wrapper has been written for pcall and re-exposed to Lua. If you happen to have any crashy functions or code, you can now
    wrap them in a pcall to catch the error and prevent it from crashing the game. functionality is identical to the official Lua pcall.
    THIS IS A LUA FUNCTION.

    ===dofiles===
    Example: dofiles("my/lua/folder/scripta.lua", "other/folder/scriptb.lua", "anotherlua.lua")
    Takes an arbitrary number of arguments, expecting all of them to be paths to LUA files which it will immediately execute.
    THIS IS A LUA FUNCTION.

    ===PlayMedia===
    Example: PlayMedia("path/to/some/video/or/audio.mp3", "InterracialHorseFisting.mp4")
    like dofiles except it expects you to load some sort of media file(s) in - they will all play over the top of eachother.
    THIS IS A LUA FUNCTION.

    ===PlayMediaQueued===
    Example: PlayMediaQueued("path/to/some/video/or/audio/JustinBiebersOrgasmNoises.mp3")
    sound files loaded in this way will not play over the top of eachother. Anything called with PlayMedia will not be delayed even if a
    sound file is playing via this function (because the whole point of PlayMedia is that it's completely unqueued and doesn't care)
    THIS IS A LUA FUNCTION.

    ===KillMedia===
    Example: KillMedia()
    Stops all media from playing immediately. Doesn't take any arguments.
    THIS IS A LUA FUNCTION.

    ===RunThread===
    Example: RunThread(myThreadWorker, "arg1", 2, "arg3")
    You pass it args identical to pcall and it will create a new OS and Lua thread then attempt to execute it immediately.
    THIS IS A LUA FUNCTION.

    ===BindKey===
    Example: BindKey("VK_F1", "LUA/mynewscript.lua")
    Takes two arguments: the first should be a keybinding, either as an integer or a string (e.g. 112, 0x70 "0x70" or "VK_F1") and the second should be a script file, provided with
    exactly the same path specification as is used in the JSON configuration file. Binding a key does NOT modify your JSON, so it will not persist after restarting the game.
    returns true if all the arguments you passed were what it expected, otherwise false. Passing an empty string for the script name results in creating a Global Toggle key instead.
    THIS IS A LUA FUNCTION.

    ===UnbindKey===
    Example: UnbindKey("VK_F5")
    Takes one argument, namely the key to unbind. Returns false if the key wasn't actually bound, otherwise true. Again, it does not do anything to your JSON config file.
    THIS IS A LUA FUNCTION

    ===GetBinding===
    Example: GetBinding("VK_F5")
    Takes one argument, namely the key to check the binding of. Returns a string containing the script the key is bound to, otherwise false.
    THIS IS A LUA FUNCTION.


    [​IMG]​