mIRC Home    About    Download    Register    News    Help

Topic Options
#127676 - 15/08/05 11:25 PM Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
Hello i was wondering if anyone can help me with two things

1. i need to make a auto kick script after ever 45 seconds on a triger like
on *:TEXT:!annoy*:#: {
and then ill have it write to a ini to keep the nick in there and keep doing it untill i triger it to stop with
on *:TEXT:!unannoy*:#:{
and have it delete the name from the ini i basicly only need help with the kick part after 45 seconds

and

2. i need to know how to have a triger display a whole text file (not just a line) in a .notice

Thanks for any help you can give me

Top
#127677 - 16/08/05 12:10 AM Re: Help
SladeKraven Offline
Planetary brain

Registered: 19/12/02
Posts: 3547
Loc: Kent, England
Maybe something like..

Code:
On @*:Join:#Channel: {
  if ($hfind(akick,$nick)) kick $chan $v1 Auto Kicked.
}

On @*:Text:!annoy:#Channel: {
  var %x = 1
  while (%x <= $hget(akick,0).item) {
    .timer 1 %x msg $chan $hget(akick,%x).item
    inc %x
  }
}

On @*:Text:!annoy &:#Channel: {
  hadd -zm akick $2 45
  if ($2 ison $chan) kick $chan $2 Auto Kicked.
}

On @*:Text:!unannoy &:#Channel: {
  if ($hfind(akick,$2)) hdel akick $2
}


*Untested*

-Andy

Top
#127678 - 16/08/05 12:33 AM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
thanks andy for the help

it doesnt fully work it kicks when triggered but dosnt kick after 45 seconds.

Top
#127679 - 16/08/05 01:07 AM Re: Help
stefys99 Offline
Vogon poet

Registered: 11/08/05
Posts: 128
You can edit that yourself, don't be lazy.

Top
#127680 - 16/08/05 01:18 AM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
if i knew anything about this stuff i wouldnt have asked thank you

i still need help though smirk


Edited by confuzzed (16/08/05 03:18 AM)

Top
#127681 - 16/08/05 03:10 AM Re: Help
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
Quote:
if i knew anything about this stuff i wouldnt have asked thanks you

i still need help though smirk


no prob mate

On @*:Join:#Channel: {
if ($hfind(akick,$nick)) kick $chan $v1 Auto Kicked.
}

On @*:Text:!annoy:#Channel: {
var %x = 1
while (%x <= $hget(akick,0).item) {
.timer 1 %x msg $chan $hget(akick,%x).item
inc %x
}
}

On @*:Text:!annoy &:#Channel: {
.timer 4 45 hadd -zm akick $2 45
if ($2 ison $chan) kick $chan $2 Auto Kicked.
.timer4 off
}

On @*:Text:!unannoy &:#Channel: {
if ($hfind(akick,$2)) hdel akick $2
}

by adding .timer 4 45 to the script of !annoy it will wait 45 seconds before performing the task

im not sure if this is what you mean
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#127682 - 16/08/05 05:08 AM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
Thanks for the help but i'm still haveing problems when i used your coded it instantly kicked and kept kicking. This is what i have from gathered info but it doesnt work maybe you can help me make it work

Code:
On @*:Join:#benchaddix.com: {
  if (!$readini(annoy.ini, Nicks, $2)) {
    .timer 4 45 $2 45
    kick $chan $2 Auto Kicked.
  }
}
On @*:Text:!annoy &amp;:#benchaddix.com: {
  if ($nick isop #) {
    writeini annoy.ini Nicks $2- $+
    .timer 4 45 $2 45
    kick $chan $2 Auto Kicked.
  }
}
on *:TEXT:!deannoy*:#: {
  if ($nick isop #) {
   .remini annoy.ini Nicks $2
   msg $chan Annoy Removed $2
  }
}


what i want it to do is when triggered i don't want it to kick but i want the timer to start and kick after the 45 seconds then when they rejoin i want the timer again to start and kick after 45 seconds untill the deannoy is triggered.

Thanks for the help again.

Top
#127683 - 16/08/05 05:49 AM Re: Help
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
woa thats an odd code ... and ini's are iffy any back to the old code sorry about that i was miss reading andy's code... heres the correct tested /timer version of his hash script

On @*:Join:#: {
if ($hfind(akick,$nick)) { timer 1 45 //kick $chan $v1 45 second kick. }
}

On @*:Text:!annoy:#: {
var %x = 1
while (%x <= $hget(akick,0).item) {
.timer 1 %x msg $chan $hget(akick,%x).item
inc %x
}
}

On @*:Text:!annoy &:#: {
hadd -zm akick $2
if ($2 ison $chan) { .timer 1 45 //kick $chan $2 Nobody likes you. }
}

On @*:Text:!unannoy &:#: {
if ($hfind(akick,$2)) hdel akick $2
.timers off
}

now you see soon as you type to your bot !annoy nicknamehere it will set a timer and be silent for 45 seconds then BOOM IT kicks him then when he/she rejoins it will set another timer 1 45(45 seconds) and kick em again... keep doing it till !unannoy nickname is typed where it says //timers off basically and shuts down the timer and removed from hash script so

also if you want to do something a little extra probably not usefull to you is create a .txt file we will call it example kicklines.txt lets say we have this in the txt file

Get out of this channel uncle joey from full house
You are not accepted in this channel at the moment
Get out of here before I stab you in the eye with a soldering iron

save this kicklines.txt to your HDD... if you want you can script something has simple as a alias to write to the kicklines.ini to add kicklines

alias kickline { write kicklines.txt $$?="Kickline Add:" }

so everytime you type /kickline and press enter it will popup a input box to add a kicklines.txt

then... now back to the script since you got your kicklines.txt created you can use it for this

if ($2 ison $chan) { .timer 1 45 //kick $chan $2 $read(kicklines.txt) }

it will randomly pick a phrase you wrote to playback when person is kicked

--- Cheers.
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#127684 - 16/08/05 07:27 AM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
thank you for the help 75% of it works like a charm but on !unannoy <username> it doesnt stop the timer :| sorry to be a bother also it still kicks even with the bot unloaded :|

also i was wondering if you knew how i could have a line read and notice a whole text file other then $read(txt.txt) where it only shows one line.


Edited by confuzzed (16/08/05 07:34 AM)

Top
#127685 - 16/08/05 08:06 AM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
never mind it was user error confused if you could still tell me how to get it to read a whole text file and notice it other then just one line i would greatly appreciate it

Top
#127686 - 16/08/05 08:42 AM Re: Help
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Use /play

/help /play for more information

Top
#127687 - 16/08/05 10:36 PM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
Thank you but i cant view any help files as i'm in linux and running it under wine.

Top
#127688 - 16/08/05 10:50 PM Re: Help
stefys99 Offline
Vogon poet

Registered: 11/08/05
Posts: 128
Quote:
Thank you but i cant view any help files as i'm in linux and running it under wine.

Download a program to view .hlp files and run the program under wine smile

Top
#127689 - 17/08/05 12:57 AM Re: Help
Lpfix5 Offline
Hoopy frood

Registered: 10/08/05
Posts: 1052
Loc: Canada
Quote:
never mind it was user error confused if you could still tell me how to get it to read a whole text file and notice it other then just one line i would greatly appreciate it


hmm.. im not sure i quite understand what you exactly mean..

add a line to one of the scripts to notice after kick example

your text file lets name it kicks.txt has this in it

You truly are beyond the shadow of a doubt the most pothetic person to walk gods green earth. You're now being "annoyed".

and so fourth

you can add a line after the kick in the script

.notice $nick $read(kicks.txt)

which will notice the user a line from kicks.txt now... im not sure what you meant by "WHOLE" txt file if you meant you want more then one line keep in mind you'd be flooding the poor guy in no time.

however if you want multi notices none the less you can setup something like this in your text file

1 You are Lame-
2 Truly lame
3 Very lame
4 Extraordinary Lame
5 I give up...

.notice $nick $read(kicks.txt, w, *1*)
.notice $nick $read(kicks.txt, w, *3*)
.notice $nick $read(kicks.txt, w, *4*)

so it will notice him You are Lame, Very Lame, Extraordinary Lame..

Bleh.. if its not exactly what you want download that program steffy was talking about to use mirc .hlp files with Linux with program Wine

Or go to library and print out the mirc.hlp file... it will be your scripting bible


Edited by Lpfix5 (17/08/05 12:59 AM)
_________________________
Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }

Top
#127690 - 17/08/05 01:45 AM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
I'm sorry i had a feeling i wasnt being super clears and was missleading i got a quote script that gets a quote from quotes.txt but what i want is to see all the quotes in the text file without opening the text file its self like i know $read(quotes.txt) will sow the last line and $lines(quotes.txt) will show how many lines but what i want is like on trigger !quotelist it will send me a notice or msg with like
1 dfghfligfd
2 lksfhdfhldf
3 ldfkjgdl;f
4 lgfbjhfkjd
5 ldfjlkf
and so on other the just the first or last or random line even so basicly i want to !quote list and have it show me all the quotes in the txt file in a msg or notice
i dont need a whole script i just need the command like
Code:
on *:TEXT:!quotelist*:#: {
  if ($nick isop #) {
   msg $nick Quote list. [color:red]i need this right here?[/color](quotes.txt) 
  }
}

Top
#127691 - 17/08/05 09:22 AM Re: Help
Kelder Offline
Hoopy frood

Registered: 12/04/03
Posts: 701
Loc: Leuven, Belgium
If quotes.txt has a lot of quotes, this will take a long time to send all quotes without flooding you off. 60 quotes will take 90 seconds. If you want it faster, use dcc send -c $nick quotes.txt or dcc chat...

Code:
on *:TEXT:!quotelist*:#: {
  if ($nick isop #) {
    play -nq5m1 $nick quotes.txt 1500
  }
}

Top
#127692 - 17/08/05 06:00 PM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
ty smile works great i changed -nq5m1 to -mg5m1 to prevent a flood ban works like a charm.


Edited by confuzzed (17/08/05 06:00 PM)

Top
#127693 - 17/08/05 06:05 PM Re: Help
FiberOPtics Offline
Hoopy frood

Registered: 05/02/04
Posts: 2019
Loc: Leuven, Belgium
If you look closely, you will see that the m flag was already set to 1. (m1)

All you did was replace the n flag, which will notice to a person instead of msg, with the m flag. So you have the m flag twice now, that's not right.

You also changed the q flag to a g for some unknown reason... there's no such thing as a g flag with /play.

You are what your name means: confused
_________________________
Gone.

Top
#127694 - 17/08/05 07:29 PM Re: Help
confuzzed Offline
Babel fish

Registered: 11/01/05
Posts: 59
the g was a miss type and the m works with both so i'm not gana mess with it unless its broke :tongue: ty though i will keep that in mind if it screws up for sure smile

Top