[LAFURE] Virtual Mode Designer 0.6.0-alpha

Create capabilities with code and events.

  1. QrukerQ
    Tested Minecraft Versions:
    • 1.9
    • 1.12
    Contributors:
    Qruker
    Languages Supported:
    English
    Description:
    - some kind of programming through the file;
    - creating your own code and issuing functions;
    - more detailed information is in the file "Events.yml".

    Code (Text):
    # # Codes:
    # # if <else> <check float/integer> <1 argument for check> <2 argument for check> - compares the integers/floats of the first argument and the second argument
    # # if <else> <check string> <argument for check 1>%:%<argument for check 2> - compares strings 1 and 2 of the argument
    # #
    # # <else> - used for another check, if previous "if" returns "false" (<else> type integer). "else" also returns where the new section in the event will be directed to.
    # # <check float/integer>:
    # # == - equals a number to another number
    # # != - not equal to another number
    # # >= - compares numbers greater than or equal to
    # # <= - compares numbers less than or equal
    # # > - compares numbers greater
    # # < - compares numbers less
    # # <check string>:
    # # equal - compares texts in the required case
    # # equals - compares texts without need for case
    # #
    # # Functions:
    # # player.message <String...> - sends a chat message to the player
    # # player.gamemode <Integer/Gamemode> - changes the player gamemode
    # # player.fly <0|1|true|false> - changes the player flight
    # # player.health <=|+|-> <Float> - changes the player health
    # # player.food <=|+|-> <Integer> - changes the player level food
    # # Functions (Events: Chat & Command):
    # # event.cancel <0|1|false|true> - cancels event at 1/true or continues event at 0/false
    # #
    # # Placeholders:
    # # %player.gamemode% - returns player the gamemode (integer type)
    # # %player.fly% - returns player the flight (integer type)
    # # %player.health% - returns player the gamemode (float type)
    # # %player.food% - returns player the level-food (integer type)
    # # Placeholders (Events: Event_Player_Chat & Event_Player_Command):
    # # %chat.message% - return player the message send to chat (string type)
    # # %chat.message.№% - return player the message send to chat after the argument (string type) (useful for working with commands)
    # # %chat.arg.length% - return player the message arguments is length (integer type)
    # # %chat.arg.№% - return player the message argument (string type)
    # #
    # # Examples:
    # # Event_Player_Chat:
    # #   '0':                                    # Start code for event.
    # #   - 'if 20 equals %chat.arg.0%%:%hello'   # When the player writes "hello" to the chat as the first argument, then this check is correct and the following code is executed.
    # #   - 'player.message &7Hello my friend =)' # If the check is correct, then this message is sent to the player.
    # #   '20':                                   # This code is called if a test with a numeric value "else 20" returns false. (If '20')
    # #   - 'if 21 equals %chat.arg.0%%:%@gm'     # Checks if the player wrote "@gm" as the first argument.
    # #   - 'if 22 == %player.gaemode% 1'         # Compares if the player has a game mode of one
    # #   - 'player.gamemode 0'                   # If the check is correct, then the player is set to a gamemode "survival".
    # #   '22':
    # #   - 'player.gamemode 1'                   # if the check with the number "22" was not correct, then this code is executed.
    # #   '21':                                   # This code is called if a test with a numeric value "else 21" returns false. (If '21')
    # #   - 'player.message &7Write &6"hello" &7as the first argument, so that I write hello to you too!'


    Events:
      Event_Player_Chat:
        '0':
        - if 1 equals %chat.arg.0%%:%arguments
        - event.cancel 1
        - 'player.message &7Third argument: &e%chat.arg.2%'
        - 'player.message &7Your message: &e%chat.message%'
        - 'player.message &7Your message from the second argument: &e%chat.message.1%'
        - 'player.message &7Number of arguments: &6%chat.arg.length%'
        '1':
        - if 10 equals %chat.arg.0%%:%@health
        - event.cancel 1
        - if 2 <= %player.health% 10
        - player.health + 10.0
        - player.message &aYou have restored health.
        '2':
        - player.message &cYou must have &610.0 &cor less health.
      Event_Player_Command:
        '0':
        - if 10 equals %chat.arg.0%%:%/test_gm
        - event.cancel 1
        - if 1 equals %chat.arg.1%%:%0
        - player.gamemode 0
        - 'player.message &aYour new gamemode: &dSurvival'
        '1':
        - if 2 equals %chat.arg.1%%:%1
        - player.gamemode 1
        - 'player.message &aYour new gamemode: &dCreative'
        '2':
        - if 3 equals %chat.arg.1%%:%2
        - player.gamemode 2
        - 'player.message &aYour new gamemode: &dAdventure'
        '3':
        - if 4 equals %chat.arg.1%%:%3
        - player.gamemode 3
        - 'player.message &aYour new gamemode: &dSpectator'
        '4':
        - 'player.message &7Use: &6/test_gm <0|1|2|3>'
     

    Plans:
    - more events;
    - more functions;
    - more placeholders;
    - more placeholders-functions;
    - creating a code in the game through the GUI;
    - support variables;
    - mode for players (players can create their codes for their modes in certain parts of the world).