Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Skript publiched on https://minecraft-list.gg
- #Minecraft-list.gg - your favorite server listing site!
- import:
- org.bukkit.Bukkit
- com.vexsoftware.votifier.model.Vote
- com.vexsoftware.votifier.model.VotifierEvent
- VotifierEvent:
- set {_player} to (event.getVote().getUsername() parsed as offline player) #Gets the player who has entered a vote on a website.
- set {_site} to event.getVote().getServiceName() #Get the plain URL of the vote website.
- voteReceived({_player}, {_site}) #Function called
- function voteReceived(player: offlineplayer, site: text):
- set {_now} to unix timestamp of now
- #{_player} is parsed as an offlineplayer.
- #{_site} would output the plain URL of the server-list website.
- #If the link to your server-listing page is https://minecraft-list.gg/server/minemalia.20
- #Then {_site} would be "minecraft-list.gg"
- #broadcast "%{_now}%" #Timestamp of the vote
- #broadcast "%{_player}%" #Example "Maaads_"
- #broadcast "%{_site}%" #Example "minecraft-list.gg"
- {_site} contains "Minecraft-list.gg" or "Other Voting site 1" or "Other Voting site 2": # Checking the vote website
- give {_player} 1 diamond #Example for giving an reward
- command "coins add %{_player}% 25" #Example for giving an reward
- add 500 to {_player}'s balance #Example for giving an reward
- set {_uuid} to uuid of {_player}
- add 1 to {votes::%{_uuid}%::amount}
- if {_player} has played before: #Checks that the player has played on the server before broadcasting a message that the player has voted.
- broadcast "&8[&3&lVOTE&8] &f&l%{_player}% &7voted and received free rewards! &8(&7/vote&8)"
- command /vote:
- trigger:
- voteGUI(player)
- on load:
- set {votingLinks::name::1} to "Minecraft-list.gg"
- set {votingLinks::link::1} to "https://minecraft-list.gg/"
- set {votingLinks::name::2} to "Minecraft-MP.com"
- set {votingLinks::link::2} to "https://minecraft-mp.com/"
- set {votingLinks::name::3} to "Minecraft-Server-List.com"
- set {votingLinks::link::3} to "https://minecraft-server-list.com/"
- function voteGUI(p: player):
- set {_gui} to chest inventory with 5 rows named "&a&lVOTE &f&lMENU &7- Information"
- set {_uuid} to uuid of {_p}
- set slot (integers from 0 to 8) of {_gui} to green stained glass pane named ""
- set slot 4 of {_gui} to getHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzU3NDcwMTBkODRhYTU2NDgzYjc1ZjYyNDNkOTRmMzRjNTM0NjAzNTg0YjJjYzY4YTQ1YmYzNjU4NDAxMDVmZCJ9fX0=") named "&a&lYOUR STATS" with lore "&8&m---------------------------%nl%%nl% &7Welcome to our &f&lVote System%nl%%nl% &7Here are your voting stats:%nl%&8【 &7Overall votes: &f%{votes::%{_uuid}%::amount} ? 0%&8】%nl%%nl%&8&m---------------------------"
- set slot 19 of {_gui} to getHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOGZlOGRhZmZlMzVjYTE4MzJmZjk5ZWVhZDQ2MTdhMzY5ZWEwMzNjMjRiODI1M2Y1MTFmZDhiOTE3MzdhN2UifX19") named "&a&lVOTING &f&lREWARDS" with lore "&8&m---------------------------%nl%%nl% &7When voting on our server,%nl% &7you will receive free rewards.%nl%%nl% &f&lRewards for voting:%nl% &8* &71x Diamond%nl% &8* &725x Coins%nl% &8* &7$500 ingame money %nl%%nl% &aYou can vote on each link every 24. hours.%nl%%nl%&8&m---------------------------"
- set slot 21 of {_gui} to getHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNmQ2NWNlODNmMWFhNWI2ZTg0ZjliMjMzNTk1MTQwZDViNmJlY2ViNjJiNmQwYzY3ZDFhMWQ4MzYyNWZmZCJ9fX0=") named "&a&l%{votingLinks::name::1}%" with lore "&8&m---------------------------%nl%%nl% &7Click here to vote on this website.%nl% &7You can vote every 24 hours.%nl%%nl%&8&m---------------------------"
- set slot 22 of {_gui} to getHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZGQ1NGQxZjhmYmY5MWIxZTdmNTVmMWJkYjI1ZTJlMzNiYWY2ZjQ2YWQ4YWZiZTA4ZmZlNzU3ZDMwNzVlMyJ9fX0=") named "&a&l%{votingLinks::name::2}%" with lore "&8&m---------------------------%nl%%nl% &7Click here to vote on this website.%nl% &7You can vote every 24 hours.%nl%%nl%&8&m---------------------------"
- set slot 23 of {_gui} to getHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjFlNGVhNTliNTRjYzk5NDE2YmM5ZjYyNDU0OGRkYWMyYTM4ZWVhNmEyZGJmNmU0Y2NkODNjZWM3YWM5NjkifX19") named "&a&l%{votingLinks::name::3}%" with lore "&8&m---------------------------%nl%%nl% &7Click here to vote on this website.%nl% &7You can vote every 24 hours.%nl%%nl%&8&m---------------------------"
- set slot 24 of {_gui} to getHead("eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjM3MGNhNDdiNjE3M2FiNThlNmE4MDE4NDg2ZTJmOGJhYTgzOTdhYjYxNGFlMmU2OTY4NDkxOTZiYWE3YyJ9fX0=") named "&a&lCOMMING SOON" with lore "&8&m---------------------------%nl%%nl% &7More voting sites will be added in the future.%nl%%nl%&8&m---------------------------"
- set slot (integers from 36 to 44) of {_gui} to white stained glass pane named ""
- open {_gui} to {_p}
- on inventory click:
- if name of player's current inventory is "&a&lVOTE &f&lMENU &7- Information":
- cancel event
- if clicked slot is 21:
- close player's inventory
- send "&7Link: &f%{votingLinks::link::1}%" with prefix "&a&lVOTE &f&lMENU" for player
- stop
- if clicked slot is 22:
- close player's inventory
- send "&7Link: &f%{votingLinks::link::2}%" with prefix "&a&lVOTE &f&lMENU" for player
- stop
- if clicked slot is 23:
- close player's inventory
- send "&7Link: &f%{votingLinks::link::3}%" with prefix "&a&lVOTE &f&lMENU" for player
- stop
- function getHead(value: text = "Nothing") :: item:
- set {_i} to a player head
- set {_n} to nbt compound of {_i}
- add nbt compound of "{SkullOwner:{Id:[I;560730361,-2039592014,-1344041958,-1058039007],Properties:{textures:[{Value:""%{_value}%""}]}}}" to {_n}
- return {_i}
- effect:
- patterns:
- send %text% with prefix %text% for %player%
- trigger:
- send "" to expression-3
- send "&8[ %expression-2% &8]" to expression-3
- send " &7%expression-1%" to expression-3
- send "" to expression-3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement