Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Dec 28, 2009 3:13 pm   

[3.12] Storing special characters in variables **Issue resolved...**
 
I'm not sure if this is a bug or not, or if someone has an idea of what to do, but here's the situation.

Currently, I have an identify script that works nicely. There's only one flaw in it right now (that I can see), and it's the inability to store some special characters in variables. For instance, if the item is:

Charneus' "Book of Destruction"

It'll actually store:

Charneus' ~B~ook of Destruction~ into the variable instead. Not sure how to go about putting it in the variable, though, as both %string and %quote don't fix the problem.

It's quite possible I'm just missing something incredibly small, but if anyone has any suggestions, I'd appreciate it. Thanks!

Charneus


Last edited by charneus on Mon Jan 04, 2010 7:55 pm; edited 1 time in total
Reply with quote
gamma_ray
Magician


Joined: 17 Apr 2005
Posts: 496

PostPosted: Mon Dec 28, 2009 7:39 pm   
 
I was unable to reproduce this using (on the command line)

test = Charneus' "Book of Destruction"
test = {Charneus' "Book of Destruction"}
test = %quote(Charneus' "Book of Destruction")
#additem test {Charneus' "Book of Destruction"}

When I did a #show each one correctly showed Charneus' "Book of Destruction", and all of them showed up fine in the settings editor. I'm thinking it's something else in how your script is handling things... Post it?
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Mon Dec 28, 2009 10:12 pm   
 
Heh. If you can read through this script, congratulations. ;) This is for Aardwolf, and the MUD output that would show is:


Code:
+-----------------------------------------------------------------+
| Keywords   : item quote book                                    |
| Name       : Book of "Destruction"                              |
| Id         : 249887550                                          |
| Type       : Armor                     Level  :   105           |
| Worth      : 20                        Weight :    16           |
| Wearable   : body                                               |
| Flags      : V3                                                 |
| Notes      : Item has 4 resistance affects.                     |
+-----------------------------------------------------------------+
| Stat Mods  : Intelligence : +3       Wisdom       : +3          |
+-----------------------------------------------------------------+


Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
  <class name="IdentScript" copy="yes">
    <notes>Version 2.1</notes>
    <alias name="togid" copy="yes">
      <value>#IF  %trigger("IdentScriptCore") {#T- "IdentScriptCore";#SAY {Turning Identify script OFF.}} {#T+ "IdentScriptCore";IdentNum=0;StartGag=0;#SAY {Turning Identify script ON.}}</value>
    </alias>
    <func name="format" copy="yes">
      <value>//$slist=""
//$str=""
//#while %regex($string,"^((?:(?:\@.)*.){1,79}(?=(?: |$)))",$str,$count) {
 //$slist = %additem($str,$slist)
 //$string = %right($string,$count)
//}
//#return $slist
#RETURN %subregex($string,"(.{1,79})(?:$| )",%concat("\1",%crlf))
</value>
      <arglist>$string</arglist>
    </func>
    <class name="IdentVars" copy="yes">
      <var name="IDName" copy="yes"/>
      <var name="IDType" copy="yes"/>
      <var name="IDWear" copy="yes"/>
      <var name="IDLevel" copy="yes"/>
      <var name="IDStats" type="Record" copy="yes"/>
      <var name="ItemStats" type="StringList" copy="yes">Strength|Dexterity|Wisdom|Constitution|Intelligence|Luck|Hit roll|Damage roll</var>
      <var name="ItemResists" type="StringList" copy="yes">All physical|All magic|Bash|Pierce|Slash|Acid|Air|Cold|Disease|Earth|Energy|Fire|Holy|Light|Electric|Magic|Mental|Negative|Poison|Shadow|Sonic|Water</var>
      <var name="IdentNum" usedef="true" copy="yes">
        <value>0</value>
        <default>0</default>
      </var>
      <var name="bidnum" copy="yes"/>
      <var name="IDResists" type="Record" copy="yes"/>
      <var name="resistson" copy="yes">0</var>
      <var name="IDRecs" type="Record" copy="yes">00001=@C(@RBid @Y199@C) @yItem: @w@YA @yLion's @YCourage@w @yLvl: @g70 @gfloat@w|00002=@C(@RBid @Y190@C) @yItem: @w@wMetalworking Chaps @yLvl: @g11 @glegs@w|00003=@C(@RBid @Y191@C) @yItem: @w@RBracers @wof the @CSiswa@w @yLvl: @g1 @garms@w @yTotal Stats: @g2 @B[@C1@WStr@C1@WDex@B]@w @C(@g2@y points@C)@w|00004=@C(@RBid @Y192@C) @yItem: @wa dagger @yLvl: @g18 @gwield@w|00005=@C(@RBid @Y193@C) @yItem: @w@ga Tr@ye@wnc@gh @gC@yo@wa@gt@w @yLvl: @g1 @gbody@w @yTotal Stats: @g1 @B[@C1@WStr@B]@w @yDR: @g+6@w @C(@g4@y points@C)@w|00006=@C(@RBid @Y194@C) @yItem: @w@bD@Ben'Mo@br@w @yLvl: @g18 @gwield@w|00007=@C(@RBid @Y195@C) @yItem: @wa welding mask @yLvl: @g18 @ghead@w|00008=@C(@RBid @Y196@C) @yItem: @wGnomish Engineering Vest @yLvl: @g7 @gtorso@w|00009=@C(@RBid @Y197@C) @yItem: @w@MTor'ia'vic@w @yLvl: @g17 @gwield@w|00010=@C(@RBid @Y198@C) @yItem: @w@Dthe @YGaze @Dof a @MPharaoh@w @yLvl: @g91 @geyes@w @yTotal Stats: @g6 @B[@C6@WDex@B]@w @yDR: @g+14@w @C(@g13@y points@C)@w</var>
      <var name="IDRecNum" type="Integer" copy="yes">1</var>
      <var name="IDRecMax" copy="yes">10</var>
      <var name="showtype" copy="yes">0</var>
      <func name="numsort" copy="yes">
        <value>#RETURN %concat(%repeat("0",(5-%len(%1))),%1)</value>
      </func>
      <var name="StartGag" copy="yes">0</var>
      <var name="shortid" copy="yes">0</var>
      <var name="IDColorLists" type="Record" sorted="true" copy="yes">Bid=bred|Bid number=byellow|Brackets=bblue|DR=yellow|DR number=green|HR=yellow|HR number=green|Item=yellow|Lvl=yellow|Lvl number=green|Neg Stat number=red|Parentheses=bcyan|Points=yellow|Points number=green|Pos Stat number=bcyan|Resists=yellow|Resists name=cyan|Resists neg number=red|Resists pos number=byellow|Stat names=bwhite|Total Stats=yellow|Total Stats number=green|Type=yellow|Type var=green|Wearable=green</var>
    </class>
    <func name="padLeft" copy="yes">
      <value>#return %repeat($Character, $Length - %len($String))$String
;#RETURN %subregex( %format( %concat( "&amp;", $Length, "s"), $String), "^\s+", %repeat( $Character, $Length-%len($String)))</value>
      <arglist>String, Length, Character</arglist>
    </func>
    <func name="padRight" copy="yes">
      <value>#return $String%repeat($Character, $Length - %len($String))
;#RETURN %subregex(%format(%concat("&amp;-",$Length,"s"),$String),"\s+$",%repeat($Character,$Length-%len($String)))</value>
      <arglist>String, Length, Character</arglist>
    </func>
    <func name="padcent" copy="yes">
      <value>$Res=%repeat($Character,$Length)
$Res=%insert($String,$Res,(($Length-%len($String))/2)+1)
$Res=%left($Res,$Length)
#RETURN $Res</value>
      <arglist>String, Length, Character</arglist>
    </func>
    <func name="ansishowid" copy="yes">
      <value>#LOCAL AnsiColor
$Color=%db(@IDColorLists, $DataKey)
#SWITCH ($Color) ("byellow") {$AnsiColor="yellow"} ("yellow") {$AnsiColor="orange"} ("bred") {$AnsiColor="red"} ("red") {$AnsiColor="darkred"} ("bblue") {$AnsiColor="blue"} ("blue") {$AnsiColor="darkblue"} ("bmagenta") {$AnsiColor="magenta"} ("magenta") {$AnsiColor="darkmagenta"} ("gray") {$AnsiColor="gray"} ("bcyan") {$AnsiColor="cyan"} ("cyan") {$AnsiColor="darkcyan"} ("bwhite") {$AnsiColor="snow"} ("white") {$AnsiColor="gainsboro"} ("bgreen") {$AnsiColor="green"} ("green") {$AnsiColor="darkgreen"}
#RETURN %concat("",$Color,"")
</value>
      <arglist>$DataKey</arglist>
    </func>
    <func name="idcolorcode" copy="yes">
      <value>#LOCAL ColorCode
$Color=%db(@IDColorLists, $DataKey)
#SWITCH ($Color) ("byellow") {$ColorCode="Y"} ("yellow") {$ColorCode="y"} ("bred") {$ColorCode="R"} ("red") {$ColorCode="r"} ("bblue") {$ColorCode="B"} ("blue") {$ColorCode="b"} ("bmagenta") {$ColorCode="M"} ("magenta") {$ColorCode="m"} ("gray") {$ColorCode="D"} ("bcyan") {$ColorCode="C"} ("cyan") {$ColorCode="c"} ("bwhite") {$ColorCode="W"} ("white") {$ColorCode="w"} ("bgreen") {$ColorCode="G"} ("green") {$ColorCode="g"}
#RETURN $ColorCode</value>
      <arglist>$DataKey</arglist>
    </func>
    <func name="idoutput" copy="yes">
      <value>#LOCAL AnsiColor
$Color=%db(@IDColorLists, $DataKey)
#SWITCH ($Color) ("byellow") {$AnsiColor="yellow"} ("yellow") {$AnsiColor="orange"} ("bred") {$AnsiColor="red"} ("red") {$AnsiColor="darkred"} ("bblue") {$AnsiColor="blue"} ("blue") {$AnsiColor="darkblue"} ("bmagenta") {$AnsiColor="magenta"} ("magenta") {$AnsiColor="darkmagenta"} ("gray") {$AnsiColor="gray"} ("bcyan") {$AnsiColor="cyan"} ("cyan") {$AnsiColor="darkcyan"} ("bwhite") {$AnsiColor="snow"} ("white") {$AnsiColor="gainsboro"} ("bgreen") {$AnsiColor="green"} ("green") {$AnsiColor="darkgreen"}
#RETURN %concat("",%if(%2, $Character,$DataKey),"")</value>
      <arglist>$DataKey, $Character</arglist>
    </func>
    <class name="IdentScriptCore" copy="yes">
      <trigger name="IDCommand" type="Command Input" priority="9590" trigontrig="false" regex="true" copy="yes">
        <pattern>^((?:c\w{0,3} )?id\w{0,6} .*)</pattern>
        <value>#IF (@IdentNum) {#ADD IdentNum 1} {
  #T+ "IdentScriptTrigs"
  #ADD IdentNum 1
  }</value>
      </trigger>
      <class name="IdentScriptTrigs" enabled="false" copy="yes">
        <trigger priority="9780" repeat="true" regex="true" copy="yes">
          <pattern>(?:(@ItemStats))\s+:\s+([-+0-9]+)</pattern>
          <value>#ADDKEY IDStats %1 %2</value>
        </trigger>
        <trigger name="StartGag" priority="9820" copy="yes">
          <pattern>+[-]+</pattern>
          <value>#IF (!@StartGag) {
  #GAGSPACE
  #GAGON
  StartGag=1
  //echo IdentScript processed!
  }</value>
          <trigger param="1" regex="true" prompt="true">
            <pattern>^$</pattern>
            <value><![CDATA[#LOCAL $PosStats $NegStats $IdentString $Resists $TotalPoints $TotalStats IdentStore
#LOOPDB @IDStats {
  #SWITCH (%val>0 AND !%ismember( %left( %key, 3), "Hit|Dam")) {$PosStats=%concat( $PosStats, "@", @idcolorcode( "Pos stat number"), %val, "@", @idcolorcode( "Stat names"), %left( %key, 3))} (%val<0 AND !%ismember( %left( %key, 3), "Hit|Dam")) {$NegStats=%concat( $NegStats, "@", @idcolorcode( "Neg stat number"), %val, "@", @idcolorcode( "Stat names"), %left( %key, 3))}
  $TotalStats=$TotalStats+%if( !%ismember( %left( %key, 3), "Hit|Dam"), %val)
  #IF (%ismember( %key, "Hit roll|Damage roll")) {$TotalPoints=$TotalPoints+(%val/2.0)}
  }
$TotalPoints=($TotalPoints+$TotalStats)
#LOOPDB @IDResists {#IF (@resistson) {$Resists=%concat( $Resists, %if( %val>0, %concat( "@", @idcolorcode( "Resists pos number"), %subchar( %val, "+"), "@", @idcolorcode( "Resists name"), %key" "), %concat( "@", @idcolorcode( "Resists neg number"), %val, "@", @idcolorcode( "Resists name"), %key, " ")))}}
#IF (@shortID) {$IdentString=%concat( "@", @idcolorcode( "Lvl"), "Lvl: @", @idcolorcode( "Lvl number"), @IDLevel, %if( @IDType, %concat( " @", @idcolorcode( "Type var"), @IDType)), %if( $PosStats, %concat( " @", @idcolorcode( "Brackets"), "[", %subchar( $PosStats, "+"), "@", @idcolorcode( "Brackets")), "]@w"), %if( %iskey( @IDStats, "Damage Roll"), %concat( " @", @idcolorcode( "DR"), "DR: @", @idcolorcode( "DR number"), %db( @IDStats, "Damage Roll"))))} {$IdentString=%concat( "@", @idcolorcode( "Item"), "Item: @w", @IDName, " @", @idcolorcode( "Lvl"), "Lvl: @", @idcolorcode( "Lvl number"), @IDLevel, %if( @IDWear, %concat( " @", @idcolorcode( "Wearable"), @IDWear, "@w")), %if( @showtype, %concat( " @", @idcolorcode( "Type"), "Type: @", @idcolorcode( "Type var"), @IDType)), %if( $TotalStats, %concat( " @", @idcolorcode( "Total Stats"), "Total Stats: @", @idcolorcode( "Total Stats number"), %subchar( $TotalStats, "+"), %if( $PosStats, %concat( " @", @idcolorcode( "Brackets"), "[", %subchar( $PosStats, "+"), "@", @idcolorcode( "Brackets"), "]@w")), %if( $NegStats, %concat( " @", @idcolorcode( "Brackets"), "[", $NegStats, "@", @idcolorcode( "Brackets"), "]@w")))), %if( %iskey( @IDStats, "Hit roll"), %concat( " @", @idcolorcode( "HR"), "HR: @"@idcolorcode( "HR number"), %db( @IDStats, "Hit roll")"@w")), %if( %iskey( @IDStats, "Damage Roll"), %concat( " @", @idcolorcode( "DR"), "DR: @", @idcolorcode( "DR number"), %db( @IDStats, "Damage roll")"@w")))}
$IdentStore=%concat( "@", @idcolorcode( "Item"), "Item: @w", @IDName, " @", @idcolorcode( "Lvl"), "Lvl: @", @idcolorcode( "Lvl number"), @IDLevel, %if( @showtype, " @"@idcolorcode( "Type")"Type: @"@idcolorcode( "Type var")@IDType), %if( @IDWear, %concat( " @", @idcolorcode( "Wearable"), @IDWear, "@w")), %if( $TotalStats, %concat( " @", @idcolorcode( "Total Stats"), "Total Stats: @", @idcolorcode( "Total Stats number"), %subchar( $TotalStats, "+"), %if( $PosStats, %concat( " @", @idcolorcode( "Brackets"), "[", %subchar( $PosStats, "+"), "@", @idcolorcode( "Brackets")), "]@w"), %if( $NegStats, %concat( " @", @idcolorcode( "Brackets"), "[", $NegStats, "@", @idcolorcode( "Brackets")), "]@w"))), %if( %iskey( @IDStats, "Hit roll"), %concat( " @", @idcolorcode( "HR"), "HR: @", @idcolorcode( "HR number"), %db( @IDStats, "Hit roll")"@w")), %if( %iskey( @IDStats, "Damage Roll"), %concat( " @", @idcolorcode( "DR"), "DR: @", @idcolorcode( "DR number"), %db( @IDStats, "Damage roll")"@w")))
  #IF (@IdentNum > 1) {#ADD IdentNum -1} {
  #VAR IdentNum 0
  #T- "IdentScriptTrigs"
  #GAGOFF
  }
  #IF (@IDRecNum=@IDRecMax) {IDRecNum=1} {#ADD IDRecNum 1}
  #ADDKEY IDRecs @numsort( @IDRecNum) {%trim( %concat( %if( @bidnum, %concat( "@", @idcolorcode( "Parentheses"), "(@", @idcolorcode( "Bid"), "Bid @", @idcolorcode( "Bid number"), @bidnum, "@", @idcolorcode( "Parentheses")") ")), $IdentStore, %if( $Resists, %concat( " @", @idcolorcode( "Resists"), "Resists: @", @idcolorcode( "Brackets"), "[", %trim( $Resists), "@", @idcolorcode( "Brackets"), "]@w")), %if( $TotalPoints, %concat( " @", @idcolorcode( "Parentheses"), "(@", @idcolorcode( "Points number"), $TotalPoints, "@", @idcolorcode( "Points"), " point", %if( $TotalPoints!=1, "s"), "@", @idcolorcode( "Parentheses"), ")@w"))))}
  #SEND "echo @MIDNum "@IDRecNum": "%trim( %concat( %if( @bidnum, %concat( "@", @idcolorcode( "Parentheses"), "(@", @idcolorcode( "Bid"), "Bid @", @idcolorcode( "Bid number"), @bidnum, "@", @idcolorcode( "Parentheses"), ") ")), $IdentString, %if( $Resists, %concat( " @", @idcolorcode( "Resists"), "Resists: @", @idcolorcode( "Brackets"), "[", %trim( $Resists), "@", @idcolorcode( "Brackets"), "]@w")), %if( $TotalPoints, %concat( " @", @idcolorcode( "Parentheses"), "(@", @idcolorcode( "Points number"), $TotalPoints, "@", @idcolorcode( "Points"), " point", %if( $TotalPoints!=1, "s"), "@", @idcolorcode( "Parentheses"), ")@w"))))
  #IF (@IDType="portal" && !%find( @IDName, Portal, Name)) {#SAY Portal not found!}
