Skocz do zawartości
  • 0

Po śmierci wypada tylko 1 przedmiot i usuwanie przedmiotów przy tworzeniu


uiuin
 Udostępnij

Pytanie

Witam
Czy ktoś może napisać skript który będzie wyrzucał 1 losowy przedmiot z ekwipunku gracza?
Ma działać na zasadzie że jeśli wylosuje się kamień to wypada cały a nie tylko 1.

Druga opcja to taka aby istniało 10% na to że podczas tworzenia przedmiotów (wszystkiego od desek po miecze) przedmiot znikał.

Odnośnik do komentarza
Udostępnij na innych stronach

6 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

Nie powiedziałem przy jakim zdarzeniu chcesz, aby wyrzucało losowy przedmiot, lecz łap kawałek:

set {_} to random element out of player's inventory
drop (amount of {_} in the player's inventory) of {_} at location of player
remove (amount of {_} in the player's inventory) of {_} from player's inventory

Nie testowane

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
2 godziny temu, DαrϰVεnuς napisał:

Nie powiedziałem przy jakim zdarzeniu chcesz, aby wyrzucało losowy przedmiot, lecz łap kawałek:


set {_} to random element out of player's inventory
drop (amount of {_} in the player's inventory) of {_} at location of player
remove (amount of {_} in the player's inventory) of {_} from player's inventory

Nie testowane

tytuł tematu - po śmierci

on death:
	set {_item} to random element out of player's inventory
	clear drops
	drop {_item}
on crafting:
	chance of 10%:
		remove event-item from player's inventory

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
18 godzin temu, Norbi napisał:

tytuł tematu - po śmierci


on death:
	set {_item} to random element out of player's inventory
	clear drops
	drop {_item}
on crafting:
	chance of 10%:
		remove event-item from player's inventory

 

Chodziło mi o to że jeśli umieramy to wszystkie przedmioty zatrzymujemy i tylko ten jeden losowy wypada. 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
on death:
	if victim is a player:
		set {_} to random element out of victim's inventory
		drop (amount of {_} in the victim's inventory) of {_} at location of victim
		remove (amount of {_} in the victim's inventory) of {_} from victim's inventory
		set {eq::%victim%} to serialized inventory of victim
		clear drops
on respawn:
	restore inventory of player from {eq::%player%}
	clear {eq::%player%}

 

Nie testowane

19 godzin temu, Norbi napisał:

tytuł tematu - po śmierci


on death:
	set {_item} to random element out of player's inventory
	clear drops
	drop {_item}
on crafting:
	chance of 10%:
		remove event-item from player's inventory

Hmm w wydarzeniu on death chyba występuje victim i attacker, nie player.

Edytowane przez DαrϰVεnuς
Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
46 minut temu, DαrϰVεnuς napisał:

on death:
	if victim is a player:
		set {_} to random element out of victim's inventory
		drop (amount of {_} in the victim's inventory) of {_} at location of victim
		remove (amount of {_} in the victim's inventory) of {_} from victim's inventory
		set {eq::%victim%} to serialized inventory of victim
		clear drops
on respawn:
	restore inventory of player from {eq::%player%}
	clear {eq::%player%}

 

Nie testowane

Hmm w wydarzeniu on death chyba występuje victim i attacker, nie player.

Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść!
Takie błędy wyskakują. 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

SkQuery jest wymagane

 

on death:
	if victim is a player:
		set {_} to random element out of victim's inventory
		drop (amount of {_} in the victim's inventory) of {_} at location of victim
		remove (amount of {_} in the victim's inventory) of {_} from victim's inventory
		set {eq::%victim%} to serialized contents of victim
		clear drops
on respawn:
	set player's inventory to {eq::%player%}
	clear {eq::%player%}

//Łączę ~Myszak

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ę...