Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #------------------------------------------------------------#
- # Author : ItsAN (Arif Nurdiansyah)
- #--------------------------------------------------------------#
- Options:
- logo : &a[&2Market+&a]
- author : &aItsAN
- ExtrasSk: ExtrasSK.jar
- WildSkript: WildSkript.jar
- SkQuery: SkQuery.jar
- skRayFall: skRayFall.jar
- Variables:
- {market.max.1} = 53 #Don't Edit
- {market.max.2} = 106 #Don't Edit
- {market.max.3} = 159 #Don't Edit
- {market.max.4} = 212 #Don't Edit
- {market.max.5} = 265 #Don't Edit
- {market.max} = 0 # Don't Edit
- {market.price.create} = 25000
- {market.refund.delete} = 20000
- {market.price.move} = 15000
- {market.price.itemgui} = 20000
- {market.icon.%player%} = tripwire hook #Default Icon GUI
- {market.desc.%player%} = "Visit My Market!"
- {market.icon.next} = paper
- Command /market [<text>] [<text>] [<number>]:
- trigger:
- if arg 1 is not set:
- message "{@logo}"
- message "&2Author : {@author}"
- message "&2Version : 0.2"
- message "&2Use /market help For More Info"
- stop
- if arg 1 is "help":
- player has permission "market.default":
- message "{@logo}"
- message "&2/market create - For Set Your Market Location | Price : &a$%{market.price.create}%"
- message "&2/market desc <deskripsi> - Change Your Market Description"
- message "&2/market List - Open Market List GUI"
- message "&2/market go <player> - Teleport To Player's Market"
- message "&2/market movehere - Move Your Market Location | Price : &a$%{market.price.move}%"
- message "&2/market delete - Delete Your Market | Refund &a$%{market.refund.delete}%"
- message "&2/market seticon - Change Your GUI Icon| Price : &a$%{market.price.itemgui}%"
- message "&2/market admin - Admin Command"
- stop
- if arg 1 is "desc":
- player has permission "market.default":
- if {market.%player%} is set:
- if arg 2 is set:
- set {market.desc.%player%} to arg 2
- message "{@logo} Done!"
- stop
- else:
- message "{@logo} Field the Description!"
- stop
- else:
- message "{@logo} You don't have permission"
- stop
- if arg 1 is "movehere":
- player has permission "market.default":
- if {market.%player%} is set:
- if player's money is less than {market.price.move}:
- message "{@logo} You don't have enougth money!"
- stop
- else:
- subtract {market.price.move} from player's money
- set {market.%player%} to location of the player
- message "{@logo} Done"
- stop
- else:
- message "{@logo} You don't have permission"
- stop
- if arg 1 is "seticon":
- player has permission "market.default":
- if {market.%player%} is set:
- if player's held item is air:
- message "{@logo} Hold the item!"
- else:
- if player's money is less than {market.price.itemgui}:
- message "{@logo} You don't have enought money!"
- stop
- else:
- subtract {market.price.itemgui} from player's money
- set {market.icon.%player%} to player's held item
- message "{@logo} Icon Changed!"
- stop
- else:
- message "{@logo} You don't have Market!"
- stop
- else:
- message "{@logo} You don't have permission!"
- stop
- if arg 1 is "create":
- if {market.%player%} is not set:
- if player's money is less than {market.price.create}:
- message "{@logo} You don't have enought money"
- stop
- else:
- if {market.max} is less than {market.max.1}:
- subtract {market.price.create} from player's money
- set {market.%player%} to location of the player
- set {market.visitor.%player%} to 0
- set {market.icon.%player%} to tripwire hook
- add 1 to {market.max}
- message "{@logo} &aMarket Set To This Location!!"
- add player to {market::*}
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- stop
- else if {market.max} is less than {market.max.2}:
- subtract {market.price.create} from player's money
- set {market.%player%} to location of the player
- set {market.visitor.%player%} to 0
- set {market.icon.%player%} to tripwire hook
- add 1 to {market.max}
- message "{@logo} &aMarket Set To This Location!!"
- add player to {market2::*}
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- stop
- else if {market.max} is less than {market.max.3}:
- subtract {market.price.create} from player's money
- set {market.%player%} to location of the player
- set {market.visitor.%player%} to 0
- set {market.icon.%player%} to tripwire hook
- add 1 to {market.max}
- message "{@logo} &aMarket Set To This Location!!"
- add player to {market3::*}
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- stop
- else if {market.max} is less than {market.max.4}:
- subtract {market.price.create} from player's money
- set {market.%player%} to location of the player
- set {market.visitor.%player%} to 0
- set {market.icon.%player%} to tripwire hook
- add 1 to {market.max}
- message "{@logo} &aMarket Set To This Location!!"
- add player to {market4::*}
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- stop
- else:
- subtract {market.price.create} from player's money
- set {market.%player%} to location of the player
- set {market.visitor.%player%} to 0
- set {market.icon.%player%} to tripwire hook
- add 1 to {market.max}
- message "{@logo} &aMarket Set To This Location!!"
- add player to {market5::*}
- play "LEVEL_UP" only to player with pitch 1 and volume 1
- stop
- if {market.%player%} is set:
- send "{@logo} Market Already Set!"
- stop
- else:
- message "{@logo} Market Already Set!"
- if arg 1 is "delete":
- if {market.%player%} is set:
- if player has permission "market.default":
- message "{@logo} &aMarket Deleted"
- add {market.refund.delete} to player's money
- message "{@logo} Refunded &a$%{market.refund.delete}%"
- play "NOTE_BASS" only to player with pitch 0.5 volume 1
- delete {market.%player%}
- remove player from {market::*}
- remove player from {market2::*}
- remove player from {market3::*}
- remove player from {market4::*}
- remove player from {market5::*}
- delete {market.visitor.%player%}
- delete {market.icon.%player%}
- subtract 1 from {market.max}
- stop
- else:
- message "{@logo} You don't have permission"
- stop
- else:
- message "{@logo} You don't have Market!"
- stop
- if arg 1 is "go":
- if {market.%arg 2%} is set:
- if player has permission "market.default":
- message "{@logo} Teleported to %arg 2%'s Market"
- teleport player to {market.%arg 2%}
- add 1 to {market.visitor.%arg 2%}
- play "LEVEL_UP" only to player with pitch 0.5 volume 1
- send player title "&a%arg 2%'s &2Market" with subtitle "&f%{market.desc.%arg 2%}%" for 2 seconds
- if {visit.%player%.%arg 2%} is not set:
- set {visit.%player%.%arg 2%} to true
- stop
- else:
- message "{@logo} You don't have permission"
- stop
- else:
- message "{@logo} %arg 2% Doesn't Have Market!"
- stop
- if arg 1 is "list":
- if player has permission "market.default":
- wait 5 tick
- open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
- play "CHEST_OPEN" only to player with pitch 0.5 volume 1
- loop {market::*}:
- add 1 to {_loop-num}
- player has permission "market.default":
- format slot 53 of player with {market.icon.next} named "&61/5" with lore "&eClick To Page 2" to close then run "sudo %player% market2"
- set {_m} to {_loop-num} - 1
- format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
- wait 1 tick
- if arg 1 is "admin":
- if player has permission "market.admin":
- if arg 2 is not set:
- message "{@logo}"
- message "&2/market admin pricecreate <price> - Change Market Create's Price"
- message "&2/market admin pricemove <price> - Change Market Move's Price"
- message "&2/market admin priceicon <price> - Change Market Icon's Price"
- message "&2/market admin setrefund <money> - Change Refund Money"
- message "&2/seticonnext - Change The Next Page's Icon"
- if arg 2 is "pricecreate":
- arg 3 is not set:
- message "{@logo} Gunakan /market admin pricecreate <harga>"
- stop
- arg 3 is set:
- set {market.price.create} to arg 3
- message "{@logo} Berhasil!"
- stop
- if arg 2 is "pricemove":
- arg 3 is not set:
- message "{@logo} Gunakan /market admin pricemove <harga>"
- stop
- arg 3 is set:
- set {market.price.move} to arg 3
- message "{@logo} Berhasil!"
- if arg 2 is "priceicon":
- arg 3 is not set:
- message "{@logo} Gunakan /market admin priceicon <harga>"
- stop
- arg 3 is set:
- set {market.price.itemgui} to arg 3
- message "{@logo} Berhasil!"
- stop
- if arg 2 is "setrefund":
- arg 3 is not set:
- message "{@logo} Gunakan /market admin refund <harga>"
- stop
- arg 3 is set:
- set {market.refund.delete} to arg 3
- message "{@logo} Berhasil!"
- stop
- command /seticonnext:
- trigger:
- player has permission "market.admin":
- set {market.icon.next} to player's held item
- send "{@logo} Done!"
- stop
- Command /market2:
- trigger:
- wait 5 tick
- open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
- format slot 53 of player with {market.icon.next} named "&62/5 Page" with lore "&eClick To Page 3" to close then run "sudo %player% market3"
- loop {market2::*}:
- if {market.visitor.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- if {market.rating.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- add 1 to {_num}
- set {_m} to {_num} - 1
- set {market.rating.%loop-value%} to {rate.%loop-value%} / {market.visitor.%loop-value%}
- play "CHEST_OPEN" only to player with pitch 0.5 volume 1
- format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
- wait 1 tick
- Command /market3:
- trigger:
- wait 5 tick
- open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
- loop {market3::*}:
- if {market.visitor.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- if {market.rating.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- add 1 to {_num}
- if player has permission "market.default":
- set {_m} to {_num} - 1
- play "CHEST_OPEN" only to player with pitch 0.5 volume 1
- format slot 53 of player with {market.icon.next} named "&63/5 Page" with lore "&eClick To Page 4" to close then run "sudo %player% market3"
- format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
- wait 1 tick
- Command /market4:
- trigger:
- wait 5 tick
- open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
- loop {market4::*}:
- if {market.visitor.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- if {market.rating.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- add 1 to {_num}
- if player has permission "market.default":
- set {_m} to {_num} - 1
- play "CHEST_OPEN" only to player with pitch 0.5 volume 1
- format slot 53 of player with {market.icon.next} named "&64/5 Page" with lore "&eClick To Page 5" to close then run "sudo %player% market3"
- format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
- wait 1 tick
- Command /market5:
- trigger:
- wait 5 tick
- open chest with 6 rows named "&0&m<[-- &aMarket GUI &0&m--]>" to player
- loop {market5::*}:
- if {market.visitor.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- if {market.rating.%loop-value%} is not set:
- set {market.visitor.%loop-value%} to "&a-"
- add 1 to {_num}
- if player has permission "market.default":
- set {_m} to {_num} - 1
- play "CHEST_OPEN" only to player with pitch 0.5 volume 1
- format slot {_m} of player with {market.icon.%loop-value%} named "&a%loop-value%'s &2Market" with lore "&0[&m--------------------------------<||&6%{market.desc.%loop-value%}%||&0&m>--------------------------------&0]||&6Visitor : &e%{market.visitor.%loop-value%}%" to close then run "sudo %player% market go %loop-value%"
- wait 1 tick
- On Load:
- message "{@logo} Skript Success Loaded" to the console
- message "{@logo} Author : ItsAN" to the console
- message "{@logo} Thank To Use This Skript" to the console
Advertisement
Add Comment
Please, Sign In to add comment