CLANS
By
BrunoCreated: 2016/01/17 23:04:31 UTC-08:00 (8 years and 341 days ago)
Edited: 2016/02/08 09:34:00 UTC-08:00 (8 years and 319 days ago)
Likes: 1
Denizen Version: 0.9.7 dev
Script Version: 1.0.2
Description:
##Clans By Bruno##
##In use at Brunos Realm##
##www.brunosrealm.com##
##ip for play is play.brunosrealm.com##
##version release 1.0.2##
Download script |
View raw script#version beta 1.0.2
clan:
type: command
debug: false
name: clan
description: Brunos Clan Command
usage: "/clan create/edit/list/roster/info/ally/war/kick/resources/invite/resign [input]"
permission: bruno.adventurer
permission message: <&5>Zeus<&f> Sorry, <player.name>, you don't have permission to manipulate clans.
allowed help:
- determine <player.has_permission[bruno.clan.test]||player.is_op>
script:
- choose <context.args.size>:
- case 1:
- choose <c.args.get[1]>:
- case list:
- narrate "<&5>Zeus<&f> You Must Provide <&2>[INPUT]<&f>, List <&2>ALL<&f>|<&2>ENEMIES<&f>|<&2>ALLIES<&f>"
- default:
- narrate "<&5>Zeus<&f> You Must Provide <&2>[INPUT]<&f>, <script.yaml_key[usage]>"
- case 2:
- choose <c.args.get[1]>:
- case create:
- choose <c.args.get[2]>:
- default:
- narrate "<&5>Zeus<&f> You are creating a clan called <c.args.get[2]>"
- define clan_leader <player.name>
- define clan_leader_uuid <player.uuid>
- define clan_leader_dname p@<player.name>
- define clan_tag <c.args.get[2]>
- choose <player.money.is[OR_MORE].than[25]><c.args.get[2].length.is[or_more].than[2]><c.args.get[2].length.is[or_less].than[11]><server.get_players_flagged[clan_leader].formatted.contains[%clan_leader%]><server.get_players_flagged[clan_member].formatted.contains[%clan_leader%]><server.flag[clan_name].as_list.contains[%clan_tag%]>:
- case truetruetruefalsefalsefalse:
- take money quantity:25
- wait 1t
- narrate "<&5>Zeus<&f> <&6>$<&f>25 <&2>Bruno Bucks <&f>Have Been Deducted From Your Bank Account."
- define clan_leader_money <player.money>
- flag server clan_name:->:%clan_tag%
- wait 1t
- flag <player> clan_tag:%clan_tag%
- wait 1t
- announce "<&5>Zeus<&f> <&2>%clan_tag%<&f> registered as a <red> clan."
- wait 1t
- flag server clan_leader:->:%clan_leader%
- wait 1t
- flag server clan_leader_uuid:->:%clan_leader_uuid%
- wait 1t
- flag <player> clan_leader:true
- wait 1t
- flag server %clan_tag%_leaders:->:%clan_leader%
- wait 1t
- flag server %clan_tag%_leaders_uuid:->:%clan_leader_uuid%
- wait 15
- announce "<&5>Zeus<&f> <&2>%clan_leader%<&f> registered as the leader of <&2>%clan_tag%."
- flag server clan_members:->:%clan_leader%
- wait 1t
- flag server clan_members_uuid:->:%clan_leader_uuid%
- wait 1t
- flag <player> clan_member:true
- wait 1t
- flag server %clan_tag%_members:->:%clan_leader%
- wait 1t
- flag server %clan_tag%_members_uuid:->:%clan_leader_uuid%
- wait 1t
- narrate "<&5>Zeus<&f> <&2>1 <&f>Member Registered to your clan."
- flag server clan_officers:->:%clan_leader%
- wait 1t
- flag server clan_officers_uuid:->:%clan_leader_uuid%
- wait 1t
- flag server %clan_tag%_officers:->:%clan_leader%
- wait 1t
- flag server %clan_tag%_officers_uuid:->:%clan_leader_uuid%
- wait 1t
- flag <player> clan_officer:true
- wait 1t
- narrate "<&5>Zeus<&f> <&a>1 <&2>Officer <&f>Registered to your clan."
- flag server %clan_tag%_resources_money:->:%clan_leader_money%
- wait 1t
- narrate "<&5>Hermes<&f> <&6>$<&sp><&2><server.flag[%clan_tag%_resources_money].round_to[2]> Registered as Clan's Total Money Resources."
- case truetruetruefalsefalsetrue:
- narrate "<&5>Zeus<&f> This clantag <&2><%clan_tag%><&f> is already in use or it is prohibited. Please choose another."
- default:
- narrate "<&5>Zeus<&f> The requirements to create a clan: <&6>You must have $25 Bruno Bucks. <&3>You must not be part of any other clan. <&e>Your clan tag must be 2 to 11 characters long."
- case "":
- narrate "<&5>Zeus<&f> The requirements to create a clan: <&2>Your clan tag must be 2 to 11 characters long."
- default:
- narrate "<&5>Zeus<&f> <&4>UNKOWN ERROR"
- case edit:
- narrate "<&5>Zeus<&f> Edit Your Clan Is Not Available Yet"
- case list:
- choose <c.args.get[2]>:
- case enemies:
- narrate "<&5>Zeus<&f> I dont know your enemies yet."
- case allies:
- narrate "<&5>Zeus<&f> I dont know your allies yet."
- case all:
- narrate "<&5>Zeus<&f> All known clans are <&2><server.flag[clan_name].as_list.formatted||No Clans Found>"
- case "":
- narrate "<&5>Zeus<&f> All known clans are <&2><server.flag[clan_name].as_list.formatted||No Clans Found>"
- default:
- narrate "<&5>Zeus<&f> All known clans are <&2><server.flag[clan_name].as_list.formatted||No Clans Found>"
- case roster:
- define clan_tag <c.args.get[2]>
- narrate "<&5>Zeus<&f> <server.flag[%clan_tag%_members].as_list.formatted||Clan<&sp>Does<&sp>Not<&sp>Exist>"
- case info:
- narrate "<&5>Zeus<&f> Clan Info Is Not Available Yet"
- case ally:
- narrate "<&5>Zeus<&f> Ally A Clan Is Not Available Yet"
- case war:
- narrate "<&5>Zeus<&f> Go To War With A Clan Is Not Available Yet"
- case kick:
- narrate "<&5>Zeus<&f> Kick A Clan Member Is Not Available Yet"
- case resources:
- define clan_tag <c.args.get[2]>
- narrate "<&5>Zeus<&f> <&2>%clan_tag%<&sp>Resources<&6>$<&2><&sp><server.flag[%clan_tag%_resources_money]||0.00>"
- case invite:
- define invited p@<c.args.get[2]>
- define invited_name <c.args.get[2]>
- define clan_leader <player.flag[clan_leader].contains[true]>
- define clan_name <player.flag[clan_tag]>
- choose <def[invited].is_online><def[invited].flag[clan_member].contains[false]>:
- case truetrue:
- narrate targets:%invited% "You've been invited to join %clan_name%. If you want to join type /clan join %clan_name%"
- flag <def[invited]> clan_invite:->:%clan_name%
- default:
- narrate "<&5>Zeus<&f> That player, %invited%, is not available to be invited to your clan right now."
- case join:
- define clan_tag <c.args.get[2]>
- define clan_member <player.name>
- define clan_member_uuid <player.uuid>
- define clan_members <server.list_online_players.filter[flag[clan_tag].contains[%clan_tag%]].formatted>
- choose <player.flag[clan_invite].contains[%clan_tag%]||false><player.flag[clan_member].contains[false]||false>:
- case truetrue:
- flag <player> clan_member:true
- wait 1t
- flag <player> clan_tag:%clan_tag%
- wait 1t
- flag server clan_members:->:%clan_member%
- wait 1t
- flag server clan_members_uuid:->:%clan_member_uuid%
- wait 1t
- flag server %clan_tag%_members:->:%clan_member%
- wait 1t
- flag server %clan_tag%_members_uuid:->:%clan_member_uuid%
- wait 1t
- announce "<&5>Zeus<&f> <player.name> has become a member of %clan_tag%."
- flag server %clan_tag%_resources_money:+:<player.money>
- wait 1t
- narrate "<&5>Zeus<&f> <server.flag[%clan_tag%_resources_money]> Registered as Clan's Total Money Resources. And %clan_member% is now a member of your clan!" targets:<server.get_online_players_flagged[%clan_tag%].formatted>||<player>>
- case truefalse:
- narrate "<&5>Zeus<&f> You must leave the clan you are in first. Type /clan resign."
- case falsetrue:
- narrate "<&5>Zeus<&f> You were not invited to that clan. And you must leave the clan you are in first. Type /clan resign."
- case falsefalse:
- narrate "<&5>Zeus<&f> You were not invited to that clan. Please check the spelling and try again or contact an officer of that clan for an invite."
- default:
- narrate "<&5>Zeus<&f> You were not invited to that clan. Please check the spelling and try again or contact an officer of that clan for an invite."
- case resign:
- define clan_member '<player.name>'
- define clan_member_uuid '<player.uuid>'
- define player_clan_tag '<player.flag[clan_tag]>'
- define clan_member_money '<player.money>'
- define clan_tag '<c.args.get[2]>'
- choose <player.flag[clan_tag].contains[%clan_tag%]><server.flag[clan_name].as_list.contains[%clan_tag%]><server.get_online_players_flagged[clan_leader].contains[%clan_member_uuid%]>:
- case truetruetrue:
- flag server clan_name:<-:%clan_tag%
- wait 1t
- flag server clan_leader:<-:%clan_member%
- wait 1t
- flag server clan_leader_uuid:<-:%clan_member_uuid%
- wait 1t
- flag <player> clan_leader:false
- wait 1t
- flag server %clan_tag%_leaders:<-:%clan_member%
- wait 1t
- flag server %clan_tag%_leaders_uuid:<-:%clan_member_uuid%
- wait 1t
- flag server clan_officers:<-:%clan_member%
- wait 1t
- flag server clan_officers_uuid:<-:%clan_member_uuid%
- wait 1t
- flag server %clan_tag%_officers:<-:%clan_member%
- wait 1t
- flag server %clan_tag%_officers_uuid:<-:%clan_member_uuid%
- wait 1t
- flag <player> clan_officer:false
- wait 1t
- flag server %clan_tag%_resources_money:!
- wait 1t
- flag <player> clan_tag:!
- wait 1t
- flag server clan_members:<-:%clan_member%
- wait 1t
- flag server clan_members_uuid:<-:%clan_members_uuid%
- wait 1t
- flag server %clan_tag%_members:<-:%clan_member%
- wait 1t
- flag server %clan_tag%_members_uuid:<-:%clan_member_uuid%
- wait 1t
- flag <player> clan_member:false
- wait 1t
- narrate "<&5>Zeus<&f> <red>You are removed from this clan and it has been deleted. You have been refunded your $25."
- give money quantity:25
- case truetruefalse:
- flag <player> clan_tag:!
- wait 1t
- flag server clan_members:<-:%clan_member%
- wait 1t
- flag server clan_members_uuid:<-:%clan_members_uuid%
- wait 1t
- flag server %clan_tag%_members:<-:%clan_member%
- wait 1t
- flag server %clan_tag%_members_uuid:<-:%clan_member_uuid%
- wait 1t
- flag <player> clan_member:false
- wait 1t
- flag server %clan_tag%_resources_money:-:%clan_member_money%
- wait 1t
- narrate "<&5>Zeus<&f> <server.flag[%clan_tag%_resources_money]> Registered as Clan's Total Money Resources because %clan_member% resigned." targets:<server.get_online_players_flagged[%clan_tag%]>
- narrate "<&5>Zeus<&f> <red>You are removed from this clan."
- case falsetruefalse:
- narrate "<&5>Zeus<&f> <red>You are not part of that clan.falsetruefalse"
- case falsetruetrue:
- narrate "<&5>Zeus<&f> <red>You are not part of that clan."
- case truefalsetrue:
- narrate "<&5>Zeus<&f> <red>That clan doesnt exist."
- case falsefalsetrue:
- narrate "<&5>Zeus<&f> <red>You are not part of that clan or it doesnt exist."
- case falsefalsefalse:
- narrate "<&5>Zeus<&f> <red>You are not part of that clan or it doesnt exist."
- default:
- narrate "<&5>Zeus<&f> <red>You are not part of that clan or it doesnt exist."
- case help:
- narrate "<&5>Zeus<&f> HELP:<red><script.yaml_key[usage]>"
- default:
- narrate "<&5>Zeus<&f> HELP:<red><script.yaml_key[usage]> because <bold>default error."
manageclan:
type: command
debug: false
name: manageclan
description: Brunos Clan Command
usage: "/manageclan edit/kick/place/delete [input]"
aliases:
- mclan
permission: bruno.clan.manage
permission message: <&5>Zeus<&f> Sorry, <player.name>, you don't have permission to manipulate clans.
allowed help:
- determine <player.has_permission[bruno.clan.test]||player.is_op>
script:
- if !<player.has_permission[bruno.clan.manage]||<context.server>> {
- narrate "<&5>Zeus<&f> <red>You do not have permission do use this command."
}
- choose <c.args.get[1]>:
- case delete:
- define clan_tag <c.args.get[2]>
- define clan_leader <server.list_players_flagged[clan_leader]>
- if !<server.flag[clan_name].contains[%clan_tag%]> {
- narrate "<&5>Zeus<&f> <red>This clantag is not in use. Please choose another."
} else {
- flag server clan_name:<-:%clan_tag%
- wait 1t
- flag server %clan_tag%_leader:!
- wait 1t
- flag server %clan_tag%_members:!
- wait 1t
- flag server %clan_tag%_officers:!
- wait 1t
- flag server %clan_tag%_resources_money:!
- flag %clan_leader% clan_leader:false
}
- case edit:
- narrate "<&5>Zeus<&f> Edit <c.args.get[2]> Is Not Available Yet"
- case place:
- narrate "<&5>Zeus<&f> place <c.args.get[2]||A Player> To <c.args.get[3]> Is Not Available Yet"
- case kick:
- narrate "<&5>Zeus<&f> Kick is not available yet"
# - define clan_tag <c.args.get[3]>
# - define clan_player <c.args.get[2]>
# - define clan_player_money <c.args.get[2].money>
# - if !<server.flag[%clan_tag%_members].contains[%clan_player%]> {
# - narrate "<red>%clan_player% is not a member of %clan_tag% or %clan_tag% does not exist."
# } else {
# - flag server %clan_tag%_members:<-:%clan_player%
# - flag server %clan_tag%_officers:<-:%clan_player%
# - flag server %clan_tag%_resources:-:%clan_player_money%
# }
- case help:
- narrate "<&5>Zeus<&f> <script.yaml_key[usage]>"
- default:
- narrate "<&5>Zeus<&f> <script.yaml_key[usage]>"
View History