View difference between Paste ID: sbvj69ds and 7zRrds0Y
SHOW: | | - or go back to the newest paste.
1
#Skrypt by Blezur
2
#Zakazuje podszywania się pod autora.
3
#Pozwalam na edycje 
4
#Jeżeli nie jesteś pewny czegoś - napisz na PW.
5
variables:
6
	{chat.global} = true
7
	{chat.vip} = true
8
	{chat.%player%} = true
9
	{ograniczenie} = true	
10
	{chattime.%player%} = 0
11
	{chat.tryb} = "&ajest wlaczony"
12
	{chat.ograniczenie.vip} = "&c to 2 sekundy"
13
	{chat.ograniczenie.gracz} = "&c to 4 sekundy"
14
	{chat.ograniczenie} = "&ajest wlaczone"
15
command /chat [<text>] [<text>]:
16
	trigger:
17
		if player has permissions "chat.admin":
18
			if arg 1 is set:
19
				if arg 1 is "global":
20
					if arg 2 is set:
21
						if arg 2 is "on" or "tak" or "wlacz":
22
							if {chat.global} is false:
23
								set {chat.vip} to true
24
								set {chat.global} to true
25
								set {chat.tryb} to "&ajest wlaczony"
26
								broadcast "&aChat zostal wlaczony przez administracje!"
27
								stop
28
							else:
29
								send "&cChat jest juz wlaczony!"
30
						if arg 2 is "off" or "nie" or "wylacz":
31
							if {chat.global} is true:
32
								set {chat.vip} to false
33
								set {chat.global} to false
34
								set {chat.tryb} to "&cjest wylaczony"								
35
								broadcast "&cChat zostal wylaczony przez administracje!"
36
								stop
37
							if {chat.global} is false:
38
								send "&cChat jest juz wylaczony!"							
39
						if arg 2 is not "on" or "tak" or "wlacz" or "off" or "nie" or "wylacz":
40
							send "&cPoprawne uzycie: &6/chat global &aon&6/&coff"
41
					if arg 2 is not set:
42
						send "&cPoprawne uzycie: &6/chat global &aon&6/&coff"
43
				if arg 1 is "vip":
44
					if arg 2 is set:
45
						if arg 2 is "on" or "tak" or "wlacz":
46
							if {chat.global} is false:
47
								if {chat.vip} is false:
48
									set {chat.vip} to true
49
									set {chat.tryb} to "&6jest dostepny tylko dla VIPów"
50
									send "&6Chat dla vip zostal wlaczony!"
51
									stop
52
								if {chat.vip} is true:
53
									send "&cChat dla vip jest juz &awlaczony!"
54
							if {chat.global} is true:
55
								send "&cChat aktualnie jest wlaczony!"
56
						if arg 2 is "off" or "nie" or "wylacz":	
57
							if {chat.global} is false:
58
								if {chat.vip} is true:
59
									set {chat.vip} to false
60
									set {chat.tryb} to "&cjest wylaczony"
61
									send "&6Chat dla vip zostal &cwylaczony!"
62
									stop
63
								if {chat.vip} is false:
64
									send "&cChat dla vip jest juz wylaczony!"
65
							if {chat.global} is true:
66
								send "&cChat globalny aktualnie jest wlaczony!"
67
						if arg 2 is not "on" or "tak" or "wlacz" or "off" or "nie" or "wylacz":
68
							send "&cPoprawne uzycie: &6/chat global &aon&6/&coff"		
69
					if arg 2 is not set:
70
						send "&cPoprawne uzycie: &6/chat global &aon&6/&coff"
71
				if arg 1 is "ograniczenie":
72
					if arg 2 is set:
73
						if arg 2 is "tak" or "on" or "wlacz":
74
							if {ograniczenie} is false:
75
								set {ograniczenie} to true
76
								set {chat.ograniczenie.vip} to "&cto 2 sekundy"
77
								set {chat.ograniczenie.gracz} to "&c to 4 sekundy"
78
								set {chat.ograniczenie} to "&ajest wlaczone"
79
								broadcast "&aOgraniczenie zostalo wlaczone!"
80
								stop
81
							if {ograniczenie} is true:
82
								send "&cOgraniczenie jest juz wlaczone!"
83
						if arg 2 is "nie" or "off" or "wylacz":
84
							if {ograniczenie} is true:
85
								set {ograniczenie} to false
86
								set {chat.ograniczenie.vip} to "&caktulanie wylaczone"
87
								set {chat.ograniczenie.gracz} to "&caktulanie wylaczone"
88
								set {chat.ograniczenie} to "&cjest wylaczone"	
89
								broadcast "&cOgraniczenie zostalo wylaczone!"
90
								stop
91
							if {ograniczenie} is false:
92
								send "&cOgraniczenie jest wylaczone!"
