Can you experienced scripters point me towards where I should head to increase my scripting level? I'm not feeling content where I currently am, and it's the reason why I've stopped scripting for such a long time.

I still retain most of my ideas and most of my knowledge I had prior to my break. With this in mind I decided to re-create one of my old Quote aliases.
Here's what I made:
Code:
on *:text:!*:#: {
  var %alias $mid($1,2) 
  if ($isalias(%alias)) %alias $nick $chan $2-
  /*
  Standard for all aliases
  var %nick $1
  var %chan $2 
  tokenize 32 $3-
  ---
  if (%!error) halt
  :error 
  msg %chan %error
  halt
  */ 
}

alias quote { 
  var %file quotes.ini
  var %nick $1
  var %chan $2 
  tokenize 32 $remove($3-,$chr(35))
  var %items $ini(%file,%chan,0) 
  if ($1 == add) { 
    if (!$2) { var %error Can't add quotes without text. | goto error }
    inc %items 
    var %quote $2-
    writeini %file %chan %items %quote
    msg %chan Added quote $+($chr(35),%items) :: %quote
  }
  elseif ($1 == del) { 
    var %item $2
    if (!%item) { var %error Can't delete unspecified quote | goto error }
    elseif ((%item !isnum) || (%item > %items)) { var %error Can't find quote $+($chr(35),%item) | goto error }
    writeini %file %chan %item DELETED
  }
  elseif ($1 == edit) { 
    var %item $2
    if (!%item) { var %error Can't edit unspecified quote | goto error }
    elseif ((%item !isnum) || (%item > %items)) { var %error Can't find quote $+($chr(35),%item) | goto error }
    var %quote $3-
    writeini %file %chan %item %quote
    msg %chan Edited quote $+($chr(35),%item) :: %quote
  }
  else { 
    if (!$1) {
      var %i 1
      while ($true) {
        var %item $rand(1,%items)
        var %quote $readini(%file,%chan,%item)
        if (%quote != DELETED) break
        if (%i >= 10) { var %error Tried 10 times, couldn't find a suitable quote. | goto error }
        inc %i
      }
      msg %chan $+($chr(35),%item) :: %quote
    }
    elseif ($1 isnum) { 
      var %item $1
      if (%item > %items) { var %error Can't find quote $+($chr(35),%item) | goto error }
      var %quote $readini(%file,%chan,%item)
      msg %chan $+($chr(35),%item) :: %quote
    }
    else { 
      var %item 1 
      while (%item <= %items) {
        var %quote $readini(%file,%chan,%item)
        if ($1- isin %quote) { 
          msg %chan $+($chr(35),%item) :: %quote
        }
        inc %item
      }
    }
  }
  if (%!error) halt
  :error 
  msg %chan %error
  halt
}
Since I have the inis set already, should I re-design the code to use hashtables and save/load dynamically? Can someone point me towards the right direction, thank you.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net