Skocz do zawartości
  • 0

Kilka generatorów kamienia


Gość Usunięty#5541

Pytanie

Gość Usunięty#5541

Dawno nie pisałem skryptów i jakoś mi to nie wychodzi, więc piszę tu.

Potrzebuję 3 generatory kamienia: Basic (odnowienie po 5 sekundach), Standard (odnowienie po 2 sekundach, Premium (natychmiastowe odnowienie). Wszystko chciałbym mieć z jednego bloku (end stone), ale inne nazwy &7Generator &akamienia &8(&cB&8), &8(&cS&8), &8(&cP&8). Potrzebuje też craftingu ("register new shaped recipe for" w ogóle nie chce mi działać po mimo posiadania SkQuery), crafting zróbcie mi dowolny,  zmienię go sobie. 

Odnośnik do komentarza
https://skript.pl/temat/31857-kilka-generator%C3%B3w-kamienia/
Udostępnij na innych stronach

9 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Chyba coś takiego:

Spoiler

on load:
	register new shaped recipe for end stone named "&7Generator &akamienia &8(&cB&8)" using stone, stone, stone, stone, stone, stone, stone, stone, stone
	register new shaped recipe for end stone named "&7Generator &akamienia &8(&cS&8)" using stone, stone, stone, stone, stone, stone, stone, stone, air
	register new shaped recipe for end stone named "&7Generator &akamienia &8(&cP&8)" using stone, stone, stone, stone, stone, stone, stone, stone, dirt
on place:
	if player's tool is end stone:
		if name of player's tool is "&7Generator &akamienia &8(&cB&8)":
			set block above event-block to stone
			add location at block above event-block to {stone::basic::*}
			send "Generator kamienia: Basic"
			stop
		if name of player's tool is "&7Generator &akamienia &8(&cS&8)"
			set block above event-block to stone
			add location at block above event-block to {stone::standard::*}
			send "Generator kamienia: Standard"
			stop
		if name of player's tool is "&7Generator &akamienia &8(&cP&8)":
			set block above event-block to stone
			add location at block above event-block to {stone::premium::*}
			send "Generator kamienia: Premium"
			stop
on break:
	if {stone::basic::*} contains location of event-block:
		wait 5 seconds
		set event-block to stone
		stop
	if {stone::standard::*} contains location of event-block:
		wait 2 seconds
		set event-block to stone
		stop
	if {stone::premium::*} contains location of event-block:
		set event-block to stone
		stop
	if {stone::basic::*} contains location of block above event-block:
		remove location of block above event-block from {stone::basic::*}
		set block above event-block to air
		send "Usunieto generator kamienia: Basic"
		stop
	if {stone::standard::*} contains location of block above event-block:
		remove location of block above event-block from {stone::standard::*}
		set block above event-block to air
		send "Usunieto generator kamienia: Standard"
		stop
	if {stone::premium::*} contains location of block above event-block:
		remove location of block above event-block from {stone::premium::*}
		set block above event-block to air
		send "Usunieto generator kamienia: Premium"
		stop

 

 

Odnośnik do komentarza
https://skript.pl/temat/31857-kilka-generator%C3%B3w-kamienia/#findComment-206406
Udostępnij na innych stronach

  • 0
options:
	Blok: end stone
	Name-1: &7Generator Stone &8(&cB&8)
	Name-2: &7Generator Stone &8(&cS&8)
	Name-3: &7Generator Stone &8(&cP&8)
	Lore-1: &cCzas odnowy: &65sek
	Lore-2: &cCzas odnowy: &62sek
	Lore-3: &cCzas odnowy: &60.01sek
on load:
	register new shaped recipe for end stone named "&7Generator Stone &8(&cB&8)" with lore "&cCzas odnowy: &65sek" using stone, stone, stone, stone, grass, stone, stone, stone, stone
	register new shaped recipe for end stone named "&7Generator Stone &8(&cS&8)" with lore "&cCzas odnowy: &62sek" using stone, stone, stone, stone, dirt, stone, stone, stone, stone
	register new shaped recipe for end stone named "&7Generator Stone &8(&cP&8)" with lore "&cCzas odnowy: &60.01sek" using stone, stone, stone, stone, stone, stone, stone, stone, stone
on place of {@Blok}:
	if lore of player's tool is "{@Lore-1}" or "{@Lore-2}" or "{@Lore-3}":
		send "&6Postawiles generator kamienia!"
		set block above event-block to stone
		if Lore of player's tool is "{@Lore-1}":
			set {Czas::%location of event-block%} to 5 second
		if Lore of player's tool is "{@Lore-2}":
			set {Czas::%location of event-block%} to 2 second
		if Lore of player's tool is "{@Lore-3}":
			set {Czas::%location of event-block%} to 0.01 second
on break of stone or {@Blok}:
	if event-block is stone:
		if block under event-block is {@Blok}:
			if {Czas::%location of block under event-block%} is set:
				wait {Czas::%location of block under event-block%}
				set event-block to stone
	if event-block is {@Blok}:
		cancel event
		set event-block to air
		if {Czas::%location of event-block%} is 5 second:
			drop {@Blok} named "{@Name-1}" with lore "{@Lore-1}" at event-block
		if {Czas::%location of event-block%} is 2 second:
			drop {@Blok} named "{@Name-2}" with lore "{@Lore-2}" at event-block
		if {Czas::%location of event-block%} is 0.01 second:
			drop {@Blok} named "{@Name-3}" with lore "{@Lore-3}" at event-block

 

Edytowane przez xAxee
Odnośnik do komentarza
https://skript.pl/temat/31857-kilka-generator%C3%B3w-kamienia/#findComment-206407
Udostępnij na innych stronach

  • 0
Gość Usunięty#5541
9 minut temu, knugi napisał:

Chyba coś takiego:

  Pokaż ukrytą zawartość

 

@knugi trochę się pośpieszyłem z pochwałą. Rozwalając generatory wypada zwykły kamień endu, możesz to zmienić?

Odnośnik do komentarza
https://skript.pl/temat/31857-kilka-generator%C3%B3w-kamienia/#findComment-206409
Udostępnij na innych stronach

  • 0
2 minuty temu, BrixNW napisał:

@knugi trochę się pośpieszyłem z pochwałą. Rozwalając generatory wypada zwykły kamień endu, możesz to zmienić?

Jasne oczywiście, zauważyłem to jak xAxee post napisał. Nie każdy jest idealny :P Zaraz dam edita.

Powinno już śmigać:

Spoiler

on load:
	register new shaped recipe for end stone named "&7Generator &akamienia &8(&cB&8)" using stone, stone, stone, stone, stone, stone, stone, stone, stone
	register new shaped recipe for end stone named "&7Generator &akamienia &8(&cS&8)" using stone, stone, stone, stone, stone, stone, stone, stone, air
	register new shaped recipe for end stone named "&7Generator &akamienia &8(&cP&8)" using stone, stone, stone, stone, stone, stone, stone, stone, dirt
on place:
	if player's tool is end stone:
		if name of player's tool is "&7Generator &akamienia &8(&cB&8)":
			set block above event-block to stone
			add location at block above event-block to {stone::basic::*}
			send "Generator kamienia: Basic"
			stop
		if name of player's tool is "&7Generator &akamienia &8(&cS&8)"
			set block above event-block to stone
			add location at block above event-block to {stone::standard::*}
			send "Generator kamienia: Standard"
			stop
		if name of player's tool is "&7Generator &akamienia &8(&cP&8)":
			set block above event-block to stone
			add location at block above event-block to {stone::premium::*}
			send "Generator kamienia: Premium"
			stop
on break:
	if {stone::basic::*} contains location of event-block:
		wait 5 seconds
		set event-block to stone
		stop
	if {stone::standard::*} contains location of event-block:
		wait 2 seconds
		set event-block to stone
		stop
	if {stone::premium::*} contains location of event-block:
		set event-block to stone
		stop
	cancel event
	set event-block to air
	if {stone::basic::*} contains location of block above event-block:
		drop end stone named "&7Generator &akamienia &8(&cB&8)"
		remove location of block above event-block from {stone::basic::*}
		set block above event-block to air
		send "Usunieto generator kamienia: Basic"
		stop
	if {stone::standard::*} contains location of block above event-block:
		drop end stone named "&7Generator &akamienia &8(&cS&8)"
		remove location of block above event-block from {stone::standard::*}
		set block above event-block to air
		send "Usunieto generator kamienia: Standard"
		stop
	if {stone::premium::*} contains location of block above event-block:
		drop end stone named "&7Generator &akamienia &8(&cP&8)"
		remove location of block above event-block from {stone::premium::*}
		set block above event-block to air
		send "Usunieto generator kamienia: Premium"
		stop

 

 

Edytowane przez knugi
Odnośnik do komentarza
https://skript.pl/temat/31857-kilka-generator%C3%B3w-kamienia/#findComment-206411
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ę...