mIRC Home    About    Download    Register    News    Help

Topic Options
#150114 - 28/05/06 06:22 PM Making a script.Need ideas and help
wormer Offline
Nutrimatic drinks dispenser

Registered: 28/05/06
Posts: 5
Hello

First off all, i want to say, that im total noob to mirc scripting, but i really need help in making the script.

The thing i need...
I idle in one chan, where new things are announced.
Example:

(07:11) · @BoT · >> (XXX) << [After School Vol 4 2006 JAV Uncensored DVDR FiL3] [FiL3]
(07:10) · @iBoT · >> (NUKE) << [T._Love-Stokrotka-DVDRiP-XviD-PL-1998-mV4U] [mV4U] [dupe.B2R.2006-03-16]

And etc. What i want is, to be able to gather this info, what bot announces lets say to txt file, or mysql database, but better prefer txt file and then be able to announce from txt file to another network, to some channel. So the idea of this, that on other network, people could lets say write !pre After School Vol 4 2006 JAV Uncensored DVDR FiL3 and bot would check the time this movie was added to txt file and shout to chan like this:

(02:12) · USER · !pre After School Vol 4 2006 JAV Uncensored DVDR FiL3
(02:12) · @BoT· [-PRETiME-] >> (XXX) << [After School Vol 4 2006 JAV Uncensored DVDR FiL3] [2w 5h 2m 44s] [13.05.2006]

I know that this is dificult, but i hope someone has some free time to help me smile Also i could bare with just announce script. I mean that sitting in channel, where stuff is announced, i can reannounce it to another networks channel. THen noone will be able to check for pretime, but it would be enough for me, to only reannounce.

So someone give some ideas, because i was trying to do everything by myself, but since im noob, i couldnt do anything. I managed only reannounce to another channel but in same network and script didnt work fine. It reannounced many times one release.

If someone want to help, please write here, or maybe i could conatct through irc network.

I really need this thing badly smile i dont know how to do it alone and where to get help, so stoped here.

Thanks

Top
#150115 - 28/05/06 06:34 PM Re: Making a script.Need ideas and help
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
did you try using the forum's search feature?

I found this example by hixxy, there are several examples (they all will need your tweaking them to have them do just what you want)


Code:
on *:TEXT:*:#channel:{
  if ($cid == 1) {
    scid 2 
    msg #channel_2 &lt; $nick &gt; $1-
  }
}


To do your own text try this:

Code:

on *:input:#channel:{
  if ((!$istok(/ $readini($mircini,text,commandchar),$left($1,1),32)) || ($ctrlenter)) &amp;&amp; ($cid == 1) {
    scid 2
    msg #channel_2 &lt; $me &gt; $1-
  }
}

Top
#150116 - 28/05/06 06:43 PM Re: Making a script.Need ideas and help
wormer Offline
Nutrimatic drinks dispenser

