Jump to content

kegnh

Member
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    6

kegnh last won the day on March 15 2022

kegnh had the most liked content!

About kegnh

  • Birthday 01/05/2007

Recent Profile Visitors

701 profile views

kegnh's Achievements

Newbie

Newbie (2/6)

27

Reputation

  1. on craft: loop 9 times: loop {blocked_items::*}: 1 of loop-value-2 = 1 of slot loop-value-1 of player's current inventory cancel event send "&cYou cannot craft with a &4%loop-value-2%&c!" stop command /blockitem: trigger: set {_item} to 1 of player's tool loop {blocked_item::*}: {_item} is loop-value: send "&cYou have already blocked &4%{_item}%&c from being crafted with!" stop add {_item} to {blocked_items::*} send "&aYou have blocked &2%{_item}%&a from being crafted with!" command /blocklist: trigger: send "&aBlocked Items:" loop {blocked_items::*}: send " &8- &2%loop-value%" command /resetblock: trigger: delete {blocked_items::*} send "&aYou have reset the blocked items list!"
  2. for anyone still looking, compare a relative amount: on rightclick: 1 of player's tool = campfire: send "CLICK WITH CAMPFIRE!!"
  3. You could make this code much more expandable. Just add more lines at the start! on load: delete {fb::*} add "&f[DupeLiife]&c Feeling Lonely? &2Do /howtoadvertise!" to {fb::*} add "&f[DupeLiife]&c TIP: Do /dupe!" to {fb::*} command /fb <integer=1>: trigger: send {fb::%arg-1%} to all players If this helped, please like () the comment, it helps out a ton
  4. You can make a non-flickering scoreboard like this: (Requires: Skbee) on join: while player is online: wait 1 second set title of player's scorebaord to "TITLE HERE" set line 3 of player's scoreboard to "Top" set line 2 of player's scoreboard to "Middle" set line 1 of player's scoreboard to "Bottom" this one is also less likely to lag-spike Please like () this comment if it helped. It may not seem like much but it motivates me to help/post more.
  5. The following addons have been discontinued and will break your server if installed: Tuske Skellet MundoSK (90% sure) If you're scripts rely on these recode them If you found this helpful please like () the comment. It may not seem like much but it motivates me to help out more.
  6. If you want a combat log script, I have one posted in script releases. It's fully customisable with configuration for blocking commands and logout. However if this isn't what you want below is a script I often send to people: It requires them to stand still for 5 seconds before teleporting. command /spawn: trigger: set {_loc} to location of block at player's location send "&8[&cSpawn&8] &fTeleporting in 5 seconds... Don't move." wait 5 seconds {_loc} is not location of block at player's location: send "&8[&cSpawn&8] &fTeleportation cancelled, You moved." else: teleport player to {spawn} send "&8[&cSpawn&8] &fTeleported." command /setspawn: permission: spawn.set trigger: set {spawn} to player's location send "&8[&cSpawn&8] &fSet spawn to your location." Please leave a like () if you found this helpful. It motivates me to help people more!
  7. this is a terrible way to do this. A rule of thumb when programming: If you repeat something more than once, your almost certainly doing it wrong A better way to approach this is using loops: command /clearchat: permission: cr.mod trigger: loop 100 times: send " " to all players send "Chat has been cleared by %player%." to all players Hope you learnt something! If this helped please like () this comment. It may not seem like much, but it would mean the world to me. It keeps me motivated to help more!
  8. Daily Script (Custom Cooldown) the other scripts on here break if you restart your server, so here is a better version: on join: if {daily::%player's uuid%} is not set: set {daily::%player's uuid%} to 12 hours ago command /daily: aliases: /totem trigger: difference between {daily::%player's uuid%} and now is greater than 12 hours: give player totem of undying send "&a&l! &fYou recieved a totem." set {daily::%player's uuid%} to now else: send "&c&l! &fYou can only claim your reward every &c12 hours&f." If this helped please like () the comment. It may not seem like much but it motivates me to help more!
  9. You could try something like this: options: # Config! # constant: 75 # this number is the percentage of your balance a player will take round: up # this value can be set to either up, down, or none void: true # set this value to false if you don't want players to lose money if they die of natural causes (hunger, fall dmg, etc) on death: victim is a player {@void} = false: attacker is a player set {_amount} to (player's balance * 0.{@constant}) "{@round}" = "up": set {_amount} to ceil({_amount}) "{@round}" = "down": set {_amount} to floor({_amount}) remove {_amount} from victim's balance add {_amount} to attacker's balance send "&a&l! &fYou killed &a%victim% &fand recieved &6$%{_amount}%&f!" to attacker send "&c&l! &fYou died to &c%attacker% &fand lost &6$%{_amount}%&f!" to victim else: set {_amount} to (player's balance * 0.{@constant}) "{@round}" = "up": set {_amount} to ceil({_amount}) "{@round}" = "down": set {_amount} to floor({_amount}) remove {_amount} from victim's balance attacker is a player: add {_amount} to attacker's balance send "&a&l! &fYou killed &a%victim% &fand recieved &6$%{_amount}%&f!" to attacker send "&c&l! &fYou died to &c%attacker% &fand lost &6$%{_amount}%&f!" to victim else: send "&c&l! &fYou died and lost &6$%{_amount}%&f!" to victim You can change the values up the top for ease of use. If this helped like () the comment! It doesn't seem like much but it motivates me to help more!
  10. Never. TuSKe has been unsupported for a while. The developers have said that they will not update TuSKe. Instead try look into how Vanilla GUIs are made or use another plugin. Here's an example: function gui_suicide(p: player, i: integer): set {_gui} to chest inventory with 3 rows named "&cERROR" # will only show if you give an invalid {_i} i = 0: # Page 1 set {_gui} to chest inventory with 3 rows named "GUI" set slot 13 of {_gui} to barrier named "&cClick to die." set metadata tag "gui.suicide.%{_i}%" of {_p} to {_gui} open {_gui} to player on inventory click: event-inventory = metadata tag "gui.suicide.0" of player: cancel event # make the gui unstealable if event-slot = 13: # check which slot was clicked kill the player send "%player% has committed suicide" to all players command /suicide: trigger: gui_suicide(player, 0) The function uses an integer ID system so you can manage many pages inside of a GUI If this looks to hard to use here is a simpler example: command /suicide: trigger: set metadata "gui.suicide" of player to chest inventory with 3 rows named "GUI" set slot 13 of (metadata "gui.suicide" of player) to barrier named "&cClick to kill" open (metadata "gui.suicide" of player) to player on inventory click: event-inventory = metadata "gui.suicide" of player cancel event event-slot = 13 kill player send "%player% has committed suicide" to all players The reason I start with the first one, is that its usually the best option for large GUIs such as shops, menus or other big projects. If this helped please like () the comment. It doesn't seem like much, but it motivates me to post/help more!
  11. on command "/op": executor is a player cancel event send "&cSorry, you cannot run this command." This script should block /op from players If this helped please like () the comment. It motivates me to keep helping people!
  12. You can try something like this: on break: event-block is stone {advancement::stone::*} doesn't contain player's uuid add player's uuid to {advancement::stone::*} send "&cACHIEVEMENT &8≫ &c%player% gained the acievement &cSTONE" to all players command /achievements <offline player=%player%>: trigger: set {_gui} to chest inventory with 1 row named "Achievements" set slot 0 of {_gui} to iron bar named "&cLocked Achievement" with lore "&a%size of {advancement::stone::*}% &fpeople have completed this." {advancement::stone::*} contains player's uuid: set slot 0 of {_gui} to stone named "&cSTONE" with lore "&aMine some stone." and "&a%size of {advancement::stone::*}% &fpeople have completed this." set metadata tag "gui.advancements" of player to {_gui} open {_gui} to player on inventory click: metadata tag "gui.advancements" of player = event-inventory cancel event I've included a GUI to show what advancements you've collected. NOTE: the gamerule announceAdvancements must be set to false. You can do this a couple ways: console command /gamerule announceAdvancements false the minehut panel settings tab If you end up using this please like () the comment. It encourages me to help out more on the forums.
  13. necroposting doesn't apply on specific categories. Skript Releases being one of them.
  14. Safe Spectator is a script where when a player stops spectating, it will teleport them to wherever they started spectating from. I personally use this for staff members who I don't want to abuse spectator gamemode, however its also safe to allow players to use it. # ,---. ,---. ,---. # ' .-' ,--,--./ .-' ,---. ' .-' ,---. ,---. ,---. # `. `-. ' ,-. || `-,| .-. :`. `-. | .-. || .-. :| .--' # .-' |\ '-' || .-'\ --..-' || '-' '\ --.\ `--. # `-----' `--`--'`--' `----'`-----' | |-' `----' `---' # by kegnh#123 `--' options: # Config # permission: safespec.use # __ # | | # | | # | | WARNING: DO NOT EDIT ANYTHING BELOW THIS LINE! # |__| EDITING THE FILE MAY BREAK IT. # __ # |__| # command /safespec: aliases: /spec, /gmsp, /spectate, /sspec permission: {@permission} trigger: if {spectate::%player's uuid%} is set: teleport player to {spectate::%player's uuid%} delete {spectate::%player's uuid%} set player's gamemode to survival send "&a&l! &fyou are no longer spectating!" to player else: set {spectate::%player's uuid%} to player's location set player's gamemode to spectator send "&a&l! &fyou are now spectating!" to player on quit: if {spectate::%player's uuid%} is set: teleport player to {spectate::%player's uuid%} delete {spectate::%player's uuid%} on gamemode change: if gamemode of player is not spectator: if {spectate::%player's uuid%} is set: teleport player to {spectate::%player's uuid%} delete {spectate::%player's uuid%} set player's gamemode to survival send "&a&l! &fyou are no longer spectating!" to player If you like the script consider liking the post! It helps out a ton, and motivates me to work on more public releases!
×
×
  • Create New...