Skocz do zawartości
  • 0

Problem z dawaniem case


TermitCG

Pytanie

Proszę o pomoc.

command /case gracz [<player>] [<text>]:
 permission: case.admin
 trigger:
  if arg 1 is not set:
   if arg 2 is not set:
    send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
  if arg 1 is set:
   if arg 2 is set:
    give %arg 2% trapped chest named "&9&lPremium Case" to the argument 1
command /caseall [<text>]:
 permission: case.admin
 trigger:
  if arg 1 is not set:
   send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
  if arg 1 is set:
   give %arg 1% trapped chest named "&9&lPremium Case" to all
   boardcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg1%!"
# cz3
on right click:
    if event-block is tnt named "&c&lRzucane TNT:
        set event-block to primed tnt
# cz4

Błędy:

sk reload kitywgui
[13:52:32 INFO]: [Skript] Reloading kitywgui.sk...
[13:52:34 ERROR]: '%arg 2% trapped chest' is not an item type (kitywgui.sk, line 156: give %arg 2% trapped chest named "&9&lPremium Case" to the argument 1')
[13:52:34 ERROR]: '?all' is not an entity type (kitywgui.sk, line 163: give %arg 1% trapped chest named "&9&lPremium Case" to ?all??')
[13:52:34 ERROR]: 'boardcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg1%!"' is not a boolean (yes/no) (kitywgui.sk, line 164: boardcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg1%!"')
[13:52:34 ERROR]: Invalid use of quotes ("). If you want to use quotes in "quoted text", double them: "". (kitywgui.sk, line 167: if event-block is tnt named "&c&lRzucane TNT:')
[13:52:34 INFO]: [Skript] Encountered 4 errors while reloading kitywgui.sk!

 

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/
Udostępnij na innych stronach

12 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /case gracz [<player>] [<text>]:
 permission: case.admin
 trigger:
  if arg 1 is not set:
   if arg 2 is not set:
    send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
  if arg 1 is set:
   if arg 2 is set:
    add arg-2 of trapped chest named "&9&lPremium Case" to arg-player's inventory
command /caseall [<text>]:
	permission: case.admin
	trigger:
		if arg 1 is not set:
			send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1 is set:
			loop all players:
				add arg-1 of trapped chest named "&9&lPremium Case" to loop-player
   broadcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg-1%!"
# cz3
on right click:
    if event-block is tnt named "&c&lRzucane TNT":
        set event-block to primed tnt

 

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220541
Udostępnij na innych stronach

  • 0

@Helios1993 nie działa

sk reload kitywgui
[14:04:19 INFO]: [Skript] Reloading kitywgui.sk...
[14:04:19 ERROR]: indentation error: expected 4 tabs, but found 3 spaces (kitywgui.sk, line 165: broadcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg-1%!"')
[14:04:21 ERROR]: '2 of trapped chest named "&9&lPremium Case"' is not a type (kitywgui.sk, line 156: add arg-2 of trapped chest named "&9&lPremium Case" to arg-player's inventory')
[14:04:21 ERROR]: '1 of trapped chest named "&9&lPremium Case"' is not a type (kitywgui.sk, line 164: add arg-1 of trapped chest named "&9&lPremium Case" to loop-player')
[14:04:21 ERROR]: a block can't be set to the TNT because the latter is not an item type (kitywgui.sk, line 169: set event-block to primed tnt')
[14:04:21 INFO]: [Skript] Encountered 4 errors while reloading kitywgui.sk!

 

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220542
Udostępnij na innych stronach

  • 0
command /case gracz [<player>] [<text>]:
	permission: case.admin
	trigger:
		if arg 1 is not set:
			if arg 2 is not set:
				send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1 is set:
 			if arg 2 is set:
				add arg-2 trapped chest named "&9&lPremium Case" to arg-player's inventory
command /caseall [<text>]:
	permission: case.admin
	trigger:
		if arg 1 is not set:
			send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1 is set:
			loop all players:
				add arg-1 trapped chest named "&9&lPremium Case" to loop-player's inventory
   broadcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg-1%!"
# cz3
on right click:
    if player's tool is tnt named "&c&lRzucane TNT":
        shoot a tnt from player with speed 0.5

nie zmieniaj tego, czasami arg 1 się buguje i trzeba użyć arg-1

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220543
Udostępnij na innych stronach

  • 0

Ooo... dzięki że zmieniłeś na shot.

 

 

 

sk reload kitywgui
[15:11:46 INFO]: [Skript] Reloading kitywgui.sk...
[15:11:46 ERROR]: indentation error: expected 3 tabs, but found '_->->->' [-> = tab, _ = space, ? = other whitespace] (kitywgui.sk, line 155: if arg 2 is set:')
[15:11:46 ERROR]: indentation error: expected 3 tabs, but found 4 tabs (kitywgui.sk, line 156: add arg-2 trapped chest named "&9&lPremium Case" to arg-player's inventory')
[15:11:46 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (kitywgui.sk, line 154: if arg 1 is set:')
[15:11:46 ERROR]: indentation error: expected 4 tabs, but found 3 spaces (kitywgui.sk, line 165: broadcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg-1%!"')
[15:11:48 ERROR]: '1 trapped chest named "&9&lPremium Case"' is not a type (kitywgui.sk, line 164: add arg-1 trapped chest named "&9&lPremium Case" to loop-player's inventory')
[15:11:48 INFO]: [Skript] Encountered 4 errors while reloading kitywgui.sk!

Nadal nie :(

 

Kurotsuwa

Łączę.

Notatka dodana przez Kurotsuwa

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220544
Udostępnij na innych stronach

  • 0

Prosze, naprawcie ten cały kod aby po prostu działał. Niektóre rzeczy nie mają błędów ale działają źle.

Aktualny kod: 

Spoiler

 


#
#                  by Mati_08151/TermgSkripter                
#                                                             
#  ZAKAZ Używania tego skryptu na serwerach bez MOJEJ zgody,  
#          ANI przypisywania sobie jego własności             
#

command /kit:
    trigger:
        open chest with 1 rows named "&8[ &3MDropHC.pl &8] &7- &r&lKITY" to player
        
        format slot 0 of player with 1 of chainmail boots named "&7&lKIT GRACZ" to close then run [ make player execute command "kitywguigracz" ]
        format slot 1 of player with 1 of iron boots named "&e&lKIT VIP" to close then run [ make player execute command "kitywguivip" ]
        format slot 2 of player with 1 of gold boots named "&6&lKIT &e&ls&6&lVIP" to close then run [ make player execute command "kitywguisvip" ]
        format slot 3 of player with 1 of diamond boots named "&3&lKIT SPONSOR" to close then run [ make player execute command "kitywguisponsor" ]
        format slot 4 of player with 1 of red glass pane named " " to be unstealable
        format slot 5 of player with 1 of red glass pane named " " to be unstealable
        format slot 6 of player with 1 of red glass pane named " " to be unstealable
        format slot 7 of player with 1 of red glass pane named " " to be unstealable
        format slot 8 of player with 1 of red glass pane named " " to be unstealable
command /kitywguigracz:
    trigger:
        if {kitgracz} is true:
            give 1 diamond pickaxe of efficiency 3 named "&7&lKIT GRACZ" to player
            give 1 boat named "&7&lKIT GRACZ" to player
            give 1 ender chest named "&7&lKIT GRACZ" to player
            set {kitgracz} to false
            wait 30 second
            set {kitgracz} to true
            send "&2&lMozesz ponownie uzyc KIT: GRACZ" to player
        else:
            send "&8&lTen KIT Mozesz uzywac co 30min!" to player
command /kitywguivip:
    trigger:
        if {kitvip} is true:
            if player has permission "kitywgui.vip":
                give 1 diamond pickaxe of efficiency 5 named "&e&lKIT VIP" to player
                give 1 diamond sword of fire aspect 2 named "&e&lKIT VIP" to player
                give 1 diamond shovel of efficiency 5 named "&e&lKIT VIP" to player
                give 1 diamond helmet of protection 4 named "&e&lKIT VIP" to player
                give 1 diamond chestplate of protection 4 named "&e&lKIT VIP" to player
                give 1 diamond leggings of protection 4 named "&e&lKIT VIP" to player
                give 1 diamond boots of protection 4 named "&e&lKIT VIP" to player
                give 3 enchanted golden apple named "&e&lKIT VIP" to player
                give 5 golden apple named "&e&lKIT VIP" to player
                set {kitvip} to false
                wait 30 second
                set {kitvip} to true
                send "&2&lMozesz ponownie uzyc KIT: VIP" to player
            else:
                send "&4Brak Permisji!" to player
        else:
            send "&8&lTen KIT Mozesz uzywac co 30min!" to player
command /kitywguisvip:
    trigger:
        if {kitsvip} is true:
            if player has permission "kitywgui.svip":
                add diamond pickaxe of efficiency 7 named "&6&lKIT &e&ls&6&lVIP" to player
                add diamond sword of sharpness 7 named "&6&lKIT &e&ls&6&lVIP" to player
                give 1 diamond shovel of efficiency 5 named "&6&lKIT &e&ls&6&lVIP" to player
                add 1 diamond helmet of protection 7 named "&6&lKIT &e&ls&6&lVIP" to player
                add 1 diamond chestplate of protection 7 named "&6&lKIT &e&ls&6&lVIP" to player
                add 1 diamond leggings of protection 7 named "&6&lKIT &e&ls&6&lVIP" to player
                add 1 diamond boots of protection 7 named "&6&lKIT &e&ls&6&lVIP" to player
                give 6 enchanted golden apple named "&6&lKIT &e&ls&6&lVIP" to player
                give 10 golden apple named "&6&lKIT &e&ls&6&lVIP" to player
                set {kitsvip} to false
                wait 30 second
                set {kitsvip} to true
                send "&2&lMozesz ponownie uzyc KIT: sVIP" to player
            else:
                send "&4Brak Permisji!" to player
        else:
            send "&8&lTen KIT Mozesz uzywac co 30min!" to player
command /kitywguisponsor:
    trigger:
        if {kitsponsor} is true:
            if player has permission "kitywgui.sponsor":
                add diamond pickaxe of efficiency 10 named "&3&lKIT SPONSOR" to player
                add diamond sword of sharpness 10 named "&3&lKIT SPONSOR" to player
                add 1 diamond shovel of efficiency 10 named "&3&lKIT SPONSOR" to player
                add 1 diamond helmet of protection 12 named "&3&lKIT SPONSOR" to player
                add 1 diamond chestplate of protection 12 named "&3&lKIT SPONSOR" to player
                add 1 diamond leggings of protection 12 named "&3&lKIT SPONSOR" to player
                add 1 diamond boots of protection 12 named "&3&lKIT SPONSOR" to player
                give 20 enchanted golden apple named "&3&lKIT SPONSOR" to player
                give 40 golden apple named "&3&lKIT SPONSOR" to player
                set {kitsponsor} to false
                wait 30 second
                set {kitsponsor} to true
                send "&2&lMozesz ponownie uzyc KIT: SPONSOR" to player
            else:
                send "&4Brak Permisji!" to player
        else:
            send "&8&lTen KIT Mozesz uzywac co 30min!" to player
on skript load:
    set {kitgracz} to true
    set {kitvip} to true
    set {kitsvip} to true
    set {kitsponsor} to true
# cz2
on place trapped chest:
	if player's tool is trapped chest named "&9&lPremium Case":
		set block to air
		send "&c&l%player%Otwarl &9&lPremium Case &c&li otrzymal:"
		chance of 50%:
			drop 64 diamond
			send "&9&lDIAMENT x64"
		chance of 30%:
			drop 1 diamond boots of protection 4 and unbreaking 3 and feather falling 2 named "&a&lButy 4/3/2"
			send "&a&lButy 4/3/2"
		chance of 20%:
			drop 1 diamond chestplate of protection 4 and unbreaking 3 named "&a&lNapiersnik 4/3"
			send "&a&lNapiersnik 4/3"
		chance of 10%:
			drop 1 diamond leggings of protection 4 and unbreaking 3 named "&a&lSpodnie 4/3"
			send "&a&lNapiersnik 4/3"
		chance of 5%:
			drop 1 diamond helmet of protection 4 and unbreaking 3 named "&a&lNapiersnik 4/3"
			send "&a&lNapiersnik 4/3"
		chance of 12%:
			drop 64 emerald
			send "&9&lEMERALD x64"
		chance of 1.5%:
			drop 1 diamond pickaxe of efficiency 8 and unbreaking 3 and fortune 3 named "&a&lKilof 8/3/3"
			send "&a&lKilof 8/3/3"
		chance of 4.2%:
			drop 64 emerald block 
			send "&9&lBLOKI EME x64"
		chance of 8.4%:
			drop 32 emerald block
			send "&9&lBLOKI EME x32"
		chance of 2%:
			drop 32 diamond
			send "&9&l- DIAMENT x32"
		chance of 6%:
			drop 64 diamond block
			send "&9&l- BLOKI DIAMENTU x64"
		chance of 7%:
			drop 16 diamond
			send "&9&l- DIAMENT x16"
		chance of 9%:
			drop 32 diamond block
			send "&9&l- BLOKI DIAMENTU x32"
		chance of 9.9%:
			drop 16 ender pearl
			send "&9&lPerelki x16"
command /case gracz [<player>] [<text>]:
	permission: case.admin
	trigger:
		if arg 1-is not set:
			if arg-2 is not set:
				send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1-is set:
 			if arg-2 is set:
				add arg-2 trapped chest named "&9&lPremium Case" to arg-player's inventory
command /caseall [<text>]:
	permission: case.admin
	trigger:
		if arg 1 is not set:
			send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1 is set:
			loop all players:
				add arg-1 trapped chest named "&9&lPremium Case" to loop-player's inventory
				broadcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg-1%!"
# cz3
on right click:
    if player's tool is tnt named "&c&lRzucane TNT":
        shoot a tnt from player with speed 0.5
# cz4

Błędy:

sk reload kitywgui
[15:54:27 INFO]: [Skript] Reloading kitywgui.sk...
[15:54:27 ERROR]: indentation error: expected 3 tabs, but found '_->->->' [-> = tab, _ = space, ? = other whitespace] (kitywgui.sk, line 155: if arg-2 is set:')
[15:54:27 ERROR]: indentation error: expected 3 tabs, but found 4 tabs (kitywgui.sk, line 156: add arg-2 trapped chest named "&9&lPremium Case" to arg-player's inventory')
[15:54:27 WARN]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section. (kitywgui.sk, line 154: if arg 1-is set:')
[15:54:28 ERROR]: '1-is not set' is not a type (kitywgui.sk, line 151: if arg 1-is not set:')
[15:54:28 ERROR]: '1-is set' is not a type (kitywgui.sk, line 154: if arg 1-is set:')
[15:54:28 ERROR]: '1 trapped chest named "&9&lPremium Case"' is not a type (kitywgui.sk, line 164: add arg-1 trapped chest named "&9&lPremium Case" to loop-player's inventory')
[15:54:28 INFO]: [Skript] Encountered 5 errors while reloading kitywgui.sk!

Większość ludzi podsyła nie działający kod.

Edytowane przez Kurotsuwa
Kurotsuwa

Wrzucam w spoiler.

Notatka dodana przez Kurotsuwa

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220550
Udostępnij na innych stronach

  • 0
command /case gracz [<player>] [<text>]:
	permission: case.admin
	trigger:
		if arg 1 is not set:
			if arg 2 is not set:
				send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1 is set:
			if arg 2 is set:
				add arg-2 of trapped chest named "&9&lPremium Case" to arg-player's inventory
command /caseall [<text>]:
	permission: case.admin
	trigger:
		if arg 1 is not set:
			send "Uzycie: &8/&cpremiumcase &c[&eNick&8] [&eIlosc&8]"
		if arg 1 is set:
			loop all players:
				add arg-1 of trapped chest named "&9&lPremium Case" to loop-player's inventory
				broadcast "&a&lCaly serwer otrzymuje &9&lPremium Case&a&l x%arg-1%!"
# cz3
on right click:
	if player's tool is tnt named "&c&lRzucane TNT":
		shoot a tnt from player with speed 0.5

spróbuj z całym skrypcie zamienić trapped chest na chest

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220556
Udostępnij na innych stronach

  • 0

@Helios1993 Zmieniłem na chest, takie błędy:

sk reload kitywgui
[17:17:59 INFO]: [Skript] Reloading kitywgui.sk...
[17:18:01 ERROR]: '2 of chest named "&9&lPremium Case"' is not a type (kitywgui.sk, line 156: add arg-2 of chest named "&9&lPremium Case" to arg-player's inventory')
[17:18:01 ERROR]: '1 of chest named "&9&lPremium Case"' is not a type (kitywgui.sk, line 164: add arg-1 of chest named "&9&lPremium Case" to loop-player's inventory')
[17:18:01 INFO]: [Skript] Encountered 2 errors while reloading kitywgui.sk!

 

Odnośnik do komentarza
https://skript.pl/temat/34266-problem-z-dawaniem-case/#findComment-220558
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ę...