bidnum=%null
IDLevel=%null
IDName=%null
IDStats=%null
IDWear=%null
IDType=%null
IDResists=%null
StartGag=0
#GAGOFF]]></value>
          </trigger>
        </trigger>
        <trigger priority="10080" repeat="true" regex="true" copy="yes">
          <pattern>(?:(@ItemResists))\s+:\s+([-+0-9]+)</pattern>
          <value>#ADDKEY IDResists %1 %2</value>
        </trigger>
        <trigger name="NameTrigs" priority="9610" ansi="true" copy="yes">
          <pattern>%e[37m| %e[1;31mName%e[0;37m%s: (*)%s%e[37m|%e[0m</pattern>
          <value>#VAR IDName %trim( %quote( %colorsyntax( %subregex(%1,"@", "@@"))))</value>
          <trigger>
            <pattern>^~| Type%s: (*)%sLevel%s:%s(%d)%s~|$</pattern>
            <value>#VAR IDType %trim(%1)
#VAR IDLevel %trim(%2)</value>
          </trigger>
          <trigger regex="true">
            <pattern>^(?:\| Wearable\s+: (.*)\s+\||[+-]+)</pattern>
            <value>#VAR IDWear %trim(%subregex(%1,"hold,"))</value>
          </trigger>
        </trigger>
      </class>
      <trigger name="AucTrig" priority="9910" regex="true" copy="yes">
        <pattern>^\{chan ch=\w+\}\w+ is auctioning .* \(Level \d+, Num (\d+)\)\. Current bid is [0-9,].</pattern>
        <value>#GAGSPACE
bidnum=%1
#IF (@IdentNum) {#add IdentNum 1} {
  #T+ "IdentScriptTrigs"
  #ADD IdentNum 1
  }
bid @bidnum</value>
      </trigger>
      <trigger name="ResistsCommand" type="Command Input" priority="10110" copy="yes">
        <pattern>^resists (%w)$</pattern>
        <value>#NOINPUT
#SWITCH (%1="on") {resistson=1;#SAY "Resists will now be shown when you identify an item."} (%1="off") {resistson=0;#SAY "Resists will be ignored when you identify an item."} {#SAY "Please use on or off to toggle showing resists. Currently, showing resists is: "%if(@resistson, "on","off")}</value>
      </trigger>
      <trigger name="NoItemTrig" priority="10150" copy="yes">
        <pattern>^You do not have that item.</pattern>
        <value>#IF (@IdentNum) {#ADD IdentNum -1}</value>
      </trigger>
      <trigger name="BidsCommand" type="Command Input" priority="10190" copy="yes">
        <pattern>^bids (%w)$</pattern>
        <value>#NOINPUT
#SWITCH (%1="on") {
  #T+ "AucTrig"
  #SAY "Now identifying every item on auction."
  } (%1="off") {
  #T- "AucTrig"
  #SAY "Stopping the identification process on auction."
  } {#SAY "Please use on or off to toggle the identifying of auctions. Current setting is: "%if( %trigger( "AucTrig"), "on", "off")}</value>
      </trigger>
      <alias name="showid" copy="yes">
        <value>#SEND {%if( %-2, %-2, echo) %db( @IDRecs, %concat( %repeat( "0", (5-%len( %1))), %1))}</value>
      </alias>
      <alias name="setrecmax" copy="yes">
        <value>#VAR IDRecMax %1
#SAY {Setting max records to %1 and clearing current records.}
IDRecs=%null
IDRecNum=0</value>
      </alias>
      <alias name="IDList" copy="yes">
        <value>#LOCAL $Name
#SAY "Displaying records..."
#LOOPDB @IDRecs {
  #CALL %regex( %val, "Item: @w(.+)@YLvl", $Name)
    #MXP {ID %subregex( %key, "^[0]+"): @colsynansi( $Name)}
 
    }</value>
      </alias>
      <trigger name="ShowTypeCommand" type="Command Input" priority="10610" copy="yes">
        <pattern>^showtype (%w)</pattern>
        <value>#NOINPUT
#SWITCH (%1="on") {#SAY "Now adding Type to ID strings.";#VAR showtype 1} (%1="off") {#SAY "Removing Type from ID strings. Previously identified items will still retain the type.";#VAR showtype 0} {#SAY "Please use on or off to toggle the showing of Type in ID strings. Current setting is: "%if( @showtype, "on", "off")}</value>
      </trigger>
      <alias name="resetid" copy="yes">
        <value>#SAY "Resetting IdentNum to 0."
#RESET IdentNum
#T- "IdentTrigs"</value>
      </alias>
      <trigger type="Command Input" priority="44430" copy="yes">
        <pattern>^shortid (*)$</pattern>
        <value>shortid=%if(%1="on",1,0)
#SAY %if(@shortid,"Short IDs on.","Short IDs off.")
#NOINPUT</value>
      </trigger>
      <alias name="idhelp" copy="yes">
        <value><![CDATA[#SAY {Created by Charneus for CMUD}
#SAY {@padcent( "IdScript Commands", "79", "-")}
#SAY {%ansi(bold,green)togid%ansi(white) - Allows you to turn the script on or off at will.}
#SAY {%ansi(bold,green)id/c id <item>%ansi(white) - Identifies the item in question. You can use any length of the word 'identify' and it will work (i.e iden, c identi, etc.).}
#SAY {%ansi(bold,green)showid <#> <channel>%ansi(white) - Based off ID list, shows record number # to whatever channel you choose (i.e., showid 3 t charneus Look!, showid 1 barter My awesome item!)}
#SAY {%ansi(bold,green)setrecmax%ansi(white) - Sets the number of records you keep track of.}
#SAY {%ansi(bold,green)idlist%ansi(white) - Shows the last ## items you have identified, where ## is your setrecmax ##.}
#SAY {%ansi(bold,green)bids <on|off>%ansi(white) - Allows triggering of auctions to automatically 'bid' the auction number to get stats.}
#SAY {%ansi(bold,green)showtype <on|off>%ansi(white) - Allows toggling of to see type of the item in showid output or not.}
#SAY {%ansi(bold,green)shortid <on|off>%ansi(white) - Toggles between a shorter version of ID output and a longer version. Play around with it to see the slight difference.}
#SAY {%ansi(bold,green)resists <on|off>%ansi(white) - Allows toggling to see resists in showid output or not. (Will not affect the in game resists command)}
#SAY {%ansi(bold,green)resetid%ansi(white) - Use this in the event that the Identify Script mysteriously stops working.}
#SAY {%ansi(bold,green)idcolors%ansi(white) - Shows your current color scheme setup.}
#SAY {%ansi(bold,green)idcolorset ~"<stat>~" ~"<color>~"%ansi(white) - Changes the color using Aardwolf's scheme. %ansi(bold,red)MUST USE QUOTES!}
#SAY
#SAY {Any questions, feel free to drop me a tell or a note.}
#SAY {%repeat( "-", 79)}]]></value>
      </alias>
      <alias name="idcolorset" copy="yes">
        <value>#ADDKEY IDColorLists %1 %2</value>
        <arglist>$Rec, $Val</arglist>
      </alias>
      <alias name="idcolors" copy="yes">
        <value>#SAY {Your current color configuration:}
#SAY {%repeat( "-", 79)}
#LOOPDB @IDColorLists {#SAY {@padright( %if( %key="Item", "Item: (word)", %key), "21", " ")@padright( "-", "4", " ")currently set to @ansishowid( %key).}}
#SAY
  #SAY {To change a color, use: idcolorset ~"~" ~"~" (i.e., idcolorset ~"Total Stats~" ~"bgreen~")%cr}
  #SAY {Full output (resists on, showtype on) currently looks like this:}
  #SAY {%concat( @idoutput( "Parentheses", "("), @idoutput( "Bid", "Bid "), @idoutput( "Bid number", "99"), @idoutput( "Parentheses", ")"), " ", @idoutput( "Item", "Item: "), "some random item with color codes ", @idoutput( "Lvl", "Lvl: "), @idoutput( "Lvl number", "1 "), @idoutput( "Wearable", "torso "), @idoutput( "Type", "Type: "), @idoutput( "Type var", "Armor "), @idoutput( "Total Stats", "Total Stats: "), @idoutput( "Total Stats number", "2 "), @idoutput( "Brackets", "["), @idoutput( "Pos stat number", "3"), @idoutput( "Stat names", "Wis"), @idoutput( "Pos stat number", "3"), @idoutput( "Stat names", "Str"), @idoutput( "Brackets", "] ["), @idoutput( "Neg stat number", "-1"), @idoutput( "Stat names", "Dex"), @idoutput( "Neg stat number", "-1"), @idoutput( "Stat names", "Luc"), @idoutput( "Brackets", "] "), @idoutput( "HR", "HR: "), @idoutput( "HR number", "+5 "), @idoutput( "DR", "DR: "), @idoutput( "DR number", "+5 "), @idoutput( "Resists", "Resists: "), @idoutput( "Brackets", "["), @idoutput( "Resists pos number", "100"), @idoutput( "Resists name", "Water "), @idoutput( "Resists neg number", "-100"), @idoutput( "Resists name", "Air"), @idoutput( "Brackets", "] "), @idoutput( "Parentheses", "("), @idoutput( "Points number", "10 "), @idoutput( "Points", "points"), @idoutput( "Parentheses", ")"))}
  #SAY {%repeat( "-", 79)}</value>
      </alias>
    </class>
  </class>
</cmud>
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sun Jan 03, 2010 9:22 am   
 
Have you tried storing the string in a literal variable? I have similar data which I keep in literals and they work just fine.

EDIT: ALso, I read that type of data into db variables. That might be another way to go.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net