Jump to content

Ofus-Will

Member
  • Posts

    25
  • Joined

  • Last visited

Recent Profile Visitors

497 profile views

Ofus-Will's Achievements

Newbie

Newbie (2/6)

3

Reputation

  1. very easily done with skript: on sign change: loop 4 times: set line loop-number of event-block to colored line loop-number of event-block
  2. Ofus-Will

    PrisonUtils

    https://gyazo.com/1411f652fc7d7d5e819bc653529de90e doesn't look very well made lmao
  3. bump, very underrated addon that i think shouldn't be overlooked
  4. https://skripthub.net/docs/?id=948
  5. A skript addon that allows for packet manipulation, can allow users to do things that usually aren't possible without outdated depricated addons. List of all packets made available: > findpacket * [00:29:51 INFO]: [All packet types] [00:29:51 INFO]: login_server_success [00:29:51 INFO]: login_client_custom_payload [00:29:51 INFO]: login_server_set_compression [00:29:51 INFO]: login_client_encryption_begin [00:29:51 INFO]: login_client_start [00:29:51 INFO]: login_server_custom_payload [00:29:51 INFO]: play_client_enchant_item [00:29:51 INFO]: status_client_start [00:29:51 INFO]: status_client_ping [00:29:51 INFO]: play_client_window_click [00:29:51 INFO]: play_client_close_window [00:29:51 INFO]: play_client_custom_payload [00:29:51 INFO]: play_client_client_command [00:29:51 INFO]: play_client_settings [00:29:51 INFO]: play_client_tab_complete [00:29:51 INFO]: play_client_transaction [00:29:51 INFO]: play_client_teleport_accept [00:29:51 INFO]: play_client_tile_nbt_query [00:29:51 INFO]: play_client_difficulty_change [00:29:51 INFO]: play_client_chat [00:29:51 INFO]: status_server_pong [00:29:51 INFO]: status_server_server_info [00:29:51 INFO]: play_server_entity_destroy [00:29:51 INFO]: play_server_recipes [00:29:51 INFO]: play_server_resource_pack_send [00:29:51 INFO]: play_server_remove_entity_effect [00:29:51 INFO]: play_server_player_info [00:29:51 INFO]: play_server_combat_event [00:29:51 INFO]: play_server_position [00:29:51 INFO]: play_server_look_at [00:29:51 INFO]: play_server_open_sign_editor [00:29:51 INFO]: play_server_open_window [00:29:51 INFO]: play_server_abilities [00:29:51 INFO]: play_server_auto_recipe [00:29:51 INFO]: play_client_use_item [00:29:51 INFO]: play_server_entity [00:29:51 INFO]: play_client_block_place [00:29:51 INFO]: play_server_entity_look [00:29:51 INFO]: play_server_open_book [00:29:51 INFO]: play_server_vehicle_move [00:29:51 INFO]: play_server_open_window_merchant [00:29:51 INFO]: play_server_map [00:29:51 INFO]: play_server_rel_entity_move_look [00:29:51 INFO]: play_server_rel_entity_move [00:29:51 INFO]: play_server_world_particles [00:29:51 INFO]: play_server_world_event [00:29:51 INFO]: play_server_login [00:29:51 INFO]: play_server_light_update [00:29:51 INFO]: play_server_open_window_horse [00:29:51 INFO]: play_server_game_state_change [00:29:51 INFO]: play_server_map_chunk [00:29:51 INFO]: play_server_keep_alive [00:29:51 INFO]: play_server_entity_status [00:29:51 INFO]: play_server_kick_disconnect [00:29:51 INFO]: play_server_unload_chunk [00:29:51 INFO]: play_server_explosion [00:29:51 INFO]: play_client_auto_recipe [00:29:51 INFO]: play_server_set_cooldown [00:29:51 INFO]: play_server_set_slot [00:29:51 INFO]: play_client_abilities [00:29:51 INFO]: play_client_block_dig [00:29:51 INFO]: play_server_custom_sound_effect [00:29:51 INFO]: play_client_entity_action
  6. this tutorial was more focused on the conceptual idea of scoreboards, i feel like situation-specific scoreboards aren't actually related to scoreboards, but rather custom mechanisms that can be displayed on the scoreboard.
  7. it's just %player's rank%, alternatively you can use %player's prefix%. Both require a valid group plugin to work
  8. would you be able to remove this post? thanks
  9. BEFORE READING: 1) If you have skrayfall installed, you must disable the enableFastScoreBoards option in skrayfall's config.yml 2) A scoreboard line can not be set to nothing, if you want an empty line, you must set it to a color code (e.g. "&0") 3) Two different scoreboards line can not have the same text, a work around is yet again by using color codes as seen above (e.g. "&eText" and "&1&eText" to display 2 lines the same) 4) There are 3 addons labelled skbee on minehut's download page, make sure you download the one that's description is "A simple solution to make your servers more bold!" INTRO Following the introduction of the new add-on skbee, i thought it'd be wise to create a scoreboard tutorial using the add-on. The only semi-viable options for minehut users prior to this add-ons introduction were skellet and skrayfall, which both had their issues. Noticeably, skellet had large parsing times and unnecessarily complex syntaxes and skrayfall scoreboards flickered. important: if you are attempting to support 1.8 clients on your minehut server using protocolsupport for example, your skbee scoreboard lines will cut off at after 16 characters for those 1.8 users READING SYNTAX PATTERNS (syntaxes are ways you can write code) for this tutorial, i will be providing the syntax patterns and example code. In the chance that you do not want to use this template, this is how you interpret skript's syntax patterns. If you do not understand, this do not worry. This is for more advanced users. %% = an object/objects (e.g. player(s) or string(s)) [] = optional, meaning it is not mandatory (option 1|option 2) = interchangeable, but only one can be used For example, all these patterns are correct for the syntax [score]board of %player% is (on|off): scoreboard of player is on scoreboard of player is off board of player is on board of player is off there are 6 simple, sufficient syntaxes provided by skbee which include: SETTING UP YOUR SCOREBOARD When making player specific scoreboards, we only want their scoreboard to exist when they're online (duh). Therefore, we need to listen to two player specific events: on join and on disconnect. Luckily for us, if we use one of skbee's syntaxes (set line or set title), skbee will automatically handle setting up a player's scoreboard for us, so we don't need a syntax like create scoreboard. Useful, right? What this means, is that all we need to do is set the title and lines of our scoreboard and we're all done! on join: set title of player's scoreboard to "my server!" set line 3 of player's scoreboard to "top line" set line 2 of player's scoreboard to "middle line" set line 1 of player's scoreboard to "bottom line" Note: minecraft scoreboards always displays the lines highest to lowest from top to bottom (3, 2, 1 instead of 1, 2, 3) Cool! we've got a scoreboard. Simple. However, odds are you're going to want to have variables on your scoreboard, right? For this example, I will be displaying online players on the scoreboard There are two ways of updating your scoreboard. For this tutorial we're going to be using a while loop as it is easier to use. For more advanced users, see the advanced scoreboards header for more efficient methods a while loop basically means, for as long as a certain statement (condition) is true, repeat something. Here's an example of it put in to use (along with the use of some colour codes) on join: set title of player's scoreboard to "&6&lServer Info" while player is online: set line 1 of player's scoreboard to "&7• &eOnline: &f%size of all players%" wait 1 second Great! Now we've got a scoreboard that will accurately display the amount of online players. It's important to remember that this works for more than just online players, and you can make it display any skript variable you'd like by including %{variable}%. When the player leaves the server we want to clear their scoreboard because we don't want to store unnecessary data for players if they're not online. We can do this easily by including: on disconnect: clear player's scoreboard And that's all there is to it! I hope you've found this tutorial useful, if you have any requests for tutorials on anything else please let me know. Skbee download link: https://www.spigotmc.org/resources/skbee-skript-addon.75839/ ADVANCED SCOREBOARDS note: I will not being going in to as much detail here, if you don't understand the content below i suggest you stick with the first method as i'm sure some of you are all aware, having a while loop that loops every 1 second for all players isn't the best way of updating a scoreboard in some cases A better more complicated method for scoreboards that display data that's manipulation is easily detectable is by passing the setting of lines to an updateBoard() function. For this example i will be using player kills and deaths function updateBoard(p: player): set {_uuid} to {_p}'s uuid set line 2 of {_p}'s scoreboard to "&6Kills: &f%{kills::%{_uuid}%} ? 0%" set line 1 of {_p}'s scoreboard to "&6Deaths: &f%{deaths::%{_uuid}%} ? 0%" on join: set title of player's scoreboard to "&e&lStats" updateBoard(player) on death of player: add 1 to {deaths::%victim's uuid%} if attacker is a player: add 1 to {kills::%attacker's uuid%} updateBoard(victim) updateBoard(attacker) on disconnect: clear scoreboard of player Notice how on join we don't require a loop, merely the initial set up of the lines. Instead, we listen in on the on death event, allowing us to only update the scoreboard of the victim and attacker when the information displayed on their boards change. If your scoreboard is not player-specific, but still contains variables that frequently change, it might be better for you to structure your updateBoard() function like so: function updateBoard(p: players): loop {_p::*}: set line 1 of loop-value's scoreboard to "..."
  10. have confirmed this is a not an issue at all, but rather the 16 character limit of my 1.8 client despite the server being on 1.15 and therefore having no such character limit.
  11. note: I have confirmed with the developer of skbee that this is not a plugin-side error, and have also confirmed that this works outside of minehut. on join: set title of player's scoreboard to "&6&lServer Info" while player is online: set line 1 of player's scoreboard to "&eOnline: &f0" # 0 for testing purposes only wait 1 second this only sets line 1 of player's scoreboard to "Online: " instead of "Online: 0" if i change line 4 to set line 1 of player's scoreboard to "&eOnline: 0" it displays it fine, showing that there an issue with minehut supporting multiple color codes in the string of this skript expression I'm not sure how you'd go about resolving this issue but i thought it was worth reporting anyone because skbee is currently the best scoreboard option performance wise Resource page: https://www.spigotmc.org/resources/skbee-skript-addon.75839/
  12. 1) why are you merging tuske and vanilla syntaxes unnecessarily? 2) for your repeated codes, you could easily use a loop for increased efficiency and readability 3) you don't need to make your temporary variables player specific because they only exist in that scope/instance anyway 4) your cancel event expression does not need to exist under every clicked slot condition, you could move it under the skbee/sknbeet inventory name condition 5) You haven't stated any of the dependencies of this project, aka this project requiring skbee/snbeet and tuske 6) expanding on point 3, you can literally just give the local location variable the identifier {_loc} due to it deleting itself after the inventory click event
  13. i suggest at the very least making the conditions else if conditions, as by doing so you won't be running unnecessary code when you've found the main argument. Also, with undisguising, it'd be better to reset their rank back to what they had prior to disguising
  14. well I was just curious as to why you'd only store a kills variable per session, but i guess there are cases where that'd be valid so i digress
×
×
  • Create New...