Skocz do zawartości
  • 0

Monetki w EQ - skrypt na monety - Potrzebna pomoc


Igor Sawicki
 Udostępnij

Pytanie

8 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

@Igor Sawicki miałes w tym skripcie sporo błędów a co do tej komendy to dodałem ją i ulkepszyłem ci skript :)

1.zablokowałem wkladanie waluty do piecyka,skrzynki.enderchesta oraz wagonika z skrzynką aby przy robieniu koemndy gracz niemiał gdzieś schowanej waluty bo nie zmini takiej walucie nazwy

2./zmiennazwe woodcoin\rubycoin\slimecoin [nowa nazwa i ty wstawiasz np "&e&lWoodCoin"]:)

3.w komendzie /bank wplac mozna było wplacic slimecoin mając zwyklego slime poprawione :)

4.w changelog możesz dać:

blokada wkladania monet do piecyka,skrzynki.enderchesta oraz wagonika z skrzynką

umozliwiona zmiana nazwy /zmiennazwe

poprawione błedy z /bank wplac :)

5.jak chcesz to usuń "w edycji pomagał kaol48s" ale szczerze wolałbym tam zostać :)

Spoiler
#########################
# Skrypt By IgorEx0407  #
#########################
#W edycji pomagal kaol48s#
################
# Wersja 6.0.0 #
#######################################
# Zakaz Kopiowania, Zmieniania autora #
#######################################

command /monety:
	trigger:
		if player has permission "monety.sk":
			give 1 sunflower of infinity 1 named "%{woodcoin}%" to player
			give 1 redstone dust of infinity 1 named "%{rubycoin}%" to player
			give 1 slimeball of infinity 1 named "%{slimecoin}%" to player
		else:
			message "<light grey>Nie masz wystarczajacych uprawnien!<light red> (monety.sk)"

on drop of sunflower or redstone dust or slimeball:
	if event-item's name is "%{woodcoin}%" or "%{rubycoin}%" or "%{slimecoin}%":
		cancel event
		send "<light red>Nie mozesz wyrzucic waluty mozesz ja wplacic&e /bank" to player
on inventory click:
	send "%inventory name of current inventory of player%"
	if inventory name of current inventory of player is "container.chest" or "container.enderchest" or "container.furnace" or "container.minecart":
		wait 2 tick
		loop 54 times:
			set {_} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
			if {_} is not air:
				loop 64 times:
					if "%{_}%" contains "of infinity 1 named":
						if "%{_}%" contains "sunfl":
							set {_n} to number of all sunflower of infinity 1 named "%{woodcoin}%" in current inventory of player
							remove all sunflower of infinity 1 named "%{woodcoin}%" from current inventory of player
							loop {_n} times:
								add 1 to {Bank.Kasa::%player%}
						if "%{_}%" contains "redsto":
							set {_n} to number of all redstone dust of infinity 1 named "%{rubycoin}%" in current inventory of player
							remove all redstone dust of infinity 1 named "%{rubycoin}%" from current inventory of player	
							loop {_n} times:
								add 5 to {Bank.Kasa::%player%}
						if "%{_}%" contains "slimeb":				
							set {_n} to number of all slimeball of infinity 1 named "%{slimecoin}%" in current inventory of player
							remove all slimeball of infinity 1 named "%{slimecoin}%" from current inventory of player
							loop {_n} times:
								add 25 to {Bank.Kasa::%player%}	
						if {_n} is set:
							send "<light red>Nie mozesz wrzucac waluty do skrzynki/enderchesta/piecyka/wagonika z skrzynka zostala ona wplacona do &e/bank" to player
							stop
options:
	Prefix: &6[Bank]
	Prefix1: &c[BankError]
Variables:
	{Bank.Kasa::%player%} = 0
on script load:
	if {woodcoin} is not set:
		set {woodcoin} to "&c&lwoodcoin"
	if {rubycoin} is not set:
		set {rubycoin} to "&c&lrubycoin"
	if {slimecoin} is not set:
		set {slimecoin} to "&c&lslimecoin"
	loop all players:
		remove loop-player from {gracze::*}
		add loop-player to {gracze::*}		
command /zmiennazwe [<text>] [<text>]:
	trigger:
		if player has permission "monety.sk":
			if arg-1 is "woodcoin" or "rubycoin" or "slimecoin":
				if {%arg-1%} is not "%colored arg-2%":
					if arg-2 is set:
						send "&6Zmienianie waluty w EQ graczy &2ONLINE"
						loop all players:
							if arg-1 is "woodcoin":
								set {_} to number of all sunflower of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all sunflower of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 sunflower of infinity 1 named "%colored arg-2%" to loop-player
							if arg-1 is "rubycoin":
								set {_} to number of all redstone dust of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all redstone dust of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 redstone dust of infinity 1 named "%colored arg-2%" to loop-player
							if arg-1 is "slimecoin":
								set {_} to number of all slimeball of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all slimeball of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 slimeball of infinity 1 named "%colored arg-2%" to loop-player
							add 1 to {_procent}
							add 1 to {_gracz}
							wait 5 tick
							if {_procent} is 5:
								set {_number} to number of all players
								set {_procent} to {_gracz}*100
								set {_procent} to {_procent}/{_number}
								send "&2Ukonczono %{_number}%%%"
								set {_procent} to 0
						send "&2Ukonczono 100%%"
						send "&6Zmienianie waluty w EQ graczy &4OFFLINE"
						loop {gracze::*}:
							set {sprawdzaniemonet::%arg-1%::%loop-value%} to "%colored arg-2%"
						send "&2Ukonczono 100%%"
						send "&2Poprawnie zmieniono nazwe %arg-1% na %colored arg-2% "
						set {%arg-1%} to "%colored arg-2%"
				
				else:
					send "&b&lBlad:&cdokladnie tak juz sie nazywa ta waluta :)"
			else:
				send "&b&lBlad:&c/zmiennazwe woodcoin\rubycoin\slimecoin [nowa nazwa]"
		else:
			message "<light grey>Nie masz wystarczajacych uprawnien!<light red> (monety.sk)"      
command /bank [<text>]:
	aliases: b
	trigger:
		if arg-1 is not set:
			execute player command "/bankpomoc"
		if arg-1 is "ilosc":
			send "{@Prefix}&2 Twoja liczba Monetek to: &3%{Bank.Kasa::%player%}%"
		if arg is "wplac Cobble":
			if player has 32 cobblestone:
				remove 32 cobblestone from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 1 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci cobble"
		if arg-1 is "wyplac woodcoin":
			if {Bank.Kasa::%player%} >= 1:
				remove 1 from {Bank.Kasa::%player%}
				give 1 sunflower of infinity 1 named "%{woodcoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"
				
		if arg-1 is "wyplac slimecoin":
			if {Bank.Kasa::%player%} >= 25:
				remove 25 from {Bank.Kasa::%player%}
				give 1 slimeball of infinity 1 named "%{slimecoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"	
				
		if arg-1 is "wyplac rubycoin":
			if {Bank.Kasa::%player%} >= 5:
				remove 5 from {Bank.Kasa::%player%}
				give 1 redstone dust of infinity 1 named "%{rubycoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"
				
		if arg-1 is "wplac slimecoin":
			if player has 1 slimeball of infinity 1 named "%{slimecoin}%":
				remove 1 slimeball of infinity 1 named "%{slimecoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 25 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
				
		if arg-1 is "wplac rubycoin":
			if player has 1 redstone dust of infinity 1 named "%{rubycoin}%":
				remove 1 redstone dust of infinity 1 named "%{rubycoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 5 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
				
		if arg-1 is "wplac woodcoin":
			if player has 1 sunflower of infinity 1 named "%{woodcoin}%":
				remove 1 sunflower of infinity 1 named "%{woodcoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 1 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
command /BankPomoc:
	aliases: BP
	trigger:
		send "{@Prefix}&2 Info o banku"
		send "&2Komendy:"
		send "                    &b&LWPLACANIE"
		send "&3/bank wplac woodcoin/rubycoin/slimecoin/Cobble "
		send "                   &b&LWYPLACANIE"
		send "&3/bank wyplac woodcoin/rubycoin/slimecoin"
		send "                        &b&LINNE"
		send "&3/bank ilosc &2Pokazuje ilosc monetek w banku"
            
command /s123:
	trigger:
		if player has permission "monety.sk":
			give 1 slimeball of infinity 1 named "%{slimecoin}%" to all players
			broadcast "&6&lDostales slimecoin"
        
command /r123:
	trigger:
		if player has permission "monety.sk":
			give 1 redstone dust of infinity 1 named "%{rubycoin}%" to all players
			broadcast "&6&lDostales rubycoin"

command /w123:
	trigger:
		if player has permission "monety.sk":
			give 1 sunflower of infinity 1 named "%{woodcoin}%" to all players
			broadcast "&6&lDostales woodcoin"
on join:
	remove player from {gracze::*}
	add player to {gracze::*}
	if {sprawdzaniemonet::woodcoin::%player%} is set:
		set {_} to number of all sunflower of infinity 1 in player's inventory
		remove all sunflower of infinity 1 from player
		loop {_} times:
			give 1 sunflower of infinity 1 named "%{sprawdzaniemonet::woodcoin::%player%}%" to player
		clear {sprawdzaniemonet::woodcoin::%player%}
	if {sprawdzaniemonet::rubycoin::%player%} is set:
		set {_} to number of all redstone dust of infinity 1 in player's inventory
		remove all redstone dust of infinity 1 from player
		loop {_} times:
			give 1 redstone dust of infinity 1 named "%{sprawdzaniemonet::rubycoin::%player%}%" to player
		clear {sprawdzaniemonet::rubycoin::%player%}
	if {sprawdzaniemonet::slimecoin::%player%} is set:
		set {_} to number of all slimeball of infinity 1 in player's inventory
		remove all slimeball of infinity 1 from player
		loop {_} times:
			give 1 slimeball of infinity 1 named "%{sprawdzaniemonet::slimecoin::%player%}%" to player
		clear {sprawdzaniemonet::slimecoin::%player%}

 

EDIT: zapomniałem wytłumaczyć ci jak działa koemnda /ziemnazwe:

zamienia wszystkim graczą stare waluty na nowe loopem

a tych których nie ma na serwerze przy logowaniu im zamieni :)

 

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

  • 0
Dnia 23.04.2017 o 01:27, kaol48s napisał:

@Igor Sawicki miałes w tym skripcie sporo błędów a co do tej komendy to dodałem ją i ulkepszyłem ci skript :)

1.zablokowałem wkladanie waluty do piecyka,skrzynki.enderchesta oraz wagonika z skrzynką aby przy robieniu koemndy gracz niemiał gdzieś schowanej waluty bo nie zmini takiej walucie nazwy

2./zmiennazwe woodcoin\rubycoin\slimecoin [nowa nazwa i ty wstawiasz np "&e&lWoodCoin"]:)

3.w komendzie /bank wplac mozna było wplacic slimecoin mając zwyklego slime poprawione :)

4.w changelog możesz dać:

blokada wkladania monet do piecyka,skrzynki.enderchesta oraz wagonika z skrzynką

umozliwiona zmiana nazwy /zmiennazwe

poprawione błedy z /bank wplac :)

5.jak chcesz to usuń "w edycji pomagał kaol48s" ale szczerze wolałbym tam zostać :)

Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść! Ukryj zawartość

#########################
# Skrypt By IgorEx0407  #
#########################
#W edycji pomagal kaol48s#
################
# Wersja 6.0.0 #
#######################################
# Zakaz Kopiowania, Zmieniania autora #
#######################################

command /monety:
	trigger:
		if player has permission "monety.sk":
			give 1 sunflower of infinity 1 named "%{woodcoin}%" to player
			give 1 redstone dust of infinity 1 named "%{rubycoin}%" to player
			give 1 slimeball of infinity 1 named "%{slimecoin}%" to player
		else:
			message "<light grey>Nie masz wystarczajacych uprawnien!<light red> (monety.sk)"

on drop of sunflower or redstone dust or slimeball:
	if event-item's name is "%{woodcoin}%" or "%{rubycoin}%" or "%{slimecoin}%":
		cancel event
		send "<light red>Nie mozesz wyrzucic waluty mozesz ja wplacic&e /bank" to player
on inventory click:
	send "%inventory name of current inventory of player%"
	if inventory name of current inventory of player is "container.chest" or "container.enderchest" or "container.furnace" or "container.minecart":
		wait 2 tick
		loop 54 times:
			set {_} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
			if {_} is not air:
				loop 64 times:
					if "%{_}%" contains "of infinity 1 named":
						if "%{_}%" contains "sunfl":
							set {_n} to number of all sunflower of infinity 1 named "%{woodcoin}%" in current inventory of player
							remove all sunflower of infinity 1 named "%{woodcoin}%" from current inventory of player
							loop {_n} times:
								add 1 to {Bank.Kasa::%player%}
						if "%{_}%" contains "redsto":
							set {_n} to number of all redstone dust of infinity 1 named "%{rubycoin}%" in current inventory of player
							remove all redstone dust of infinity 1 named "%{rubycoin}%" from current inventory of player	
							loop {_n} times:
								add 5 to {Bank.Kasa::%player%}
						if "%{_}%" contains "slimeb":				
							set {_n} to number of all slimeball of infinity 1 named "%{slimecoin}%" in current inventory of player
							remove all slimeball of infinity 1 named "%{slimecoin}%" from current inventory of player
							loop {_n} times:
								add 25 to {Bank.Kasa::%player%}	
						if {_n} is set:
							send "<light red>Nie mozesz wrzucac waluty do skrzynki/enderchesta/piecyka/wagonika z skrzynka zostala ona wplacona do &e/bank" to player
							stop
options:
	Prefix: &6[Bank]
	Prefix1: &c[BankError]
Variables:
	{Bank.Kasa::%player%} = 0
on script load:
	if {woodcoin} is not set:
		set {woodcoin} to "&c&lwoodcoin"
	if {rubycoin} is not set:
		set {rubycoin} to "&c&lrubycoin"
	if {slimecoin} is not set:
		set {slimecoin} to "&c&lslimecoin"
	loop all players:
		remove loop-player from {gracze::*}
		add loop-player to {gracze::*}		
command /zmiennazwe [<text>] [<text>]:
	trigger:
		if player has permission "monety.sk":
			if arg-1 is "woodcoin" or "rubycoin" or "slimecoin":
				if {%arg-1%} is not "%colored arg-2%":
					if arg-2 is set:
						send "&6Zmienianie waluty w EQ graczy &2ONLINE"
						loop all players:
							if arg-1 is "woodcoin":
								set {_} to number of all sunflower of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all sunflower of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 sunflower of infinity 1 named "%colored arg-2%" to loop-player
							if arg-1 is "rubycoin":
								set {_} to number of all redstone dust of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all redstone dust of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 redstone dust of infinity 1 named "%colored arg-2%" to loop-player
							if arg-1 is "slimecoin":
								set {_} to number of all slimeball of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all slimeball of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 slimeball of infinity 1 named "%colored arg-2%" to loop-player
							add 1 to {_procent}
							add 1 to {_gracz}
							wait 5 tick
							if {_procent} is 5:
								set {_number} to number of all players
								set {_procent} to {_gracz}*100
								set {_procent} to {_procent}/{_number}
								send "&2Ukonczono %{_number}%%%"
								set {_procent} to 0
						send "&2Ukonczono 100%%"
						send "&6Zmienianie waluty w EQ graczy &4OFFLINE"
						loop {gracze::*}:
							set {sprawdzaniemonet::%arg-1%::%loop-value%} to "%colored arg-2%"
						send "&2Ukonczono 100%%"
						send "&2Poprawnie zmieniono nazwe %arg-1% na %colored arg-2% "
						set {%arg-1%} to "%colored arg-2%"
				
				else:
					send "&b&lBlad:&cdokladnie tak juz sie nazywa ta waluta :)"
			else:
				send "&b&lBlad:&c/zmiennazwe woodcoin\rubycoin\slimecoin [nowa nazwa]"
		else:
			message "<light grey>Nie masz wystarczajacych uprawnien!<light red> (monety.sk)"      
