Skocz do zawartości
  • 0

Skrypt na /home, /sethome


kkxd

Pytanie

Witam, Potrzebuje skryptu na komendy /home, /sethome, /delhome, jednak ma on zapisywać lokalizacje domów nie w zmiennej, a w pliku .yml

Sam mógłbym sobie takie coś napisać, jednak nie moge wczytać lokalizacji z pliku, aby była traktowana jako lokalizacja. (Parsed as location nie działa)

Z góry dzięki!

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/
Udostępnij na innych stronach

16 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0

@kkxd nie rozumiem , dlaczego chcesz to oznaczać jako lokalizacje skoro tak się nie da...

 

on load:
	if folder "plugins/esejHome/" doesn't exists:
		create folder "plugins/esejHome/"
		create file "plugins/esejHome/list.yml"
		wl "// S k r i p t  c r e a t e d  b y  e s e j" to "plugins/esejHome/list.yml"
		stop
on join:
	if {home::%player%} isn't set:
		set {home::%player%} to false
command /esej:sethome:
	description: Ustawianie domu.
	aliases: /sethome
	trigger:
		if {home::%player%} is false:
			set {home::%player%} to true
			wl "%player%: '%location of player%'" to "plugins/esejHome/list.yml"
			send "&8» &6Pomyslnie ustawiono lokalizacje domu" to the player
			stop
		else:
			send "&8» &3Masz juz dom!" to the player
command /esej:home:
	description: teleportowanie do domu.
	aliases: /home
	trigger:
		if {home::%player%} is true:
			set {_loc} to single value "%player%" get of "plugins/esejHome/list.yml"
			set {_tp} to true
			set {_loc2} to player's location
			wait 5 seconds
			if location of player is {_loc2}:
				teleport player to {_loc}
				send "&8» &3Przeteleportowano"
				stop
			else:
				send "&8» &cRuszyles sie" to the player
				stop
command /esej:delhome:
	description: Usuwanie domu
	aliases: /delhome
	trigger:
		if {home::%player%} is true:
			set {home::%Player%} to false
			set {_delX} to single value "%player%" get of "plugins/esejHome/list.yml"
			set "%{_delX}" to "" in yaml file "plugins/esejHome/list.yml"
			send "&8» &cUsunieto twoj dom" to the player
			stop
		else:
			send "&8» &cNie masz domu!"

 

Edytowane przez esej
Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-136100
Udostępnij na innych stronach

  • 1
on load:
	if folder "plugins/esejHome/" doesn't exists:
		create folder "plugins/esejHome/"
		create file "plugins/esejHome/list.yml"
		wl "// S k r i p t  c r e a t e d  b y  e s e j" to "plugins/esejHome/list.yml"
		stop
on join:
	if {home::%player%} isn't set:
		set {home::%player%} to false
command /esej:sethome:
	description: Ustawianie domu.
	aliases: /sethome
	trigger:
		if {home::%player%} is false:
			set {home::%player%} to true
			wl "%player%: '%location of player%'" to "plugins/esejHome/list.yml"
			send "&8» &6Pomyslnie ustawiono lokalizacje domu" to the player
			stop
		else:
			send "&8» &3Masz juz dom!" to the player
command /esej:home:
	description: teleportowanie do domu.
	aliases: /home
	trigger:
		if {home::%player%} is true:
			set {_loc::%player%} to single value "%player%" get of "plugins/esejHome/list.yml"
			wait 5 seconds
			teleport player to {_loc::%player%}
command /esej:delhome:
	description: Usuwanie domu
	aliases: /delhome
	trigger:
		if {home::%player%} is true:
			set {home::%Player%} to false
			set {_delX} to single value "%player%" get of "plugins/esejHome/list.yml"
			set "%{_delX}" to "" in yaml file "plugins/esejHome/list.yml"
			send "&8» &cUsunieto twoj dom" to the player
			stop
		else:
			send "&8» &cNie masz domu!"

sprobuj tak

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-136142
Udostępnij na innych stronach

  • 0

Z tego co pamiętam to wildskripta na 1.8 nie ma, a skript znalazłem tylko na 1.12, który nie dzialal i wywalał błędy w konsoli. Obecnie używam najnowszego z bukkit.org bodajże na 1.7.10. Możesz podać link do skripta na 1.8.8?

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-136187
Udostępnij na innych stronach

  • 0

command /ustawdom:
    executable by: players
    trigger:
        set {dom.%player%.location} to location of player
        message "&9Dom> &7Ustawiono punkt teleportacji."

command /dom:
    executable by: players
    trigger:
        if {dom.%player%.location} is not set:
            message "&9Serwer> &7Brakuje punktu teleportacji..."
            stop trigger
        teleport player to {dom.%player%.location}

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-139943
Udostępnij na innych stronach

  • 0

 

options:
	nopermission: &c&lHmm... Chcialbys chyba...
	sethome: &a&lPomyslnie ustawiono home.
	home: &a&lPomyslnie przeteleportowano.
	permission: ps.home
	nohome: &c&lNajpierw zrob home przy uzyciu komendy /sethome
command /sethome:
	permission: {@permission}
	permission message: {@nopermission}
	trigger:
		set {home.%player%} to location of player
		send "{@sethome}"
command /home:
	permission: {@permission}
	permission message: {@nopermission}
	trigger:
		if {home.%player%} is not set:
			send "{@nohome}"
		if {home.%player%} is set:
			send "{@home}"
			teleport player to {home.%player%}

 

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-140226
Udostępnij na innych stronach

  • 0

