Skocz do zawartości
  • 0

parsed as integer


xXx_Skrypter_xXx

Pytanie

Witam, mam mały problem:

Próbuję zrobić skrypt, na poziom wędki, który jest pokazany w lore.

Tutaj kodzik:

on fishing:
	if "%fishing state%" is "CAUGHT_FISH":
		repair player's held item
		clear caught item
		add 1 to {zlowione::%player%}
		if {zlowione::%player%} is less than 7:
			set {_xp::*} to line 5 of the lore of the player's held item split at "/"
			replace all "►" with "" in {_xp::*}
			set {_xpwedki} to "%{_xp::1}%" parsed as integer
			set {_potxpwedki} to "%{_xp::2}%" parsed as integer
			send "%{_xpwedki}% , %{_potxpwedki}%" to player
			if {_xpwedki} is less than {_potxpwedki}:

		if {zlowione::%player%} is greater than or equal to 7:
			set {zlowione::%player%} to 0

I teraz linijka z "send ..." wysyła "<none> , <none>" gdy usunę "parsed as integer" z 9 i 10 linijki to wysyła "0 / 50" - czyli tak jak jest w lore wędki, ale skrypt po linijce 12 z "if ..." nie działa, czy może wie ktoś w czym problem?

Bardzo proszę o pomoc :)

Screen lore wędki, jakby coś było nie jasne:

Spoiler

xLutlHb.png

 

GRIERIOR

Zmieniłem link do imgura na bezpośredni do zdjęcia.

Notatka dodana przez GRIERIOR

Odnośnik do komentarza
Udostępnij na innych stronach

4 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
17 godzin temu, xXx_Skrypter_xXx napisał:

Witam, mam mały problem:

Próbuję zrobić skrypt, na poziom wędki, który jest pokazany w lore.

Tutaj kodzik:

on fishing:
	if "%fishing state%" is "CAUGHT_FISH":
		repair player's held item
		clear caught item
		add 1 to {zlowione::%player%}
		if {zlowione::%player%} is less than 7:
			set {_xp::*} to line 5 of the lore of the player's held item split at "/"
			replace all "►" with "" in {_xp::*}
			set {_xpwedki} to "%{_xp::1}%" parsed as integer
			set {_potxpwedki} to "%{_xp::2}%" parsed as integer
			send "%{_xpwedki}% , %{_potxpwedki}%" to player
			if {_xpwedki} is less than {_potxpwedki}:

		if {zlowione::%player%} is greater than or equal to 7:
			set {zlowione::%player%} to 0

I teraz linijka z "send ..." wysyła "<none> , <none>" gdy usunę "parsed as integer" z 9 i 10 linijki to wysyła "0 / 50" - czyli tak jak jest w lore wędki, ale skrypt po linijce 12 z "if ..." nie działa, czy może wie ktoś w czym problem?

Bardzo proszę o pomoc :)

Screen lore wędki, jakby coś było nie jasne:

  Ukryj zawartość

xLutlHb.png

 

on fishing:
	if "%fishing state%" is "CAUGHT_FISH":
		repair player's held item
		clear caught item
		add 1 to {zlowione::%player%}
		if {zlowione::%player%} is less than 7:
			set {_xp::*} to line 5 of the lore of the player's held item split at "/"
			replace all "►" with "" in {_xp::*}
			set {_xpwedki} to "%{_xp::1}%" parsed as integer
			set {_potxpwedki} to "%{_xp::2}%" parsed as integer
			send "%{_xpwedki}% , %{_potxpwedki}%" to player
		if {_xpwedki} is less than {_potxpwedki}:
			if {zlowione::%player%} is greater than or equal to 7:
				set {zlowione::%player%} to 0

powinno być dobrze o ile o to ci chodzi

Edytowane przez Kubo0208
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ę...