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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
jessew
Apprentice


Joined: 03 Mar 2003
Posts: 141

PostPosted: Thu Dec 09, 2004 7:43 pm   

Medievia - DayChecker - Reports on item condition
 
EDIT: No IDEA how i screwed up the forum :P deal :)
DayChecker v1.0
To Install:Save to file and place it in your root zmud directory do NOT use import script from the file menu
One note on this script I've tested it and it seems to work fine but I'm sure there's something I forgot(There always is) so don't let your items live or die by this script.


Code:
;;DayChecker v1.0 Caebryn of Medievia
#DELCLASS "DayChecker"
#IF (@CaebUtils_Version < 1.1) {
    #MESSAGE DayChecker Requires CaebUtils script to be installed first.
    #ABORT 1
}
#CLASS "DayChecker"

     #VAR DayChecker_Version 1.0

     #ALIAS dccheck {
        #T+ "DayTrig"
        #T+ "DayShowTrig"
        #T+ "DayTimer"
        #VAR dcloc "" "" "DayChecker"
        #VAR dcegg "" "" "DayChecker"
        #VAR dcday "" "" "DayChecker"
        #IF (%1) {
            #SEND {%-1}
        } {
            #SEND {app all worn}
        }
     }

;;Hook script up to themer
    #ALIAS dccolor {cthchange %1 %2 dc_theme1 dc_theme dctheme "DayChecker"}
    #ALIAS dctheme {cthshow "Caebryn's Daychecker" dc_theme1 dc_example dc_explain dccolor}
    #VAR dc_theme1 {11|12|3|6|10|2|12|4}
    #VAR dc_theme  {@CC(bold,cyan)|@CC(bold,red)|@CC(cyan)|@CC(yellow)|@CC(bold,green)|@CC(green)|@CC(bold,red)|@CC(red)}
    #VAR dc_explain {"Display Titles|Column Headers|Display Seperators|Item Names|Days > 75|Days 50-75|Days 25-50|Days < 25"}
    #FUN dc_example {%concat(@dc_exampletitle,@dc_exampleseper,@dc_exampleline1,@dc_exampleline2,@dc_exampleline3,@dc_exampleline4,@dc_exampleseper)}
    #FUN dc_exampletitle {%concat(@dc_theme.1,"Day Checker                              ",@dc_theme.2,"Days     Eggings",%crlf)}
    #FUN dc_exampleseper {%concat(@dc_theme.3,"---------------------------------------------------------",%crlf)}
    #FUN dc_exampleline1 {%concat(@dc_theme.4,"a glass bracelet filled with swirling pi    ",@dc_theme.8,"22",@CC(bold,green),"     BRIGHT",%crlf)}
    #FUN dc_exampleline2 {%concat(@dc_theme.4,"the diamond orb of Tyche                    ",@dc_theme.7,"33",@CC(bold,green),"      FAINT",%crlf)}
    #FUN dc_exampleline3 {%concat(@dc_theme.4,"the soft white boots of the Mad Archer      ",@dc_theme.6,"60",@CC(bold,green),"     BRIGHT",%crlf)}
    #FUN dc_exampleline4 {%concat(@dc_theme.4,"the silver arm of Ergoth                    ",@dc_theme.5,"98",@CC(bold,green),"    UNEGGED",%crlf)}

;;Variables
    #VAR dc_eggings "flk grn|br grn|black|fnt grn"
    #VAR dc_eggcolor "@CC(bold,black)FLICKERING|@CC(bold,green)BRIGHT|@CC(bold,black)BLACK|@CC(green)FAINT"
    #FUN dcf_egg {%item(@dc_eggcolor,%ismember(%1,@dc_eggings))}

