Skocz do zawartości
  • 0

Przerobienie skryptu


Messie911

Pytanie

Witam,


Poczebuje przerobić skrypt:




on load:
if file in "plugins/Skript/scripts/dbsk.sk" is not exists:
download from "http://file.meee.pl/skript/dbsk/dbsk.sk" to file "plugins/Skript/scripts/dbsk.sk"
wait 10 tick
execute console command "sk reload dbsk"
set {skript.aip.version::tchest} to "0.3"
if {tchest.temp::reload} is not set:
set {tchest.temp::reload} to false
if {tchest.temp::reload} is true:
send {skript.msg::reload} to {tchest.temp::player}
set {tchest.temp::reload} to false
stop

send {skript.msg::reload} to console

command /tchest [<text>] [<text>]:
aliases: treasurechest
trigger:
if arg 1 is not set:
send "&6&LTChest &6by &6&LYooka"
send "&3/tchest set&f - zapisywanie przedmiotÄ‚łw &6(&fdomyĹ?lny typ &2unlimited&6)"
send "&3/tchest setforget [<&fczas&3>]&f - czas odniawiania skrzyni &6(&2Typ forget&6)"
send "&3/tchest del&f - usuwanie skrzyni"
send "&3/tchest one&f - zmiana typu skrzyni na jednorazowy"
send "&3/tchest setmsg [<&fwiadomoĹ?Ä?&3>]&f - ustawianie wiadomoĹ?ci dla skrzyni"
send "&3/tchest random [<&fliczba&3>]&f - subtyp losowy dla typÄ‚łw &2one &fi &2forget"
send "&3/tchest info&f - Inforacje o skrzyni"
send "&3/tchest relaod&f - PrzeĹ?adowanie skryptu"
if arg 1 is "set" or "create":
if player doesn't have permission "tchest.admin.set":
send {skript.msg::noperm}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
clear {tchest.items.%location of target block%::*}
loop all items in inventory of target block:
add loop-item to {tchest.items.%location of target block%::*}

set {tchest.info.%location of target block%::typ} to "unlimited"
send {skript.msg::itemsave}
stop
if arg 1 is "setforgettime" or "setforget":
if player doesn't have permission "tchest.admin.setforget":
send {skript.msg::noperm}
stop
if arg 2 is not set:
send {skript.msg::notime}
stop
if arg 2 parsed as timespan is not set:
send {skript.msg::notime}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
if {tchest.items.%location of target block%::*} is not set:
send {skript.msg::nochestsave}
stop
if {tchest.data.%location of target block%::*} is set:
delete {tchest.data.%location of target block%::*}
set {_time} to arg 2 parsed as timespan
set {tchest.info.%location of target block%::forget} to {_time}
set {tchest.info.%location of target block%::typ} to "forget"
send "%{skript.msg::setforget}% %{_time}%"
stop
if arg 1 is "del" or "usun":
if player doesn't have permission "tchest.admin.del":
send {skript.msg::noperm}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
delete {tchest.info.%location of target block%::*}
delete {tchest.items.%location of target block%::*}
delete {tchest.data.%location of target block%::*}
set target block to air
send {skript.msg::deletechest}
stop
if arg 1 is "one":
if player doesn't have permission "tchest.admin.one":
send {skript.msg::noperm}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
if {tchest.items.%location of target block%::*} is not set:
send {skript.msg::nochestsave}
stop
if {tchest.data.%location of target block%::*} is set:
delete {tchest.data.%location of target block%::*}
set {tchest.info.%location of target block%::typ} to "one"
if {tchest.info.%location of target block%::forget} is set:
delete {tchest.info.%location of target block%::forget}
send {skript.msg::oneset}
stop
if arg 1 is "setmsg":
if player doesn't have permission "tchest.admin.setmsg":
send {skript.msg::noperm}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
if {tchest.items.%location of target block%::*} is not set:
send {skript.msg::nochestsave}
stop
if arg 2 is not set:
send {skript.msg::nomsg}
stop
set {tchest.info.%location of target block%::msg} to coloured arg 2
send {skript.msg::setmsg}
stop
if arg 1 is "random":
if player doesn't have permission "tchest.admin.setrandom":
send {skript.msg::noperm}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
if {tchest.items.%location of target block%::*} is not set:
send {skript.msg::nochestsave}
stop
if {tchest.info.%location of target block%::typ} is not "forget" or "one":
send {skript.msg::norandomset}
stop
if arg 2 is not set:
send {skript.msg::norandomnumer}
stop
if arg 2 parsed as number is not set:
send {skript.msg::norandomnumer}
stop
set {_number} to arg 2 parsed as number
set {tchest.info.%location of target block%::subtyp} to "random"
set {tchest.info.%location of target block%::randomliczba} to {_number}
send {skript.msg::setrand}
stop
if arg 1 is "info":
if player doesn't have permission "tchest.admin.setrandom":
send {skript.msg::noperm}
stop
if targeted block is not chest:
send {skript.msg::nochest}
stop
if {tchest.items.%location of target block%::*} is not set:
send {skript.msg::nochestsave}
stop
send "&6&LInforamcje Skrzyni - &2%location of target block%"
send "&3Przedmioty: &f%{tchest.items.%location of target block%::*}%"
send "&3Typ: &f%{tchest.info.%location of target block%::typ}%"
if {tchest.info.%location of target block%::typ} is "forget":
send "&3Czas odnowienia: &f%{tchest.info.%location of target block%::forget}%"
if {tchest.info.%location of target block%::subtyp} is "random":
send "&3Subtyp: &f%{tchest.info.%location of target block%::subtyp}%"
send "&3IloĹ?Ä? losowaych przedmiotÄ‚łw: &f%{tchest.info.%location of target block%::randomliczba}%"
stop
if arg 1 is "reload" or "r":
if player doesn't have permission "tchest.admin.reload":
send {skript.msg::noperm}
stop
command sender is not the console:
set {tchest.temp::player} to player
set {tchest.temp::reload} to true
execute console command "sk reload %script%"
stop
execute console command "sk reload %script%"
stop
if arg 1 is "autor" or "version":
send "&6&LTChest &6by &6&LYooka"
send "&3Autor: &6Yooka"
send "&3www: &6http://meee.pl"
send "&3Wersja: &6%{skript.aip.version::tchest}%"







on rightclick on chest:
if {tchest.items.%event-location%::*} is set:
clear inventory of event-block
# --- Skrzynia odnawialna --- #
if {tchest.info.%event-location%::typ} is "forget":
if player doesn't have permission "tchest.use.forget":
send {skript.msg::noperm}
cancel event
stop

set {_waited} to difference between now and {tchest.data.%event-location%::%UUID of player%}
if {_waited} is less than {tchest.info.%location of target block%::forget}:
set {_last} to {tchest.data.%event-location%::%UUID of player%}
add {tchest.info.%location of target block%::forget} to {_last}
send "&cMusisz zaczekaÄ? &6%difference between {_last} and now%"
stop
if {tchest.info.%event-location%::subtyp} is "random":
add "zajebioza" to {_przedmioty::*}
set {_liczba} to {tchest.info.%event-location%::randomliczba}
set {_dodaj} to true
set {_licznik} to 0
while {_dodaj} is true:
set {_przedmiot} to random element out of {tchest.items.%event-location%::*}
if {_przedmioty::*} doesn't contain {_przedmiot}:
add {_przedmiot} to inventory of event-block
add {_przedmiot} to {_przedmioty::*}
add 1 to {_licznik}
if {_licznik} is {_liczba}:
set {_dodaj} to false
set {tchest.data.%event-location%::%UUID of player%} to now
if {tchest.info.%location of target block%::msg} is set:
send {tchest.info.%location of target block%::msg}
stop
stop

loop {tchest.items.%event-location%::*}:
add loop-value to inventory of event-block
set {tchest.data.%event-location%::%UUID of player%} to now
if {tchest.info.%location of target block%::msg} is set:
send {tchest.info.%location of target block%::msg}
stop
stop
# --- Skrzynia unlimited --- #
if {tchest.info.%location of target block%::typ} is "unlimited":
if player doesn't have permission "tchest.use.unlimited":
send {skript.msg::noperm}
cancel event
stop
loop {tchest.items.%event-location%::*}:
add loop-value to inventory of event-block
if {tchest.info.%location of target block%::msg} is set:
send {tchest.info.%location of target block%::msg}
stop
stop
# --- Skrzynia jednorazowa --- #
if {tchest.info.%location of target block%::typ} is "one":
if player doesn't have permission "tchest.use.one":
send {skript.msg::noperm}
cancel event
stop
if {tchest.data.%event-location%::%UUID of player%} is not set:
set {tchest.data.%event-location%::%UUID of player%} to false
if {tchest.data.%event-location%::%UUID of player%} is true:
send {skript.msg::oneused}
stop
if {tchest.info.%event-location%::subtyp} is "random":
add "zajebioza" to {_przedmioty::*}
set {_liczba} to {tchest.info.%event-location%::randomliczba}
set {_dodaj} to true
set {_licznik} to 0
while {_dodaj} is true:
set {_przedmiot} to random element out of {tchest.items.%event-location%::*}
if {_przedmioty::*} doesn't contain {_przedmiot}:
add {_przedmiot} to inventory of event-block
add {_przedmiot} to {_przedmioty::*}
add 1 to {_licznik}
if {_licznik} is {_liczba}:
set {_dodaj} to false
set {tchest.data.%event-location%::%UUID of player%} to true
if {tchest.info.%location of target block%::msg} is set:
send {tchest.info.%location of target block%::msg}
stop
stop
loop {tchest.items.%event-location%::*}:
add loop-value to inventory of event-block
set {tchest.data.%event-location%::%UUID of player%} to true
if {tchest.info.%location of target block%::msg} is set:
send {tchest.info.%location of target block%::msg}
stop
stop

on break:
if event-block is chest:
if {tchest.items.%event-location%::*} is set:
if player doesn't have permission "tchest.break":
send {skript.msg::noperm}
cancel event
stop
send {skript.msg::nobreak}
cancel event
stop


on explosion prime:
loop blocks in radius 5 around event-location:
if loop-block is chest:
if {tchest.items.%location of loop-block%::*} is set:
cancel event
stop

Chce by skrzynaka odnawiała się dopiero gdy zmienna " {zmienna.skrzynka}" będzie miała 1 ,a gdy będz 0 to się nie odnawia  >.<  >.<


Edytowane przez Messie911
Odnośnik do komentarza
Udostępnij na innych stronach

1 odpowiedź na to pytanie

Rekomendowane odpowiedzi

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...