93
						if arg 2 is not "tak" or "on" or "wlacz" or "nie" or "off" or "wylacz":
94
							send "&cPoprawne uzycie: &6/chat ograniczenie &aon&6/&coff"
95
					if arg 2 is not set:
96
						send "&cPoprawne uzycie: &6/chat ograniczenie &aon&6/&coff"
97
				if arg 1 is "cc" or "czysc" or "wyczysc":
98
					loop 100 times:
99
						broadcast "&k"
100
					broadcast "&cChat zostal wyczyszczony przez administracje."
101
				if arg 1 is "p" or "help" or "pomoc":
102
					send "&6/chat global &aon&6/&coff &7- &eWlaczanie/wylaczanie chatu calkowicie."
103
					send "&6/chat vip &aon&6/&coff &7- &eWlaczanie/wylaczanie chatu dla vip (musi byc wylaczony chat global."
104
					send "&6/chat ograniczenie &aon&6/&coff &7- &eWlaczanie/wylaczanie ograniczenia na chacie."
105
					send "&6/chat czysc &7- &eCzyszczenie chatu."
106
					send "&6/chat pomoc &7- &ePomoc skryptu."					
107
				if arg 1 is not "ograniczenie" or "global" or "vip" or "cc" or "czysc" or "wyczysc" or "help" or "pomoc" or "p":
108
					send "&6/chat global &aon&6/&coff &7- &eWlaczanie/wylaczanie chatu calkowicie."
109
					send "&6/chat vip &aon&6/&coff &7- &eWlaczanie/wylaczanie chatu dla vip (musi byc wylaczony chat global."
110
					send "&6/chat ograniczenie &aon&6/&coff &7- &eWlaczanie/wylaczanie ograniczenia na chacie."
111
					send "&6/chat czysc &7- &eCzyszczenie chatu."
112
					send "&6/chat pomoc &7- &ePomoc skryptu."
113
			else:
114
				send "&8&m------------------"
115
				send "&cChat aktualnie %{chat.tryb}%"
116
				send "&cOgraniczenie aktualnie jest %{chat.ograniczenie}%"
117
				send "&cOgraniczenie dla VIP %{chat.ograniczenie.vip}%"
118
				send "&cOgraniczenie dla gracza %{chat.ograniczenie.gracz}%"
119
				send "&8&m------------------"
120
		else:
121
			send "&8&m------------------"
122
			send "&cChat aktualnie %{chat.tryb}%"
123
			send "&cOgraniczenie aktualnie jest %{chat.ograniczenie}%"
124
			send "&cOgraniczenie dla VIP %{chat.ograniczenie.vip}%"
125
			send "&cOgraniczenie dla gracza %{chat.ograniczenie.gracz}%"
126
			send "&8&m------------------"				
127
on chat:
128
	if player has permissions "chat.nolimit" or "chat.admin":
129
		stop
130
	else:
131
		if {chat.vip} is true:
132
			if player has permissions "chat.vip":
133
				if {ograniczenie} is true:
134
					if {chat.%player%} is true:
135
						set {chat.%player%} to false
136
						set {chattime.%player%} to 2
137
						wait 1 second
138
						remove 1 from {chattime.%player%}
139
						wait 1 second
140
						remove 1 from {chattime.%player%}
141
						set {chat.%player%} to true
142
					else:
143
						cancel event
144
						if {chattime.%player%} is 2:
145
							send "&cMozesz napisac za &6%{chattime.%player%}% &csekundy!"
146
						if {chattime.%player%} is 1:
147
							send "&cMozesz napisac za &6%{chattime.%player%}% &csekunde!"				
148
			else:
149
				if {ograniczenie} is true:
150
					if {chat.global} is true:
151
						if {chat.%player%} is true:
152
							set {chat.%player%} to false
153
							set {chattime.%player%} to 5
154
							wait 1 second
155
							remove 1 from {chattime.%player%}
156
							wait 1 second
157
							remove 1 from {chattime.%player%}				
158
							wait 1 second
159
							remove 1 from {chattime.%player%}
160
							wait 1 second
161
							remove 1 from {chattime.%player%}
162
							wait 1 second
163
							remove 1 from {chattime.%player%}				
164
							set {chat.%player%} to true
165
						else:
166
							cancel event
167
							if {chattime.%player%} is 2 or 3 or 4:
168
								send "&cMozesz napisac za &6%{chattime.%player%}% &csekundy!"
169
							if {chattime.%player%} is 1:
170
								send "&cMozesz napisac za &6%{chattime.%player%}% &csekunde!"	
171
					else:
172
						cancel event
173
						send "&cPisanie na chacie zostalo zablokowane dla graczy!"
174
						send "&aAktualnie pisac mogą rangi &6VIP&c!"
175
		else:
176
			cancel event
177
			send "&cPisanie na chacie zostalo wylaczone!"