;;Main Triggers
     #TRIGGER "DayTrig" {(?:~<.*~>\s+)?(.{1,}) - Lev.*Cond\((?:.*?) -(?: Egged - (.*) -)? (.*) Days\)} {
        #VAR dcloc %additem(%left(%trim(%1),40),@dcloc) "" "DayChecker"
        #VAR dcegg %additem(%if(%2,@dcf_egg(%2),@CC(bold,white)UNEGGED),@dcegg) "" "DayChecker"
        #VAR dcday %additem(%if(%isnumber(%3),%if(%eval(%3/25) > 3,@dc_theme.5,%case(%eval((%3/25)+1),@dc_theme.8,@dc_theme.7,@dc_theme.6,@dc_theme.5))%3,@CC(bold,cyan)INF),@dcday) "" "DayChecker"
     } "" {regex|disable}

     #TRIGGER "DayShowTrig" {Lev~(%d~)} {#T- "DayTimer"} "" {disable}
     #COND {$} {dcshow}

     #ALARM "DayTimer" 10 {dc_shutdown} "" {disable}
;;Script Commands
     #ALIAS dc_shutdown {
        cmsg "DayChecker" "Daycheck waited 10 seconds and couldn't find any items to check. Type dchelp If your having trouble." "dchelp"
        #T- "DayTrig"
        #T- "DayShowTrig"
        #T- "DayTimer"
     }
     #ALIAS dcshow {
        #T- "DayTrig"
        #T- "DayShowTrig"
        #VAR dctemp {%concat(%format("&s&-41s&s&-5s&11s",@dc_theme.1,"Day Checker",@dc_theme.2,"Days","Eggings"),%crlf)} "" "DayChecker"
        #VAR dctemp {%concat(@dctemp,@dc_theme.3,%repeat("-",57),%crlf)}
        #LOOP 1,%numitems(@dcloc) {
            #VAR dctemp %concat(@dctemp,@dc_theme.4,%item(@dcloc,%i),%repeat(" ",%eval(41 - %len(%stripansi(%item(@dcloc,%i))))),%repeat(" ",%eval(5 - %len(%stripansi(%item(@dcday,%i))))),%item(@dcday,%i),%repeat(" ",%eval(11 - %len(%stripansi(%item(@dcegg,%i))))),%item(@dcegg,%i),%crlf) "" "DayChecker"
        }
        #VAR dctemp {%concat(@dctemp,@dc_theme.3,%repeat("-",57),%crlf)}
        #SHOW %replace(@dctemp)
     }
#CLASS 0

#T- "DayTrig"
#T- "DayShowTrig"

#CLASS "DayChecker|Help"
    #ALIAS dchelp {
        #SHOW @dchelpmsg
    }
    #ALIAS dchelpcreate {
        #VAR dchelpmsg @hhtitle(%concat("DayChecker v",@DayChecker_Version," Help file")) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhline) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhentry(dchelp,"-","Show this help file.")) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhentry(dccheck,"-","Will day check items worn.")) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhentry("dccheck (cmd)","-","Will run (cmd) and check those items.")) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhentry("",""," e.g. dccheck app all locker")) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhentry("dcshow","-","Show check report from last DayCheck.")) _nodef "DayChecker|Help"
        #VAR dchelpmsg %concat(@dchelpmsg,@hhline) _nodef "DayChecker|Help"
    }   
#CLASS 0
dchelpcreate
#IF (!%yesno("Would you like to add a submenu to your speedmenu for this script?")) {
    cmsg "DayChecker" "Not installing menu please type dchelp to see commands." "dchelp"
    #ABORT 1
}

#CLASS "DayChecker|Menu"

    #MENU {Caebryn's Day Checker} {} "" "DayCheckerSubMenu"

#CLASS 0

#CLASS "DayChecker|Menu|DayCheckerSubMenu" menu

    #MENU {HelpFile} {dchelp}
    #MENU {DayCheck Items Worn} {dccheck app all worn}
    #MENU {DayCheck Locker Items} {dccheck page -none app all locker}
    #MENU {DayCheck Inventory Items} {dccheck page -none app all}

#CLASS 0

_________________
I love deadlines. I like the whooshing sound they make as they fly by.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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