Author Topic:  Custom Admin / Developer Menu for your world  (Read 172 times)

0 Members and 1 Guest are viewing this topic.

Zepyhr

  • Fresh Meat
  • *
  • Posts: 2
    • View Profile
    • Awards
  • Xbox: PHUGV Matchless
  • PSN: MatchlessDread1
  • Steam: GhostScripter
Custom Admin / Developer Menu for your world
« on: January 06, 2017, 11:38:03 AM »
I am just recently got back to XBL and I re-downloaded Total Miner Forge, and well I saw this thing that said scripts and started messing with it. So far I don't really have much setup in the scripts, all that is there is a Admin/Developer Menu if you have the admin permission when you right click the Custom option in the main menu.

Here is a example of what I have in a normal text format.

Menu\Rex

Rex:

1. if
2. hasPermission [Admin [true]]
3. then
4. MessageBox [Welcome Back! [player]] [a=[Dismiss Message][Rex\Admin]]
4. elseif
5. exit

Sorry if it looks bad I am still learning how to use the script function in the game. Can someone help me and or give any advice?

AlienizdPixel

  • Tester
  • Supreme Member
  • *****
  • Posts: 2555
  • Hello
  • Awards 3 years on site+600 posts Members who have unlocked the robotic avatar Awarded to exemplary forum members 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: A1ienizdPixe1
  • Steam: Alienizd
Re: Custom Admin / Developer Menu for your world
« Reply #1 on: January 06, 2017, 11:58:43 AM »
It seems fine, however I would suggest using the Menu Command if you are planning on adding more than 3 options to it. Also, you do not need the ElseIf nor the Exit commands, unless you are planning to add on to the remaining of the script.
There is a documentation available for Scripts here to look at, and can also be viewed in-game (the controls appear at the bottom of the editing menu and when selecting a sample command).
Also, wrong board, this topic would be more suitable here, as this board is more for requests of ideas that are not currently within the game. You are able to contact a moderator to move this topic over. *Topic was moved.
« Last Edit: January 06, 2017, 06:01:24 PM by AlienizdPixel »
-Alionz

crazytater94

  • Supreme Member
  • *****
  • Posts: 2519
  • Mastering TM since 2011
  • Awards Awarded to exemplary forum members Members who have unlocked the robotic avatar 3 years on site+600 posts 2 years on site+300 posts Was in the top 10 of the forum stats page as of 4/12/15 Former MotM winners Week 1 members w/25+ posts (4/13/13-4/20/13) 1 year on site+100 posts
    • View Profile
    • Awards
  • Xbox: crazytater94
Re: Custom Admin / Developer Menu for your world
« Reply #2 on: January 09, 2017, 10:26:11 PM »
Use something like this to help maximize efficiency.


If
HasPermission [admin] [false]
Then
Exit

Else
Notify [1.) Invincibility] [local]
Notify [2.) Clear Inventory
Etc... //to let you know what number does what.

Input [X]
//here is where you type the desired number.
Endif

If
Var [X] [=] [1]
Then
//Do your first admin command. (Invincibility)

Elseif
Var [X] [=] [2]
Then
//Do your second command. (Clear inventory)

Etc...



I also added special commands, like 666 spawns a blood moon, and 101 resets you back to the starting stats and gear, etc...


Very useful, and merges multiple scripts from a menu, into 1 single script.