Skocz do zawartości

Skrypt na piecyk z rust


Bodziusiu2

Rekomendowane odpowiedzi

WITAM

Udostępniam mój skrypt na piecyk (podobny) na tryb rust (nietylko)

Tutaj skrypt 

Cytat

 


options:
	e: &4&lE&a&lRUST &8>>&3
on break:
	if "%type of event-block%" contain "cobblestone stair":
		give {1::%location of event-block%} of iron ore to player
		give {2::%location of event-block%} of gold ore to player
		give {3::%location of event-block%} of diamond ore to player
		give {4::%location of event-block%} of iron ingot to player
		give {5::%location of event-block%} of gold ingot to player
		give {6::%location of event-block%} of diamond to player
		give {7::%location of event-block%} of oak log to player
		give {8::%location of event-block%} of beef to player
		give {9::%location of event-block%} of cooked beef to player
		give {00::%location of event-block%} of charcoal to player
		delete {1::%location of event-block%}
		delete {2::%location of event-block%}
		delete {3::%location of event-block%}
		delete {4::%location of event-block%}
		delete {5::%location of event-block%}
		delete {6::%location of event-block%}
		delete {7::%location of event-block%}
		delete {8::%location of event-block%}
		delete {9::%location of event-block%}
		delete {0::%location of event-block%}
		delete {furnace::%location of event-block%}
		delete {open::%location of event-block%}



on place:
	if "%type of event-block%" contain "cobblestone stair":
		set {_loc} and {_loc1} to location of event-player
		add 15 to x-loc of {_loc} and z-loc of {_loc}
		remove 15 from x-loc of {_loc1} and z-loc of {_loc1}
		add 15 to y-loc of {_loc1}
		remove 15 from y-loc of {_loc}
		loop all blocks within {_loc} and {_loc1}:
			if loop-block is sponge:
				if {szaf::%location of loop-block%::members::*} contain event-player:
					set {1::%location of event-block%} to 0
					set {2::%location of event-block%} to 0
					set {3::%location of event-block%} to 0
					set {4::%location of event-block%} to 0
					set {5::%location of event-block%} to 0
					set {6::%location of event-block%} to 0
					set {7::%location of event-block%} to 0
					set {8::%location of event-block%} to 0
					set {9::%location of event-block%} to 0
					set {00::%location of event-block%} to 0
					set {0::%location of event-block%} to location of event-block
					set {furnace::%location of event-block%} to false
					set {open::%location of event-block%} to 1
				else:
					cancel event
					send "{@e} Nie mozesz tu budowac bez autoryzacji"
					stop
		set {1::%location of event-block%} to 0
		set {2::%location of event-block%} to 0
		set {3::%location of event-block%} to 0
		set {4::%location of event-block%} to 0
		set {5::%location of event-block%} to 0
		set {6::%location of event-block%} to 0
		set {7::%location of event-block%} to 0
		set {8::%location of event-block%} to 0
		set {9::%location of event-block%} to 0
		set {00::%location of event-block%} to 0
		set {0::%location of event-block%} to location of event-block
		set {furnace::%location of event-block%} to false
		set {open::%location of event-block%} to 1
		
every 3 second:
	loop {0::*}:
		if {1::%loop-value%} > 0:
			if {7::%loop-value%} > 0:
				subtract 1 from {7::%loop-value%}
				subtract 1 from {1::%loop-value%}
				add 1 to {4::%loop-value%}
				add 1 to {00::%loop-value%}
		if {2::%loop-value%} > 0:
			if {7::%loop-value%} > 0:
				subtract 1 from {7::%loop-value%}
				subtract 1 from {2::%loop-value%}
				add 1 to {5::%loop-value%}
				add 1 to {00::%loop-value%}
		if {3::%loop-value%} > 0:
			if {7::%loop-value%} > 0:
				subtract 1 from {7::%loop-value%}
				subtract 1 from {3::%loop-value%}
				add 1 to {6::%loop-value%}
				add 1 to {00::%loop-value%}
		if {8::%loop-value%} > 0:
			if {7::%loop-value%} > 0:
				subtract 1 from {7::%loop-value%}
				subtract 1 from {8::%loop-value%}
				add 1 to {9::%loop-value%}
				add 1 to {00::%loop-value%}