command /bank [<text>]:
	aliases: b
	trigger:
		if arg-1 is not set:
			execute player command "/bankpomoc"
		if arg-1 is "ilosc":
			send "{@Prefix}&2 Twoja liczba Monetek to: &3%{Bank.Kasa::%player%}%"
		if arg is "wplac Cobble":
			if player has 32 cobblestone:
				remove 32 cobblestone from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 1 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci cobble"
		if arg-1 is "wyplac woodcoin":
			if {Bank.Kasa::%player%} >= 1:
				remove 1 from {Bank.Kasa::%player%}
				give 1 sunflower of infinity 1 named "%{woodcoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"
				
		if arg-1 is "wyplac slimecoin":
			if {Bank.Kasa::%player%} >= 25:
				remove 25 from {Bank.Kasa::%player%}
				give 1 slimeball of infinity 1 named "%{slimecoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"	
				
		if arg-1 is "wyplac rubycoin":
			if {Bank.Kasa::%player%} >= 5:
				remove 5 from {Bank.Kasa::%player%}
				give 1 redstone dust of infinity 1 named "%{rubycoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"
				
		if arg-1 is "wplac slimecoin":
			if player has 1 slimeball of infinity 1 named "%{slimecoin}%":
				remove 1 slimeball of infinity 1 named "%{slimecoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 25 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
				
		if arg-1 is "wplac rubycoin":
			if player has 1 redstone dust of infinity 1 named "%{rubycoin}%":
				remove 1 redstone dust of infinity 1 named "%{rubycoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 5 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
				
		if arg-1 is "wplac woodcoin":
			if player has 1 sunflower of infinity 1 named "%{woodcoin}%":
				remove 1 sunflower of infinity 1 named "%{woodcoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 1 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
command /BankPomoc:
	aliases: BP
	trigger:
		send "{@Prefix}&2 Info o banku"
		send "&2Komendy:"
		send "                    &b&LWPLACANIE"
		send "&3/bank wplac woodcoin/rubycoin/slimecoin/Cobble "
		send "                   &b&LWYPLACANIE"
		send "&3/bank wyplac woodcoin/rubycoin/slimecoin"
		send "                        &b&LINNE"
		send "&3/bank ilosc &2Pokazuje ilosc monetek w banku"
            
command /s123:
	trigger:
		if player has permission "monety.sk":
			give 1 slimeball of infinity 1 named "%{slimecoin}%" to all players
			broadcast "&6&lDostales slimecoin"
        
command /r123:
	trigger:
		if player has permission "monety.sk":
			give 1 redstone dust of infinity 1 named "%{rubycoin}%" to all players
			broadcast "&6&lDostales rubycoin"

command /w123:
	trigger:
		if player has permission "monety.sk":
			give 1 sunflower of infinity 1 named "%{woodcoin}%" to all players
			broadcast "&6&lDostales woodcoin"
on join:
	remove player from {gracze::*}
	add player to {gracze::*}
	if {sprawdzaniemonet::woodcoin::%player%} is set:
		set {_} to number of all sunflower of infinity 1 in player's inventory
		remove all sunflower of infinity 1 from player
		loop {_} times:
			give 1 sunflower of infinity 1 named "%{sprawdzaniemonet::woodcoin::%player%}%" to player
		clear {sprawdzaniemonet::woodcoin::%player%}
	if {sprawdzaniemonet::rubycoin::%player%} is set:
		set {_} to number of all redstone dust of infinity 1 in player's inventory
		remove all redstone dust of infinity 1 from player
		loop {_} times:
			give 1 redstone dust of infinity 1 named "%{sprawdzaniemonet::rubycoin::%player%}%" to player
		clear {sprawdzaniemonet::rubycoin::%player%}
	if {sprawdzaniemonet::slimecoin::%player%} is set:
		set {_} to number of all slimeball of infinity 1 in player's inventory
		remove all slimeball of infinity 1 from player
		loop {_} times:
			give 1 slimeball of infinity 1 named "%{sprawdzaniemonet::slimecoin::%player%}%" to player
		clear {sprawdzaniemonet::slimecoin::%player%}

 

EDIT: zapomniałem wytłumaczyć ci jak działa koemnda /ziemnazwe:

zamienia wszystkim graczą stare waluty na nowe loopem

a tych których nie ma na serwerze przy logowaniu im zamieni :)

 

