Sol Banner
Sağ Banner

Paylaşım » SK « CAnnouncer | Animasyonlu bossbar skripti

  • Konuyu başlatan Konuyu başlatan ColKaplani
  • Başlangıç tarihi Başlangıç tarihi

ColKaplani

CAnnouncer Skripti;
Gerekenler:
  • Skyrayfall
  • Skript
  • Skutilities
  • İsteğe bağlı olarak (Essentials ve Groupmanager)
Komutları;
  • /CAnnouncer reload - Duyuruları ve mesajları güncellersiniz
  • /CAnnouncer list - Duyuruları listelersiniz
  • /CAnnouncer add <duyuru> - Yazdığınız duyuruyu eklersiniz
  • / CAnnouncer remove <duyuru> - Yazdığınız duyuruyu silersiniz
  • /CAnnouncer time - Duyuruların değişme süresini gösterir
  • /CAnnouncer help - Yardım metinlerini gösterir
Resimler:
Yakında eklenecektir.
Skript;

JavaScript:
on join:
    while player is online:
        loop {ca::announces::*}:
            set {_x} to {ca::interval}
            replace all "§f{MONEY}" with "&a%player's balance%" in {ca::announces::*}
            replace all "§f{NAME}" with "&a%name of player%" in {ca::announces::*}
            replace all "§f{GROUP}" with "&a%group of player%" in {ca::announces::*}
            display bossbar with "%loop-value%" to player for "%{_x}% seconds" parsed as timespan
            loop {ca::interval} times:
                wait 1 tick
        wait 1 tick        
command /CAnnouncer [<text>] [<text>]:
    trigger:
        command sender is player:
            player has permission "%{ca::permission}%":
                arg 1 is "reload":
                    send "%{ca::prefix}% %{ca::reloading}%" to player
                    wait 5 ticks
                    getConfig()
                    getFiles()
                    send "%{ca::prefix}% %{ca::reloaded}%" to player
                arg 1 is "list":
                    loop {ca::announces::*}:
                        send "&7(&f%loop-index%&7) &f%loop-value%" to player
                arg 1 is "add":
                    arg-2 is set:
                        set {_x} to arg-2 parsed as text
                        replace all "&" with "§" in {_x}
                        add {_x} to yml list "Announce" from file "plugins/CAnnouncer/announce.yml"
                        set {_x} to "%{ca::successadd}%"
                        replace all "{ANNOUNCER}" with arg-2 in {_x}
                        message "%{ca::prefix}% %{_x}%"                        
                        getConfig()
                        stop
                    else:
                        send "%{ca::prefix}% %{ca::errorarg::*}%" to player
                arg 1 is "remove":
                    arg-2 is set:
                        set {_announce::*} to yml list "Announce" from file "plugins/CAnnouncer/announce.yml"
                        loop {_announce::*}:
                            arg-2 is "%loop-value%":
                                remove arg-2 from yml list "Announce" from file "plugins/CAnnouncer/announce.yml"
                                set {_x} to "%{ca::successremove}%"
                                replace all "{ANNOUNCER}" with arg-2 in {_x}
                                message "%{ca::prefix}% %{_x}%"
                                stop
                                getConfig()
                        set {_x} to "%{ca::doesnotexist}%"
                        replace all "{ANNOUNCER}" with arg-2 in {_x}
                        message "%{ca::prefix}% %{_x}%"
                        stop
                    else:
                        send "%{ca::prefix}% %{ca::errorarg::*}%" to player
                arg 1 is "time":
                    arg 2 is set:
                        set {_x} to yml value "Intervalmsg" from file "plugins/CAnnouncer/config.yml"
                        replace all "{TIME}" with arg-2 in {_x}
                        set yml value "Interval" from file "plugins/CAnnouncer/config.yml" to arg-2 parsed as integer
                        send "%{ca::prefix}% %{_x}%" to player
                        getConfig()
                    else:
                        send "%{ca::prefix}% %{ca::errorarg::*}%" to player
                arg-1 is set:
                    arg 1 isn't "remove" or "reload" or "list" or "add" or "time":
                        send "%{ca::prefix}% %{ca::errorarg::*}%" to player
                        send "&6&m------------&f(&eC&cAnnouncer&f)&6&m------------" to player
                        send "&7/CAnnouncer help &8- &aGive &eC&cAnnouncer &aabout information" to player
                        send "&7/CAnnouncer add &f(&7text&f) &8- &aCreate a announce into announce.yml!" to player
                        send "&7/CAnnouncer remove &f(&7text&f) &8- &aDelete a announce from announce.yml!" to player
                        send "&7/CAnnouncer time &f(&7number&f) &8- &aset the wait time (in ticks)." to player
                        send "&7/CAnnouncer reload &8- &aReload &eC&cAnnouncer &afiles." to player
                        send "&7/CAnnouncer list &8- &aList of announcer" to player
                        send "&6&m------------&f(&eC&cAnnouncer&f)&6&m------------" to player
                arg-1 is "help":
                    send "&6&m------------&f(&eC&cAnnouncer&f)&6&m------------" to player
                    send "&7/CAnnouncer help &8- &aGive &eC&cAnnouncer &aabout information" to player
                    send "&7/CAnnouncer add &f(&7text&f) &8- &aCreate a announce into announce.yml!" to player
                    send "&7/CAnnouncer remove &f(&7text&f) &8- &aDelete a announce from announce.yml!" to player
                    send "&7/CAnnouncer time &f(&7number&f) &8- &aset the wait time (in ticks)." to player
                    send "&7/CAnnouncer reload &8- &aReload &eC&cAnnouncer &afiles." to player
                    send "&7/CAnnouncer list &8- &aList of announcer" to player
                    send "&6&m------------&f(&eC&cAnnouncer&f)&6&m------------" to player
            else:
                send "%{ca::prefix}% %{ca::permissionmsg}%" to player
