S
sooply
Ziyaretçi
Minecraft - TuSKe İle Gui Oluşturma
TuSKe ile GUI oluşturmak mümkündür. Bu özellik skQuery adlı addonda da mevcuttur ama eski ve hatalı olduğundan pek önerdiğimi söyleyemem. Yavaştan konunun içine girmeye başlayalım isterseniz. İlk önce komut oluşturmayı öğrenmenizi öneririm. Bunun için forumda rehberler mevcut. İsterseniz buraya tıklayarak konuya gidebilirsiniz.
Kod Kalıpları
GUI Oluşturma
Kod:
virtual %inventorytype% [inventory] [with size %-number%] [(named|with (name|title)) %-string%]
virtual %inventorytype% [inventory] [with %-number% row] [(named|with (name|title)) %-string%]
virtual %inventorytype% [inventory] [(named|with (name|title)) %-string%] with size %-number%
virtual %inventorytype% [inventory] [(named|with (name|title)) %-string%] with %-number% row
create [a] [new] gui [[with id] %-string%] with %inventory% [and shape %-strings%]
(change|edit) %guiinventory%
Kod:
(make|format) next gui [slot] (with|to)
(make|format) gui [slot] %strings/numbers% (with|to) %itemstack%
Kod:
run (when|while) clos(e|ing) [gui]
anvil - Örs
brewing - İksir Tezgahı
chest - Sandık
workbench - Çalışma Masası
dispenser - Fırlatıcı
dropper - Bırakıcı
enchanting - Büyü Masası
ender chest - Ender Sandık
furnace - Ocak
hopper - Huni
player - Oyuncu Envanteri
beacon - Fener
merchant - Köylü Takas Menüsü
creative - Yaratıcı Modu Envanteri
Not: Çalışmayan veya farklı bir addon gerektiren envanter tipleri olabilir.
brewing - İksir Tezgahı
chest - Sandık
workbench - Çalışma Masası
dispenser - Fırlatıcı
dropper - Bırakıcı
enchanting - Büyü Masası
ender chest - Ender Sandık
furnace - Ocak
hopper - Huni
player - Oyuncu Envanteri
beacon - Fener
merchant - Köylü Takas Menüsü
creative - Yaratıcı Modu Envanteri
Not: Çalışmayan veya farklı bir addon gerektiren envanter tipleri olabilir.
left - Sol tıklama
right - Sağ tıklama
shift left - Shift tuşuyla sol tıklama
shift right - Shift tuşuyla sağ tıklama
double click - Çift tıklama
middle - Fare tekerleği ile tıklama
number key - Sayı tuşları ile tıklama
drop - Eşyayı atma tuşuna basarak tıklama
control drop - CTRL ve eşyayı atma tuşlarına basarak tıklama
right - Sağ tıklama
shift left - Shift tuşuyla sol tıklama
shift right - Shift tuşuyla sağ tıklama
double click - Çift tıklama
middle - Fare tekerleği ile tıklama
number key - Sayı tuşları ile tıklama
drop - Eşyayı atma tuşuna basarak tıklama
control drop - CTRL ve eşyayı atma tuşlarına basarak tıklama
Kod:
%Oyuncu% has [a] gui
%Oyuncu% does(n't| not) have [a] gui
Kod:
slot %Sayı% of %Oyuncu% is [a] gui
slot %Sayı% of %Oyuncu% is(n't| not) [a] gui
GUI oluşturmak öyle sandığınız gibi zor bir işlem değil. Öğrendiğimiz kod kalıplarıyla ilk önce hangi envanter tipi GUI'yi oluşturacağımızı belirleyelim. 3 satır olsun. İsmi'de Warp olsun.
YAML:
#Kod Kalıbı: create [a] [new] gui [[with id] %-string%] with %inventory% [and shape %-strings%]
create a gui with virtual chest with 3 rows named "&3Warp"
Kod kalıbımızı biliyoruz. Gördüğünüz gibi satır sayısını da ayarladık. Sırada GUI'nin içini ayarlamada. Bu da zor değil.
YAML:
create a gui with virtual chest with 3 rows named "&3Warp":
make gui slot 13 of player with stone named "&aAda" with lore "&bAdana mı gitmek istiyorsun? Tek yapman gereken||&bburaya tıklaman!" to run:
#Olaylar
#Kod Kalıpları: (make|format) gui [slot] %strings/numbers% (with|to) %itemstack%
Gördüğünüz gibi en basit bir şekilde GUI'mizi oluşturduk. Gelin bunun devamını getirelim.
Not: || işareti ile GUI'nin açıklamasında alt satıra geçtik. Sizde böyle yapabilirsiniz.
Kod:
create a gui with virtual chest with 3 rows named "&3Warp":
make gui slot 13 of player with stone named "&aAda" with lore "&bAdana mı gitmek istiyorsun? Tek yapman gereken||&bburaya tıklaman!" to run:
close player's inventory
send "&3&lWARP &8» &73 saniye sonra &8adana &7ışınlanacaksın."
wait 3 seconds
execute player command "/is"
Sizler istediğiniz gibi bu GUI'nin devamını getirebilirsiniz.
Yazı İle GUI Oluşturma
Başlık biraz tuhaf oldu diyebilirim. Bu özellikle oluşturacağınız GUI'yi daha kolayca ve düzenli olarak oluşturabilirsiniz. Bunun için GUI'de bulunan slot numaralarını bilmenize gerek yok. Her bir karakter GUI'deki eşyayı temsil etmektedir.
Kod:
add "---------" to {_gui::*}
add "- -" to {_gui::*}
add "---------" to {_gui::*}
create a gui with virtual chest and shape {_gui::*}
#Kod Kalıbı: create [a] [new] gui [[with id] %string%] with %inventory% [and shape %strings%]
GUI'nin şu an temelini atmış bulunmaktayız. Sıra geldi işaretleri eşyaya dönüştürmede
Kod:
add "---------" to {_gui::*}
add "- -" to {_gui::*}
add "---------" to {_gui::*}
create a gui with virtual chest and shape {_gui::*}:
make gui slot "-" with stained glass pane
İşte işlemlerimiz bu kadar.
Örnek GUI
Bana ait olmayan ama bütün kod kalıplarını içeren bir GUI. Buraya bakarak basit bir GUI oluşturabilirsiniz.
Kod:
command /gui:
permission: op
trigger:
open virtual chest with size 2 named "GUI Deneme" to player
make gui slot 0 of player with stone named "hiçbir şey yapmaz" to nothing
make gui slot 1 of player with stone named "Menüyü kapatır" to close
make gui slot 2 of player with stone named "Bir sayı tuşuna basılı tutup" with lore "&ftıklanırsa menüyü kapatır" to close using number key
make gui slot 3 of player with stone named "Oyuncuya /say Deneme" with lore "&fkomutunu kullandırır." to run player command "/say Deneme"
make gui slot 4 of player with stone to run player command "/msg %player% Sağ" using right mouse button
make gui slot 4 of player with stone named "Sağ tıklanırsa /say Sağ" with lore "&fSol tıklanırsa /say Sol||&fkomutunu kullandırır." to run player command "/msg %player% Sol" using left mouse button
make gui slot 5 of player with stone named "Oyuncuya /say Deneme" with lore "&fkomutunu kullandırır." to run player command "/say Deneme"
make gui slot 6 of player with stone named "Oyuncuya ""*"" yetkisiyle" with lore "&f/say Deneme komutunu kullandırır." to run player command "/say Deneme" with permission "*"
make gui slot 7 of player with stone named "Konsola /say Deneme" with lore "&fkomutunu kullandırır." to run console command "/say Selam"
make gui slot 8 of player with stone named "deneme(player)" with lore "&ffonksiyonunu çalıştırır" to run function deneme(player)
make gui slot 9 of player with stone named "Menüyü kapatır ve deneme(player)" with lore "&ffonksiyonunu çalıştırır" to close then run function deneme(player)
make gui slot 10 of player with stone named "Taş tutarak tıklarsan" with lore "&fdeneme(player) fonksiyonunu çalıştırır" to run function deneme(player) with cursor stone
make gui slot 11 of player with stone named "Sol tıklanınca envanteri kapatıp mesaj" with lore "&fgönderen skript kodu çalıştırır." to run using left mouse button:
close player's inventory
send "Başarılı!"
function deneme(p: player):
send "GUI eşyasına tıkladın!" to {_p}