Dzięki mordo, Mógłbyś jeszcze zrobić system kredytów z banku ?

 

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

  • 0
Dnia 27.04.2017 o 19:56, kaol48s napisał:

kredyty jak mógłbyś opisać?

 

Hmm system kredytów czyli przykładowo jest komenda /bank pozycz [Ilosc monet max 5SlimeCoinów] i co 5min wyświetla się że np "Masz długi w banku szybko je splac!" i tak samo komenda /bank splac [Ilosc monet]

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

Mógłbyś dać to od cb zależy jaka kara :D

 

Dnia 23.04.2017 o 01:27, kaol48s napisał:

@Igor Sawicki miałes w tym skripcie sporo błędów a co do tej komendy to dodałem ją i ulkepszyłem ci skript :)

1.zablokowałem wkladanie waluty do piecyka,skrzynki.enderchesta oraz wagonika z skrzynką aby przy robieniu koemndy gracz niemiał gdzieś schowanej waluty bo nie zmini takiej walucie nazwy

2./zmiennazwe woodcoin\rubycoin\slimecoin [nowa nazwa i ty wstawiasz np "&e&lWoodCoin"]:)

3.w komendzie /bank wplac mozna było wplacic slimecoin mając zwyklego slime poprawione :)

4.w changelog możesz dać:

blokada wkladania monet do piecyka,skrzynki.enderchesta oraz wagonika z skrzynką

umozliwiona zmiana nazwy /zmiennazwe

poprawione błedy z /bank wplac :)

5.jak chcesz to usuń "w edycji pomagał kaol48s" ale szczerze wolałbym tam zostać :)

Zarejestruj się lub zaloguj, aby zobaczyć ukrytą treść! Pokaż ukrytą zawartość

#########################
# Skrypt By IgorEx0407  #
#########################
#W edycji pomagal kaol48s#
################
# Wersja 6.0.0 #
#######################################
# Zakaz Kopiowania, Zmieniania autora #
#######################################

command /monety:
	trigger:
		if player has permission "monety.sk":
			give 1 sunflower of infinity 1 named "%{woodcoin}%" to player
			give 1 redstone dust of infinity 1 named "%{rubycoin}%" to player
			give 1 slimeball of infinity 1 named "%{slimecoin}%" to player
		else:
			message "<light grey>Nie masz wystarczajacych uprawnien!<light red> (monety.sk)"

on drop of sunflower or redstone dust or slimeball:
	if event-item's name is "%{woodcoin}%" or "%{rubycoin}%" or "%{slimecoin}%":
		cancel event
		send "<light red>Nie mozesz wyrzucic waluty mozesz ja wplacic&e /bank" to player
on inventory click:
	send "%inventory name of current inventory of player%"
	if inventory name of current inventory of player is "container.chest" or "container.enderchest" or "container.furnace" or "container.minecart":
		wait 2 tick
		loop 54 times:
			set {_} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
			if {_} is not air:
				loop 64 times:
					if "%{_}%" contains "of infinity 1 named":
						if "%{_}%" contains "sunfl":
							set {_n} to number of all sunflower of infinity 1 named "%{woodcoin}%" in current inventory of player
							remove all sunflower of infinity 1 named "%{woodcoin}%" from current inventory of player
							loop {_n} times:
								add 1 to {Bank.Kasa::%player%}
						if "%{_}%" contains "redsto":
							set {_n} to number of all redstone dust of infinity 1 named "%{rubycoin}%" in current inventory of player
							remove all redstone dust of infinity 1 named "%{rubycoin}%" from current inventory of player	
							loop {_n} times:
								add 5 to {Bank.Kasa::%player%}
						if "%{_}%" contains "slimeb":				
							set {_n} to number of all slimeball of infinity 1 named "%{slimecoin}%" in current inventory of player
							remove all slimeball of infinity 1 named "%{slimecoin}%" from current inventory of player
							loop {_n} times:
								add 25 to {Bank.Kasa::%player%}	
						if {_n} is set:
							send "<light red>Nie mozesz wrzucac waluty do skrzynki/enderchesta/piecyka/wagonika z skrzynka zostala ona wplacona do &e/bank" to player
							stop