function getConfig():
    set {ca::prefix} to yml value "Prefix" from file "plugins/CAnnouncer/config.yml"
    set {ca::permission} to yml value "Permission" from file "plugins/CAnnouncer/config.yml"
    set {ca::permissionmsg} to yml value "Permissionmsg" from file "plugins/CAnnouncer/config.yml"
    set {ca::announces::*} to yml list "Announce" from file "plugins/CAnnouncer/announce.yml"
    set {ca::errorarg::*} to yml value "ErrorArg" from file "plugins/CAnnouncer/config.yml"
    set {ca::reloading} to yml value "Reload" from file "plugins/CAnnouncer/config.yml"
    set {ca::reloaded} to yml value "Reloaded" from file "plugins/CAnnouncer/config.yml"
    set {ca::interval} to yml value "Interval" from file "plugins/CAnnouncer/config.yml"
    set {ca::successadd} to yml value "SuccessAdd" from file "plugins/CAnnouncer/config.yml"
    set {ca::successremove} to yml value "SuccessRemove" from file "plugins/CAnnouncer/config.yml"
    set {ca::doesnotexist} to yml value "Doesnotexist" from file "plugins/CAnnouncer/config.yml"
function getFiles():
    file "plugins/CAnnouncer/config.yml" doesn't exist:
        create file "plugins/CAnnouncer/config.yml"
        set yml value "Prefix" from file "plugins/CAnnouncer/config.yml" to "&eC&cAnnouncer &8»"
        set yml value "Permission" from file "plugins/CAnnouncer/config.yml" to "CAnnouncer.admin"
        set yml value "Permissionmsg" from file "plugins/CAnnouncer/config.yml" to "&cYou do not have permission &f(&c!&f)"
        set yml value "ErrorArg" from file "plugins/CAnnouncer/config.yml" to "&cError... &fSomething went wrong. Check your argument again."
        set yml value "Reload" from file "plugins/CAnnouncer/config.yml" to "&fReloading config."
        set yml value "Reloaded" from file "plugins/CAnnouncer/config.yml" to "&fSuccessfully reloaded config."
        set yml value "Intervalmsg" from file "plugins/CAnnouncer/config.yml" to "&fSet wait time to {TIME} ticks."
        set yml value "Interval" from file "plugins/CAnnouncer/config.yml" to "10" parsed as integer
        set yml value "SuccessAdd" from file "plugins/CAnnouncer/config.yml" to "&a{ANNOUNCER} &fsuccessfully added in announce.yml"
        set yml value "SuccessRemove" from file "plugins/CAnnouncer/config.yml" to "&a{ANNOUNCER} &fsuccessfully removed in announce.yml"
        set yml value "Doesnotexist" from file "plugins/CAnnouncer/config.yml" to "&c{ANNOUNCER} &fdoesn't exist in announce.yml!"
    file "plugins/CAnnouncer/announce.yml" doesn't exist:
        create file "plugins/CAnnouncer/announce.yml"
        add "&eC&cAnnouncer &aVersion &51.0" to yml list "Announce" from file "plugins/CAnnouncer/announce.yml"
        add "&7Coded &5By &9ColKaplani" to yml list "Announce" from file "plugins/CAnnouncer/announce.yml"
 
Moderatörün son düzenlenenleri:

Yeni Mesajlar


Üst