Skocz do zawartości
  • 0

Klasy


kosa212

Pytanie

Mógł mi ktoś napisać skrypt na klasy.Chodzi gdy wpisze komende /klasy otwiera sie gui w którym są 3 klasy.Pierwsza klase kosztuje 4000 monet i jest na 2dni gdy ją naciśniemy pojawia sie na chacie kupiłeś Maga na 2 dni.Ten mag robi że mamy leprzy exp przy kopaniu i mamy speeda 2.Kolejna klasa to Górnik i kosztuje 3000 monet i jest na 3 dni gdy ją sie kupi dodaje ekwipunku żelzny miecz,sikiera,Kilof, i 25 chleba gdy taką klasą sie wykopie  stak stone to dostajesz 50 monet.Kolejna klasa to Terminator i kosztuje 10000 monet i jest  na 3 dni i gdy taką klasą kogoś bijesz zabierasz mu 0.5 mocniej i masz 5 dodatkowych serci gdy kogoß sie zabije dostaje sie 30monet.

I można mieć tylko 1 klase!

Monety to z pluginu vault.

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

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
Spoiler

every 1 second:
	loop {zakupili::*}:
		if {klasa::%loop-value%} is "MAG":
			if difference between now and {klasa::%loop-value%::czas} >= 2 days:
				if loop-value is online:
					clear {klasa::%loop-value%}
					clear {klasa::%loop-value%::czas}
					clear {zakupili::%loop-value%}
					remove speed from loop-value parsed as player
			else:
				apply speed 2 to loop-value for 1000 second
		if {klasa::%loop-value%} is "GORNIK" or "TERMINATOR":
			if difference between now and {klasa::%loop-value%::czas} >= 3 days:
				if loop-value is online:
					clear {klasa::%loop-value%}
					clear {klasa::%loop-value%::czas}
					clear {zakupili::%loop-value%}
					set loop-value's max health to 10
command /klasy [<text>] [<number>]:
	trigger:
		if arg-1 is not set:
			open chest with 3 rows named "&6&lKLASY" to player
			wait 2 tick
			loop 27 times:
				format slot loop-number -1 of player with light gray glass pane named " " to be unstealable
			format slot 10 of player with potion named "&2&LKLASA: &5&lMAG" with lore "&2&LDaje:||&2&L- Speed II||&2&L- Wiecej exp przy kopaniu||&2&LKoszt: 4000 $||&2&LCzas : 2 dni" to close then run [execute player command "klasy kupuje 1"]
			format slot 13 of player with potion named "&2&LKLASA: &8&lGORNIK" with lore "&2&LDaje:||&2&L- Zielazny miecz||&2&L- Zielazna siekiera||&2&L- Zielazny kilof||&2&L- 25 chleba||&2&L- po wykapaniu 64 stone daje 50$||&2&LKoszt: 3000 $||&2&LCzas : 3 dni" to close then run [execute player command "klasy kupuje 2"]
			format slot 16 of player with potion named "&2&LKLASA: &c&lTERMINATOR" with lore "&2&LDaje:||&2&L- 5 dodatkowych serc||&2&L- bijesz o 0.5 srca wiecej||&2&L- po zabiciu otrzymujesz 30$||&2&LKoszt: 10000 $||&2&LCzas : 3 dni" to close then run [execute player command "klasy kupuje 3"]
		if arg-1 is "kupuje":
			if arg-2 is 1:
				if player's balance >= 4000:
					add player to {zakupili::*}
					set {klasa::%player%} to "MAG"
					set {klasa::%player%::czas} to now
					broadcast "          "
					broadcast "&2&lGracz &6&l%player% &2&lzakupił klase &5&lMAGA &2&lpod &6/klasy"
					broadcast "          "
					remove 4000 from player's balance
			if arg-2 is 2:
				if player's balance >= 3000:
					add player to {zakupili::*}
					set {klasa::%player%} to "GORNIK"
					set {klasa::%player%::czas} to now
					broadcast "          "
					broadcast "&2&lGracz &6&l%player% &2&lzakupił klase &8&lGORNIKA &2&lpod &6/klasy"
					broadcast "          "
					remove 3000 from player's balance
					give player iron pickaxe
					give player iron sword
					give player iron axe
					give player 25 bread
					remove speed from player
					set player's max health to 10
			if arg-2 is 3:
				if player's balance >= 10000:
					add player to {zakupili::*}
					set {klasa::%player%} to "TERMINATOR"
					set {klasa::%player%::czas} to now
					broadcast "          "
					broadcast "&2&lGracz &6&l%player% &2&lzakupił klase &4&lTERMINATORA &2&lpod &6/klasy"
					broadcast "          "
					remove 10000 from player's balance
					set player's max health to 15
					remove speed from player
on death:
	if victim is a player:
		if attacker is a player:
			if {klasa::%attacker%} is "TERMINATOR":
				add 30 to attacker's balance
on damage:
	if attacker is a player:
		if {klasa::%attacker%} is "TERMINATOR":
			set damage to damage+0.5
