Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #+--------------------------------------------------+
- # Skript Name: Lucky Chest
- # Version: V1.0
- # Author: Yusril Takeuchi
- #
- # Skript ini adalah Lucky Chest yang berarti
- # Chest keberuntungan. Fungsinya jika kita menemukan chest ini
- # maka kita akan mendapatkan sebuah item didalamnya.
- # Tapi jika ingin membukanya perlu memerlukan sebuah Key.
- # Bagi admin, mendapatkan Key bisa dengan cara /lc get key.
- # Namun untuk member, kalian para staff bisa mengkreatifitaskan sendiri.
- # Bagi donatur, kalian bisa mendapatkan 2x loot dari dalam chest.
- # Dan perlu memerlukan permission luckychest.donatur
- #
- # Permission:
- # luckychest.open - Berguna untuk bisa membuka Lucky Chest
- # luckychest.key - Berguna untuk mendapatkan Key dengan command /lc get key
- # luckychest.donatur - Mendapatkan 2x jumlah barang dari dalam chest. Recommended untuk donatur.
- # luckychest.reload - Akses menggunakan /lc reload untuk mengreload skript ini.
- # luckychest.help - Mengakses seluruh command
- #
- # Features:
- # - Loot Chest System
- # - Double Donatur Loot
- # - Key System
- # - Reload Command
- # - Hook System
- #
- # Requirements:
- # - ExtrasSK
- #
- # Cara Install:
- # 1.Masukan file ini di directory .../plugins/skript/script/
- # 2.Reload dengan menggunakan command /skript reload LuckyChest
- # 3.Gunakan command /lc atau /luckychest untuk mengakses seluruh command
- #
- # Command:
- # - /lc
- # - /lc get key
- # - /lc reload
- # - /lc help
- #
- # Changelog Version:
- # V1.0:
- # - Release Skript
- #
- #+-------------------------------------------------------------------------------------------------------------+
- # =Author Note=
- # Jika anda ingin mengedit skript ini silahkan, tapi SAYA TIDAK BERTANGGUNG JAWAB atas
- # kerusakan yang anda perbuat sendiri, disarankan bertanya sebelum ingin mengeditnya.
- # Dan selalu membaca deskripsi / penjelasan dari tiap line agar mengetahui fungsi fungsinya
- #
- # =BIG WARNING=
- # Mengganti Author resmi berarti melanggar Hak Cipta
- # © Copyright 2015 Yusril Takeuchi
- #
- #+-------------------------------------------------------------------------------------------------------------+
- #
- #+-------------------------------------------------------------------------------------------------------------+
- #
- # =Extra Note=
- # Kamu Membutuhkan Plugin Skript Tambahan Agar Skript Berjalan Lancar Atau Akan Terjadi Error
- # Skript Addon Required: ExtrasSK
- # http://dev.bukkit.org/bukkit-plugins/skript/forum/misc/66835-addon-extras-sk-1-5-added-crop-grow-trample-events/
- #
- #+-------------------------------------------------------------------------------------------------------------+
- #+-----------------------------------+
- #
- # OPTIONS
- #
- #+-----------------------------------+
- options:
- # --- Title And Prefix --- #
- Title: &b&lLucky Chest
- Prefix: &7[&bLucky Chest&7] &b
- # --- Permission --- #
- PermOpen: luckychest.open
- PermKey: luckychest.key
- PermDonatur: luckychest.donatur
- PermReload: luckychest.reload
- PermHelp: luckychest.help
- # --- Double Loot Donatur --- #
- LootDouble: 2
- # --- Type key --- #
- Key: tripwire hook
- KeyName: &6[&3Lucky Key&6]
- # --- Loot --- #
- Loot: Iron ingot
- Loot2: Gold ingot
- Loot3: Diamond
- Loot4: Iron Sword
- Loot5: Gold Sword
- Loot6: Diamond Sword
- # --- Jumlah Loot Donatur--- #
- LootJumlahD: 2
- LootJumlahD2: 2
- LootJumlahD3: 2
- LootJumlahD4: 2
- LootJumlahD5: 2
- LootJumlahD6: 2
- # --- Jumlah Loot Player --- #
- LootJumlah: 1
- LootJumlah2: 1
- LootJumlah3: 1
- LootJumlah4: 1
- LootJumlah5: 2
- LootJumlah6: 2
- # --- Skript File Name --- #
- LuckyChest: LuckyChest
- # --- Addon --- #
- ExtrasSk: ExtrasSK.jar
- # --- About --- #
- Author: &dYusrilTakeuchi
- Version: &dV1.0
- # --- Lore Key --- #
- LoreKey: &c&l•&bBisa Digunakan Untuk Membuka Lucky Chest||&c&l•&bKlik Kanan Ke Arah Ender Chest Untuk Mendapatkan Loot||&c&l•&4Tidak Berlaku Untuk Chest Biasa||&c&l•&4Loot Bisa Berupa Material, Makanan, Atau Senjata|| ||&c&l•&3Klik Kanan Ke Chest Untuk Menggunakan
- #+-----------------------------------+
- #
- # ON JOIN
- #
- #+-----------------------------------+
- # --- Bagian ini untuk set double 2x loot. tapi berhubung saya tidak pakai ini jadi dibiarkan saja --- #
- # --- Jika anda ingin menggunakannya silahkan --- #
- on join:
- # --- Ketika player memiliki permission donatur --- #
- player has permission "{@PermDonatur}":
- # --- Mengset variable ke options
- set {lc.loot} to {@LootDouble}
- else:
- stop
- on join:
- wait 50 ticks
- message "&b//&b&m----------&7[ {@Title} &7]&b&m----------&b\\"
- message " &3Name&7: &b{@LuckyChest}"
- message " &3Author&7: {@Author}"
- message " &3Version&7: {@Version}"
- message " "
- message " &c&l•&bThis server powered by {@LuckyChest}"
- message "&b//&b&m----------&7[ {@Title} &7]&b&m----------&b\\"
- #+-----------------------------------+
- #
- # RIGHTCLICK ENDER CHEST
- #
- #+-----------------------------------+
- # --- Ketika player klik kanan ke ender chest --- #
- on rightclick on ender chest:
- # --- Jika player memegang sebuah Lucky Key --- #
- player is holding {@Key}:
- # --- Nama Key sesuai yang sudah di tentukan --- #
- "%name of player's held item%" is "{@KeyName}":
- # --- Jika player memiliki permission membuka --- #
- player has permission "{@PermOpen}":
- player has permission "{@PermDonatur}":
- # --- Chance of 80% ini untuk persentase pendapatan --- #
- chance of 80%:
- # --- Dengan ada ini, chest tidak terbuka --- #
- cancel event
- # --- SFX --- #
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- # --- Menghapus Lucky Key dari inventory --- #
- remove 1 tripwire hook named "{@KeyName}" with lore "{@LoreKey}" from player's inventory
- # --- Menggive Loot Item ke player --- #
- give {@LootJumlahD} {@Loot} to player
- give {@LootJumlahD2} {@Loot2} to player
- message "{@Prefix}Mendapatkan &3{@LootJumlahD} {@Loot}, {@LootJumlahD2} {@Loot2}"
- chance of 50%:
- give {@LootJumlahD3} {@Loot3} to player
- message "{@Prefix}dan &3{@LootJumlahD3} {@Loot3}!"
- chance of 50%:
- cancel event
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- remove 1 tripwire hook named "{@KeyName}" with lore "{@LoreKey}" from player's inventory
- give {@LootJumlahD4} {@Loot4} to player
- give {@LootJumlahD5} {@Loot5} to player
- message "{@Prefix}Mendapatkan &3{@LootJumlahD4} {@Loot4}, {@LootJumlahD5} {@Loot5}"
- chance of 50%:
- give {@LootJumlahD6} {@Loot6} to player
- message "{@Prefix}dan &3{@LootJumlahD6} {@Loot6}!"
- else:
- chance of 80%:
- cancel event
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- remove 1 tripwire hook named "{@KeyName}" with lore "{@LoreKey}" from player's inventory
- give {@LootJumlah} {@Loot} to player
- give {@LootJumlah2} {@Loot2} to player
- message "{@Prefix}Mendapatkan &3{@LootJumlahD} {@Loot}, {@LootJumlahD2} {@Loot2}"
- chance of 50%:
- give {@LootJumlahD3} {@Loot3} to player
- message "{@Prefix}dan &3{@LootJumlahD3} {@Loot3}!"
- chance of 50%:
- cancel event
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- remove 1 tripwire hook named "{@KeyName}" with lore "{@LoreKey}" from player's inventory
- give {@LootJumlah4} {@Loot4} to player
- give {@LootJumlah5} {@Loot5} to player
- chance of 50%:
- give {@LootJumlah6} {@Loot6} to player
- message "{@Prefix}Mendapatkan &3{@LootJumlah4} {@Loot4}, {@LootJumlah5} {@Loot5} &bdan &3{@LootJumlah6} {@Loot6}!"
- # --- Jika player tidak punya permission untuk membuka Lucky Chest --- #
- else:
- cancel event
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- message "{@Prefix}&4Maaf kamu tidak punya izin untuk membuka Lucky Chest!"
- # --- Jika player tidak memiliki Lucky Key --- #
- else:
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- message "{@Prefix}Kamu tidak memiliki {@KeyName}!"
- cancel event
- #+-----------------------------------+
- #
- # LUCKY CHEST COMMAND
- #
- #+-----------------------------------+
- command /luckychest [<text>] [<text>]:
- aliases: /lc
- trigger:
- if arg 1 is not set:
- player has permission "{@PermHelp}":
- message "&6//&6&m----------&7[ {@Title} &7]&6&m----------&6\\"
- message " &6/lc help &7- &bMelihat seluruh command Sword Skill"
- message " &6/lc get key &7- &bMendapatkan Lucky Key"
- message " &6/lc reload &7- &bReload skript"
- message " &3Author&7: {@Author}"
- message " &3Version&7: {@Version}"
- message "&6//&6&m----------&7[ {@Title} &7]&6&m----------&6\\"
- else:
- message "{@Prefix}&4Maaf kamu tidak punya izin!"
- if arg 1 is "help":
- player has permission "{@PermHelp}":
- message "&6//&6&m----------&7[ {@Title} &7]&6&m----------&6\\"
- message " &6/lc help &7- &bMelihat seluruh command Sword Skill"
- message " &6/lc get key &7- &bMendapatkan Lucky Key"
- message " &6/lc reload &7- &bReload skript"
- message " &3Author&7: {@Author}"
- message " &3Version&7: {@Version}"
- message "&6//&6&m----------&7[ {@Title} &7]&6&m----------&6\\"
- else:
- message "{@Prefix}&4Maaf kamu tidak punya izin!"
- if arg 1 is "get":
- if arg 2 is "Key":
- player has permission "{@PermKey}":
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- give 1 {@Key} named "{@KeyName}" with lore "{@LoreKey}" to player
- message "{@Prefix}Mendapatkan 1 {@KeyName}!"
- else:
- message "{@Prefix}&4Maaf kamu tidak punya izin!"
- if arg 1 is "reload":
- player has permission "{@PermReload}":
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- message "{@Prefix}Persiapan untuk reload skript!"
- wait 20 ticks
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- message "{@Prefix}1"
- wait 20 ticks
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- message "{@Prefix}2"
- wait 20 ticks
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- message "{@Prefix}3"
- wait 20 ticks
- execute console command "/sk reload {@LuckyChest}"
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- message "{@Prefix}Berhasil reload Lucky Chest!"
- else:
- message "{@Prefix}&4Maaf kamu tidak punya izin!"
- #+-----------------------------------+
- #
- # HOOK AND NOTIFICATION
- #
- #+-----------------------------------+
- # --- Membutuhkan Extras Sk --- #
- on load:
- if file "plugins\{@ExtrasSk}" exists:
- message "{@Prefix}ExtrasSK Berhasil dihook! Let's Play The Sound!!" to the console
- stop
- else:
- message "{@Prefix}ExtrasSK Tidak terdeteksi, Akan segera di disable" to the console
- execute console command "/sk disable {@LuckyChest}"
- stop
- # --- Sukses Load --- #
- on load:
- message "{@Prefix}{@LuckyChest} Berhasil Di Load! {@Version}" to the console
- on unload:
- message "{@Prefix}{@LuckyChest} Berhasil Di Unload! {@Version}" to the console
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement