Jump to content

kegnh

Member
  • Posts

    35
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by kegnh

  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!
  15. # ,-----. ,--. ,--. ,--. # ' .--./ ,---. ,--,--,--.| |-. ,--,--.,-' '-.| | ,---. ,---. # | | | .-. || || .-. '' ,-. |'-. .-'| | | .-. || .-. | # ' '--'\' '-' '| | | || `-' |\ '-' | | | | '--.' '-' '' '-' ' # `-----' `---' `--`--`--' `---' `--`--' `--' `-----' `---' .`- / # by kegnh#1234 `---' # ######################### # # Plugin Config # # ######################### options: cooldown: 5 seconds # how long the player will be in combat. message-type: message # where the message will be sent (message, action bar, title) start-message: "&cCOMBAT &8| &fYou are in combat, if you log out you will be killed." # the message sent to the player when they enter combat. end-message: "&cCOMBAT &8| &fYou are no longer in combat, you can now logout safely." # the message sent to the player when they leave combat. disable-commands: true # when 'true' disables all commands while in combat. disable-chat: false # when 'true' players will not be able to speak in chat while in combat. disable-pickup: false # when 'true' players will not be able to pickup items while in combat. disable-drop: false # when 'true' players will not be able to drop items while in combat. command-error: "&cCOMBAT &8| &fYou cannot use commands in combat." # the message sent to the player when they try to use a command while in combat. chat-error: "&cCOMBAT &8| &fYou cannot chat in combat." # the message sent to the player when they try to chat while in combat. pickup-error: "&cCOMBAT &8| &fYou cannot pickup items while in combat." # the message sent to the player when they try to pickup an item while in combat. drop-error: "&cCOMBAT &8| &fYou cannot drop items while in combat." # the message sent to the player when they try to drop an item while in combat. bypass-enabled: false # when 'true' players with the below permission wont be put in combat log. bypass-permission: combatlog.bypass # __ # | | # | | # | | WARNING: DO NOT EDIT ANYTHING BELOW THIS LINE! # |__| EDITING THE FILE MAY BREAK IT. # __ # |__| # on damage: victim is a player attacker is a player if {@bypass-enabled} is true: if victim has permission "{@bypass-permission}": stop set metadata tag "combatLog" of victim to now send {@message-type} {@start-message} to victim wait {@cooldown} difference between now and (metadata tag "combatLog" of victim) >= {@cooldown} send {@message-type} {@end-message} to victim on command: metadata tag "combatLog" of player is set difference between now and metadata tag "combatLog" of player < {@cooldown} {@disable-commands} is true cancel event send {@command-error} to player on chat: metadata tag "combatLog" of player is set difference between now and metadata tag "combatLog" of player < {@cooldown} {@disable-chat} is true cancel event send {@chat-error} to player on drop: metadata tag "combatLog" of player is set difference between now and metadata tag "combatLog" of player < {@cooldown} {@disable-drop} is true cancel event send {@drop-error} to player on pickup: metadata tag "combatLog" of player is set difference between now and metadata tag "combatLog" of player < {@cooldown} {@disable-pickup} is true cancel event send {@pickup-error} to player on quit: metadata tag "combatLog" of player is set difference between now and metadata tag "combatLog" of player < {@cooldown} kill player If you have any issues dm me: kegnh#1234 If you like it leave a like!
  16. You're directly comparing the item, this means that if there are multiple items in your hand skript reads it as: 64 of apple named "&cCool" And what your comparing it to: 1 of apple named "&cCool" Note: skript automatically adds the "1 of " at parse time, this is how skript reads your code. You can try comparing properties of the items: name of player's tool is "&cCool" however, if someone names an apple "&cCool" or any other item is named "&cCool" it will trigger. The better way to do this is to compare only a slice of the players tool: 1 of player's tool = apple named "&cCool" that way you're comparing only 1 of the player's tool The finished code for this is: on eat: 1 of player's tool = apple named "&cCool" apply regeneration 2 to player for 30 seconds replacing the existing effect Hope that helps! If it works please leave a like
  17. A server doing this pretty well is betamaxed, its a roblox simulator style game and encourages afk rewards and daily rewards. Check them out if you have time!
  18. command /rules [<text>]: trigger: if arg-1 is "reset": if player has permission "rules.admin": delete {rules::*} player command "/rules" else: player command "/rules" else: create gui with virtual chest inventory with size 3 named "&8&lRules": format gui slots (0,1,2,3,4,5,6,7,8,9,17,18,19,20,21,22,23,24,25,26) with black stained glass pane named "&7" format gui slot 22 with barrier named "&cClose": close player's inventory loop {rules::*}: format next gui slot with loop-value if player has permission "rules.admin": format next gui slot with stone button of infinity named "&6Add New Rule" with all flags hidden: close player's inventory set {rule_creation::%player%} to 1 set {_loc} to player's location send "&aType the rules name in chat:" to player while {rule_creation::%player%} is not 3: teleport player to {_loc} wait 5 ticks add oak sign named "&f%coloured {rule_creation::%player%::name}%" with lore "&f%coloured {rule_creation::%player%::description}%" to {rules::*} delete {rule_creation::%player%} delete {rule_creation::%player%::*} player command "/rules" loop integers between 0 and 26: format next gui slot with light grey stained glass pane named "&7" open last gui to player on chat: if {rule_creation::%player%} is 1: cancel event set {rule_creation::%player%::name} to message set {rule_creation::%player%} to 2 send "&aType the rules description in chat:" to player else if {rule_creation::%player%} is 2: cancel event set {_} to message replace all "\n" in {_} with "%nl%&f" set {rule_creation::%player%::description} to {_} set {rule_creation::%player%} to 3 on command: if {rule_creation::%player%} is 1: cancel event send "&cYou must type the rules name in chat." to player else if {rule_creation::%player%} is 2: cancel event send "&cYou must type the rules description in chat." to player on quit: delete {rule_creation::%player%} delete {rule_creation::%player%::*} Commands: /rules - rules page (people with "rules.admin" can add new rules from here) /rules reset - clear all rules
  19. Introduction Before we begin, I wanted to introduce myself. I'm kegnh, I work/have worked on almost 50 popular Minehut servers. I like to create joke servers in my spare time, and push the limits of Minehut. I also wanted to mention that the guide below isn't for a good server, just a popular one. If you have a good enough idea, I suggest you build it, good ideas are enough to launch themselves. If you enjoy the tutorial, please like it, may seem simple but it goes along way. The Idea Keeping players online Keep players coming back Server Launch Getting your first 50 players Step 1 - The Idea Every server, popular or not, starts with an idea. An idea is the basic building ground for a server. Ideas are often the part where most servers fail. To create an idea, you can steal take inspiration from other servers. When I say this I don't mean coping directly. I'm talking about merging two ideas into one new idea. Ideal Idea requirements: Single Player. Try to make your server primarily single player. This way, as you start out your server, player's won't have to rely on other players to have a good time. Multiplayer Aspects. While the game is not primarily multi-player, you still want to support player interaction. Whether this be creating friendly (or not so friendly... we'll add to this later) competition such as leaderboards, or player interaction whether role-play or trading. Replay ability. One of the key aspects of a Minehut server are seasons. Seasons are a way to reset player statistics, further engage players, and give new-comers a chance. The example I'll use for this tutorial, is a mix between GenPVP and Prison. My idea is to have a plot server where you mine out your plot with bombs. I'll add to this idea later but that's the most basic I can make it. Step 2 - Keeping players online Most players on Minehut find new servers on the front page. The front page usually is a server owner's dream, but not if you know how. The front page is ordered with player count, which means the more players online the better. The key here is that the players don't have to be online online, afk players still count towards the server total A good way to encourage players to stay online is with afk rewards. Gen servers are a good example as the longer you're online the more money you receive. To add to the server we're creating, let's add some sort of reward, I'm going to reward the player with coins. To give purpose to the coins I'm thinking of adding a shop where you can buy better bombs, with bigger explosions. And as this will become a large part of the game I'll add a way to get coins by playing. The new Idea is to blow up your plot with bombs to dig deeper and deeper and sell new ores that you discover. Step 3 - Keep players coming back The key to keeping a popular server is to keep player's coming back. The most obvious is a Daily Reward, which increases the more days in a row you collect it. Another key idea is to make your server name recognisable, relatable and short. For example the server name Expel is short, and recognisable, but not relatable to bombs. BombPlots is recognisable, relatable, and each word relatively small. For our server I'll make the name BombPlots, and I'll add daily coin rewards that increase with every consecutive day. Step 4 - Prototyping Now it's the fun time where we put all our efforts together to try make a playable prototype. I suggest making the prototype in skript, and if possible creating the finished server as a plugin. If you don't have much programming experience, then hiring someone else is also an effective solution. The focus of the prototype should be to create some main mechanics, and test if they're worth putting into production. Nothing worse than putting a terrible game into production. Step 5 - Launch / Getting your first 50 players Great! We've reached the point where you're ready to release Make sure you include a tutorial in your release. To get your first 50 players advertising is key, if you can buy a rank, or hire someone to advertise for you. You can also advertise in the forums, lobby, and discord server! Conclusion Thank you for reading, I hope this helps with projects now, and far in the future. If you did enjoy, like the post, it helps out a lot more than you may think.
  20. I Am Accepting Simple Skript Requests (Free) # Contact itskegnh#9344 for help. options: discord-link: https://discord.gg/sAA7kMNuaV prefix: &7[&dDiscord&7] &8| &f link-text: &6&lCLICK HERE &f suffix: to join the discord. command /discord: trigger: send "{@prefix}<link:{@discord-link}>{@link-text}<reset>{@suffix}" to player
  21. Requesting Builders / Developers for the Minehut Market. Team Developers: 4 Builders: 0 Why Earthy? Earthy is a Minehut Market team dedicated to helping the environment. All profits our team makes will be directly donated to environmental charities. How do you join? DM itskegnh#9344 with the following application format. We accept most, if not all applicants. Application Requirements 14+ and Eligible for a job in your country. Must have at least 1 skript or build to show. Application Format MC username: Date of Birth: Proof of Work: Earthy
  22. broadcast "" logs in console to prevent console spam, I prefer to use send "" to all players. we can also add a condition if need be in the future send "" to all players where [input has permission "clearlag.view"]
  23. # SKegnh - ClearLag # made by itskegnh#9344 options: clearlag-delay: 10 minutes prefix: <tooltip:&f[&cSKegnh&f]>&f[&cClearLag&f]<reset> &f every {@clearlag-delay}: send "{@prefix}Clearing all items in 60 seconds." to all players wait 40 seconds send "{@prefix}Clearing all items in 20 seconds." to all players wait 10 seconds send "{@prefix}Clearing all items in 10 seconds." to all players wait 10 seconds send "{@prefix}Cleared %size of dropped items% items." to all players kill dropped items command /clearlag: permission: skegnh.clearlag trigger: send "{@prefix}Cleared %size of dropped items% items." to all players kill dropped items Simple ClearLag.
  24. ... trash lol ... not actually tho, very cool
×
×
  • Create New...