Staff Pick: Brunos Gamemode version 2 (2/14/2016)
By
BrunoCreated: 2016/01/19 20:23:53 UTC-08:00 (8 years and 339 days ago)
Edited: 2016/02/14 17:48:05 UTC-08:00 (8 years and 313 days ago)
Likes: 1
Staff pick as of: 2016/01/20 19:14:37 UTC-08:00 (8 years and 338 days ago)
Denizen Version: Version 0.9.7
Script Version: 2.3
Description:
Switching gamemodes for others and swapping inventories and equipment sets.
Switches gamemodes for other players that are not opped themselves.
Swaps equipement and inventories for those players too.
Download script |
View raw script#CREATIVE MODE SCRIPT#
#OTHER SCRIPTS BELOW#
gmcreative:
type: command
debug: false
name: gmc
usage: "/gmc [playername]"
description: Creative Gamemode command
aliases:
- gm1
- creative
permission: bruno.gamemode
permission message: <&5>Zeus<&f> Talk to the boss, you can't use this command.
script:
- define target p@<c.args.get[1]>
- define target_name <c.args.get[1]>
- choose <context.args.size>:
- case 0:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_CREATIVE
- wait 1t
- adjust <player> 'equipment:<player.flag[e_creative]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:CREATIVE'
- case 1:
- choose <def[target_name]>:
- case <player.name>:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_CREATIVE
- wait 1t
- adjust <player> 'equipment:<player.flag[e_creative]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:CREATIVE'
- default:
- choose <server.list_online_players.formatted.contains[%target_name%]>:
- case true:
- narrate "<&5>Hermes<&f> Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes and notify anyone else involved in the situation."
- note <def[target].inventory> as:<def[target_name]>_<def[target].gamemode>
- wait 1t
- flag <def[target]> e_<def[target].gamemode>:<def[target].equipment>
- wait 1t
- inventory clear d:<def[target].inventory>
- wait 1t
- inventory set d:<def[target].inventory> o:in@<def[target_name]>_CREATIVE
- wait 1t
- adjust <def[target]> 'equipment:<def[target].flag[e_creative]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <def[target]> 'gamemode:CREATIVE'
- case help:
- narrate "<&5>Zeus<&f> <script.yaml_key[usage]>"
- default:
- narrate "<&5>Zeus<&f> Please choose a player that is online."
- default:
- narrate "<&5>Zeus<&f> Nah. Try again mate. <script.yaml_key[usage]>"
#
#SURVIVAL SCRIPT #
#
gmsurvival:
type: command
name: gms
usage: "/gms [playername]"
description: Survival Gamemode command
debug: false
aliases:
- gm0
- survival
permission: bruno.gms
permission message: <&5>Zeus<&f> Talk to the boss, you can't use this command.
script:
- define target p@<c.args.get[1]>
- define target_name <c.args.get[1]>
- choose <context.args.size>:
- case 0:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_SURVIVAL
- wait 1t
- adjust <player> 'equipment:<player.flag[e_survival]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:survival'
- case 1:
- choose <def[target_name]>:
- case <player.name>:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_SURVIVAL
- wait 1t
- adjust <player> 'equipment:<player.flag[e_survival]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:survival'
- default:
- choose <server.list_online_players.formatted.contains[%target_name%]>:
- case true:
- narrate "<&5>Hermes<&f> Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes and notify anyone else involved in the situation."
- note <def[target].inventory> as:<def[target_name]>_<def[target].gamemode>
- wait 1t
- flag <def[target]> e_<def[target].gamemode>:<def[target].equipment>
- wait 1t
- inventory clear d:<def[target].inventory>
- wait 1t
- inventory set d:<def[target].inventory> o:in@<def[target_name]>_SURVIVAL
- wait 1t
- adjust <def[target]> 'equipment:<def[target].flag[e_survival]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <def[target]> 'gamemode:survival'
- case help:
- narrate "<&5>Zeus<&f> <script.yaml_key[usage]>"
- default:
- narrate "<&5>Zeus<&f> Please choose a player that is online."
- default:
- narrate "<&5>Zeus<&f> Nah. Try again mate. <script.yaml_key[usage]>"
#
#ADVENTUREMODESCRIPT#
#
gmadventure:
type: command
debug: false
name: gma
usage: "/gma [playername]"
description: Adventure Gamemode command
aliases:
- gm2
- adventure
permission: bruno.gamemode.adventure
permission message: <&5>Zeus<&f> Talk to the boss, you can't use this command.
script:
- narrate <context.args.size>
- define target p@<c.args.get[1]>
- define target_name <c.args.get[1]>
- choose <context.args.size>:
- case 0:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_ADVENTURE
- wait 1t
- adjust <player> 'equipment:<player.flag[e_adventure]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:adventure'
- case 1:
- choose <def[target_name]>:
- case <player.name>:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_ADVENTURE
- wait 1t
- adjust <player> 'equipment:<player.flag[e_adventure]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:adventure'
- default:
- choose <server.list_online_players.formatted.contains[%target_name%]>:
- case true:
- narrate "<&5>Hermes<&f> Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes and notify anyone else involved in the situation."
- note <def[target].inventory> as:<def[target_name]>_<def[target].gamemode>
- wait 1t
- flag <def[target]> e_<def[target].gamemode>:<def[target].equipment>
- wait 1t
- inventory clear d:<def[target].inventory>
- wait 1t
- inventory set d:<def[target].inventory> o:in@<def[target_name]>_adventure
- wait 1t
- adjust <def[target]> 'equipment:<def[target].flag[e_adventure]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <def[target]> 'gamemode:adventure'
- case help:
- narrate "<&5>Zeus<&f> <script.yaml_key[usage]>"
- default:
- narrate "<&5>Zeus<&f> Please choose a player that is online."
- default:
- narrate "<&5>Zeus<&f> Nah. Try again mate. <script.yaml_key[usage]>"
gmspectator:
type: command
debug: false
name: gm3
usage: "/gm3 [playername]"
description: Spectator Gamemode command
aliases:
- v
- vanish
- spectator
- spectate
permission: bruno.gamemode
permission message: <&5>Zeus<&f> Talk to the boss, you can't use this command.
script:
- define target p@<c.args.get[1]>
- define target_name <c.args.get[1]>
- choose <context.args.size>:
- case 0:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_SPECTATOR
- wait 1t
- adjust <player> 'equipment:<player.flag[e_spectator]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:spectator'
- case 1:
- choose <def[target_name]>:
- case <player.name>:
- note <player.inventory> as:<player.name>_<player.gamemode>
- wait 1t
- flag <player> e_<player.gamemode>:<player.equipment>
- wait 1t
- inventory clear d:<player.inventory>
- wait 1t
- inventory set d:<player.inventory> o:in@<player.name>_SPECTATOR
- wait 1t
- adjust <player> 'equipment:<player.flag[e_spectator]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <player> 'gamemode:spectator'
- default:
- choose <server.list_online_players.formatted.contains[%target_name%]>:
- case true:
- narrate "<&5>Hermes<&f> Saving inventory and swapping inventory. It may be a good idea clear your inventory before swapping gamemodes and notify anyone else involved in the situation."
- note <def[target].inventory> as:<def[target_name]>_<def[target].gamemode>
- wait 1t
- flag <def[target]> e_<def[target].gamemode>:<def[target].equipment>
- wait 1t
- inventory clear d:<def[target].inventory>
- wait 1t
- inventory set d:<def[target].inventory> o:in@<def[target_name]>_SPECTATOR
- wait 1t
- adjust <def[target]> 'equipment:<def[target].flag[e_spectator]>'
- wait 1t
- narrate "<&5>Hermes<&f> Inventory saved and switched."
- adjust <def[target]> 'gamemode:spectator'
- case help:
- narrate "<&5>Zeus<&f> <script.yaml_key[usage]>"
- default:
- narrate "<&5>Zeus<&f> Please choose a player that is online."
- default:
- narrate "<&5>Zeus<&f> Nah. Try again mate. <script.yaml_key[usage]>"
View History