Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- variables:
- {Moles.version} = "1.1"
- options:
- P: &8[&bMoles&8]&r
- command /moles [<text>]:
- permission: skript.op
- trigger:
- if arg 1 is not set:
- message "{@P} /moles help"
- else if arg 1 is equal to "set":
- set {Moles} to true
- delete {Mole.IsMole::*}
- delete {Mole.MoleOfTeam::*}
- broadcast "{@P} Moles set by &b%command sender%&r!"
- loop all players:
- set {isMole.%loop-player%} to false
- wait 1 second
- loop {Teams::*}:
- set {_Mole} to (random element out of {Team.%loop-value%::*})
- set {Mole.IsMole::%{_Mole}%} to loop-value
- set {Mole.MoleOfTeam::%loop-value%} to {_Mole}
- set {_MolePlayer} to ("%{_Mole}%" parsed as offlineplayer)
- if {_MolePlayer} is online:
- message "&eYou are a mole! Use /molekit" to {_MolePlayer}
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- set {molekit.%{_MolePlayer}%} to true
- set {isMole.%{_MolePlayer}%} to true
- set {HasMoleKit.%{_MolePlayer}%} to false
- else if arg 1 is equal to "delete" or "reset":
- if command sender does not have the permission "moles.delete":
- message "{@P} NOPE!"
- execute console command "/playsound random.break %player% ~ ~ ~ 1 1 1"
- set {Moles} to false
- delete {Moles.IsMole::*}
- delete {Moles.MolesOfTeam::*}
- loop all players:
- delete {isMole.%loop-player%}
- delete {HasMoleKit.%loop-player%}
- broadcast "{@P} Reset by %command sender%!"
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- else if arg is equal to "help":
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- message "{@P} Mole Skript v%{Moles.version}% commands:"
- message "{@P} /moles set: sets moles"
- message "{@P} /moles reset: removes variables, resets moles"
- else:
- message "{@P} /moles help"
- on death of player:
- execute console command "/team leave %player%"
- if {Moles.IsMole::%player%} is set:
- delete {Mole.IsMole::%player%}
- delete {isMole:%player%}
- command /molekit [<text>] [<text>]:
- trigger:
- if {molekit.%command sender%} is true:
- {HasMoleKit.%command sender%} is false:
- {isMole.%command sender%} is true:
- if arg-1 is not set:
- message "{@P} Use /molekit list to see the kits!"
- if arg-1 is "list":
- message "{@P} The mole kits are:"
- message "{@P} &91. &rThe Mobber"
- message "{@P} &92. &rThe Troll"
- message "{@P} &93. &rThe Potter"
- message "{@P} &94. &rThe Fighter"
- message "{@P} &95. &rThe Trapper"
- message "{@P} &96. &rThe Pyro"
- message "{@P} Use &9/molekit info&r to learn about each kit!"
- message "{@P} Use &9/molekit choose &r<&91&r - &96&r> to get your kit!"
- if arg-1 is "info" or "explain" or "learn":
- arg-2 is "1":
- message "{@P} The Mobber gets a various assortment of mob spawn eggs." to the command sender
- arg-2 is "2":
- message "{@P} The Troll gets 16 cobweb as well as 5 TnT and 2 end portal blocks." to the command sender
- arg-2 is "3":
- message "{@P} The Potter gets a weakness potion, a swiftness potions, and a poison potion." to the command sender
- arg-2 is "4":
- message "{@P} The Fighter gets a diamond sword, a bow, 64 arrows, and a golden apple." to the command sender
- arg-2 is "5":
- message "{@P} The Trapper gets 16 TnT, 2 of each type of piston, 64 redstone, and a flint and steel." to the command sender
- arg-2 is "6":
- message "{@P} The Pyro gets 5 blaze spawn eggs, a flint and steel, a fire resist potion, and 3 TnT." to the command sender
- arg-2 is not set:
- message "Please specify which kit you'd like to learn about. 1-6."
- if arg-1 is "select" or "choose" or "pick":
- arg-2 is "1" or "Mobber" or "The Mobber":
- give player 3 creeper spawn egg
- give player 3 spider spawn egg
- give player 3 skeleton spawn egg
- give player 3 zombie spawn egg
- set {molekit.%command sender%} to false
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- arg-2 is "2" or "Troll" or "The Troll":
- give player 16 cobweb
- give player 5 TNT
- give player 2 end portal
- set {molekit.%command sender%} to false
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- arg-2 is "3" or "Potter" or "The Potter":
- give player 1 unextended splash Weakness potion II item
- give player 1 potion of:8226
- give player 1 potion of:16420
- set {molekit.%command sender%} to false
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- arg-2 is "4" or "Fighter" or "The Fighter":
- give player 1 diamond sword
- give player 1 bow
- give player 1 golden apple
- give player 64 arrows
- set {molekit.%command sender%} to false
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- arg-2 is "5" or "Trapper" or "The Trapper":
- give player 16 TNT
- give player 2 piston
- give player 2 sticky piston
- give player 64 redstone
- give player 1 flint and steel
- set {molekit.%command sender%} to false
- execute console command "/playsound note.pling %{_MolePlayer}% ~ ~ ~ 1 1 1"
- arg-2 is "6" or "Pyro" or "The Pyro":
- give player 5 blaze spawn egg
- give player 1 flint and steel
- give player 1 potion of:8227
- give player 3 TNT
- set {molekit.%command sender%} to false
- else:
- message "{@P} You're not a mole!"
- if {HasMoleKit.%command sender%} is not set:
- if {isMole.%command sender%} is true:
- message "{@P} You've already gotten your kit!"
- command /mcc <text>:
- usage: /mcc <message>
- trigger:
- {isMole.%command sender%} is true:
- set {_player} to command sender
- loop all players:
- {isMole.%loop-player%} is true:
- message "{@P} &e%command sender%&r: %arg%" to the loop-player
- else:
- message "{@P} You're not a mole!"
- command /mcl:
- usage: /mcl - broadcast location to other moles
- trigger:
- {isMole.%command sender%} is true:
- set {_moleLoc} to the command sender's location
- loop all players:
- {isMole.%loop-player%} is true:
- message "{@P} &e%command sender%&r says: %{_moleLoc}%" to the loop-player
- else:
- message "{@P} You're not a mole!"
- command /mcp:
- usage: /mcp - list mole players alive
- trigger:
- {isMole.%command sender%} is true:
- loop all players:
- if {isMole.%loop-player%} is true:
- message "{@P} %loop-player% "
- else:
- message "{@P} You're not a mole!"
- command /mclist:
- usage: /mclist - List all mole players
- permission: skript.op
- trigger:
- if {Mole.MoleOfTeam::*} is not set:
- message "{@P} There are no moles"
- else:
- loop {Mole.MoleOfTeam::*}:
- message "{@P} Mole of &9Team %loop-index%§r: %loop-value%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement