Commands like -gold and -lumber

Hotwer

New Member
Reaction score
0
I really wanna learn how do it.
It's commands you type like the -gold or -lumber and how much you want!
I don't wanna hack any map! I know it's so much used in hacked maps, but, I just like to make funny maps to have fun, and It's usefull for tests on the map.
 

tommerbob

Minecraft. :D
Reaction score
110
The game already has a built-in command system.

"greedisgood XXX" will you give you X gold.
 

Hotwer

New Member
Reaction score
0
Lol. But it doesn't work online. I wanna make test with friends, of course. I know these Cheats.
 

Ashlebede

New Member
Reaction score
43
@tommerbob

Ever heard of that thing we call multiplayer?

Anyways, you'd have to make a chat event in a trigger.

Trigger:
  • MyTrigger
    • Events
      • Player - Player 1 (Red) types a chat message containing -gold as A substring
      • Player - Player 2 (Blue) types a chat message containing -gold as A substring
      • Player - Player 3 (Teal) types a chat message containing -gold as A substring
      • And so on...
    • Conditions
      • (Substring((Entered chat string), 1, 5)) Equal to -gold
    • Actions
      • Player - Add (Integer((Substring((Entered chat string), 7, 17)))) to (Triggering player) Current gold


Not too sure about the condition. Just try it and you'll see.
 

tommerbob

Minecraft. :D
Reaction score
110
No what's multiplayer?

/s

He didn't specify that he wanted it for online play.

@Hotwer

The numbers (7, 17) are substrings: Parts of a string that the game reads data from. In other words, the game will give X gold to the triggering player relative to the digits entered from the 7th to the 17th characters of the entered text. Hope that helps.
 

Ashlebede

New Member
Reaction score
43
@tommerbob

He did mention he wanted the commands to be -gold and -lumber. I could have made that trigger only useable in single-player, as well.

Anyways, those numbers are "indexes" in a string. They're basically the numbers of the letters in the entered messages.

For instance, number 1, the first character, is "-" and number 5 is "d". The trigger will check if everything between characters 1 and 5 is "-gold".

Then, the "7" is after the space which follows -gold ("-gold ") and is where the numbers should be written. "17" is just somewhere past the string.
 

Hotwer

New Member
Reaction score
0
I thought thats obviously, so why I will make a map? For myself? And I request Triggers, not cheats, I was specific in what I wanted.

Edit: @Ash
Thanks, now I can do much more.
Than, the last question. For the -lumber the numbers of the Condition will be 1 and 7. Than the Action will be 9 and what i want, like 16 (I dont need more, the max is 100000, and have seven caracteres in this number, haha).
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top