mIRC Home    About    Download    Register    News    Help

Print Thread
#127676 15/08/05 10:25 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
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

#127677 15/08/05 11:10 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
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

#127678 15/08/05 11:33 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
thanks andy for the help

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

#127679 16/08/05 12:07 AM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
You can edit that yourself, don't be lazy.

#127680 16/08/05 12:18 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
if i knew anything about this stuff i wouldnt have asked thank you

i still need help though smirk

Last edited by confuzzed; 16/08/05 02:18 AM.
#127681 16/08/05 02:10 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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* }
#127682 16/08/05 04:08 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
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.

#127683 16/08/05 04:49 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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* }
#127684 16/08/05 06:27 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
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.

Last edited by confuzzed; 16/08/05 06:34 AM.
#127685 16/08/05 07:06 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
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

#127686 16/08/05 07:42 AM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Use /play

/help /play for more information

#127687 16/08/05 09:36 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
Thank you but i cant view any help files as i'm in linux and running it under wine.

#127688 16/08/05 09:50 PM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
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

#127689 16/08/05 11:57 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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

Last edited by Lpfix5; 16/08/05 11:59 PM.

Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#127690 17/08/05 12:45 AM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
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) 
  }
}

#127691 17/08/05 08:22 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
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
  }
}

#127692 17/08/05 05:00 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
Posts: 59
ty smile works great i changed -nq5m1 to -mg5m1 to prevent a flood ban works like a charm.

Last edited by confuzzed; 17/08/05 05:00 PM.
#127693 17/08/05 05:05 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.
#127694 17/08/05 06:29 PM
Joined: Jan 2005
Posts: 59
C
Babel fish
OP Offline
Babel fish
C
Joined: Jan 2005
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


Link Copied to Clipboard