Staff Pick: Hugs
By
Fortifier42Created: 2016/02/02 17:23:53 UTC-08:00 (8 years and 325 days ago)
Edited: 2016/02/02 17:23:53 UTC-08:00 (8 years and 325 days ago)
Likes: 0
Staff pick as of: 2016/02/05 17:02:40 UTC-08:00 (8 years and 322 days ago)
Denizen Version: Dev #457
Script Version: 1.0
Description:
Share the love, give some hugs.
Only command: /hug <player> ... (You can list multiple players!)
Download script |
View raw scriptHug_Command:
type: command
debug: false
name: Hug
aliases:
- hugs
usage: /hug <<>player<>> ...
description: Give people a hug!
tab complete:
- if <context.server> {
- queue clear
}
- determine <server.list_online_players.exclude[<player>].parse[name].filter[starts_with[<context.args.last||>]]>
script:
- choose <context.args.size>:
- case 0:
- narrate "<&c>Sorry, you must enter atleast one person to love!"
- queue clear
- default:
- if <context.server> {
- narrate "<&c>Sorry, but only players can give some love!"
- queue clear
}
- define Players li@
- foreach <context.args> {
- define P <server.match_player[<def[Value]>]||null>
- if <def[P]> != null && <def[P]> != <player> && <def[Players].contains[<def[P]>].not> {
- define Players <def[Players].include[<def[P]>]>
}
}
- if <def[Players].is_empty> {
- narrate "<&c>Sorry, but we couldn't find any of those players.. :("
- queue clear
}
- announce "<&6><player.name><&r> has given <&6><def[Players].formatted><&r> a hug!"
View History