Author Topic: Quote System (DropLogs)  (Read 284 times)

Jane

  • Management
  • Full
  • *******
  • Posts: 130
  • Reputation +1/-0
  • mIRC Scripters
    • View Profile
Quote System (DropLogs)
« 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))
  }
}

Share on Bluesky Share on Facebook


morbid

  • Trial Moderator
  • Junior
  • ***
  • Posts: 61
  • Reputation +0/-0
  • I own you
  • Location: I'm probably standing right behind you.
    • View Profile
Re: Quote System (DropLogs)
« Reply #1 on: February 22, 2011, 08:11:05 pm »
Tested, Works great.
Only thing I think Quote System's should go into bots.

Jane

  • Management
  • Full
  • *******
  • Posts: 130
  • Reputation +1/-0
  • mIRC Scripters
    • View Profile
Re: Quote System (DropLogs)
« Reply #2 on: February 23, 2011, 09:59:18 am »
Thanks, Have fun. ^^