on break of stone:
	if {klasa::%player%} is "GORNIK":
		if {50hasju::%player%} is not set:
			set {50hasju::%player%} to 0
		add 1 to {50hasju::%player%}
		if {50hasju::%player%} is 64:
			set {50hasju::%player%} to 0
			add 50 to player's balance

 

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
Spoiler

every 30 second:
	loop {7days::*}:
		if difference between now and {7days::%loop-value%} >= 7 days:
			clear {7days::%loop-value%}
	loop {zakupili::*}:
		if {klasa::%loop-value%} is "MAG":
			if difference between now and {klasa::%loop-value%::czas} >= 2 days:
				if loop-value is online:
					clear {klasa::%loop-value%}
					clear {klasa::%loop-value%::czas}
					clear {zakupili::%loop-value%}
					remove speed from loop-value parsed as player
			else:
				apply speed 2 to loop-value for 1000 second
		if {klasa::%loop-value%} is "GORNIK" or "TERMINATOR":
			if difference between now and {klasa::%loop-value%::czas} >= 3 days:
				if loop-value is online:
					clear {klasa::%loop-value%}
					clear {klasa::%loop-value%::czas}
					clear {zakupili::%loop-value%}
					set loop-value's max health to 10
command /klasy [<text>] [<number>]:
	trigger:
		if arg-1 is not set:
			open chest with 3 rows named "&6&lKLASY" to player
			wait 2 tick
			loop 27 times:
				format slot loop-number -1 of player with light gray glass pane named " " to be unstealable
			format slot 10 of player with potion named "&2&LKLASA: &5&lMAG" with lore "&2&LDaje:||&2&L- Speed II||&2&L- Wiecej exp przy kopaniu||&2&LKoszt: 4000 $||&2&LCzas : 2 dni" to close then run [execute player command "klasy kupuje 1"]
			format slot 13 of player with potion named "&2&LKLASA: &8&lGORNIK" with lore "&2&LDaje:||&2&L- Zielazny miecz||&2&L- Zielazna siekiera||&2&L- Zielazny kilof||&2&L- 25 chleba||&2&L- po wykapaniu 64 stone daje 50$||&2&LKoszt: 3000 $||&2&LCzas : 3 dni" to close then run [execute player command "klasy kupuje 2"]
			format slot 16 of player with potion named "&2&LKLASA: &c&lTERMINATOR" with lore "&2&LDaje:||&2&L- 5 dodatkowych serc||&2&L- bijesz o 0.5 srca wiecej||&2&L- po zabiciu otrzymujesz 30$||&2&LKoszt: 10000 $||&2&LCzas : 3 dni" to close then run [execute player command "klasy kupuje 3"]
		if arg-1 is "kupuje":
			if {7days::%player%} is not set:
				if arg-2 is 1:
					if player's balance >= 4000:
						add player to {zakupili::*}
						set {klasa::%player%} to "MAG"
						set {klasa::%player%::czas} to now
						broadcast "          "
						broadcast "&2&lGracz &6&l%player% &2&lzakupił klase &5&lMAGA &2&lpod &6/klasy"
						broadcast "          "
						remove 4000 from player's balance
						set {7days::%player%} to now
				if arg-2 is 2:
					if player's balance >= 3000:
						add player to {zakupili::*}
						set {klasa::%player%} to "GORNIK"
						set {klasa::%player%::czas} to now
						broadcast "          "
						broadcast "&2&lGracz &6&l%player% &2&lzakupił klase &8&lGORNIKA &2&lpod &6/klasy"
						broadcast "          "
						remove 3000 from player's balance
						give player iron pickaxe
						give player iron sword
						give player iron axe
						give player 25 bread
						remove speed from player
						set player's max health to 10
						set {7days::%player%} to now
				if arg-2 is 3:
					if player's balance >= 10000:
						add player to {zakupili::*}
						set {klasa::%player%} to "TERMINATOR"
						set {klasa::%player%::czas} to now
						broadcast "          "
						broadcast "&2&lGracz &6&l%player% &2&lzakupił klase &4&lTERMINATORA &2&lpod &6/klasy"
						broadcast "          "
						remove 10000 from player's balance
						set player's max health to 15
						remove speed from player
						set {7days::%player%} to now		
  			else:
				set {_} to {7days::%player%}
				add 7 days to {_}
				send "&cklase mozesz kupic dopiero %{_}%"
on death:
	if victim is a player:
		if attacker is a player:
			if {klasa::%attacker%} is "TERMINATOR":
				add 30 to attacker's balance
on damage:
	if attacker is a player:
		if {klasa::%attacker%} is "TERMINATOR":
			set damage to damage+0.5
on break of stone:
	if {klasa::%player%} is "GORNIK":
		if {50hasju::%player%} is not set:
			set {50hasju::%player%} to 0
		add 1 to {50hasju::%player%}
		if {50hasju::%player%} is 64:
			set {50hasju::%player%} to 0
			add 50 to player's balance

 

Proszę nie pogniewam się o parę lików pod postami :P

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

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ę...