Skocz do zawartości
  • 0

Naprawa itemów w GUI - kowadło


patrykozak
 Udostępnij

Pytanie

Cześć, szukałem i wszędzie są niedokończone te skrypty..
Szukam skryptu na GUI kowadła. Po kliknięciu na stojące kowadło prawym przyciskiem myszy włącza się gui.
Gui by było np. kowadło i tam napisane "naprawa przedmiotu" oraz lore z "koszt naprawy to 30 lvl"
I aby pobierało ten 30 lvl za naprawę przedmiotu.
Dziękuję :)

 

Odnośnik do komentarza
Udostępnij na innych stronach

10 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
function repair(p: player):
	if {_p)'s level >= 30:
		repair {_p}'s tool
		set {_p}'s level to (player's lvl - 30)
		send "&aNaprawiles przedmiot!"
	else:
		send "&cMasz za maly poziom exp. Wymagany 30!" to {_p}

on right click on anvil:
	cancel event
	open chest with 1 rows named "&eKowadlo:" to player
	set slot 5 of player with 1 of anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%"

on inventory click:
	if name of player's inventory is "&eKowadlo:":
		if clicked slot is 5:
			repair(player)

 

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

  • 0
1 godzinę temu, KrejzolekPRO napisał:
function repair(p: player):
	if {_p)'s level >= 30:
		repair {_p}'s tool
		set {_p}'s level to (player's lvl - 30)
		send "&aNaprawiles przedmiot!"
	else:
		send "&cMasz za maly poziom exp. Wymagany 30!" to {_p}

on right click on anvil:
	cancel event
	open chest with 1 rows named "&eKowadlo:" to player
	set slot 5 of player with 1 of anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%"

on inventory click:
	if name of player's inventory is "&eKowadlo:":
		if clicked slot is 5:
			repair(player)

 

nzngp5.jpg

Nie działa.

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
45 minut temu, patrykozak napisał:

nzngp5.jpg

Nie działa.

function repair(p: player):
	if {_p)'s exp level >= 30:
		repair {_p}'s tool
		set {_p}'s level to (player's exp level - 30)
		send "&aNaprawiles przedmiot!"
	else:
		send "&cMasz za maly poziom exp. Wymagany 30!" to {_p}

on right click on anvil:
	cancel event
	open chest with 1 rows named "&eKowadlo:" to player
	set slot 5 of player's current inventory with 1 of anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%"

on inventory click:
	if name of player's current inventory is "&eKowadlo:":
		if clicked slot is 5:
			repair(player)

 

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

  • 0
15 minut temu, KrejzolekPRO napisał:
function repair(p: player):
	if {_p)'s exp level >= 30:
		repair {_p}'s tool
		set {_p}'s level to (player's exp level - 30)
		send "&aNaprawiles przedmiot!"
	else:
		send "&cMasz za maly poziom exp. Wymagany 30!" to {_p}

on right click on anvil:
	cancel event
	open chest with 1 rows named "&eKowadlo:" to player
	set slot 5 of player's current inventory with 1 of anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%"

on inventory click:
	if name of player's current inventory is "&eKowadlo:":
		if clicked slot is 5:
			repair(player)

 

Nadal nic ...
jfupog.png

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
function repair(p: player):
	if {_p)'s lvl is greater than 29:
		repair {_p}'s tool
		set {_p}'s lvl to ({_p}'s lvl - 30)
		send "&aNaprawiles przedmiot!" to {_p}
	else:
		send "&cMasz za maly poziom exp. Wymagany 30!" to {_p}

on right click on anvil:
	cancel event
	open chest with 1 rows named "&eKowadlo:" to player
	set slot 5 of player's current inventory to anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%"

on inventory click:
	if name of player's current inventory is "&eKowadlo:":
		if clicked slot is 5: //if slot is 5:
			repair(player)

@patrykozak edytowałem.

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

  • 0
1 godzinę temu, KrejzolekPRO napisał:
function repair(p: player):
	if {_p)'s lvl is greater than 29:
		repair {_p}'s tool
		set {_p}'s lvl to ({_p}'s lvl - 30)
		send "&aNaprawiles przedmiot!" to {_p}
	else:
		send "&cMasz za maly poziom exp. Wymagany 30!" to {_p}

on right click on anvil:
	cancel event
	open chest with 1 rows named "&eKowadlo:" to player
	set slot 5 of player's current inventory to anvil named "&eKliknij i napraw!" with lore "&7Koszt: &e30 poziom exp.||&7Przedmiot: &e%player's tool%"

on inventory click:
	if name of player's current inventory is "&eKowadlo:":
		if clicked slot is 5: //if slot is 5:
			repair(player)

@patrykozak edytowałem.

Nadal nic ... nie wiem czemu to nie działa ....!!

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...