Top

Learn & Regurgitate Bot


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jun 21, 2009
Last Updated  Jun 22, 2009
Tags  44  bot  chan  channel  com  connect  dll  file  ini  irc  jonesy  jonesy44  lean  list  mirc  msg  regurgitate  remove  say  script  token 

Introduction

What is this?
Another, but working, simple (!)learn and (!)say bot. This was made by request for a friend of mine.

Commands
As a user:-
[!@`]say <topic> - returns topic's data
[!@`]learn <topic> <data> - adds topic & data to bot
As the bot:-
/remsay - remove a "say" topic
/saylist [-o] - echo say list location, -o switch opens the file

Grab the Code

; say/learn bot
; by jonesy44
; /remsay - remove a say
; /saylist [-o] - echo say list location, -o switch opens the file.
 
on $*:text:/^[!`@](say|learn)\s?(.*)$/Si:#: {
  var %key = $gettok($regml(2),1,32), %dt = $gettok($regml(2),2-,32)
  if $regml(1) == say {
    if (!%key) { var %y = $r(1,$lines(say.dat)) | msg # $+(,%y,/,$lines(say.dat),) $+(,$gettok($read(say.dat,%y),1,32),) - $gettok($read(say.dat,%y),2-,32) }
    elseif ($read(say.dat,s,%key)) msg # $+(,%key,) - $v1
    else msg # Nothing saved for $+(,%key,)
  }
  elseif $regml(1) == learn {
    if (!$read(say.dat,s,%key)) { write say.dat %key %dt | msg # Data for $+(,%key,) has been saved as $qt(%dt) }
    else msg # Data for $+(,%key,) already exists
  }
}
alias remsay {
  var %r = $$input(Data topic to be removed,eq,Remove Say Data)
  if ($read(say.dat,s,%r)) { write $+(-ds,%r) say.dat | noop $input(Data removed,oi,Remove Say Data) }
  else noop $input(No data found for $qt(%r),wo,Remove Say Data)
}
alias saylist $iif($1 == -o,run,echo -a) $+($mircdir,say.dat)

Comments

  (5)  RSS
jonesy44
Comments: 1,856
 
mIRC Snippet:  Learn & Regurgitate Bot
Posted on Jun 22, 2009 5:53 pm
Updated - Hawkee stripped the backslashed for some reason.
PATX
Comments: 389
 
mIRC Snippet:  Learn & Regurgitate Bot
Posted on Jun 22, 2009 7:03 pm
meh... i have my own version of this... but its still good 5.4/10
^Neptune
Comments: 599
 
mIRC Snippet:  Learn & Regurgitate Bot
Posted on Jun 23, 2009 4:51 am
* Neptune barfs.
jonesy44
Comments: 1,856
 
mIRC Snippet:  Learn & Regurgitate Bot
Posted on Jun 23, 2009 8:00 am
Most people do have these lol. But based on the coding? You'd say it's good?
PATX
Comments: 389
 
mIRC Snippet:  Learn & Regurgitate Bot
Posted on Jun 23, 2009 8:23 am
Yes. I like the point and the coding is pretty nice. :) Good job!

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom