Skocz do zawartości
  • 0

fortune


pawel1232

Pytanie

on mine of stone:
	if player don't have permission "cmd.drop.svip":
		if {t::d} is "&cwyłączony":
			set {diament::sz} to {Sz::n::d::d} 
			if player is holding any pickaxe or pickaxe of fortune 1 or pickaxe of fortune 2 or pickaxe of fortune 3:
				if player's y-coordinate is less than 25:
					chance of {diament::sz}%:
				if player can hold 1 diamond:
					add 1 diamond block or 2 diamond block to player
				else:
					drop 1 diamond block or 2 diamond block

Ma ktoś pomysł jak zastąpić tą linijkę z fortuna i dodać coś sensownego? Np gracz trzyma kilof bez fortuny nie dropi podwójnie jeśli trzyma fortune 1 to dropi 1-2 jesli trzyma fortune 2 to 1-2-3 a jak fortune 3 to 2-3

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/
Udostępnij na innych stronach

Rekomendowane odpowiedzi

  • 0
29 minut temu, pawel1232 napisał:

on mine of stone:
	if player don't have permission "cmd.drop.svip":
		if {t::d} is "&cwyłączony":
			set {diament::sz} to {Sz::n::d::d} 
			if player is holding any pickaxe or pickaxe of fortune 1 or pickaxe of fortune 2 or pickaxe of fortune 3:
				if player's y-coordinate is less than 25:
					chance of {diament::sz}%:
				if player can hold 1 diamond:
					add 1 diamond block or 2 diamond block to player
				else:
					drop 1 diamond block or 2 diamond block

Ma ktoś pomysł jak zastąpić tą linijkę z fortuna i dodać coś sensownego? Np gracz trzyma kilof bez fortuny nie dropi podwójnie jeśli trzyma fortune 1 to dropi 1-2 jesli trzyma fortune 2 to 1-2-3 a jak fortune 3 to 2-3

on mine of stone:
	if player's tool is pickaxe of fortune:
		set {_maxdrop} to (level of fortune of player's tool) + 1
		if player's y-coordinate is less than 25:
			chance of {diament::sz}%:
				set {_drop} to random integer between 1 and {_maxdrop}
				if player can hold {_maxdrop} of diamond blocks:
					give player {_drop} of diamond blocks
				else:
					drop {_drop} of diamond blocks at event-block

Takie coś powinno być okej.

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257862
Udostępnij na innych stronach

  • 0
16 minut temu, Kormic napisał:

on mine of stone:
	if player's tool is pickaxe of fortune:
		set {_maxdrop} to (level of fortune of player's tool) + 1
		if player's y-coordinate is less than 25:
			chance of {diament::sz}%:
				set {_drop} to random integer between 1 and {_maxdrop}
				if player can hold {_maxdrop} of diamond blocks:
					give player {_drop} of diamond blocks
				else:
					drop {_drop} of diamond blocks at event-block

Takie coś powinno być okej.

Jak byś mi połączył to z tamtym to było by super

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257867
Udostępnij na innych stronach

  • 0
4 minuty temu, pawel1232 napisał:

Jak byś mi połączył to z tamtym to było by super

on mine of stone:
	if player has permission "cmd.drop.svip":
		stop
	if {t::d} is not "&cwyłączony":
		stop
	set {diament::sz} to {Sz::n::d::d}
	if player's tool is not pickaxe of fortune:
		stop
	set {_maxdrop} to (level of fortune of player's tool) + 1
	if player's y-coordinate is not less than 25:
		stop
	chance of {diament::sz}%:
		set {_drop} to random integer between 1 and {_maxdrop}
		if player can hold {_maxdrop} of diamond blocks:
			give player {_drop} of diamond blocks
		else:
			drop {_drop} of diamond blocks at event-block

Proszę.

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257869
Udostępnij na innych stronach

  • 0
9 minut temu, Kormic napisał:

on mine of stone:
	if player has permission "cmd.drop.svip":
		stop
	if {t::d} is not "&cwyłączony":
		stop
	set {diament::sz} to {Sz::n::d::d}
	if player's tool is not pickaxe of fortune:
		stop
	set {_maxdrop} to (level of fortune of player's tool) + 1
	if player's y-coordinate is not less than 25:
		stop
	chance of {diament::sz}%:
		set {_drop} to random integer between 1 and {_maxdrop}
		if player can hold {_maxdrop} of diamond blocks:
			give player {_drop} of diamond blocks
		else:
			drop {_drop} of diamond blocks at event-block

Proszę.

on mine of stone:
	if player has permission "cmd.drop.svip":
		if {t::d} is "&cwyłączony":
			set {diament::sz} to {Sz::n::d::d} + 100
			if player's tool is pickaxe of fortune:
				set {_maxdrop} to (level of fortune of player's tool) + 1
				if player's y-coordinate is less than 25:
					chance of {diament::sz}%:
						set {_drop} to random integer between 1 and {_maxdrop}
						if player can hold {_maxdrop} of diamonds:
							give player {_drop} of diamonds
						else:
							drop {_drop} of diamonds at event-block		

Zrobiłem coś takiego i nic dropi nic a szansa jest 100%  w twoim tak samo 

EDIT: wszystkie warunki spełniłem

Edytowane przez pawel1232
Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257874
Udostępnij na innych stronach

  • 0
Teraz, pawel1232 napisał:

on mine of stone:
	if player has permission "cmd.drop.svip":
		if {t::d} is "&cwyłączony":
			set {diament::sz} to {Sz::n::d::d} + 100
			if player's tool is pickaxe of fortune:
				set {_maxdrop} to (level of fortune of player's tool) + 1
				if player's y-coordinate is less than 25:
					chance of {diament::sz}%:
						set {_drop} to random integer between 1 and {_maxdrop}
						if player can hold {_maxdrop} of diamonds:
							give player {_drop} of diamonds
						else:
							drop w{_drop} of diamonds at event-block		

Zrobiłem coś takiego i nic dropi nic a szansa jest 100%  w twoim tak samo 

W moim przypadku gdy miałeś permisję "cmd.drop.svip", to nie działało. W twoim natomiast ów permisja jest wymagana. Upewnij się również, że wszystkie warunki się zgadzają. Poza tym dałeś coś takiego:

set {diament::sz} to {Sz::n::d::d} + 100

Tutaj zapewne wyjdzie ponad 100% szans, a nie wiem szczerze  jak takie coś działa. Lepiej daj 'chance of 100%:' i tyle. 

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257876
Udostępnij na innych stronach

  • 0
5 minut temu, Kormic napisał:

W moim przypadku gdy miałeś permisję "cmd.drop.svip", to nie działało. W twoim natomiast ów permisja jest wymagana. Upewnij się również, że wszystkie warunki się zgadzają. Poza tym dałeś coś takiego:


set {diament::sz} to {Sz::n::d::d} + 100

Tutaj zapewne wyjdzie ponad 100% szans, a nie wiem szczerze  jak takie coś działa. Lepiej daj 'chance of 100%:' i tyle. 

Wszystkie warunki zgadzają się ale nic nie dropi błędów nie ma zadnych

EDIT: cos jest nie tak z:

if player's tool is pickaxe of fortune:

Jak dodałem else: 

do kazdego z warunku to tylko to się nie zgadza a mam kilof fortune 3

Edytowane przez pawel1232
Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257877
Udostępnij na innych stronach

  • 0
1 minutę temu, pawel1232 napisał:

Wszystkie warunki zgadzają się ale nic nie dropi błędów nie ma zadnych

Zrobiłem prosty debugging, sprawdź ile numerków ci się wyświetli.

on mine of stone:
	send "1" to player
	if player has permission "cmd.drop.svip":
		send "2" to player
		if {t::d} is "&cwyłączony":
			send "3" to player
			set {diament::sz} to {Sz::n::d::d}
			if player's tool is pickaxe of fortune:
				send "4" to player
				set {_maxdrop} to (level of fortune of player's tool) + 1
				if player's y-coordinate is less than 25:
					send "5" to player
					chance of {diament::sz}%:
						send "6" to player
						set {_drop} to random integer between 1 and {_maxdrop}
						if player can hold {_maxdrop} of diamonds:
							give player {_drop} of diamonds
						else:
							drop {_drop} of diamonds at event-block

 

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257878
Udostępnij na innych stronach

  • 0
23 minuty temu, Kormic napisał:

Zrobiłem prosty debugging, sprawdź ile numerków ci się wyświetli.


on mine of stone:
	send "1" to player
	if player has permission "cmd.drop.svip":
		send "2" to player
		if {t::d} is "&cwyłączony":
			send "3" to player
			set {diament::sz} to {Sz::n::d::d}
			if player's tool is pickaxe of fortune:
				send "4" to player
				set {_maxdrop} to (level of fortune of player's tool) + 1
				if player's y-coordinate is less than 25:
					send "5" to player
					chance of {diament::sz}%:
						send "6" to player
						set {_drop} to random integer between 1 and {_maxdrop}
						if player can hold {_maxdrop} of diamonds:
							give player {_drop} of diamonds
						else:
							drop {_drop} of diamonds at event-block

 

tylko 4 sie nie wyswietla a reszta tak ale mam kilof z fortune 3 

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257881
Udostępnij na innych stronach

  • 0
3 minuty temu, pawel1232 napisał:

to samo 

Dobra, spróbuj jeszcze tak:

if player's tool's enchantments contains "fortune":

Jeśli to nie zadziała to sprawdź enchanty tak:

send "%player's tool's enchantments%" to player

i wstaw odpowiedni tekst w warunek.

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257887
Udostępnij na innych stronach

  • 0
6 minut temu, Kormic napisał:

Dobra, spróbuj jeszcze tak:


if player's tool's enchantments contains "fortune":

Jeśli to nie zadziała to sprawdź enchanty tak:


send "%player's tool's enchantments%" to player

i wstaw odpowiedni tekst w warunek.

Ten pierwszy nie działa mam błąd can't understand this condition

EDIT: drugi też podobny błąd 

Edytowane przez pawel1232
Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257888
Udostępnij na innych stronach

  • 0
1 minutę temu, Kormic napisał:

A czy to drugie działa?

Podobny błąd

EDIT dodałem do tego 

if player's tool is any pickaxe of fortune 3:

I działa tylko jak dać fortune 1 2 3 ? 

Edytowane przez pawel1232
Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257890
Udostępnij na innych stronach

  • 0
4 minuty temu, pawel1232 napisał:

Zobacz moją poprzednią odpowiedź wersja 2,2 fixes

W takim razie masz zbyt starą wersję, aby użyć tego wyrażenia. Mam jeszcze jeden pomysł, ale jest dość dziwny. Daj mi chwilę pomyśleć i wrócę do ciebie z pomysłem.

EDIT:

Nie masz może przypadkiem dodatku SkBee lub SkNBeet?

Edytowane przez Kormic
Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257894
Udostępnij na innych stronach

  • 0
Teraz, Kormic napisał:

W takim razie masz zbyt starą wersję, aby użyć tego wyrażenia. Mam jeszcze jeden pomysł, ale jest dość dziwny. Daj mi chwilę pomyśleć i wrócę do ciebie z pomysłem.

Dropi mi item jak dodałem do fortune "3"  wtedy jest ok tylko jak zrobić ze gracz ma fortune 1 i 2 i 3 ?

tak jest 

if player's tool is any pickaxe of fortune 3:

a tak było 

if player's tool is any pickaxe of fortune:

 

Odnośnik do komentarza
https://skript.pl/temat/41241-fortune/#findComment-257895
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ę...