| Script Format |
New Script FormatingNew 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}_
/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}
|