Command /ustawdom:
    permission: ustaw.dom
    permission message: &6&lNie masz permisji do tej komendy! 
    Trigger:
    send "&6&lUstawiam dom..." to player
    wait 3 seconds
    set {warp.%player%} to location of player 
    send "&6&lPomyslnie ustawiles teleport do domu" to player 
Command /tpdom:
    permission: dom.tp
    permission message: Nie masz permisji do tej komendy 
    Trigger:
        send "&6&lZostaniesz teleportowny za sekunde ;)." to player
        wait 1 second
        teleport player to {warp.%player%}

 

w .yml to nwm xD ale powinno działać

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-141109
Udostępnij na innych stronach

  • 0
11 godzin temu, vaxuuuu napisał:

Command /ustawdom:
    permission: ustaw.dom
    permission message: &6&lNie masz permisji do tej komendy! 
    Trigger:
    send "&6&lUstawiam dom..." to player
    wait 3 seconds
    set {warp.%player%} to location of player 
    send "&6&lPomyslnie ustawiles teleport do domu" to player 
Command /tpdom:
    permission: dom.tp
    permission message: Nie masz permisji do tej komendy 
    Trigger:
        send "&6&lZostaniesz teleportowny za sekunde ;)." to player
        wait 1 second
        teleport player to {warp.%player%}

 

w .yml to nwm xD ale powinno działać

Gdzie ty masz yml? 

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-141143
Udostępnij na innych stronach

  • 0
14 minut temu, Polski Sześcian napisał:

Gdzie ty masz yml? 

Gdzie ty masz yml?

 

options:
	nopermission: &c&lHmm... Chcialbys chyba...
	sethome: &a&lPomyslnie ustawiono home.
	home: &a&lPomyslnie przeteleportowano.
	permission: ps.home
	nohome: &c&lNajpierw zrob home przy uzyciu komendy /sethome
command /sethome:
	permission: {@permission}
	permission message: {@nopermission}
	trigger:
		set {home.%player%} to location of player
		send "{@sethome}"
command /home:
	permission: {@permission}
	permission message: {@nopermission}
	trigger:
		if {home.%player%} is not set:
			send "{@nohome}"
		if {home.%player%} is set:
			send "{@home}"
			teleport player to {home.%player%}

 

 

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-141146
Udostępnij na innych stronach

  • 0
2 minuty temu, Polski Sześcian napisał:

Gdzie ty masz yml? 

A ty gdzie masz yml? Widzisz co ty piszesz?

	Command /ustawdom:
	[TAB]Trigger:
	[TAB][TAB]If file "plugins/sdDom/players/%player%.yml" exists:
	[TAB][TAB]Delete file
	[TAB]create file "plugins/sdDom/players/%player%.yml"
	[TAB]set "x" to "%x-coordinate of player% in YAML file "plugins/sdDom/players/%player%.yml"
	[TAB]set "y" to "%y-coordinate of player% in YAML file "plugins/sdDom/players/%player%.yml"
	[TAB]set "z" to "%z-coordinate of player% in YAML file "plugins/sdDom/players/%player%.yml"
	 
	Command /dom:
	[TAB]Trigger:
	[TAB][TAB]If file "plugins/sdDom/players/%player%.yml" exists:
	[TAB][TAB][TAB]set {_x} to single value "x" out of "plugins/sdDom/players/%player%.yml"
	[TAB][TAB][TAB]set {_x} to single value "x" out of "plugins/sdDom/players/%player%.yml"
	[TAB][TAB][TAB]set {_x} to single value "x" out of "plugins/sdDom/players/%player%.yml"
	[TAB][TAB][TAB]set {_tp} to location of player
	[TAB][TAB][TAB]set x-coordinate of {_tp} to ({_x} parsed as integer)
	[TAB][TAB][TAB]set y-coordinate of {_tp} to ({_y} parsed as integer)
	[TAB][TAB][TAB]set z-coordinate of {_tp} to ({_z} parsed as integer)
	[TAB][TAB][TAB]teleport player to {_tp}
	

Wez sobie ctrl+a, ctrl+f, zamień i zamień [TAB] ma tabulator bo jestem na fonie xd

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-141147
Udostępnij na innych stronach

  • 0
Command /ustawdom:
	Trigger:
		If file "plugins/sdDom/players/%player%.yml" exists:
			Delete file
		create file "plugins/sdDom/players/%player%.yml"
		set "x" to "%x-coordinate of player% in YAML file "plugins/sdDom/players/%player%.yml"
		set "y" to "%y-coordinate of player% in YAML file "plugins/sdDom/players/%player%.yml"
		set "z" to "%z-coordinate of player% in YAML file "plugins/sdDom/players/%player%.yml"
	 
Command /dom:
	Trigger:
		If file "plugins/sdDom/players/%player%.yml" exists:
			set {_x} to single value "x" out of "plugins/sdDom/players/%player%.yml"
			set {_y} to single value "y" out of "plugins/sdDom/players/%player%.yml"
			set {_z} to single value "z" out of "plugins/sdDom/players/%player%.yml"
			set {_tp} to location of player
			set x-coordinate of {_tp} to ({_x} parsed as integer)
			set y-coordinate of {_tp} to ({_y} parsed as integer)
			set z-coordinate of {_tp} to ({_z} parsed as integer)
			teleport player to {_tp}

@Quaczi Popełniłeś błąd przy wczytywaniu x,y,z bo dałeś samo x 3 razy

Odnośnik do komentarza
https://skript.pl/temat/20044-skrypt-na-home-sethome/#findComment-141152
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ę...