24 | 01 | 2018
Script Format

New Script Formating 

New script formatting rules that allow commands to be continued across lines. Ending a line with \ or _ tells the /read command that the line continues on the following line. Leading white space can now be used and will be stripped off by the /read command. Trailing white space on lines with the continuation character will also be removed.

For example:

/alias {values %1}_
 {/if
{@IsEmpty($1)==1}_
      {/showme
{@Chr(10)@AnsiBold()@ForeYellow()_
       Syntax: @ForeRed()values @ForeGreen()_
       
tradepost command @ForeYellow()- @ForeGreen()_
       tradepost @ForeYellow()_
       must be the first three or more letters and @ForeGreen()_
       command @ForeYellow()can be
anything.@AnsiReset()_
               }_
      }_
      {/if {$1 == "list"}_
           {/showme
{@Chr(10)@AnsiBold()_
             @ForeYellow()Medievia
Trade Posts@AnsiReset()};_
            /showme
{@AnsiBold()@ForeYellow()ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ};_
            /loop {1,18}_
                  {/showme
{@AnsiBold()@ForeGreen()_
                    @a(shopnames,$LoopCount,0)@AnsiReset
()}_
                  }_
           }_
           {/var {Shop}
{@Word($1,1)}{TVVariables};_
            /var
{tp}{@Lower($Shop)}{TVVariables};_
            /var {tpnum}{0}{TVVariables};_
            /var {NumWordLength}
{@Len($Shop)}{TVVariables};_
            /var {NumStringLength}
{@Len($1)}{TVVariables};_
            /math {NumChars} {$NumStringLength - $NumWordLength - 1};_
            /var {Command}_
                 
{@Mid($1,@math($NumWordLength + 1),$NumChars)}_
                 {TVVariables};_
            /if {$NumWordLength < 3}_
                {/showme
{@AnsiBold()@ForeCyan()_
                Shop
argument must be 3 letters or more long._
                @AnsiReset
()}_
                }_
                {$Command @a(tpname,1,1) from ;_
                 /var {iBase}{1}{TVVariables};_
                 /loop {1,18,i}_
                       {_
                        /if
{_
                            @StrStr(@Lower(@a(shopnames,$i,0)),$tp
) != -1_
                            } _
                            {/var {tpnum}{$i}{TVVariables}}_
                            {_
                             /if {$tpnum == 0}_
                                 {/if {$i == 2}_
                                      {/math {iBase}{$iBase +3}}_
                                      {/math {iBase}{$iBase +5}}_
                                 }_
                            }_
                       };_
                 /if {$tpnum != 2}_
                     {$Command @a(shopnames,$tpnum,0)_
                       - @a(itemstuff,$iBase,1)_
                       : @a(itemstuff,$iBase,7)_
                       . @a(itemstuff,@math($iBase + 1),1)_
                       : @a(itemstuff,@math($iBase + 1),7)_
                       . @a(itemstuff,@math($iBase + 2),1)_
                       : @a(itemstuff,@math($iBase + 2),7)_
                       . @a(itemstuff,@math($iBase +3),1)_
                       : @a(itemstuff,@math($iBase + 3),7)_
                       . @a(itemstuff,@math($iBase + 4),1)_
                       : @a(itemstuff,@math($iBase + 4),7).}_
                     {$Command @a(shopnames,$tpnum,0) - _
                       @a(itemstuff,$iBase,1)_
                       : @a(itemstuff,$iBase,7)_
                       . @a(itemstuff,@math($iBase + 1),1)_
                       : @a(itemstuff,@math($iBase + 1),7)_
                       . @a(itemstuff,@math($iBase + 2),1)_
                       : @a(itemstuff,@math($iBase + 2),7).}_
                 }_
            }_
       }_
 } {TValias}


would be the same as

/alias {values %1} {/if {@IsEmpty($1)==1}{/showme {@Chr(10)@AnsiBold()@ForeYellow()Syntax: @ForeRed()values @ForeGreen()tradepost command @ForeYellow()- @ForeGreen()tradepost @ForeYellow()must be the first three or more letters and @ForeGreen()command @ForeYellow()can be anything.@AnsiReset()}}{/if {$1 == "list"}{/showme {@Chr(10)@AnsiBold()@ForeYellow()Medievia Trade Posts@AnsiReset()};/showme {@AnsiBold()@ForeYellow()ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ};/loop {1,18}{/showme {@AnsiBold()@ForeGreen()@a(shopnames,$LoopCount,0)@AnsiReset()}}}{/var {Shop} {@Word($1,1)}{TVVariables};/var {tp}{@Lower($Shop)}{TVVariables};/var {tpnum}{0}{TVVariables};/var {NumWordLength} {@Len($Shop)}{TVVariables};/var {NumStringLength} {@Len($1)}{TVVariables};/math {NumChars} {$NumStringLength - $NumWordLength - 1};/var {Command} {@Mid($1,@math($NumWordLength + 1),$NumChars)}{TVVariables};/if {$NumWordLength < 3}{/showme {@AnsiBold()@ForeCyan()Shop argument must be 3 letters or more long.@AnsiReset()}}{$Command @a(tpname,1,1) from ;/var {iBase}{1}{TVVariables};/loop {1,18,i}{/if {@StrStr(@Lower(@a(shopnames,$i,0)),$tp) != -1}{/var {tpnum}{$i}{TVVariables}}{/if {$tpnum == 0}{/if {$i == 2}{/math {iBase}{$iBase +3}}{/math {iBase}{$iBase +5}}}}};/if {$tpnum != 2}{$Command @a(shopnames,$tpnum,0) - @a(itemstuff,$iBase,1): @a(itemstuff,$iBase,7). @a(itemstuff,@math($iBase + 1),1): @a(itemstuff,@math($iBase + 1),7). @a(itemstuff,@math($iBase + 2),1): @a(itemstuff,@math($iBase + 2),7). @a(itemstuff,@math($iBase +3),1): @a(itemstuff,@math($iBase + 3),7). @a(itemstuff,@math($iBase + 4),1): @a(itemstuff,@math($iBase + 4),7).}{$Command @a(shopnames,$tpnum,0) - @a(itemstuff,$iBase,1): @a(itemstuff,$iBase,7). @a(itemstuff,@math($iBase + 1),1): @a(itemstuff,@math($iBase + 1),7). @a(itemstuff,@math($iBase + 2),1): @a(itemstuff,@math($iBase + 2),7).}}}}}{TValias}