########################################### # Made by Smellyonionman for Smellycraft. # # onion@smellycraft.com # # Tested on Denizen-1.1.2-b4492-DEV # # Version 1.2 # #-----------------------------------------# # Updates and notes are found at: # # https://smellycraft.com/d/smellyboard # #-----------------------------------------# # You may use, modify or share this # # script, provided you don't remove # # or alter lines 1-13 of this file. # ########################################### sc_sb_init: type: task debug: false script: - define namespace:sc_sb - define admin:> - define targets:]].include[].deduplicate||> - define filename: - if ]||null>: - if : - ~yaml unload id:sc_sb - ~yaml load:../Smellycraft/<[filename]> id:sc_sb - else: - ~yaml create id:sc_sb - define payload: - if <[payload].matches[null]>: - ~webget https://raw.githubusercontent.com/smellyonionman/smellycraft/master/configs/smellyboard.yml save:sc_raw headers:host/smellycraft.com:443|user-agent/smellycraft - define payload: - ~yaml loadtext:<[payload]> id:sc_sb - yaml set type:! id:sc_sb - if ].not>: - define msg:'>' - narrate <[msg].unescaped.parse_color> targets:<[targets]> - stop - foreach >> as:task: - if ]||]>>]>].not>: - define placeholder:> - narrate '<[placeholder].replace[[script]].with[<[task]>].separated_by[&sp].unescaped.parse_color>' targets:<[targets]> - stop - ~yaml savefile:../Smellycraft/<[filename]> id:sc_sb - ~yaml create id:sc_sb_linetemp - ~yaml loadtext: id:sc_sb_linetemp - yaml set type:! id:sc_sb_linetemp - foreach : - if ]||false>: - yaml id:sc_sb_linetemp copykey:<[value]> custom.<[value]> to_id:sc_sb - define feedback:> - inject >]> sc_sb_cmd: type: command debug: false name: smellyboard description: usage: /smellyboard ( reload | credits | update ( enable | disable ) | freq | max ) script: - define namespace:sc_sb - define admin:> - if : - if >]>: - yaml set .sc_sb.index:1 id:sc_pcache - inventory open d: - else: - define feedback:> - else if : - if : - if ]||false> || || : - define arg: - inject - else if : - define feedback:&9made&spby&spyour&spfriend&sp&6smellyonionman&nl&9Go&spto&sp&ahttps&co//smellycraft.com/smellyboard&sp&9for&spinfo - else if : - if : - if ]||false> || || : - if : - if : - define feedback:> - else: - yaml set settings.update:true id:sc_sb - define feedback:> - else if : - if : - define feedback:>> - else: - yaml set settings.update:false id:sc_sb - define feedback:> - else: - define feedback:> - else: - define feedback:> - else if : - if ]||false> || || : - if : - define val: - yaml set settings.:<[val]||3> id:sc_sb - else: - define feedback:> - else: - define feedback:> - else: - define placeholder:> - define feedback:<[placeholder].replace[[args]].with[]> - if <[feedback].exists>: - inject >]> sc_sb_events: type: world debug: false events: on reload scripts: - if : - inject on server start priority:1: - inject on shutdown: - define namespace:sc_sb - inject - yaml unload id:sc_sb - foreach ].list_keys[smellyboard.lines]||null>: - if ].matches[true|enabled]||null> foreach next ~yaml set smellyboard.lines.<[value]>:! id:sc_ - yaml set smellyboard.listener:false id:sc_ on delta time hourly: - define namespace:sc_sb - define silent:true - inject - if : - inject >]> on delta time secondly: - if : - stop - if >].is[==].to[0]||false>: - stop - foreach as:player: - adjust linked_player:<[player]> - if ].list_keys[smellyboard.lines].size.is[MORE].than[0]||null>: - foreach ].list_keys[smellyboard.lines]> as:key: - define var:].read[smellyboard.lines.<[key]>]||false> - define output:|:.output].parsed||&cError> - sidebar set title:Smellyboard> values:<[output].parse_color> players: - else: - sidebar remove players: on player drags in sc_sb_menu: - determine cancelled on player clicks in sc_sb_menu: - determine passively cancelled - define namespace:sc_sb - define type: - if <[type].matches[null]||false>: - stop - else if <[type].matches[prev|next]||null>: - define index: - yaml set .sc_sb.index:<[index]> id:sc_pcache - else if <[type].matches[line]||false>: - define line: - define enabled:].list_keys[smellyboard.lines].contains[<[line]>]||false> - if ].list_keys[smellyboard.lines].size.is[OR_MORE].than[]||false>: - if <[enabled].not>: - define title:> - inject >]> - stop - if : - if <[enabled].not||false>: - yaml set smellyboard.listener:<[line]> id:sc_ - inventory close d: - define placeholder:> - define feedback:<[placeholder].replace[[line]].with[<[line]>]> - inject >]> - stop - inject - else: - inject - inventory open d: on player chats: - define namespace:sc_sb - if ].map_get[smellyboard.listener].matches[false].not||false>: - determine passively cancelled - if : - define feedback:> - inject >]> - stop - else: - define line:].read[smellyboard.listener]||null> - define enabled:false - define feedback:.].unescaped.parse_color> - define var: - if <[feedback].exists>: - inject >]> - inject - yaml set smellyboard.listener:false id:sc_ sc_sb_toggle: type: task debug: false script: - if <[enabled]||false>: - yaml set smellyboard.lines.<[line]>:! id:sc_ - else: - yaml set smellyboard.lines.<[line]>:<[var]||null> id:sc_ - inventory open d: sc_sb_menu: type: inventory debug: false title: Error> size: 9 procedural items: - define index:.sc_sb.index]||1> - if <[index].is[MORE].than[1]||false>: - define prev:]> - else: - define prev:]> - define icons:|:<[prev]> - define items: - define range:<[items].get[<[index]>].to[<[index].add[7].sub[1]>]> - foreach <[range]||> as:node: - define perms:!|:.permissions]||> - foreach <[perms]>: - if ]||false>: - define material:.icon]||air> - define display:.display].parsed||&cError> - define lore:.lore].parsed||> - define listener:.input]||false> - define icon:].with[display_name=<[display]||&cError>;lore=<[lore]>;nbt=type/line|data/<[node]>|listener/<[listener]>;flags=HIDE_ATTRIBUTES|HIDE_ENCHANTS|HIDE_POTION_EFFECTS]> - if ].list_keys[smellyboard.lines].contains[<[node]>]||null>: - adjust def:icon lore:<[icon].lore.include[]> - adjust def:icon enchantments: - else: - adjust def:icon lore:<[icon].lore.include[]> - define icons:|:<[icon]> - foreach stop - define icons:!|:<[icons].pad_right[8].with[]> - if <[items].size.is[MORE].than[<[index].add[7]>]||false>: - define next:]> - else: - define next:]> - define icons:|:<[next]> - determine <[icons].unescaped.parse_color> sc_sb_lines: type: yaml data balance: icon: emerald display: '&aBalance' permissions: - group.players lore: - '&9Shows your current balance' output: '&9Balance: &6]||&cError>' waypoint: icon: compass display: '&aWaypoint' permissions: - group.players lore: - '&9Distance in blocks from' - '&9your current waypoint' output: '&a].round_down||&c?> &9blocks to waypoint' exhaustion: icon: apple display: '&aExhaustion' permissions: - group.players lore: - '&9How quickly you are tiring' output: '&9Exhaustion: &a' lag: icon: observer display: '&aLagometer' permissions: - group.players lore: - '&9Displays your current ping' - '&9as well as current TPS.' output: '&9You: &a&9ms, Us: &a &9TPS' mob: icon: zombie_head display: '&aMob Counter' permissions: - group.players lore: - '&9Useful for AFK mob farms.' input: true output: '&9<[var].to_titlecase||&cError> Counter: &a].within[2].size||&c?>' slime: icon: slime_block display: '&aSlime Chunks' permissions: - group.players lore: - '&9Indicates whether or not' - '&9you are in a slime chunk' output: '&9Slime Chunk: ].pass[&aTrue].fail[&cFalse]>' power: icon: repeater display: '&aSignal Power' permissions: - group.players lore: - '&9Shows power of cursor block' output: '&9Power: &a' damage: icon: diamond_sword display: '&aWeapon Damage' permissions: - group.players lore: - '&9Shows calculated weapon damage' output: '&9Damage: ' item: icon: hopper display: '&aItem Counter' permissions: - group.players lore: - '&9Counts items in your inventory' input: true output: '&9<[var].as_item.material.name.to_titlecase||&cError>: &a]||&c?>' debug: icon: comparator display: '&aDenizen Debugger' permissions: - group.admin lore: - '&9Indicates debugger status' output: '&9Global Debug: ].pass[&aEnabled].fail[&cDisabled]>' sc_sb_data: type: yaml data version: 1.2 filename: smellyboard.yml scripts: reload: sc_sb_init save: sc_common_save update: sc_common_update sc_sb_defaults: type: yaml data settings: enabled: true update: true max: 3 freq: 5 permissions: use: smellyboard.use bypass: smellyboard.bypass admin: smellyboard.admin scripts: narrator: sc_common_feedback GUI: sc_common_marquee lines: balance: true waypoint: true exhaustion: true lag: true mob: true slime: true power: true damage: true item: true debug: true messages: prefix: '&9[&aSmelly&2Board&9]' description: 'Interfaces with the Smellyboard plugin.' reload: '&9Smellyboard reloaded.' missing_common: '&This plugin uses code contained in sc_common.yml. Visit https://smellycraft.com/d/common for the most recent version.' missing_script: '&9 Script &a[script] &9was not detected. &c Installation not complete. &9An alternative is available in the Common Files.' limit: '&cToo many items active' title: '&7&lSmellyboard' menu: ' &0&lHUD Selector' enabled: '&9Currently &aenabled' disabled: '&9Currently &cdisabled' linename: '&oEnter name of [line]&co' cancelled: '&7Input cancelled. Display unaltered.' custom: job: icon: iron_pickaxe display: '&aJob Stats' permissions: - group.players lore: - '&9Displays current &alevel' - '&9and &aXP &9for a given Job' input: true output: '&9<[var].to_titlecase||&cError>: &aLevel &6].xp.level||&c?>&a, &6].xp||&c?> &axp'