FastReplies 1.0beta5
Skript ne yapar?
İstediğiniz kadar komut ekleyebilir, sınırsız satırda cevap ekleyebilir,
ve bu komutlara yetkilendirme yapabilirsiniz!
Anlamadınız mı? Hadi detaylara inelim...
Kodlandı:
Paperclip 1.8.8
Skript 2.2dev36
Gereken Add-on Listesi:
Skript 2.2dev36+
skript-yaml
Komutlar:
/fr help
Yardım mesajı.
fastreplies.admin.help
/fr commands
Komutları gösterir.
fastreplies.admin.commands
/fr add <komut> <mesaj>
Yeni bir komut ve ona bir mesaj eklersiniz.
fastreplies.admin.add
/fr remove <komut>
Bir komutu kaldırırsınız.
fastreplies.admin.remove
/fr set <komut> <true/false>
Komutu in/aktif yaparsınız.
fastreplies.admin.set
/fr reload [<yaml>]
Tüm skripti veya yaml dosyasını yeniler.
fastreplies.admin.reload
/fr addline <komut> <yazı> YENİ
Girilen komuta yazıyı ekler.
fastreplies.admin.addline
/fr removeline <komut> <yazı> YENİ
Girilen komuttan yazıyı siler.
fastreplies.admin.removeline
Kullanım:
Komutu kullanarak kendimize özel bir komut oluşturuyoruz.
Bu komuta bir yetki ve mesaj ekliyoruz.
İster oyun içinden ister yaml dosyasını kullanarak komutun aktif mi
inaktif mi olacağını, vereceği mesajı ve yetkiyi ayarlayabiliyoruz.
Dikkat, yetki "fastreplies.use.xx" olmak zorundadır, aksi
halde çakışabilir ve kod hata verir.
Görseller:
Kod:
- Skript paylaşıldı.
- "commands" komutu eklendi.
- "set" komutu eklendi.
- Komutu in/aktif yapma eklendi.
- Mesajlar düzenlendi.
- Yetkilendirme otomatik hale getirildi.
- Mantık hataları giderildi.
- "set" komutu eklendi.
- Komutu in/aktif yapma eklendi.
- Mesajlar düzenlendi.
- Yetkilendirme otomatik hale getirildi.
- Mantık hataları giderildi.
- Performans iyileştirildi.
- Satırlar kısaltıldı.
- Birkaç şey kaldırıldı.
- Satırlar kısaltıldı.
- Birkaç şey kaldırıldı.
- Addline ve removeline komutları eklendi:
> Artık komut açıklamasına satır ekleyip silebileceksiniz, oyun içi düzenleme!
- Performans artırıldı.
> Artık komut açıklamasına satır ekleyip silebileceksiniz, oyun içi düzenleme!
- Performans artırıldı.
Skript ne yapar?
İstediğiniz kadar komut ekleyebilir, sınırsız satırda cevap ekleyebilir,
ve bu komutlara yetkilendirme yapabilirsiniz!
Anlamadınız mı? Hadi detaylara inelim...
Kodlandı:
Paperclip 1.8.8
Skript 2.2dev36
Gereken Add-on Listesi:
Skript 2.2dev36+
skript-yaml
Komutlar:
/fr help
Yardım mesajı.
fastreplies.admin.help
/fr commands
Komutları gösterir.
fastreplies.admin.commands
/fr add <komut> <mesaj>
Yeni bir komut ve ona bir mesaj eklersiniz.
fastreplies.admin.add
/fr remove <komut>
Bir komutu kaldırırsınız.
fastreplies.admin.remove
/fr set <komut> <true/false>
Komutu in/aktif yaparsınız.
fastreplies.admin.set
/fr reload [<yaml>]
Tüm skripti veya yaml dosyasını yeniler.
fastreplies.admin.reload
/fr addline <komut> <yazı> YENİ
Girilen komuta yazıyı ekler.
fastreplies.admin.addline
/fr removeline <komut> <yazı> YENİ
Girilen komuttan yazıyı siler.
fastreplies.admin.removeline
Kullanım:
Komutu kullanarak kendimize özel bir komut oluşturuyoruz.
Bu komuta bir yetki ve mesaj ekliyoruz.
İster oyun içinden ister yaml dosyasını kullanarak komutun aktif mi
inaktif mi olacağını, vereceği mesajı ve yetkiyi ayarlayabiliyoruz.
Dikkat, yetki "fastreplies.use.xx" olmak zorundadır, aksi
halde çakışabilir ve kod hata verir.
Görseller:
Kod:
Kod:
on load:
execute console command "/fr reload yaml"
on command:
if yaml list "%command%.enabled" from "FRM" is set:
cancel event
if yaml list "%command%.enabled" from "FRM" is false:
send "&8[&9FastReplies&8] &eThis command is disabled."
else if yaml list "%command%.enabled" from "FRM" is true:
if yaml list "%command%.permission" from "FRM" is "none":
set {_reply::*} to yaml list "%command%.reply" from "FRM"
send "%join {_reply::*} with nl% "
else if yaml list "%command%.permission" from "FRM" isn't "none":
if executor has permission "%command%.permission":
set {_reply::*} to yaml list "%command%.reply" from "FRM"
send "%join {_reply::*} with nl% "
else if executor doesn't have permission "%command%.permission":
send "&8[&9FastReplies&8] &eYou don't have the permission to use this command."
else:
send "&8[&9FastReplies&8] &eThere is an error about perms with this command, contact to admins."
else:
send "&8[&9FastReplies&8] &eThere is an error about status with this command, contact to admins."
command /fastreplies [<text=help>] [<text>] [<text>]:
aliases: fr
trigger:
if arg-1 is "add" or "remove" or "commands" or "help" or "set" or "reload" or "addline" or "removeline":
if executor has permission "fastreplies.admin.%arg-1%":
if arg-1 is "add":
if arg-2 and arg-3 are set:
if yaml list "%arg-2%.reply" from "FRM" isn't set:
add "true" to yaml list "%arg-2%.enabled" from "FRM"
add "fastreplies.use.%arg-2%" to yaml list "%arg-2%.permission" from "FRM"
add arg-3 to yaml list "%arg-2%.reply" from "FRM"
save yaml "FRM"
send "&8[&9FastReplies&8] &eAdded command: &7%arg-2%" and "&8[&9FastReplies&8] &ePermission: &7fastreplies.use.%arg-2%" and "&8[&9FastReplies&8] &eReply: &7%arg-3%"
else if yaml list "%arg-2%.reply" from "FRM" is set:
send "&8[&9FastReplies&8] &eThis command exists in the list."
else if arg-2 and arg-3 aren't set:
send "&8[&9FastReplies&8] &eUsage: /fr add [command] [reply]."
else if arg-1 is "addline":
arg-2 and arg-3 are set:
if yaml list "%arg-2%.reply" from "FRM" is set:
add arg-3 to yaml list "%arg-2%.reply" from "FRM"
save yaml "FRM"
send "&8[&9FastReplies&8] &eNew line added to: &7%arg-2%" and "&8[&9FastReplies&8] &eAdded line: %arg-3%"
else if yaml list "%arg-2%.reply" from "FRM" isn't set:
send "&8[&9FastReplies&8] &eThis command doesn't exist, add it first."
else if arg-2 and arg-3 aren't set:
send "&8[&9FastReplies&8] &eYou didn't enter the command or newline."
else if arg-1 is "commands":
loop yaml node keys "" from "FRM":
add loop-value to {_FR::commands::*}
send "&8[&9FastReplies&8] &eList of added commands: &e%join {_FR::commands::*} with "", ""%"
else if arg-1 is "help":
send "&8[&9FastReplies&8] &e/fr add [cmd] [reply] &7: Add command." and "&8[&9FastReplies&8] &e/fr addline [cmd] [newline] &7: Add a newline." and "&8[&9FastReplies&8] &e/fr commands &7: See all commands you added." and "&8[&9FastReplies&8] &e/fr reload [yaml] &7: Reloads skript or yaml." and "&8[&9FastReplies&8] &e/fr remove [cmd] &7: Remove command." and "&8[&9FastReplies&8] &e/fr removeline [cmd] [line] &7: Remove a line." and "&8[&9FastReplies&8] &e/fr set [cmd] [true/false] &7: Enable/disable a command."
else if arg-1 is "remove":
if arg-2 and yaml list "%arg-2%.reply" from "FRM" are set:
delete yaml list arg-2 from "FRM"
save yaml "FRM"
send "&8[&9FastReplies&8] &eRemoved command: &7%arg-2%"
else if arg-2 and yaml list "%arg-2%.reply" from "FRM" aren't set:
send "&8[&9FastReplies&8] &eYou didn't enter the command, or it doesn't exist."
else if arg-1 is "removeline":
if arg-2 and arg-3 are set:
if yaml list "%arg-2%.reply" from "FRM" is set:
add yaml list "%arg-2%.reply" from "FRM" to {_return::*}
{_return::*} contains arg-3:
remove arg-3 from yaml list "%arg-2%.reply" from "FRM"
save yaml "FRM"
send "&8[&9FastReplies&8] &eRemoved the line %arg-3% from %arg-2%"
else:
send "&8[&9FastReplies&8] &eThis line doesn't exist."
else if yaml list "%arg-2%.reply" from "FRM" isn't set:
send "&8[&9FastReplies&8] &eThis command doesn't exist, add it first."
else if arg-2 and arg-3 aren't set:
send "&8[&9FastReplies&8] &eYou didn't enter the command or the line."
else if arg-1 is "reload":
set {_ms} to unix timestamp of now
if arg-2 is "yaml":
load yaml "plugins/FastReplies/commands.yml" as "FRM"
yaml "FRM" is empty:
add "&cThis is just an example." to yaml list "example.reply" from "FRM"
add "fastreplies.use.example" to yaml list "example.permission" from "FRM"
add "false" to yaml list "example.enabled" from "FRM"
save yaml "FRM"
send "&8[&9FastReplies&8] &eReloaded all yaml files in %difference between {_ms} and unix timestamp of now%ms."
else if arg-2 isn't "yaml":
execute console command "/sk reload %script's name%"
send "&8[&9FastReplies&8] &eReloaded FastReplies in %difference between {_ms} and unix timestamp of now%ms"
else if arg-1 is "set":
if arg-2, arg-3 and yaml list "%arg-2%.enabled" from "FRM" are set:
if arg-3 is "true" or "false":
set yaml list "%arg-2%.enabled" from "FRM" to arg-3
send "&8[&9FastReplies&8] &eChanged the status of %arg-2% to %arg-3%"
save yaml "FRM"
else if arg-3 isn't "true" or "false":
send "&8[&9FastReplies&8] &eYou may only set to true or false."
else if arg-2, arg-3 and yaml list "%arg-2%.enabled" from "FRM" aren't set:
send "&8[&9FastReplies&8] &eYou didn't enter the cmd, status or it doesn't exist."
else if arg-1 isn't "add" or "remove" or "commands" or "help" or "set" or "reload":
execute executor command "/fr help"
Buraya kadar okuduysanız çok teşekkürler, iyi günler iyi forumlar mc-tr ailesi!
Bulduğunuz hataları, isteklerinizi vesaire söylerseniz, düzeltirim, eklerim, yapar ederim.
Kod neden İngilizce diye soranlara, sadece burada paylaşmıyorum xd
Ekli dosyalar
Moderatör tarafından düzenlendi: