# Skrypt na schowek v. 0.1 by imxkvpi # imxkvpi © Copyright 2017 options: # Uprawnienie do zdjecia limitu perm-admin: imxkvpi.schowek.admin perm-omin: imxkvpi.limit.omin variables: #{ #DEFAULT SETTINGS {limity::items::*} = "enderpearl, enchanted golden apple, golden apple" {limit.enderpearl} = 4 {limit.enchanted golden apple} = 2 {limit.golden apple} = 5 #} on pickup: if {limity::items::*} contains "%event-item%": if amount of event-item in player's inventory is bigger than or equal to {limit.%event-item%}: set {_amount.inv} to amount of event-item in player's inventory set {_x} to "%{_amount.inv}% %event-item%" remove {_x} from player's inventory subtract {limit.%event-item%} from {_amount.inv} add {_amount.inv} to {schowek::%event-item%::%player%} clear {_amount.inv} set {_x} to "%{limit.%event-item%}% %event-item%" add {_x} to player's inventory send "&cPosiadales za duza ilosc &8(&6%event-item%&8)" to player stop else: stop else: stop #every second: #loop all players: #send "czesc" to loop-player command /imxkvpi:schowek: usage: /schowek aliases: /schowek, /sch, trigger: open chest with 3 rows named "&8(&c&lSCH&6&lO&c&lWEK&8)" to player loop {limity::items::*}: set {_1::%loop-index%} to loop-value+1 loop {_1::%loop-index%} times: format slot {_1::%loop-index%} + 1 of player with 1 of loop-index parsed as item to be unstealable command /imxkvpi:odbierzitem []: usage: /odbierzitemy aliases: /odbierzitem, /odbitem trigger: if amount of item-arg in player's inventory is smaller than {limit.%item-arg%}: send "&cPrzekazujemy itemy do odbioru... &8(&6Wait..&8)" wait 2.22 seconds send "&aPrzesylka zostanie dostarczona za chwile..." wait 0.69 seconds set {_x} to "%{schowek::%item-arg%::%player%}% %item-arg%" add {_x} to player's inventory clear {schowek::%item-arg%::%player%} stop else: send "&3Posiadasz zbyt wiele &8(&6%item-arg%&8) &3 w ekwipunku" stop command /adminschowek [] []: permission: {@perm-admin} trigger: if argument 1 is set: if argument 1 is "add": if argument 2 is set: add player's tool to {limity::items::*} set {limit.%player's tool%} to argument 2 send "&cDodano nowy limit &8( &3x%argument 2% &6%player's tool% &8)" stop else: send "&4Blad: &c/adminschowek &8<&cadd/del&8> &8<&6ilosc&8>" if argument 1 is "del": remove player's tool from {limity::items::*} send "&cUsunieto" stop if argument 1 is "zmien": argument 2 is set: set {limit.%player's tool%} to argument 2 send "&3Zmieniono &climit &6%player's tool%" stop else: send "Podaj ilosc" else: send "&4Blad: &c/adminschowek &8<&aadd&6/&cdel&8>" stop command /limity: trigger: set {_xx} to "enchanted golden apple" open chest with 3 rows named "&8(&c&lLI&6&lMI&c&lTY&8)" to player format slot 4 of player with sign named "&6Lista limitow" with lore "&3&lBE&c&lTA" to be unstealable format slot 10 of player with enchanted golden apple named "&6Enchantowane zlote jablka" with lore "&3Limit: &c%{limit.%{_xx}%}%" to be unstealable