|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Tue Oct 25, 2011 3:12 pm
[solved] easy reading script text? |
I remember in zMUD that after entering in the information, it would automatically rearrange everything so that items inside loops, looked like it. The ; would drop that command to the next line, and in the same line. Does this make sense? For example....
This is the alias as it stands everything all in one line.
Code: |
#if (@bmove) {#add line 1;#if (%left( %read( 1, @line), 2) = "//") {#add line 1};#var bkill 10;#READ 1 @line} |
This is what I'm looking for automatically. I did this by hand, so not 100% sure this is "right". But this is the idea.
Code: |
#if (@bmove) {#add line 1
#if (%left( %read( 1, @line), 2) = "//") {
#add line 1
}
#var bkill 10
#READ 1 @line
} |
Some items I have can be read SO much easier in this format. What happened? TIA as usual everyone! |
|
Last edited by shaun.murray on Tue Oct 25, 2011 5:30 pm; edited 1 time in total |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Tue Oct 25, 2011 3:22 pm |
Go to Editor -> Reformat script (or hit CTRL+M). There's no way to make it auto-format anymore, AFAIK.
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Tue Oct 25, 2011 3:39 pm |
Code: |
#switch (%1 = "on") {
#VARIABLE botterloop 10
#VARIABLE botterstatus Enabled
#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER ENABLED ~#~#~#~#~#
} (%1 = "off") {
#VARIABLE botterloop -100
#VARIABLE botterstatus Disabled
#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER DISABLED ~#~#~#~#~#
} (%1 = "disp") {#WINDOW misc %ansi( grey)~#~#~#~#~# BOTTER Status: ~[ @botterstatus ~] ~#~#~#~#~#} (%1 = "group") {#switch (%2 = "on") {#var bottergroup 1} (%2 = "off") {#var bottergroup 0} (%2 = "add") {%additem bottergroup_members %3} (%2 = "remove") {} (%2 = "removeall") {} {#say ERROR! No proper 'group' command entered! ERROR!}} {#say ERROR! Wrong command entered! ERROR!} |
Almost there... The end of that doesn't seem to want to 'look pretty'. What is this called btw? Or is there a name? Thanks again!!! |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Tue Oct 25, 2011 5:28 pm |
The autoformat does not work well on complex #SWITCH commands. The only way to get this to "look pretty" is to do it by hand.
|
|
|
|
shaun.murray Magician
Joined: 23 Jul 2005 Posts: 334 Location: Chicago
|
Posted: Tue Oct 25, 2011 5:31 pm |
:bow: I have been. Love'n the ctrl+m.... Hahaha, almost EVERYTHING got a touch this morning. LoL
|
|
|
|
|
|