Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Copyright By Enrico , Jangan Sampai Di Claim !
- #Cara Penggunaaan
- #Pertama Pegang item yang ingin dijual
- #Lalu Tulis /es <namaNPC> <Harga> <SlotItem> <Lore> #Gunakan || untuk lore baris ganda :V
- #Buat Npc yang telah di set namanya tadi
- options:
- pr: emeraldshop
- pf: &8&l(&6-&8> &fEShop&8>&a
- item: emerald
- on inventory close:
- delete {shopmode.%player%}
- loop items in player's inventory:
- lore of loop-item contains "Price:":
- remove loop-item from player #anti BUG
- on npc right click:
- wait 2 tick
- loop {{@pr}::*}:
- if citizen name is "%loop-value%":
- set {shopmode.%player%} to true
- wait 2 tick
- open chest with 6 row named "%loop-value% Shop" to player
- loop 54 times:
- set {_a} to loop-num - 1
- if {{@pr}.%{_a}%::item%loop-value%} is set:
- if {{@pr}.%{_a}%::lore%loop-value%} is set:
- format slot {_a} of player with {{@pr}.%{_a}%::item%loop-value%} named "%{{@pr}.%{_a}%::name%loop-value%}%" with lore "%{{@pr}.%{_a}%::lore%loop-value%}%||&fPrice: &a%{{@pr}.%{_a}%::price%loop-value%}% &fEmerald" to close then run "sudo %player% checkershop %{{@pr}.%{_a}%::name%loop-value%}% %{{@pr}.%{_a}%::price%loop-value%}%"
- if {{@pr}.%{_a}%::lore%loop-value%} is not set:
- format slot {_a} of player with {{@pr}.%{_a}%::item%loop-value%} named "%{{@pr}.%{_a}%::name%loop-value%}%" with lore "&fPrice: &a%{{@pr}.%{_a}%::price%loop-value%}% &fEmerald" to close then run "sudo %player% checkershop %{{@pr}.%{_a}%::item%loop-value%}% %{{@pr}.%{_a}%::price%loop-value%}%"
- wait 1 tick
- command /emeraldshop [<text>] [<number>] [<number>] [<text>]:
- usage: /emeraldshop <NamaNPC> <Harga> <Slot> <Lore>
- aliases: es
- trigger:
- if player don't have permission "{@pr}":
- stop
- if arg 1 is not set:
- send "{@pf} /emeraldshop <NamaNPC> <Harga> <Slot> <Lore>"
- stop
- if arg 1 is set:
- if arg 2 is not set:
- send "{@pf} /emeraldshop <NamaNPC> <Harga> <Slot> <Lore>"
- stop
- if arg 2 is set:
- if arg 3 is not set:
- send "{@pf} /emeraldshop <NamaNPC> <Harga> <Slot> <Lore>"
- stop
- if arg 3 is set:
- if arg 4 is not set:
- send "{@pf} /emeraldshop <NamaNPC> <Harga> <Slot> <Lore>"
- stop
- if arg 4 is set:
- set {{@pr}.%arg 3%::name%arg 1%} to player's tool
- if name of player's tool is set:
- set {{@pr}.%arg 3%::name%arg 1%} to name of player's tool
- set {{@pr}.%arg 3%::item%arg 1%} to player's tool
- set {{@pr}.%arg 3%::price%arg 1%} to arg 2
- set {{@pr}.%arg 3%::lore%arg 1%} to "%arg 4%"
- if lore of player's tool is set:
- set {{@pr}.%arg 3%::lore%arg 1%} to "%lore of player's tool%||%arg 4%"
- add arg 1 to {{@pr}::*}
- send "{@pf} Item &6%player's tool% &ftelah berhasil di set di NPC &a%arg 1%&f, pada slot &a%arg 3%&f, dengan harga &a%arg 2%&f, dan Lore %arg 4%"
- command /checkershop [<text>] [<number>]:
- trigger:
- if {shopmode.%player%} is true:
- set {_count} to number of emerald in player's inventory
- set {_c} to arg 2
- if {_count} is more than or equal to {_c}:
- set {_i} to arg 1 parsed as item
- give player {_i}
- loop {_c} times:
- remove 1 emerald from player
- send "{@pf} Kamu berhasil membeli %{_i}% , dengan harga %arg 2% emerald"
- stop
- send "{@pf} Maaf Emerald Mu kurang untuk membeli ini"
Advertisement
Add Comment
Please, Sign In to add comment