Clans Part 1 (Create a clan - Trigger)
Description
Introduction: Welcome to part 1 of my clans wikis! If you don't know what I mean by that, think of Clash of Clans. Basically, it's like a "club" for people to join, especially for economy bots, which could provide benefits within your economy bot. Throughout my wikis, I will cover creating a clan, inviting people to your clan, promoting and demoting people to coleader, viewing your clan, donating to your clan, and more! I will be using slash commands throughout all of my wikis, so you may have to adjust the code a bit if you aren't using them. Variables (do not include = in the variable name. If the right side of the = has nothing, leave the value blank): money=0 clanName= clanLeader= clanCoLeader= clanMemberCount=0 clanMaxMembers=10 clanMembers= clanMulti=1 clanMoney=0 clanInvites= How does it work? It might seem difficult to make it so that everybody in the same clan has the same values for each variable, such as clan money (when someone donates money to the clan, how does it update for all user?). To combat this, only the clan leader's variables will change. The only variable that changes for members in a clan is the clanLeader variable, which becomes the clan leader's ID, so when you try to retrieve or change a value for a user, it's really just changing or retrieving the value of the clan leader's ID. I will leave comments throughout the code to help guide you if you need to make any changes. Part 1: So, this part will mainly focus on creating a clan. I'll be using slash commands as well as buttons (those codes will be in separate wikis) https://imgur.com/a/Ut4vHbk
Trigger
BDScript Code
$nomention
$c[Throughout my wikis, I will be using the clanLeader variable to check if a user is in a clan or not. If it is blank, the user is not in a clan. (See line below)]
$onlyIf[$getVar[clanLeader;$authorID]==;Leave your current clan to create a new one!]
$ephemeral
$title[Clan Creation]
$c[You can obviously change the cost to whatever you want, I will tell you where to change it in the confirm button as well!]
$description[It will cost $500,000 to create a clan!]
$c[Use my other wikis for the buttons codes!]
$addButton[yes;continueCreate;Continue;success]
$addButton[no;cancelCreate;Cancel;danger]