Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-
- # Lotterey.sk made by
- # Minhii
- # -+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-
- options:
- kosten: 100
- Prefix: &8[&cLotterey&8] &7
- #Variable für Gems/Geld
- geld: {gems.%player%}
- #Variable für Tickets
- ticketp: {ticket.%player%}
- ticketarg: {ticket.%arg-2%}
- perm: lotterie.use
- gems: {gems.%player%}
- online: {hour.%loop-player%}
- command /lotterey [<text>] [<offline player>] [<integer>]:
- trigger:
- if player has permissions "{@perm}":
- if arg-1 is "add":
- if arg-2 is set:
- if arg-3 is bigger than or equal to 1:
- add arg-3 to {@ticketarg}
- send "{@Prefix}Du hast dem Spieler &c%arg-2% %arg-3% &7Ticket/s gegeben!"
- if arg-2 is online:
- send "{@Prefix}&c%player% &7gave you &c%arg-3% &7Tickets" to arg-2
- else:
- send "{@Prefix}You have to specify a positive number"
- else:
- send "{@Prefix}You have to specify a player"
- else if arg-1 is "remove":
- if arg-2 is set:
- if arg-3 is bigger than or equal to 1:
- set {_checkminus} to {@ticketarg} - arg-3
- if {_checkminus} is smaller than 0:
- send "{@Prefix}The Player hasn't so much Tickets. He currently has &c%{@ticketarg}% &7Tickets!"
- else:
- remove arg-3 from {@ticketarg}
- send "{@Prefix}You tooked &c%arg-3% &7Tickets from &c%arg-2%"
- if arg-2 is online:
- send "{@Prefix}&c%player% &7tooked &c%arg-3% &7Tickets from you" to arg-2
- else:
- send "{@Prefix}You have to specify a positive number"
- else:
- send "{@Prefix}You have to specify a player"
- else if arg-1 is "setblock":
- set block at location of player to enchantment table
- send "{@Prefix}You setted the Lotterey Block"
- else:
- send "&8&m&l=============={@Prefix}&8&m&l=============="
- send ""
- send "&7/lotterey &cadd/remove &7[Player] [Amount]"
- send "&7/lotterey &csetblock &8| &7Sets the Lottery-block"
- send ""
- send "&8&m&l=============={@Prefix}&8&m&l=============="
- else:
- send "&fUnknown command. Type ""/help"" for help."
- command /lotto [<text>] [<integer>]:
- trigger:
- if arg-1 is "on":
- if {@ticketp} is bigger than or equal to 1:
- remove 1 from {@ticketp}
- open chest with 3 rows named "&dUse Lottereyticket" to player
- wait 5 ticks
- set {inlott.%player%} to true
- format slot 0 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 0"]
- format slot 1 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 1"]
- format slot 2 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 2"]
- format slot 3 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 3"]
- format slot 4 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 4"]
- format slot 5 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 5"]
- format slot 6 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 6"]
- format slot 7 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 7"]
- format slot 8 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 8"]
- format slot 9 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 9"]
- format slot 10 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 10"]
- format slot 11 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 11"]
- format slot 12 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 12"]
- format slot 13 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 13"]
- format slot 14 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 14"]
- format slot 15 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 15"]
- format slot 16 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 16"]
- format slot 17 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 17"]
- format slot 18 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 18"]
- format slot 19 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 19"]
- format slot 20 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 20"]
- format slot 21 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 21"]
- format slot 22 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 22"]
- format slot 23 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 23"]
- format slot 24 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 24"]
- format slot 25 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 25"]
- format slot 26 of player with obsidian named "&cClick here!" to run [make player execute "lotto click 26"]
- else:
- send "{@Prefix}You haven't enough Tickets!"
- else if arg-1 is "buy":
- if {@geld} is bigger than or equal to {@kosten}:
- remove {@kosten} from {@geld}
- send "{@Prefix}You bought a Ticket"
- add 1 to {@ticketp}
- else:
- send "{@Prefix}You havent enough Gems"
- else if arg-1 is "click":
- if arg-2 is set:
- if {inlott.%player%} is true:
- chance of 80 %:
- set {_win} to random integer between 10 and 60
- else:
- set {_win} to random integer between 100 and 350
- if {_win} is bigger than or equal to 130:
- format slot arg-2 of player with shiny emerald block named "&a&l%{_win}% Gems" to be unstealable
- else:
- format slot arg-2 of player with shiny emerald named "&a&l%{_win}% Gems" to be unstealable
- if {winsave.%player%::*} is not set:
- set {winsave.%player%::*} to {_win}
- else:
- add {_win} to {winsave.%player%::*}
- add {_win} to {@geld}
- loop {winsave.%player%::*}:
- add 1 to {_checkclick}
- if {_checkclick} is bigger than or equal to 5:
- wait 5 ticks
- open chest with 2 rows named "&5Gems you won" to player
- wait 10 ticks
- set {inlott.%player%} to true
- set {_winsave} to 2
- loop {winsave.%player%::*}:
- if {_winsave} is smaller than 7:
- if {inlott.%player%} is true:
- if loop-value is bigger than or equal to 350:
- format slot {_winsave} of player with shiny emerald block named "&a&l%loop-value% Gems" to be unstealable
- else:
- format slot {_winsave} of player with shiny emerald named "&a&l%loop-value% Gems" to be unstealable
- add 1 to {_winsave}
- if {inlott.%player%} is true:
- wait 5 ticks
- format slot 0 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 1 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 7 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 8 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 9 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 10 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 12 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 11 of player with book named "&aUse Lotteryticket" with lore "&cYou have %{@ticketp}% Tickets" to run [make player execute "lotto on"]
- wait a tick
- if {inlott.%player%} is true:
- format slot 14 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 13 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 16 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- format slot 17 of player with gray stained glass pane named "&5" to be unstealable
- wait a tick
- if {inlott.%player%} is true:
- loop {winsave.%player%::*}:
- add loop-value to {_gewinngesamt}
- wait a tick
- if {inlott.%player%} is true:
- format slot 15 of player with shiny hopper named "&c&lOverall Won:" with lore "&6&l%{_gewinngesamt}%" to be unstealable
- wait 5 ticks
- wait a tick
- delete {inlott.%player%}
- delete {winsave.%player%::*}
- else:
- send "&fUnknown command. Type ""/help"" for help."
- else:
- send "&fUnknown command. Type ""/help"" for help."
- else:
- send "&fUnknown command. Type ""/help"" for help."
- on rightclick on enchantment table:
- cancel event
- if {@ticketp} is smaller than 0:
- set {@ticketp} to 0
- wait 5 ticks
- open chest with 1 row named "&cLotterey" to player
- wait a tick
- format slot 0 of player with gray stained glass pane named "&5" to be unstealable
- format slot 1 of player with gray stained glass pane named "&5" to be unstealable
- format slot 2 of player with book named "&aUse Lottereyticket" with lore "&cYou have %{@ticketp}% Tickets" to run [make player execute "lotto on"]
- format slot 3 of player with gray stained glass pane named "&5" to be unstealable
- format slot 4 of player with emerald named "&aYour Gems:" with lore "&c%{@gems}%" to be unstealable
- format slot 5 of player with gray stained glass pane named "&5" to be unstealable
- format slot 6 of player with shiny paper named "&cBuy a Lottereyticekt" with lore "&7Cost:&a {@kosten} &f&lGems" to run [make player execute "lotto buy"]
- format slot 7 of player with gray stained glass pane named "&5" to be unstealable
- format slot 8 of player with gray stained glass pane named "&5" to be unstealable
- on load:
- wait 20 ticks
- broadcast "{@Prefix}The Lotterey was loaded by a &cStaff Member"
- on inventory close:
- if {inlott.%player%} is true:
- if {winsave.%player%::*} is not set:
- send "{@Prefix}You have abort the Lotterey. You got the Lottereyticket back"
- delete {winsave.%player%::*}
- add 1 to {@ticketp}
- delete {inlott.%player%}
- if {inlott.%player%} is true:
- delete {inlott.%player%}
- loop {winsave.%player%::*}:
- add 1 to {_checkclick}
- if {_checkclick} is smaller than 5:
- send "{@Prefix}You have abort the Lotterey. You got the Lottereyticket back"
- delete {winsave.%player%::*}
- add 1 to {@ticketp}
- delete {inlott.%player%}
- on inventory click:
- if inventory name of player's current inventory is "&cLotterie" or "&dUse Lottereyticket" or "&5Get Gems":
- cancel event
- on quit:
- if {inlott.%player%} is true:
- delete {inlott.%player%}
- on join:
- if {inlott.%player%} is true:
- delete {inlott.%player%}
- on first join:
- set {gems.%player%} to 0
- command /gems [<text>] [<player>] [<number>]:
- aliases: /money
- trigger:
- if arg 1 is not set:
- if player has permission "gems.admin":
- message "&8-[ &a&l Gems &8]-"
- message "&6/gems see <Player> &7- Shows the Gems of someone"
- message "&6/gems give <Player> &7- Give a Player Gems"
- message "&6/gems reset <Player> &7- Sets the Gems of the Player back to 0"
- message "&6/gems take <Player> &7- Take Gems from a Player"
- message "&6/gems see &7- Shows your Gems"
- message "&6/gems pay <Player> &7- Pay someone Gems"
- stop
- if arg 1 is "see":
- if player has permission "gems.player":
- if player arg is not set:
- message "&8[&a&lGems&8] &cYou have to specify a Player"
- if player arg is set:
- message "&aGems&8: &c%{gems.%arg-2%}% &6(%arg 2%)"
- stop
- if arg 1 is "pay":
- if player has permission "gems.player":
- if arg 2 is set:
- if number arg is set:
- if {gems.%player%} is less than number arg:
- message "&8[&a&lGems&8] &cYou haven't so much Gems"
- if {gems.%player%} is more than number arg:
- remove number arg from {gems.%player%}
- add number arg to {gems.%arg-2%}
- message "&8[&a&lGems&8] &cYou paid %player arg% %number arg% &aGems" to player
- message "&8[&a&lGems&8] &eYou recieved %number arg% from %player%"
- if arg 1 is "give":
- if player has permission "gems.admin":
- add number arg to {gems.%arg-2%}
- message "&8[&a&lGems&8] &cYou gave %player arg% %number arg% &aGems"
- if arg 1 is "reset":
- if player has permission "gems.admin":
- if player arg is set:
- set {gems.%arg-2%} to 0
- message "&8[&a&lGems&8] &cYou resetted the Gems of %player arg%"
- if arg 1 is "take":
- if player has permission "gems.admin":
- if arg 2 is set:
- if number arg is set:
- if {gems.%arg-2%} is less than number arg:
- message "&8[&a&lGems&8] &c%arg 2% hasn't so much Gems"
- stop
- else:
- remove number arg from {gems.%arg-2%}
- message "&8[&a&lGems&8] &cYou tooked &e%arg 3% &cGems from &e%arg 2%"
- every 5 seconds:
- loop all players:
- wipe loop-player's sidebar
- if loop-player has permission "scoreboard.player":
- set name of sidebar of loop-player to "&e&lPIXEL-RPG"
- set score "" in sidebar of loop-player to 10
- set score "&fRank: &7Standard" in sidebar of loop-player to 9
- set score "&fLocation: &aOverworld" in sidebar of loop-player to 7
- set score "" in sidebar of loop-player to 6
- set score "&fServer: &bPixel-RPG" in sidebar of loop-player to 5
- set score "&fOnline: &a%number of players%" in sidebar of loop-player to 4
- set score "" in sidebar of loop-player to 3
- set score "&bvisit our Realm Store" in sidebar of loop-player to 2
- set score "&b/store, /buy, /realm" in sidebar of loop-player to 1
- if loop-player has permission "scoreboard.Paladin":
- set name of sidebar of loop-player to "&e&lPIXEL-RPG"
- set score "" in sidebar of loop-player to 10
- set score "&fRank: &dPaladin" in sidebar of loop-player to 9
- set score "&fLocation: &aOverworld" in sidebar of loop-player to 7
- set score "" in sidebar of loop-player to 6
- set score "&fServer: &bPixel-RPG" in sidebar of loop-player to 5
- set score "&fOnline: &a%number of players%" in sidebar of loop-player to 4
- set score "" in sidebar of loop-player to 3
- set score "&bvisit our Realm Store" in sidebar of loop-player to 2
- set score "&b/store, /buy, /realm" in sidebar of loop-player to 1
- if loop-player has permission "scoreboard.staff":
- set name of sidebar of loop-player to "&e&lPIXEL-RPG"
- set score "" in sidebar of loop-player to 10
- set score "&fRank: &cStaff" in sidebar of loop-player to 9
- set score "&fLocation: &aOverworld" in sidebar of loop-player to 7
- set score "" in sidebar of loop-player to 6
- set score "&fServer: &bPixel-RPG" in sidebar of loop-player to 5
- set score "&fOnline: &a%number of players%" in sidebar of loop-player to 4
- set score "" in sidebar of loop-player to 3
- set score "&bvisit our Realm Store" in sidebar of loop-player to 2
- set score "&b/store, /buy, /realm" in sidebar of loop-player to 1
Advertisement
Add Comment
Please, Sign In to add comment