Library Script

Do you have script in mind but no ability to make it, type in what it should do, and you might be lucky.

Library Script

Postby StareX » Sun Mar 01, 2009 12:06 pm

Ehh... i dont know really how to code it but..
i can have a script called library script... :S

I was had until i got format.. :(

library script with commands:

!cmdhelp
!cmdadd
!cmddel

and etc...

and it message:

<Nick> ?? test
<Bot> Nick: (Test) - Testing
_

<Nick> ?? test > Nick42
<Bot> Nick42: (Test) - Testing
_

<Nick> !cmdadd Test Testing
-Bot- Successful added.
_

<Nick> !cmdhelp
<Bot> Usage: !cmdadd, !cmddel, !cmdhelp, ?? command
_

<Nick> !cmddel Test
<Bot> Successful deleted.
_

kind of this :S
I was has this but i don't remember where it was :(

Can i get one? :S
Please..

Thanks,
StareX. :roll:
StareX
 

Re: Library Script

Postby Cristian » Sun Mar 01, 2009 12:34 pm

This seems to fill your request http://cell.cubicle.fi/scripts/?#faq
Cristian
proof of advance
proof of advance
 
Posts: 282
Joined: Sun Nov 04, 2007 3:02 pm
Location: Denmark
Authnick: Sumsar

Re: Library Script

Postby Blady » Tue May 12, 2009 6:06 pm

You wanted it in MSL or TCL ?
Blady
 

Re: Library Script

Postby zNigel- » Tue May 12, 2009 6:26 pm

Probably MSL, since its in the MSL section :)
zNigel-
 

Re: Library Script

Postby Blady » Tue May 12, 2009 6:44 pm

Was just wondering because of Sumsar's link.
if you want something like that in MSL, try this :

Code: Select all
; ###############
; Dictionary by Blady @ Quakenet
;
; Commands:
; !dic <on,off,add,del> [label] [text]
;
; Then use ?? label [nick]
; ###############
on *:text:*:#your_channel: {
  if ($1 == !dic) {
    if ($2 == on) || ($2 == off) {
      if (%distat == $2) {
        notice $nick Dictionary is already %distat
      }
      else {
        set %distat $2
        notice $nick Dictionary is now %distat
      }
    }
    elseif ($2 == add) {
      if ($0 >= 4) {
        if (!$read(dictionary.db,s,$3)) {
          write dictionary.db $3 $4-
          notice $nick Done.
        }
        else {
          notice $nick There is already a lable called $qt($3) $+ .
        }
      }
      else {
        notice $nick $1 add <lable> <text>
      }
    }
    elseif ($2 == del) {
      if ($0 >= 3) {
        if ($read(dictionary.db,s,$3)) {
          write -dl $+ $readn dictionary.db
          notice $nick Done. Erased label $qt($3) $+ .
        }
        else {
          notice $nick There is no such label.
        }
      }
      else {
        notice $nick $1 del <lable>
      }
    }
  }
  elseif ($1 == ??) && ($0 >= 2) && (%distat == on) && (!%dic.flood) {
    set -u2 %dic.flood 1

    var %2 = $2

    var %line $read(dictionary.db,nr,$+(/^\Q,$replacecs(%2,\E,\E\\E\Q),\E(?: |$)/i))
    if (!%line) { var %line $read(dictionary.db,nr,$+(/^\S*\Q,$replacecs(%2,\E,\E\\E\Q),\E/i)) }
    if (!%line) { var %line $read(dictionary.db,nw,$+(*,%2,*)) }
    if (%line) msg $chan $iif($3 ison $chan,$3 $+ :) ( $+ $gettok(%line,1,32) $+ ) $gettok(%line,2-,32)
    else msg $chan Sorry, no help available for $+(,$2,,.)

  }
}


Have fun
Blady
 

Re: Library Script

Postby skylord » Tue Nov 24, 2009 11:25 am

Code: Select all
; Definition script by teppuli
; Redistribution STRICTLY PROHIBITED!
on 9:text:!cmdadd *:#:{
  if (!$3) { notice $nick Usage: $1 <command> <text> | halt }
  writeini learnlist.ini $chan $2 $3-
  notice $nick Done
}
on 9:text:!cmdhelp:#:{
  notice $nick Usage: !cmdhelp / !cmdadd <command> <text> / !cmddel <commands> / !cmdlist / ?? <command>
}
on 9:text:!cmddel *:#:{
  if (!$2) { notice $nick Usage: $1 <command> | halt }
  remini learnlist.ini $chan $2
  notice $nick Done
}
on 9:text:!cmdlist:#:{
  notice $nick List:
  var %i = 1
  while (%i <= $ini(learnlist.ini,$chan,0)) {
    notice $nick Word: $ini(learnlist.ini,$chan,%i)
    inc %i
  }
  notice $nick End of list
}
on *:text:$($chr(63) $+ $chr(63) *):#:{
  if ($1 != $chr(63) $+ $chr(63)) { halt }
 
  if (!$readini(learnlist.ini,$chan,$2)) { msg $chan $nick $+ : Definition for word $+(",$2,") not found | halt }
  if ($3 == $chr(62)) {
    if (!$4) {  msg $chan $nick $+ : ( $+ $2 $+ ) $readini(learnlist.ini,$chan,$2)  | halt }
    msg $chan $4 $+ : ( $+ $2 $+ ) - $readini(learnlist.ini,$chan,$2)
    halt
 
  }
  msg $chan $nick $+ : ( $+ $2 $+ ) - $readini(learnlist.ini,$chan,$2)
}
 
skylord
 


Return to Mirc Scripting Request

Who is online

Users browsing this forum: No registered users and 1 guest

cron