on rightclick:
	if "%type of event-block%" contain "cobblestone stair":
		send "{@e} &2Loading.."
		wait 1 second
		send "{@e} &2Loading..."
		wait 1 second
		if "%type of targeted block%" contain "cobblestone stair":
			if {open::%location of targeted block%} is 1:
				set {open::%location of targeted block%} to 2
				open chest inventory with 3 rows named "&eFurnace" to player
				wait 1 tick
				set {furnace::%player%} to true
				while {furnace::%player%} is true:
					set slot 1 of player's current inventory to iron ore named "&8Metal Ore" with lore "&3Ilosc: &e%{1::%location of event-block%}%"
					set slot 2 of player's current inventory to gold ore named "&8Sulfur Ore" with lore "&3Ilosc: &e%{2::%location of event-block%}%"
					set slot 3 of player's current inventory to diamond ore named "&8High Quality Metal Ore" with lore "&3Ilosc: &e%{3::%location of event-block%}%"
					set slot 5 of player's current inventory to iron ingot named "&8Metal Fragments" with lore "&3Ilosc: &e%{4::%location of event-block%}%"
					set slot 6 of player's current inventory to gold ingot named "&8Sulfur" with lore "&3Ilosc: &e%{5::%location of event-block%}%"
					set slot 7 of player's current inventory to diamond named "&8High Quality Metal" with lore "&3Ilosc: &e%{6::%location of event-block%}%"
					set slot 13 of player's current inventory to oak log named "&8Wood" with lore "&3Ilosc: &e%{7::%location of event-block%}%"
					set slot 17 of player's current inventory to charcoal named "&8Charcoal" with lore "&3Ilosc: &e%{00::%location of event-block%}%"
					set slot 20 of player's current inventory to beef named "&8Raw Meat" with lore "&3Ilosc: &e%{8::%location of event-block%}%"
					set slot 24 of player's current inventory to cooked beef named "&8Steak" with lore "&3Ilosc: &e%{9::%location of event-block%}%"
					set slot 0 and 4 and 8 and 9 and 10 and 11 and 12 and 14 and 15 and 16 and 18 and 19 and 21 and 22 and 23 and 25 and 26 of player's current inventory to gray stained glass pane named " "
					wait 2 second
			else:
				send "{@e} Ktos juz to robi !!"
		else:
			send "{@e} Musisz patrzec na piec !!"
		
on inventory close:
	name of player's current inventory is "&eFurnace":
		set {furnace::%player%} to false
		set {open::%location of targeted block%} to 1
on inventory click:
	name of player's current inventory is "&eFurnace":
		if clicked slot is 13:
			if player have 1 of oak log:
				remove 1 of oak log from player
				add 1 to {7::%location of targeted block%}
		if clicked slot is 1:
			if player have 1 of iron ore:
				remove 1 of iron ore from player
				add 1 to {1::%location of targeted block%}
		if clicked slot is 2:
			if player have 1 of gold ore:
				remove 1 of gold ore from player
				add 1 to {2::%location of targeted block%}
		if clicked slot is 3:
			if player have 1 of diamond ore:
				remove 1 of diamond ore from player
				add 1 to {3::%location of targeted block%}
		if clicked slot is 20:
			if player have 1 of beef:
				remove 1 of beef from player
				add 1 to {8::%location of targeted block%}
		if clicked slot is 17:
			if {00::%location of targeted block%} > 0:
				give {00::%location of targeted block%} of charcoal to player
				set {00::%location of targeted block%} to 0
		if clicked slot is 5:
			if {4::%location of targeted block%} > 0:
				give {4::%location of targeted block%} of iron ingot to player
				set {4::%location of targeted block%} to 0
		if clicked slot is 6:
			if {5::%location of targeted block%} > 0:
				give {5::%location of targeted block%} of gold ingot to player
				set {5::%location of targeted block%} to 0
		if clicked slot is 7:
			if {6::%location of targeted block%} > 0:
				give {6::%location of targeted block%} of diamond to player
				set {6::%location of targeted block%} to 0
		if clicked slot is 24:
			if {9::%location of targeted block%} > 0:
				give {9::%location of targeted block%} of cooked beef to player
				set {9::%location of targeted block%} to 0
		
on inventory click:
	name of player's current inventory is "&eFurnace":
		clicked inventory is not player's inventory
		cancel event
		

 

Nie znalazłem błędów, ale jak ktoś znajdzie poprawie

Jeśli ktoś chce aby przerobić pod go chętnie pomogę

 

Działanie

Aby dodać przedmiot do pieca trzeba go posiadać i kliknąć na niego w gui

Aby odebrać trzeba kliknąć 

Przepala się co 3 sekundy

 

Z tym (loading) chodzi oto że był bug na otwieranie poprzedniego piecyka otwartego i to była pierwsza myśl aby to zablokować

 

Skrypt nie jest idealny ale udostępniam go, może ktoś potrzebuje 

Edytowane przez Bodziusiu2
Glicz

Poprawiam formatowanie na ciemnym motywie.

Notatka dodana przez Glicz

Odnośnik do komentarza
Udostępnij na innych stronach

  • Szifter zablokował(a) ten temat
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ę...