SecretManX
Sudan Çıkmış
- Mesajlar
- 2
- En iyi cevaplar
- 0
- Beğeniler
- 4
- Puanları
- 20
Merhaba!
Bu konuda size DeluxeMenus ve ChestCommands (ölü, kullanışsız) eklentilerine/onların benzerlerine muadil olan SkriptGUI adındaki sistemimi tanıtıcam. Kendisiyle bayağı bir uğraştım, tek başıma yapmadım tabii, gerçekten çok kafa yormak gerekti bazı kısımlarına.
Sistem tamamen YAML üzerinden işliyor ve %70 düzenlenebilir. GUI'leri siz oluşturuyorsunuz, istediğiniz gibi dosya üzerinden düzenleyebiliyorsunuz. Aynı zamanda bir config dosyası bulunuyor, belirli şeyleri düzenleyebilirsiniz oradan da.
Sistem İngilizce olarak kodlandı, kod üzerinden veya ayar dosyalarından birçok şeyi çevirebilirsiniz.
Sistemin kendisini görmek için aşağıdaki bağlantıları kullanabilirsiniz:
Sürümleri görmek/hızlıca indirmek için: bilektugrul/SkriptGUI
Tam kodu şuradan bulabilirsiniz: bilektugrul/SkriptGUI
Sistemin kullanımını öğretmek için hazırlanmış Türkçe / İngilizce bir doküman yok, şu anlık.
Gereken eklentiler/skript addonları:
- skUtilities
- skript-mirror
- skript-yaml
- TuSKe
- PlaceholderAPI (Eğer placeholderlerden yararlanmak istiyorsanız gerekiyor.)
GitHub kullanmayı biliyorsanız, kendi forkunuzu oluşturup kodu istediğiniz gibi geliştirebilirsiniz. Fikirleriniz orijinal projenin de gelişmesine yardımcı olacaktır.
Bu konuda size DeluxeMenus ve ChestCommands (ölü, kullanışsız) eklentilerine/onların benzerlerine muadil olan SkriptGUI adındaki sistemimi tanıtıcam. Kendisiyle bayağı bir uğraştım, tek başıma yapmadım tabii, gerçekten çok kafa yormak gerekti bazı kısımlarına.
Sistem tamamen YAML üzerinden işliyor ve %70 düzenlenebilir. GUI'leri siz oluşturuyorsunuz, istediğiniz gibi dosya üzerinden düzenleyebiliyorsunuz. Aynı zamanda bir config dosyası bulunuyor, belirli şeyleri düzenleyebilirsiniz oradan da.
Sistem İngilizce olarak kodlandı, kod üzerinden veya ayar dosyalarından birçok şeyi çevirebilirsiniz.
Sistemin kendisini görmek için aşağıdaki bağlantıları kullanabilirsiniz:
Sürümleri görmek/hızlıca indirmek için: bilektugrul/SkriptGUI
Tam kodu şuradan bulabilirsiniz: bilektugrul/SkriptGUI
Sistemin kullanımını öğretmek için hazırlanmış Türkçe / İngilizce bir doküman yok, şu anlık.
Gereken eklentiler/skript addonları:
- skUtilities
- skript-mirror
- skript-yaml
- TuSKe
- PlaceholderAPI (Eğer placeholderlerden yararlanmak istiyorsanız gerekiyor.)
GitHub kullanmayı biliyorsanız, kendi forkunuzu oluşturup kodu istediğiniz gibi geliştirebilirsiniz. Fikirleriniz orijinal projenin de gelişmesine yardımcı olacaktır.
Kod:
#Version: v1.0-beta5
#Don't change these (^*) lines!
import:
java.lang.System
java.io.BufferedReader
java.io.InputStreamReader
java.net.URL
me.clip.placeholderapi.PlaceholderAPI
expression (nl|new[ ]line):
get:
return last character of System.lineSeparator()
expression text of url %text% [line %-integer%]:
get:
set {_in} to new BufferedReader(new InputStreamReader(new URL(expression 1).openStream()))
while true:
add 1 to {_count}
set {_return::%{_count}%} to {_in}.readLine()
if {_return::%{_count}%} isn't set:
stop loop
if {_count} is expression-2:
{_in}.close()
return {_return::%{_count}%}
{_in}.close()
return {_return::*}
expression placeholder parsed %$strings% [from %-player%]:
return type: string
get:
loop expressions-1:
add PlaceholderAPI.setPlaceholders(expression-2, loop-value) to {_return::*}
return {_return::*}
command /skgui [<text="help">] [<text>] [<text>] [<text>]:
trigger:
if executor has permission "%{SkriptGUI::adminPerm}%":
if arg-1 is "help":
send "%{SkriptGUI::helpCMD::*}%"
else if arg-1 is "reload" or "rl":
if arg-2 isn't set:
set {_systemMS} to current system milliseconds
if dir "plugins/SkriptGUI/" doesn't exist:
create dir "plugins/SkriptGUI/GUIs/"
set file contents of "plugins/SkriptGUI/GUIs/example.yml" to text of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI/GUIs/example.yml"
set file contents of "plugins/SkriptGUI/config.yml" to text of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI/config.yml"
execute executor command "skgui reload config"
if line 1 in file "plugins/Skript/scripts/%script's name%.sk" isn't text of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI.sk" line 1:
send "%{SkriptGUI::prefix}% &cYou're running with outdated version of SkriptGUI." and "%{SkriptGUI::prefix}% &cPlease update from &ehttps://github.com/bilektugrul/SkriptGUI/releases" to executor
if executor is a player:
send "%{SkriptGUI::prefix}% &2&n<cmd:/skgui update>Click here for directly update system!" and nl to executor
else:
send "%{SkriptGUI::prefix}% &2You can directly update this system in game with command &8""&2/skgui update&8""&2."
else:
send "%{SkriptGUI::prefix}% &2You're running with latest version of SkriptGUI." and "%{SkriptGUI::prefix}% &2Thanks!" to executor
loop files in directory "plugins/SkriptGUI/GUIs":
if first character of name of file loop-value isn't "-":
load yaml "plugins/SkriptGUI/GUIs/%name of file loop-value%.yml" as "SkriptGUI/GUIs/%name of file loop-value%.yml"
save yaml "SkriptGUI/GUIs/%name of file loop-value%.yml" without extra lines between nodes
add 1 to {_guiAmount}
loop loaded yaml:
if loop-value contains "SkriptGUI/GUIs/":
if file "plugins/%loop-value%" doesn't exist:
unload yaml loop-value
send "%{SkriptGUI::prefix}% &2Succesfully reloaded with &e%{_guiAmount}% &2GUI. &8(&e%difference between {_systemMS} and current system milliseconds% ms&8)" to executor
else if yaml "SkriptGUI/GUIs/%arg-2%.yml" is loaded:
load yaml "plugins/SkriptGUI/GUIs/%arg-2%.yml" as "SkriptGUI/GUIs/%arg-2%.yml"
save yaml "SkriptGUI/GUIs/%arg-2%.yml" without extra lines between nodes
send "%{SkriptGUI::prefix}% &2GUI &e%arg-2% &2is succesfully reloaded." to executor
else if arg-2 is "config":
load yaml "plugins/SkriptGUI/config.yml" as "SkriptGUI/config"
save yaml "SkriptGUI/config" without extra lines between nodes
set {SkriptGUI::adminPerm} to yaml value "admin-permission" from "SkriptGUI/config"
set {SkriptGUI::prefix} to yaml value "prefix" from "SkriptGUI/config"
set {SkriptGUI::noPermMSG} to yaml value "no-permission-message" from "SkriptGUI/config"
set {SkriptGUI::helpCMD::*} to colored join yaml list "help-command" from "SkriptGUI/config" with nl
replace "%%prefix%%" with {SkriptGUI::prefix} in {SkriptGUI::noPermMSG}
replace "%%prefix%%" with {SkriptGUI::prefix} in {SkriptGUI::helpCMD::*}
send "%{SkriptGUI::prefix}% &eConfig &2is succesfully reloaded."
else:
send "%{SkriptGUI::prefix}% &cThere is no GUI with this ID."
else if arg-1 is "disable":
if yaml "SkriptGUI/GUIs/%arg-2%.yml" is loaded:
save yaml "SkriptGUI/GUIs/%arg-2%.yml"
unload yaml "SkriptGUI/GUIs/%arg-2%.yml"
set {_name} to name of file "plugins/SkriptGUI/GUIs/%arg-2%.yml"
rename file "plugins/SkriptGUI/GUIs/%arg-2%.yml" to "-%{_name}%.yml"
send "%{SkriptGUI::prefix}% &2GUI &e%arg-2% &2succesfully disabled."
else:
send "%{SkriptGUI::prefix}% &cThere is no GUI with this ID."
else if arg-1 is "enable":
if yaml "SkriptGUI/GUIs/%arg-2%.yml" isn't loaded:
if file "plugins/SkriptGUI/GUIs/-%arg-2%.yml" exists:
set {_name} to name of file "plugins/SkriptGUI/GUIs/-%arg-2%.yml"
replace "-" with "" in {_name}
rename file "plugins/SkriptGUI/GUIs/-%arg-2%.yml" to "%{_name}%.yml"
load yaml "plugins/SkriptGUI/GUIs/%arg-2%.yml" as "SkriptGUI/GUIs/%arg-2%.yml"
save yaml "SkriptGUI/GUIs/%arg-2%.yml"
send "%{SkriptGUI::prefix}% &2GUI &e%arg-2% &2succesfully enabled."
else:
send "%{SkriptGUI::prefix}% &cThere is no GUI with this ID."
else:
send "%{SkriptGUI::prefix}% &cThere is already a GUI with this ID."
else if arg-1 is "open":
if yaml "SkriptGUI/GUIs/%arg-2%.yml" is loaded:
openGUI((arg-3 parsed as player if arg-3 is set else player), arg-2)
else:
send "%{SkriptGUI::prefix}% &cThere is no GUI with this ID."
else if arg-1 is "create":
if arg-2 is set:
if yaml "SkriptGUI/GUIs/%arg-2%.yml" isn't loaded:
if arg-3 parsed as integer is set:
if arg-4 is set:
set {SkriptGUI::creatingGUI::%player%} to true
set {SkriptGUI::creatingGUI::%player%::id} to arg-2
set {SkriptGUI::creatingGUI::%player%::size} to arg-3 parsed as integer
set {SkriptGUI::creatingGUI::%player%::name} to placeholder parsed arg-4 from player
send "%{SkriptGUI::prefix}% &2Edit the GUI however you want. After that, close it. The system will take care of the rest."
open virtual chest inventory named placeholder parsed colored arg-4 from player with size arg-3 parsed as integer to player
else:
send "%{SkriptGUI::prefix}% &cPlease enter a GUI name."
else:
send "%{SkriptGUI::prefix}% &cPlease enter a GUI size."
else:
send "%{SkriptGUI::prefix}% &cYou can't create this GUI because there is already a GUI with this ID."
else:
send "%{SkriptGUI::prefix}% &cPlease enter a GUI ID."
else if arg-1 is "update":
if line 1 in file "plugins/Skript/scripts/%script's name%.sk" isn't text of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI.sk" line 1:
set {_systemMS} to current system milliseconds
set {_fileName} to line 1 in file "plugins/Skript/scripts/%script's name%.sk"
replace "##Version: " with "" in {_fileName}
create directory "plugins/SkriptGUI/backups"
set file contents of "plugins/SkriptGUI/backups/SkriptGUI (%{_fileName}%).sk" to file contents of "plugins/Skript/scripts/%script's name%.sk"
set file contents of "plugins/Skript/scripts/%script's name%.sk" to text of url "https://raw.githubusercontent.com/bilektugrul/SkriptGUI/master/SkriptGUI.sk"
execute executor command "sk reload %script's name%"
send "%{SkriptGUI::prefix}% &2Succesfully updated and reloaded! &8(&e%difference between {_systemMS} and current system milliseconds% ms&8)" and "%{SkriptGUI::prefix}% &2Old version codes have been backed up."
else:
send "%{SkriptGUI::prefix}% &cYou're already running with latest version of SkriptGUI." to executor
else if arg-1 is "list":
loop loaded yaml:
if loop-value contains "SkriptGUI/GUIs/":
add last element of (loop-value split at "SkriptGUI/GUIs/") to {_list::*}
send {_list::*} to player
else:
send "%{SkriptGUI::prefix}% &cInvalid argument."
execute player command "skgui help"
else:
send placeholder parsed {SkriptGUI::noPermMSG} from player
function openGUI(player: player, gui: text):
if yaml value "gui.open-requirement" from "SkriptGUI/GUIs/%{_gui}%.yml" is set:
set {_openable} to requirementCheck("gui.open-requirement.requirements", {_gui}, {_player})
else:
set {_openable} to true
if {_openable} is true:
set {_size} to yaml value "gui.size" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_name} to yaml value "gui.name" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_update-ticks} to yaml value "gui.update-ticks" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_open-commands::player::*} to placeholder parsed yaml list "gui.open-commands.player" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_open-commands::console::*} to placeholder parsed yaml list "gui.open-commands.console" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
open virtual chest inventory named placeholder parsed colored {_name} from {_player} with size {_size} to {_player}
loop {_open-commands::player::*}:
execute {_player} command loop-value
loop {_open-commands::console::*}:
execute console command loop-value
if yaml value "gui.update" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
while {_player}'s current inventory's name is placeholder parsed {_name} from {_player}:
forceOpenGUI({_player}, {_gui}, false, 0, {_name})
wait "%{_update-ticks}% ticks" parsed as timespan
else:
forceOpenGUI({_player}, {_gui}, false, 0, {_name})
else:
returnDenyEvents("gui.open-requirement", {_gui}, {_player})
function forceOpenGUI(player: player, gui: text, virtual: boolean, size: integer, name: text):
if {_virtual} is true:
open virtual chest inventory named placeholder parsed colored {_name} from {_player} with size {_size} to {_player}
loop yaml node keys "gui.slots" from "SkriptGUI/GUIs/%{_gui}%.yml":
set {_value} to loop-value
set {_GUI::item} to placeholder parsed yaml value "gui.slots.%loop-value%.item.material" from "SkriptGUI/GUIs/%{_gui}%.yml" parsed as item
set {_GUI::itemNBT} to placeholder parsed yaml value "gui.slots.%loop-value%.item.NBT" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::itemAmount} to yaml value "gui.slots.%loop-value%.item.amount" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_GUI::slot} to yaml value "gui.slots.%loop-value%.slot" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_GUI::rightclick::playerCommands::*} to placeholder parsed yaml list "gui.slots.%loop-value%.commands.rightclick.player-commands" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::rightclick::consoleCommands::*} to placeholder parsed yaml list "gui.slots.%loop-value%.commands.rightclick.console-commands" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::leftclick::consoleCommands::*} to placeholder parsed yaml list "gui.slots.%loop-value%.commands.leftclick.console-commands" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::leftclick::playerCommands::*} to placeholder parsed yaml list "gui.slots.%loop-value%.commands.leftclick.player-commands" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::click::playerCommands::*} to placeholder parsed yaml list "gui.slots.%loop-value%.commands.click.player-commands" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::click::consoleCommands::*} to placeholder parsed yaml list "gui.slots.%loop-value%.commands.click.console-commands" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::itemLore::*} to placeholder parsed yaml list "gui.slots.%loop-value%.item.lore" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::itemName} to placeholder parsed yaml value "gui.slots.%loop-value%.item.material-name" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_GUI::skullOwner} to yaml value "gui.slots.%loop-value%.item.skull.owner" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_GUI::skullID} to yaml value "gui.slots.%loop-value%.item.skull.id" from "SkriptGUI/GUIs/%{_gui}%.yml"
set {_GUI::skullValue} to yaml value "gui.slots.%loop-value%.item.skull.texture-value" from "SkriptGUI/GUIs/%{_gui}%.yml"
if {_GUI::skullOwner} is set:
set {_GUI::item} to skull of "%{_GUI::skullOwner}%" parsed as offlineplayer
if {_GUI::skullID} is set:
if {_GUI::skullValue} is set:
set {_GUI::item} to skull from skin with value {_GUI::skullValue} signature {_GUI::skullID}
loop yaml list "gui.slots.%loop-value%.item.enchants" from "SkriptGUI/GUIs/%{_gui}%.yml":
enchant {_GUI::item} with "%loop-value-2%" parsed as enchantment type
if yaml value "gui.slots.%loop-value%.item.shiny" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
set {_GUI::item} to shiny {_GUI::item}
if yaml value "gui.slots.%loop-value%.item.hide-flags" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
set {_GUI::item} to {_GUI::item} with no nbt
if {_GUI::itemNBT} is set:
set {_GUI::item} to {_GUI::item} with nbt {_GUI::itemNBT}
if yaml value "gui.slots.%{_value}%.item.view-requirement.requirements" from "SkriptGUI/GUIs/%{_gui}%.yml" is set:
set {_viewable} to requirementCheck("gui.slots.%{_value}%.item.view-requirement.requirements", {_gui}, {_player})
else:
set {_viewable} to true
if {_viewable} is true:
make gui slot {_GUI::slot} of {_player} with ({_GUI::itemAmount} otherwise 1) of {_GUI::item} named colored {_GUI::itemName} with lore {_GUI::itemLore::*} to run:
if yaml value "gui.slots.%{_value}%.close-on-click" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
close {_player}'s inventory
if gui-click-type is right mouse button:
if yaml value "gui.slots.%{_value}%.commands.rightclick.requirement" from "SkriptGUI/GUIs/%{_gui}%.yml" is set:
set {_clickable} to requirementCheck("gui.slots.%{_value}%.commands.rightclick.requirement.requirements", {_gui}, {_player})
else:
set {_clickable} to true
if {_clickable} is true:
loop {_GUI::rightclick::consoleCommands::*}:
execute console command loop-value-2
loop {_GUI::rightclick::playerCommands::*}:
execute {_player} command loop-value-2
else:
returnDenyEvents("gui.slots.%{_value}%.commands.rightclick.requirement", {_gui}, {_player})
else if gui-click-type is left mouse button:
if yaml value "gui.slots.%{_value}%.commands.leftclick.requirement" from "SkriptGUI/GUIs/%{_gui}%.yml" is set:
set {_clickable} to requirementCheck("gui.slots.%{_value}%.commands.leftclick.requirement.requirements", {_gui}, {_player})
else:
set {_clickable} to true
if {_clickable} is true:
loop {_GUI::leftclick::consoleCommands::*}:
execute console command loop-value-2
loop {_GUI::leftclick::playerCommands::*}:
execute {_player} command loop-value-2
else:
returnDenyEvents("gui.slots.%{_value}%.commands.rightclick.requirement", {_gui}, {_player})
if yaml value "gui.slots.%{_value}%.commands.click" from "SkriptGUI/GUIs/%{_gui}%.yml" is set:
if yaml value "gui.slots.%{_value}%.commands.click.requirement" from "SkriptGUI/GUIs/%{_gui}%.yml" is set:
set {_clickable} to requirementCheck("gui.slots.%{_value}%.commands.click.requirement.requirements", {_gui}, {_player})
else:
set {_clickable} to true
if {_clickable} is true:
loop {_GUI::click::consoleCommands::*}:
execute console command loop-value-2
loop {_GUI::click::playerCommands::*}:
execute {_player} command loop-value-2
else:
returnDenyEvents("gui.slots.%{_value}%.commands.rightclick.requirement", {_gui}, {_player})
delete {_GUI::*}
function requirementCheck(value: text, gui: text, player: player) :: boolean:
loop yaml node keys {_value} from "SkriptGUI/GUIs/%{_gui}%.yml":
set {_output} to placeholder parsed yaml value "%{_value}%.%loop-value%.output" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_input} to placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "string equals ignorecase":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if {_output} isn't placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}:
return false
else:
set {_return} to true
else if {_output} is placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}:
set {_return} to true
if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "string equals":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if {_output} doesn't match placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}:
return false
else:
set {_return} to true
else if {_output} matches placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "string contains":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if {_output} doesn't contain placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}:
return false
else:
set {_return} to true
else if {_output} contains placeholder parsed yaml value "%{_value}%.%loop-value%.input" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "has permission":
set {_permission} to placeholder parsed yaml value "%{_value}%.%loop-value%.permission" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if {_player} doesn't have permission {_permission}:
return false
else:
set {_return} to true
else if {_player} has permission {_permission}:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is ">":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if "%{_output}%" parsed as number isn't greater than "%{_input}%" parsed as number:
return false
else:
set {_return} to true
else if "%{_output}%" parsed as number is greater than "%{_input}%" parsed as number:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is ">=":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if "%{_output}%" parsed as number isn't greater or equal to "%{_input}%" parsed as number:
return false
else:
set {_return} to true
else if "%{_output}%" parsed as number is greater or equal to "%{_input}%" parsed as number:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "=":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if "%{_output}%" parsed as number isn't "%{_input}%" parsed as number:
return false
else:
set {_return} to true
else if "%{_output}%" parsed as number is "%{_input}%" parsed as number:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "<=":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if "%{_output}%" parsed as number isn't less or equal to "%{_input}%" parsed as number:
return false
else:
set {_return} to true
else if "%{_output}%" parsed as number is less or equal to "%{_input}%" parsed as number:
set {_return} to true
else if yaml value "%{_value}%.%loop-value%.type" from "SkriptGUI/GUIs/%{_gui}%.yml" is "<":
if yaml value "gui.open-requirement.stop-if-a-requirement-missing" from "SkriptGUI/GUIs/%{_gui}%.yml" is true:
if "%{_output}%" parsed as number isn't less than "%{_input}%" parsed as number:
return false
else:
set {_return} to true
else if "%{_output}%" parsed as number is less than "%{_input}%" parsed as number:
set {_return} to true
return {_return}
function returnDenyEvents(value: text, gui: text, player: player):
set {_denyMessages::*} to placeholder parsed yaml list "%{_value}%.deny-messages" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_denyCommands::player::*} to placeholder parsed yaml list "%{_value}%.deny-commands.player" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
set {_denyCommands::console::*} to placeholder parsed yaml list "%{_value}%.deny-commands.console" from "SkriptGUI/GUIs/%{_gui}%.yml" from {_player}
if {_denyMessages::*} is set:
replace "%%prefix%%" with "%{skriptgui::prefix}%" in {_denyMessages::*}
send colored join {_denyMessages::*} with nl to {_player}
loop {_denyCommands::player::*}:
execute {_player} command loop-value
loop {_denyCommands::console::*}:
execute console command loop-value
on inventory close:
if {skriptgui::creatingGUI::%player%} is set:
if colored name of event-inventory is colored {skriptgui::creatingGUI::%player%::name}:
load yaml "plugins/SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" as "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml"
set yaml value "gui.size" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to {skriptgui::creatingGUI::%player%::size}
set yaml value "gui.name" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to {skriptgui::creatingGUI::%player%::name}
set yaml value "gui.update" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to false
set yaml value "gui.update-ticks" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to 20
loop {skriptgui::creatingGUI::%player%::size} * 9 times:
if type of slot (loop-number - 1) of event-inventory isn't air:
set yaml value "gui.slots.slot-%loop-number - 1%.item.material" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to "%type of slot (loop-number - 1) of event-inventory%"
set yaml value "gui.slots.slot-%loop-number - 1%.slot" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to rounded (loop-number - 1)
if name of slot (loop-number - 1) of event-inventory is set:
set yaml value "gui.slots.slot-%loop-number - 1%.material-name" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to name of slot (loop-number - 1) of event-inventory
set yaml value "gui.slots.slot-%loop-number - 1%.close-on-click" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to true
if lore of slot (loop-number - 1) of event-inventory is set:
set yaml list "gui.slots.slot-%loop-number - 1%.item.lore" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to lore of slot (loop-number - 1) of event-inventory
set yaml value "gui.slots.slot-%loop-number - 1%.item.shiny" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to true
set yaml value "gui.slots.slot-%loop-number - 1%.item.hide-flags" from "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml" to false
save yaml "SkriptGUI/GUIs/%{skriptgui::creatingGUI::%player%::id}%.yml"
send "%{SkriptGUI::prefix}% &2GUI &e%{skriptgui::creatingGUI::%player%::id}% &2created!"
delete {skriptgui::creatingGUI::%player%::*}
delete {skriptgui::creatingGUI::%player%}
on command:
if yaml value "gui-commands./%full command%" from "SkriptGUI/config" is set:
cancel event
openGUI(player, yaml value "gui-commands./%full command%" from "SkriptGUI/config")
on sign change:
if line 1 of event-block is yaml value "sign-design.required-first-line" from "SkriptGUI/config":
if player has permission "%{SkriptGUI::adminPerm}%":
if line 2 of event-block isn't "":
if yaml "SkriptGUI/GUIs/%uncolored line 2 of block%.yml" is loaded:
loop 4 times:
set {_value} to element loop-number of yaml list "sign-design.design" from "SkriptGUI/config"
replace "%%gui-id%%" with uncolored line 2 of event-block in {_value}
replace "%%prefix%%" with {SkriptGUI::prefix} in {_value}
set line loop-number of event-block to placeholder parsed colored {_value} from player
else:
send "%{SkriptGUI::prefix}% &cThere is no GUI with this ID."
else:
send "%{SkriptGUI::prefix}% &cPlease enter a GUI ID to line 2 of sign."
on rightclick on sign:
set {_value} to 1st element of yaml list "sign-design.design" from "SkriptGUI/config"
replace "%%prefix%%" with {SkriptGUI::prefix} in {_value}
if {_value} is line 1 of block:
openGUI(player, uncolored line 2 of block)
on load:
execute console command "skgui reload"
Gözünüz biraz gerçek Skript görsün istedim xd.
Son düzenleme: