Skocz do zawartości

Timeranks


Pan Góra
# CSH External VIP Project

Masz dosyć problemów z czynnikiem zaufania w CS2 lub notorycznymi banami?

Sprawdź CSH External VIP Project.


Więcej informacji  

Rekomendowane odpowiedzi

logo.png

Autor :

 

ShroN

 

opis.png

 

Skrypt odpowiada za dawanie rangi, a po x czasie zostanie ona odebrana. Gdy twój serwer się wyłączy, czas w skrypcie stanie, ale gdy włączysz serwer, czas będzie leciał dalej.
Dostępne jednostki czasowe w skrypcie to m - minuta, h - godz i d - dzień. No cóż nie będę się dużo rozpisywała, skrypt działa podobnie jak plugin AZrank, tylko (mam nadzieję) bez bugów.

 

pex.png

 

azodsh.* - pozwala uzywac komendy /azodsh

 

wymagania.png

Musisz posiadać te pluginy!

 

- Skript
- PermissionEX
- WildSkript

 

komendy.png

 

Jedyna komenda jest: /azodsh
Jej zastosowanie:
/azodsh set nazwagracza rangaktoramaotrzymac rangaktoramaotrzymacpouplywieczasu m/h/d liczba
Przykład
/azodsh set Góra VIP Gracz d 30
Objaśnienie przykładu:
Góra - Nazwa gracza
VIP - Nazwa rangi która ma otrzymać gracz (Góra)
Gracz - Nazwa rangi która ma otrzymać gracz (Góra) po upływie czasu, w tym przypadku 30 dni
d - jednostka czasow, czyli m to minuty, h to godziny a d to dni
30 - Czas na ile gracz otrzymał rangę (w tym przypadku Góra)

 

CODE:

# ############## #;
# Skrypt #
# By ShroN #
# Name AzOdSh #
# #
# Version: 0.1 #
# ############## #

options:
    tag: &f[&2AzOdSh&f]

on load:
    if folder "plugins/AzOdSh/" doesn't exists:
        create folder "plugins/AzOdSh/"
    if folder "plugins/AzOdSh/players/" doesn't exists:
        create folder "plugins/AzOdSh/players/"
    if file "plugins/AzOdSh/config.yml" doesn't exists:
        create file "plugins/AzOdSh/config.yml"
        set "czas" to "0" in yaml file "plugins/AzOdSh/config.yml"
variables:
    {azodsh.dczascaly} = 0
    {azodsh.czascaly} = 0


command /azodsh [<text=help>] [<offlineplayer>] [<text>] [<text>] [<text>] [<number>]:
    permission: azodsh.*
    trigger:
        if arg 1 contains "help" or "pomoc" or "h" or "set" or "ustaw" or "daj":
            if arg 1 is "help" or "pomoc" or "h":
                send "&f------------&a==========={@tag}&a===========&f------------"
                send "{@tag} &9/azodsh &aset &f<&6nick&f> <&6ranga&f> <&6ranga2&f> <&6m&a/&6h&a/&6d&f> <&6czas&f>"
                send "&f------------&a==========={@tag}&a===========&f------------"
                stop
            if arg 1 is "set" or "ustaw" or "daj":
                if arg 2 is set: #Nazwa gracza
                    if arg 3 is set: #Nazwa rangi na ktora ustawie
                        if arg 4 is set: #Nazwa rangi ktora potrzyma po czasie
                            if arg 5 contains "m" or "h" or "d":
                                if arg 5 is "m": #Czas - minuta
                                    if arg 6 is set: #Liczby
                                        set {azodsh.czas.%offlineplayer-arg%} to 0
                                        execute player command "pex user %offlineplayer-arg% group set %arg 3%"
                                        set {azodsh.czas.%offlineplayer-arg%} to arg 6
                                        send "{@tag} &aUstawiles range &6%arg 3% &agraczowi &6%offlineplayer-arg%&a na &6%arg 6%&a min!"
                                        set {azodsh.dczascaly} to single value "czas" get of "plugins/AzOdSh/config.yml" parsed as number
                                        add {azodsh.dczascaly} to {azodsh.czas.%offlineplayer-arg%}
                                        if file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml" doesn't exists:
                                            create file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga1" to "%arg 3%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga2" to "%arg 4%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "nick" to "%offlineplayer-arg%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            stop
                                        else:
                                            add 1 to {azodsh.czas.%offlineplayer-arg%}
                                            create file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga1" to "%arg 3%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga2" to "%arg 4%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "nick" to "%offlineplayer-arg%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            stop
                                    else:
                                        send "{@tag} &aPodaj na ile minut..."
                                        stop
                                if arg 5 is "h": #Czas - godz
                                    if arg 6 is set: #Liczby
                                        set {azodsh.czas.%offlineplayer-arg%} to 0
                                        execute player command "pex user %offlineplayer-arg% group set %arg 3%"
                                        set {azodsh.czas.%offlineplayer-arg%} to arg 6 * 60
                                        send "{@tag} &aUstawiles range &6%arg 3% &agraczowi &6%offlineplayer-arg%&a na &6%arg 6%&a godz!"
                                        set {azodsh.dczascaly} to single value "czas" get of "plugins/AzOdSh/config.yml" parsed as number
                                        add {azodsh.dczascaly} to {azodsh.czas.%offlineplayer-arg%}
                                        if file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml" doesn't exists:
                                            create file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga1" to "%arg 3%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga2" to "%arg 4%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "nick" to "%offlineplayer-arg%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            stop
                                        else:
                                            add 1 to {azodsh.czas.%offlineplayer-arg%}
                                            create file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga1" to "%arg 3%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga2" to "%arg 4%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "nick" to "%offlineplayer-arg%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            stop
                                    else:
                                        send "{@tag} &aPodaj na ile godz..."
                                        stop
                                if arg 5 is "d": #Czas - dni
                                    if arg 6 is set: #Liczby
                                        set {azodsh.czas.%offlineplayer-arg%} to 0
                                        execute player command "pex user %offlineplayer-arg% group set %arg 3%"
                                        set {azodsh.czas.%offlineplayer-arg%} to arg 6 * 1440
                                        send "{@tag} &aUstawiles range &6%arg 3% &agraczowi &6%offlineplayer-arg%&a na &6%arg 6%&a dni!"
                                        set {azodsh.dczascaly} to single value "czas" get of "plugins/AzOdSh/config.yml" parsed as number
                                        add {azodsh.dczascaly} to {azodsh.czas.%offlineplayer-arg%}
                                        if file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml" doesn't exists:
                                            create file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga1" to "%arg 3%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga2" to "%arg 4%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "nick" to "%offlineplayer-arg%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            stop
                                        else:
                                            add 1 to {azodsh.czas.%offlineplayer-arg%}
                                            create file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga1" to "%arg 3%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "ranga2" to "%arg 4%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            set "nick" to "%offlineplayer-arg%" in yaml file "plugins/AzOdSh/players/%{azodsh.czas.%offlineplayer-arg%}%.yml"
                                            stop
                                    else:
                                        send "{@tag} &aPodaj na ile dni..."
                                        stop
                            else:
                                send "{@tag} &aWpisz m - minuty, h - godz lub d - dni"
                                stop
                        else:
                            send "{@tag} &aPodaj nazwe rangi ktora gracz ma otrzymac po uplywie czasu..."
                            stop
                    else:
                        send "{@tag} &aPodaj nazwe rangi ktora gracz ma otrzymac..."
                        stop
                else:
                    send "{@tag} &aPodaj nazwe gracza..."
                    stop
        else:
            send "&9-------&a====={@tag}&a=====&9-------"
            send "{@tag} &9/azodsh &aset &f<&6nick&f> <&6ranga&f> <&6ranga2&f> <&6m&a/&6h&a/&6d&f> <&6czas&f>"
            send "&9-------&a====={@tag}&a=====&9-------"
            stop
            
every 1 minutes:
    set {azodsh.czascaly} to single value "czas" get of "plugins/AzOdSh/config.yml" parsed as number
    set {azodsh.dczascaly} to {azodsh.czascaly}
    add 1 to {azodsh.dczascaly}
    set "czas" to "%{azodsh.dczascaly}%" in yaml file "plugins/AzOdSh/config.yml"
    if file "plugins/AzOdSh/players/%{azodsh.dczascaly}%.yml" doesn't exists:
        stop
    else:
        set {azodsh.dranga2} to single value "ranga2" get of "plugins/AzOdSh/players/%{azodsh.dczascaly}%.yml"
        set {azodsh.dnick} to single value "nick" get of "plugins/AzOdSh/players/%{azodsh.dczascaly}%.yml"
        execute console command "pex user %{azodsh.dnick}% group set %{azodsh.dranga2}%"
        stop

 

 

 

Odnośnik do komentarza

Dołącz do dyskusji

Możesz dodać zawartość już teraz a zarejestrować się później. Jeśli posiadasz już konto, zaloguj się aby dodać zawartość za jego pomocą.

Gość
Dodaj odpowiedź do tematu...

×   Wklejono zawartość z formatowaniem.   Usuń formatowanie

  Dozwolonych jest tylko 75 emoji.

×   Odnośnik został automatycznie osadzony.   Przywróć wyświetlanie jako odnośnik

×   Przywrócono poprzednią zawartość.   Wyczyść edytor

×   Nie możesz bezpośrednio wkleić grafiki. Dodaj lub załącz grafiki z adresu URL.

  Tagi

×
×
  • Dodaj nową pozycję...

Powiadomienie o plikach cookie

Umieściliśmy na Twoim urządzeniu pliki cookie, aby pomóc Ci usprawnić przeglądanie strony. Możesz dostosować ustawienia plików cookie, w przeciwnym wypadku zakładamy, że wyrażasz na to zgodę. Regulamin. Polityka prywatności