Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Jane
« on: February 23, 2011, 09:59:18 am »

Thanks, Have fun. ^^
Posted by: morbid
« on: February 22, 2011, 08:11:05 pm »

Tested, Works great.
Only thing I think Quote System's should go into bots.
Posted by: Jane
« on: February 22, 2011, 06:24:12 pm »

!droplogs [add <item> | del <item> | clear]

!droplogs alone will display your drop logs

Made as a request from a friend, enjoy

**NOTE** This script is remote, not a personal command. (For Bots)


Code: [Select]
on $*:TEXT:/^[!@.](droplogs)/:#: {
  var %pre $iif($left($1,1) == @, msg $chan, notice $nick)
  if ($2 == add && $3 != $null) {
    writeini droplogs.ini $nick $replace($3-,$chr(32),_) $calc($readini(droplogs.ini,$nick,$replace($3-,$chr(32),_)) + 1)
    %pre [Drop Logs]: $3- added to your drop logs. You now have $readini(droplogs.ini,$nick,$replace($3-,$chr(32),_)) $3- $+ .
    halt
  }
  if ($2 == del && $ini(droplogs.ini,$nick,$replace($3-,$chr(32),_))) {
    remini droplogs.ini $nick $replace($3-,$chr(32),_)
    %pre [Drop Logs]: $3- removed from your drop logs.
    halt
  }
  if ($2 == clear && $ini(droplogs.ini,$nick)) {
    remini droplogs.ini $nick
    %pre [Drop Logs]: Your drop logs have been cleared.
    halt
  }
  if (!$ini(droplogs.ini,$nick)) { %pre [Drop Logs]: You don't have any logs. Try using !droplogs [add <item> $chr(124) del <item> $chr(124) clear] | halt }
  else {
    var %looptot $ini(droplogs.ini,$nick,0)
    var %looptemp 1
    var %string
    while (%looptemp <= %looptot) {
      %string = $addtok(%string,$replace($ini(droplogs.ini,$nick,%looptemp),_,$chr(32)) $+ ( $+ $readini(droplogs.ini,$nick,$ini(droplogs.ini,$nick,%looptemp)) $+ ) $chr(124),32)
      inc %looptemp 1
    }
    %pre [Drop Logs]: $remove(%string,$right(%string,2))
  }
}