It9BobEE
Język: Skript
|
Autor: uiuin
function loadFile(source: text = " ", name: text, unload: boolean = false): if {_unload} is true: unload yaml "%{_name}%" else: load yaml "%{_source}%" as "%{_name}%" function getEffectId(name: text) :: number: set {_id} to yaml value "effect.%{_name}%" from "lpalchemy_effects" if {_id} is set: return {_id} else: return 0 #zwraca id 0 czyli brak efektu function nameDecimal(color: text) :: text: set {_decimal} to yaml value "color.%{_color}%" from "lpalchemy_colors" if {_decimal} is set: return {_decimal} else: return "16777215" #zawsze zwraca kolor bialy on load: loadFile("plugins/lpcore/addons/lpalchemy/effects.yml", "lpalchemy_effects") loadFile("plugins/lpcore/addons/lpalchemy/potions.yml", "lpalchemy_potions") loadFile("plugins/lpcore/addons/lpalchemy/colors.yml", "lpalchemy_colors") #komendy do testu command /teste [<text>] [<text>]: trigger: if arg-2 is set: send "%getEffectId(arg-1)%" else: send nameDecimal(arg-1) # command /testcre: trigger: #wersja set yaml value "yml_version" from "lpalchemy" to 0.2 #blokowanie set yaml value "savemode" from "lpalchemy_potions" to false set yaml value "savemode.lvllimit_enable" from "lpalchemy_potions" to false set yaml value "savemode.lvllimit" from "lpalchemy_potions" to 3 set yaml value "savemode.timelimit_enable" from "lpalchemy_potions" to false set yaml value "savemode.timelimit" from "lpalchemy_potions" to 600 set yaml value "savemode.cleaning_enable" from "lpalchemy_potions" to false #mikstury set yaml value "potions.1.name" from "lpalchemy_potions" to "&6Kochajaca &3Mikstura" set yaml value "potions.1.type" from "lpalchemy_potions" to 0 set yaml value "potions.1.color" from "lpalchemy_potions" to "red" set yaml value "potions.1.needrecipe" from "lpalchemy_potions" to false set yaml value "potions.1.recipe" from "lpalchemy_potions" to "kcpot" set yaml list "potions.1.required_items" from "lpalchemy_potions" to "64 stone" and "32 dirt" #efekty set yaml value "potions.1.effects.1.name" from "lpalchemy_potions" to "haste" set yaml value "potions.1.effects.1.power" from "lpalchemy_potions" to 2 set yaml value "potions.1.effects.1.dur" from "lpalchemy_potions" to 120 set yaml value "potions.1.effects.2.name" from "lpalchemy_potions" to "speed" set yaml value "potions.1.effects.2.power" from "lpalchemy_potions" to 1 set yaml value "potions.1.effects.2.dur" from "lpalchemy_potions" to 60 # set yaml value "potions.2.name" from "lpalchemy_potions" to "&4Bolesna &3Miksturka" set yaml value "potions.2.type" from "lpalchemy_potions" to 1 set yaml value "potions.2.color" from "lpalchemy_potions" to "11141120" set yaml value "potions.2.needrecipe" from "lpalchemy_potions" to true set yaml value "potions.2.recipe" from "lpalchemy_potions" to "hpot" set yaml list "potions.2.required_items" from "lpalchemy_potions" to "32 stone" and "32 diamond" # set yaml value "potions.2.effects.1.name" from "lpalchemy_potions" to "slowness" set yaml value "potions.2.effects.1.power" from "lpalchemy_potions" to 2 set yaml value "potions.2.effects.1.dur" from "lpalchemy_potions" to 120 set yaml value "potions.2.effects.2.name" from "lpalchemy_potions" to "speed" set yaml value "potions.2.effects.2.power" from "lpalchemy_potions" to 1 set yaml value "potions.2.effects.2.dur" from "lpalchemy_potions" to 60 save yaml "lpalchemy_potions"