Description

By DragonFlare on Apr 26, 2010

This is a Description script it allows users to set a description for themselves in a room i made it when i was bored.

on *:TEXT:*:#:{
  Tokenize 32 $Strip($1-)
  if ($1 == !SetDesc) {
    writeini -n desc. $+ $chan $+ .ini DESCRIPTIONS $nick Description For  < $+ $nick $+ > $2-
    msg $chan Description Set!.
    msg $chan Description for $nick set to $2-
    notice $nick Congratulations your description has been set
    notice ShadowWolf $nick set there Description to $2-
  }
  elseif ($1 == !ViewDesc) {
    if ($readini(desc. $+ $chan $+ .ini, DESCRIPTIONS, $2-) == $null) {     
      msg $chan There isnt a description set for $2- $nick $+ .
    }
    else { msg $chan $readini(desc. $+ $chan $+ .ini, DESCRIPTIONS, $2-)
    }
  }
  elseif ($1 == !MyDesc) {
    msg $chan $readini(desc. $+ $chan $+ .ini, DESCRIPTIONS, $nick)
  }
}

Comments

Sign in to comment.
napa182   -  Apr 26, 2010

i would go with hash on this. this snippet reminds me of MichaelA's Description Script. I had done a rewrite of his using hash it may help if you want to go over to hash.

 Respond  
WorldDMT   -  Apr 26, 2010
elseif ($1 == !ViewDesc) {
    if ($readini(desc. $+ $chan $+ .ini, DESCRIPTIONS, $2-) == $null) {

$2- is only $2 bcz you'r checking the nick

== $null is useless u can replace it by adding "!" befor the identifer

 if !$readini(desc. $+ # $+ .ini,DESCRIPTIONS,$2) {

about !MyDesc if no data for this one that will return nothing?

metel ma men2oul ma tlabek 7alak :p

so take it easy man :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.