1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Infoboxes

Discussion in 'APIs' started by FusionCore, Jul 11, 2020.

  1. FusionCore

    Supporter

    Joined:
    Apr 19, 2020
    Messages:
    44
    Likes Received:
    1
    Author: FusionCore
    Version: 1.0
    Name: Infoboxes

    Infoboxes display information under chat
    The only other infobox I have made was in my SkNotepad resource
    This however allows you to make your very own.
    Make sure to read through all of this to understand!

    Dependancies:
    Skript
    (Duh)
    Json.sk (Easier json usage)
    SkQuery (For smoother infobox updating)

    Example for making an infobox:
    Code (Text):
    1. createInfobox("test", "&8[&bO&8] &8- Hello [(-x-)&8]|-+-|&8| &r|-+-|&fHello|-+-|&fWelcome to &8Test Server&f!")
    2.                |--|    |----------------------------|   |------|   |-------|   |----------------------------|
    3.                 ||                   ||                    ||          ||                    ||
    4.                Name                 Sides                Openers     Fill 1                Fill 2
    Notes for when making code:
    -
    Insert (-x-) so that players can close their infobox.

    Code:
    Code (Text):
    1. on load:
    2.   if {infoboxes::*} does not contain "test":
    3.     createInfobox("test", "&8[&bO&8] &8- Hello [(-x-)&8]|-+-|&8| &r|-+-|&fHello|-+-|&fWelcome to &8Test Server&f!")
    4.  
    5. on chat:
    6.   cancel event
    7.   broadcast("[%sender's world%]<%sender%> %message%")

    InGame:
    [​IMG]


    Functions:
    createInfobox(infobox-name, infobox-lines) - Creates an infobox
    deleteInfobox(infobox-name) - Deletes an infobox
    send(to, msg) - Sends a message to a player
    broadcast(msg) - Broadcasts a message
    reloadInfobox(player)
    - Reloads the player's infobox
    infoboxClear(player) - Clears the player's infobox
    infoboxShow(player) - Shows the player's infobox
    infoboxHide(player) - Hides the player's infobox
    infoboxSet(player, infobox-name) - Sets the player's infobox
    closeInfobox(player)
    - Closes the player's infobox
    openInfobox(player) - Opens the player's infobox

    Disclaimers:
    -
    You cannot do %player% and have it show the players name. This is currently in development, as are Variables
    - Command outputs as /gamemode example creative will not show (updated examples gamemode to creative) I am creating a skript for this in a better format if we get good reviews.
    - Chat plugins and skripts do not work. Until skripts are made for this as chat plugins, Chat plugins do not work.
    - If you have json text and you want to show it with a few simple fixes you can change this in the code, but it can allow your players to do json.sk. (Unless you find another way ;D)
    - If you have any plugins like that show data using send, it will not work correctly...

    TOS:
    -
    Do not sell this skript
    - Do not redistribute this skript
    - Do not take credit for the creation of this skript
     

Share This Page

Loading...