mIRC Homepage
Posted By: confuzzed Help - 15/08/05 10:25 PM
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
Posted By: SladeKraven Re: Help - 15/08/05 11:10 PM
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
Posted By: confuzzed Re: Help - 15/08/05 11:33 PM
thanks andy for the help

it doesnt fully work it kicks when triggered but dosnt kick after 45 seconds.
Posted By: stefys99 Re: Help - 16/08/05 12:07 AM
You can edit that yourself, don't be lazy.
Posted By: confuzzed Re: Help - 16/08/05 12:18 AM
if i knew anything about this stuff i wouldnt have asked thank you

i still need help though smirk
Posted By: Lpfix5 Re: Help - 16/08/05 02:10 AM
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
Posted By: confuzzed Re: Help - 16/08/05 04:08 AM
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.
Posted By: Lpfix5 Re: Help - 16/08/05 04:49 AM
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.
Posted By: confuzzed Re: Help - 16/08/05 06:27 AM
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.
Posted By: confuzzed Re: Help - 16/08/05 07:06 AM
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
Posted By: RusselB Re: Help - 16/08/05 07:42 AM
Use /play

/help /play for more information
Posted By: confuzzed Re: Help - 16/08/05 09:36 PM
Thank you but i cant view any help files as i'm in linux and running it under wine.
Posted By: stefys99 Re: Help - 16/08/05 09:50 PM
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
Posted By: Lpfix5 Re: Help - 16/08/05 11:57 PM
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
Posted By: confuzzed Re: Help - 17/08/05 12:45 AM
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) 
  }
}
Posted By: Kelder Re: Help - 17/08/05 08:22 AM
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
  }
}
Posted By: confuzzed Re: Help - 17/08/05 05:00 PM
ty smile works great i changed -nq5m1 to -mg5m1 to prevent a flood ban works like a charm.
Posted By: FiberOPtics Re: Help - 17/08/05 05:05 PM
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
Posted By: confuzzed Re: Help - 17/08/05 06:29 PM
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
© mIRC Discussion Forums