options:
	Prefix: &6[Bank]
	Prefix1: &c[BankError]
Variables:
	{Bank.Kasa::%player%} = 0
on script load:
	if {woodcoin} is not set:
		set {woodcoin} to "&c&lwoodcoin"
	if {rubycoin} is not set:
		set {rubycoin} to "&c&lrubycoin"
	if {slimecoin} is not set:
		set {slimecoin} to "&c&lslimecoin"
	loop all players:
		remove loop-player from {gracze::*}
		add loop-player to {gracze::*}		
command /zmiennazwe [<text>] [<text>]:
	trigger:
		if player has permission "monety.sk":
			if arg-1 is "woodcoin" or "rubycoin" or "slimecoin":
				if {%arg-1%} is not "%colored arg-2%":
					if arg-2 is set:
						send "&6Zmienianie waluty w EQ graczy &2ONLINE"
						loop all players:
							if arg-1 is "woodcoin":
								set {_} to number of all sunflower of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all sunflower of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 sunflower of infinity 1 named "%colored arg-2%" to loop-player
							if arg-1 is "rubycoin":
								set {_} to number of all redstone dust of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all redstone dust of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 redstone dust of infinity 1 named "%colored arg-2%" to loop-player
							if arg-1 is "slimecoin":
								set {_} to number of all slimeball of infinity 1 named "%{%arg-1%}%" in loop-player's inventory
								remove all slimeball of infinity 1 named "%{%arg-1%}%" from loop-player
								loop {_} times:
									give 1 slimeball of infinity 1 named "%colored arg-2%" to loop-player
							add 1 to {_procent}
							add 1 to {_gracz}
							wait 5 tick
							if {_procent} is 5:
								set {_number} to number of all players
								set {_procent} to {_gracz}*100
								set {_procent} to {_procent}/{_number}
								send "&2Ukonczono %{_number}%%%"
								set {_procent} to 0
						send "&2Ukonczono 100%%"
						send "&6Zmienianie waluty w EQ graczy &4OFFLINE"
						loop {gracze::*}:
							set {sprawdzaniemonet::%arg-1%::%loop-value%} to "%colored arg-2%"
						send "&2Ukonczono 100%%"
						send "&2Poprawnie zmieniono nazwe %arg-1% na %colored arg-2% "
						set {%arg-1%} to "%colored arg-2%"
				
				else:
					send "&b&lBlad:&cdokladnie tak juz sie nazywa ta waluta :)"
			else:
				send "&b&lBlad:&c/zmiennazwe woodcoin\rubycoin\slimecoin [nowa nazwa]"
		else:
			message "<light grey>Nie masz wystarczajacych uprawnien!<light red> (monety.sk)"      
command /bank [<text>]:
	aliases: b
	trigger:
		if arg-1 is not set:
			execute player command "/bankpomoc"
		if arg-1 is "ilosc":
			send "{@Prefix}&2 Twoja liczba Monetek to: &3%{Bank.Kasa::%player%}%"
		if arg is "wplac Cobble":
			if player has 32 cobblestone:
				remove 32 cobblestone from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 1 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci cobble"
		if arg-1 is "wyplac woodcoin":
			if {Bank.Kasa::%player%} >= 1:
				remove 1 from {Bank.Kasa::%player%}
				give 1 sunflower of infinity 1 named "%{woodcoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"
				
		if arg-1 is "wyplac slimecoin":
			if {Bank.Kasa::%player%} >= 25:
				remove 25 from {Bank.Kasa::%player%}
				give 1 slimeball of infinity 1 named "%{slimecoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"	
				
		if arg-1 is "wyplac rubycoin":
			if {Bank.Kasa::%player%} >= 5:
				remove 5 from {Bank.Kasa::%player%}
				give 1 redstone dust of infinity 1 named "%{rubycoin}%" to player
				send "{@Prefix}&2 Dokonales wymiany"
				stop
			else:
				send "{@Prefix1} &c Halo halo a Monetki gdzie?"
				
		if arg-1 is "wplac slimecoin":
			if player has 1 slimeball of infinity 1 named "%{slimecoin}%":
				remove 1 slimeball of infinity 1 named "%{slimecoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 25 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
				
		if arg-1 is "wplac rubycoin":
			if player has 1 redstone dust of infinity 1 named "%{rubycoin}%":
				remove 1 redstone dust of infinity 1 named "%{rubycoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 5 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
				
		if arg-1 is "wplac woodcoin":
			if player has 1 sunflower of infinity 1 named "%{woodcoin}%":
				remove 1 sunflower of infinity 1 named "%{woodcoin}%" from player
				send "{@Prefix} &2Pomyslnie dokonano wymiany"
				add 1 to {Bank.Kasa::%player%}
				stop
			else:
				send "{@Prefix1}&c Brak odpowiedniej ilosci monet"
