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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sat Jan 21, 2006 10:10 pm   

Item State Script Help
 
Okay synopsis.

I am writting a script to convert the following

Code:

<used as light>      an eye of a Kraken (new) (lit)
<worn on finger>     the ring of the dead (new)
<worn on finger>     a ring of wizardry (new)
<worn around neck>   (Invisible) a holy symbol of Gath (new)
<worn around neck>   (Invisible) a holy symbol of Dira (new)
<worn on body>       a set of overlord armor (new)
<worn on head>       the helm of brainpower (new)
<worn on legs>       frosted legplates (slightly worn)
<worn on feet>       the royal slippers (new)
<worn on hands>      a pair of white marble gauntlets (new)
<worn on arms>       the rainbow colored wings of a couatl (slightly worn)
<worn as shield>     a shield of storms (heavily worn)
<worn about body>    a wizard's cloak (new)
<worn about waist>   a time-ravaged belt (heavily worn)
<worn around wrist>  a tooth bracelet (new)
<worn around wrist>  (Invisible) a burlap sack full of kittens <miao> (worn)
<right hand>         the spear of the dead (used)
<left hand>          magical bagpipes (new)


To
Code:

You are using:
<used as light>      an eye of a Kraken (100%) (!0) {#SUBSTITUTE {(*100%)}}
<worn on finger>     the ring of the dead (100%)
<worn on finger>     a ring of wizardry (100%)
<worn around neck>   (Invisible) a holy symbol of Gath (100%)
<worn around neck>   (Invisible) a holy symbol of Dira (100%)
<worn on body>       a set of overlord armor (100%)
<worn on head>       the helm of brainpower (100%)
<worn on legs>       frosted legplates (80%)
<worn on feet>       the royal slippers (100%)
<worn on hands>      a pair of white marble gauntlets (100%)
<worn on arms>       the rainbow colored wings of a couatl (80%)
<worn as shield>     a shield of storms (60%)
<worn about body>    a wizard's cloak (100%)
<worn about waist>   a time-ravaged belt (60%)
<worn around wrist>  a tooth bracelet (100%)
<worn around wrist>  (Invisible) a burlap sack full of kittens <miao> (70%)
<right hand>         the spear of the dead (90%)
<left hand>          magical bagpipes (100%)


As you can see i have it all working but the LIGHT Its screwing up in the multistate and im not sure why

Heres the script
Code:

#CLASS {Displays|ItemStates}
#VAR Itemstate {damnew|used|slightly worn|worn|heavily worn|damaged|heavily damaged|falling apart|crumbling|destroyed|lights|perish|new|slightly_worn|heavily_worn|heavily_damaged|falling_apart|fresh|slightly_fresh|somewhat_spoiled|slightly_spoiled|spoiled|rotting|slightly_rotten|rotten|unlit|lit|fading|dim|very_dim|flickeringlightslit|unlit|fading|dim|very dim|flickeringperishfresh|slightly fresh|somewhat spoiled|slightly spoiled|spoiled|rotting|slightly rotten|rottennew%ansi( hi, cyan)100%used%ansi( green, hi)90%slightly_worn%ansi( green, hi)80%worn%ansi( green)70%heavily_worn%ansi( yellow)60%damaged%ansi( yellow, hi)50%heavily_damaged%ansi( yellow, hi)40%falling_apart%ansi( red)30%crumbling%ansi( red, hi)20%destroyed%ansi( red, hi)10%fresh%ansi( hi, cyan)*100%slightly_fresh%ansi( green)*85%somewhat_spoiled%ansi( red)*50%slightly_spoiled%ansi( yellow)*60%spoiled%ansi( hi, yellow)*40%rotting%ansi( red)*30%slightly_rotten%ansi( hi, red)*20%rotten%ansi( blink, hi, red)*10%unlit%ansi( green)unlitlit%ansi( white)*100%fading%ansi( yellow)*75%dim%ansi( red)*50%very_dim%ansi( hi, red)*35%flickering%ansi( blink, hi, red)*15%}
#TRIGGER "ItemDam" {~(({@ItemState.dam|@ItemState.perish})~)} {#IF (!%begins( %trigger, "Trigael:")) {#SUBSTITUTE {%ansi(default)~(@{ItemState.%replace( "%1", " ", "_")}%ansi(default)~)}}}
#COND {~(({@ItemState.lights})~)} {#SUBSTITUTE {%ansi(default)~(@{ItemState.%replace( "%1", " ", "_")}%ansi(default)~)}} {reparse}
#CLASS 0


Please help me get the light working properly.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Wed Jan 25, 2006 3:22 pm   
 
Nothing jumps out at me when I scan it.

Maybe try changing the second substitute to a #PSUB and see if that changes anything.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion 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