Registered: 28/05/06
Posts: 5
I tried this code
Code:
 ON 1:TEXT:*:#CHAN_ECHO'S_FROM:{
  if (PRETIME isin $1-) || (French isin $1-) || (SWEDiSH isin $1-) || (DANiSH isin $1-) || (German isin $1-) || (DUTCH isin $1-) || (.KOR. isin $1-) || (.iTALiAN. isin $1-) || (.SATRip. isin $1-) || (.PL. isin $1-) || (.*-pre*. isin $1-) {
    set %echo.say OFF
  }
  if (DVD-R isin $1-) &amp;&amp; (%echo.say == ON) { /msg #CHAN_ECHO'S_TO $1- }
  if (SVCD isin $1-) &amp;&amp; (%echo.say == ON) { /msg #CHAN_ECHO'S_TO $1- }
  if (VCD isin $1-) &amp;&amp; (%echo.say == ON) { /msg #CHAN_ECHO'S_TO $1- }
  if (XviD isin $1-) &amp;&amp; (%echo.say == ON) { /msg #CHAN_ECHO'S_TO $1- }
  if (XBoX isin $1-) &amp;&amp; (%echo.say == ON) { /msg #CHAN_ECHO'S_TO $1- }
  if (Games isin $1-) &amp;&amp; (%echo.say == ON) { /msg #CHAN_ECHO'S_TO $1- }

  set %echo.say ON
} 


But it didnt worked, because it reannounced not one time the release, but sometimes two, sometimes four times. So the reannounce didnt worked good, since the bot who announces first, announces only one time, but my reannounce bot somehow repeats it few times. Sometimes as it should one.

Top
#150117 - 28/05/06 09:12 PM Re: Making a script.Need ideas and help
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
here is a possible solution
you will need to fine tune the
Code:
on *:text:!pre *:#CHANNEL: {
  if ($network == NETWORK) &amp;&amp; ($chan == #CHANNEL) {
    var %text = $read(FILENAME,W,$+(*,$2-,*))
    var %i = 1
    var %netcnt = $scon(0)
    while (%i &lt;= %netcnt) {
      if ($scon(%i).network == DESTINATION-NET) { 
        scon $scon(%i) 
        msg #DESTINATION-CHAN $($+(%,text),2)
      }
      inc %i
    }
  }
}

Top
#150118 - 28/05/06 09:18 PM Re: Making a script.Need ideas and help
DaveC Offline
Planetary brain

Registered: 26/09/03
Posts: 4230
This wasnt anything like what u asked for, it doesnt deal with multiple servers, and has no text file, or user request.

Anyway this is a working one
Code:
ON *:TEXT:*:#CHAN_ECHO'S_FROM:{
  if ((PRETIME isin $1-) || (French isin $1-) || (SWEDiSH isin $1-) || (DANiSH isin $1-) || (German isin $1-) || (DUTCH isin $1-) || (.KOR. isin $1-) || (.iTALiAN. isin $1-) || (.SATRip. isin $1-) || (.PL. isin $1-) || (.*-pre*. isin $1-)) { return }
  if ((DVD-R isin $1-) || (SVCD isin $1-) || (VCD isin $1-) || (XviD isin $1-) || (XBoX isin $1-) || (Games isin $1-)) { msg #CHAN_ECHO'S_TO $1- }
}



Note: is .*-pre*. ment to find JUST that , or is it ment to be a wildcard match to lets say .blah-pre-fred. ?
If it is a wild card match then change the first line to (you might get some false matches tho!)
if ((PRETIME isin $1-) || (French isin $1-) || (SWEDiSH isin $1-) || (DANiSH isin $1-) || (German isin $1-) || (DUTCH isin $1-) || (.KOR. isin $1-) || (.iTALiAN. isin $1-) || (.SATRip. isin $1-) || (.PL. isin $1-) || (*.*-pre*.* iswm $1-)) { return }

Top
#150119 - 28/05/06 09:33 PM Re: Making a script.Need ideas and help
wormer Offline
Nutrimatic drinks dispenser

Registered: 28/05/06
Posts: 5
Thanks MIkechat for trying to help smile but im a little bit confused

As i understand, when someone says !pre smth, it searched in FILENAME and shouts to channel. But i need a code, that when a bot announces, i could collect that data automaticaly and save to that FILENAME and when if someone want to check when this file was pre'd, he will write !pre smth.


EDIT: DaveC

if ((PRETIME isin $1-) || (French isin $1-) || (SWEDiSH isin $1-) || (DANiSH isin $1-) || (German isin $1-) || (DUTCH isin $1-) || (.KOR. isin $1-) || (.iTALiAN. isin $1-) || (.SATRip. isin $1-) || (.PL. isin $1-) || (.*-pre*. isin $1-))

This line supposed to be taken off, it meant not to be reannounced.
I only need the script to be able to take from channel announces only with DVD-R SVCD VCD XviD XBoX Games MP3 TV DOX

Thats it smile and about *-pre* its also should be taken off. Because if someone in chan searches for release, he writes !pre release name and when script will reannounce his request to my channel, so i dont want this to happen smile


Edited by wormer (28/05/06 09:49 PM)

Top
#150120 - 28/05/06 09:56 PM Re: Making a script.Need ideas and help
MikeChat Offline
Hoopy frood

Registered: 12/12/02
Posts: 1245
Loc: California, doooood
looks to me you want two different scripts
1) echo bot on server A Channel A to server B channel B

2) allow searching in bots file of saved data for titles/words/something
which means you will be in channel with the bot to make the request

is that a better description of what you really want? if not please be more specific in your request for HELP with the script YOU are writing

Top
#150121 - 28/05/06 10:15 PM Re: Making a script.Need ideas and help
wormer Offline
Nutrimatic drinks dispenser

Registered: 28/05/06
Posts: 5
k, i will try to be more specific.

Now im sitting in efnet server in channel, where is a bot, who announces stuff. What i want is, when this bot announces example:

(00:00) · @BoT · >> (XViD) << [Nelly Furtado Maneater (live totp uk 28 05 06) XviD 2006 LCF] [LCF] i want that his announces were automaticaly added to txt file. I want that txt file consisted the time this bot announced this release, in what category(from example its XViD), what the release name. So lets say all stuff, this bot announces is added to txt file, so other people, who hangs in another network, and another chan, could just write !pre *release name* and when script searched for certain name and looks if such name/release is on txt file added. IF he finds the release with same name, he shouts at another networks channel where user said !pre *smth*
example:
(11:52) · user · !pre Top.Gear.S08E01.WS.PDTV.XviD-RiVER
(11:52) · @me/bot · [-PRETiME-] >> (TV) << [Top.Gear.S08E01.WS.PDTV.XviD-RiVER] [ released 10m 6s ago] [28.05.2006]

Its some kind of database, which holds all announces from certain bot.

So lets say i need to things. One, that the bot which announce stuff, would be added to txt file, so the users on other network could search for releases and see when certain release was release. Another thing, that when bot announces new release, i could imediately reannounce it to that another network that people could get info. So the idea of all this, that people through me could be able see releases announced in different network and channel where im idling. I want that they would be able see everything what certain bot announces in different network and everything woul be going through my nick. I mean all announces and searching in txt file for release.

I have no idea how to tell the situation more specific confused

Top
#150122 - 29/05/06 05:56 PM Re: Making a script.Need ideas and help
wormer Offline
Nutrimatic drinks dispenser

Registered: 28/05/06
Posts: 5
So nobody have any suggestions with adding releases to db(txt file)?


Edited by wormer (29/05/06 05:57 PM)

Top