• Hey! Register here to create your account, engage with the community, and talk about what is new!

How do i make a command book

Pitzl_

New member
Joined
Dec 24, 2021
Messages
8
Reaction score
0
So right now i dont have really a command system I was thinking to make it using a book (because I don't have a rank) but I don't know how. Is there any player or mod that can help me?
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,260
Reaction score
356
the most basic way is to compare the book to a pre made one, to do it, On Player Left Click Event or in a Loop place an If Variable =, in the 1st slot put a Game Value: Main Hand Item and in the 2nd slot put your pre-made book, then execute the command and replace the book with an empty one
 

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,260
Reaction score
356
ah, then you need text manipulation, on player swap hands event, place a If Variable: Item Equals, in the 1st slot put a Game Value: Main Hand Item and in the 2nd one put a book and quill and change the if variable tag to material only. Now between the pistons place a Game Action: Cancel Event and after it, place a Set Variable: Get Book Text, in the first slot put a variable (preferably local) and in the second one put the same game value as before, now place a Set Variable: Split Text, in the first and the second slot put the same variable as before and that should give you a list that has each word split. You can now either name a text %index(same variable, 1) to get the command and %index(same variable, 2) to get the argument OR use Set Variable: Get Value At Index to get the value at the first or the second tho i recommend the %index one as it's more compact
 
Top Bottom