command /BankPomoc:
	aliases: BP
	trigger:
		send "{@Prefix}&2 Info o banku"
		send "&2Komendy:"
		send "                    &b&LWPLACANIE"
		send "&3/bank wplac woodcoin/rubycoin/slimecoin/Cobble "
		send "                   &b&LWYPLACANIE"
		send "&3/bank wyplac woodcoin/rubycoin/slimecoin"
		send "                        &b&LINNE"
		send "&3/bank ilosc &2Pokazuje ilosc monetek w banku"
            
command /s123:
	trigger:
		if player has permission "monety.sk":
			give 1 slimeball of infinity 1 named "%{slimecoin}%" to all players
			broadcast "&6&lDostales slimecoin"
        
command /r123:
	trigger:
		if player has permission "monety.sk":
			give 1 redstone dust of infinity 1 named "%{rubycoin}%" to all players
			broadcast "&6&lDostales rubycoin"

command /w123:
	trigger:
		if player has permission "monety.sk":
			give 1 sunflower of infinity 1 named "%{woodcoin}%" to all players
			broadcast "&6&lDostales woodcoin"
on join:
	remove player from {gracze::*}
	add player to {gracze::*}
	if {sprawdzaniemonet::woodcoin::%player%} is set:
		set {_} to number of all sunflower of infinity 1 in player's inventory
		remove all sunflower of infinity 1 from player
		loop {_} times:
			give 1 sunflower of infinity 1 named "%{sprawdzaniemonet::woodcoin::%player%}%" to player
		clear {sprawdzaniemonet::woodcoin::%player%}
	if {sprawdzaniemonet::rubycoin::%player%} is set:
		set {_} to number of all redstone dust of infinity 1 in player's inventory
		remove all redstone dust of infinity 1 from player
		loop {_} times:
			give 1 redstone dust of infinity 1 named "%{sprawdzaniemonet::rubycoin::%player%}%" to player
		clear {sprawdzaniemonet::rubycoin::%player%}
	if {sprawdzaniemonet::slimecoin::%player%} is set:
		set {_} to number of all slimeball of infinity 1 in player's inventory
		remove all slimeball of infinity 1 from player
		loop {_} times:
			give 1 slimeball of infinity 1 named "%{sprawdzaniemonet::slimecoin::%player%}%" to player
		clear {sprawdzaniemonet::slimecoin::%player%}

 

 

EDIT: zapomniałem wytłumaczyć ci jak działa koemnda /ziemnazwe:

zamienia wszystkim graczą stare waluty na nowe loopem

a tych których nie ma na serwerze przy logowaniu im zamieni :)

 

 

Znalazłem błąd jak wkładasz np do enderchestu to na chacie się pojawia container.crafting i potem jak klikniesz E i na jakiś slot w eq to też się wyświetla. Naprawisz to ?

 

//Łączę ~PoweredDragon

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0

thx

 

 

Dnia 1.05.2017 o 00:15, kaol48s napisał:

serki to było do szukania nazw invenmtory to jest linijka zaraz pod on inventory click: dokładnie :

send "%inventory name of current inventory of player%"

usun ją :D

 
 

A pracujesz nad tymi pożyczkami ?

 

//łączę ~PoweredDragon

 

Dnia 1.05.2017 o 00:15, kaol48s napisał:

serki to było do szukania nazw invenmtory to jest linijka zaraz pod on inventory click: dokładnie :

send "%inventory name of current inventory of player%"

usun ją :D

 

kaol

//łączę, nieprawidłowy ref ~PoweredDragon

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