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
Einder
Novice


Joined: 03 Jan 2008
Posts: 48

PostPosted: Fri Dec 30, 2011 5:11 am   

ToDo List/Notepad
 
This script was created to be used as a todo list/notepad for Zmud. It has been fully tested and works perfectly in Zmud 7.21.

addnote <text>: adds your note
delnote #: deletes the note
complete #: marks the note as complete
prioritize #: colors the note red to mark it as a priority
todo: displays all notes

everything else runs in the background. Enjoy!

Code:
#CLASS {Notepad}
#ALIAS addnote {
  #ADDKEY Notepad %eval( %numkeys( @Notepad)+1) {%-1}
  #ECHO Note added.
  }
#ALIAS ToDo {
  #SHOW "#"":" Notes Text
  #LOOPDB @Notepad {#SHOW %key":" %val}
  }
#ALIAS sortnotes {
  #VAR temp ""
  #LOOPDB @Notepad {#ADDITEM temp {%concat( %key, "=", %val)}}
  #VAR temp %sort( @temp)
  #VAR Notepad ""
  #LOOP %numitems( @Temp) {#ADDKEY Notepad %i %word( %pop( Temp), 2, "=")}
  #UNVAR temp
  #GAG
  }
#ALIAS delnote {
  #LOOPDB @Notepad {
    #IF (%key = %1) {
      #ECHO Note Removed.
      #DELKEY Notepad %key
      }
    }
  sortnotes
  }
#ALIAS complete {
  #LOOPDB @Notepad {
    #IF (%key = %1) {
      #DELKEY Notepad %key
      #ADDKEY Notepad %key {%ansi( cyan)*Completed* %ansi( grey)%val}
      #ECHO Note Completed.
      }
    }
  sortnotes
  }
#ALIAS prioritize {
  #LOOPDB @Notepad {
    #IF (%key = %1) {
      #DELKEY Notepad %key
      #ADDKEY Notepad %key %ansi( red)%val
      #ECHO Note Prioritized.
      }
    }
  sortnotes
  }
#VAR notepad {}
#CLASS 0
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