|
requesting a script if possible
#204415
19/09/08 10:39 AM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
i need a script for my bot that will repeat a message on a channel like every 20 minutes or so adjustable if it possible and need to have different message on different channels i need for 5 channels. is this possible? very very new to irc thing but learning fast, started to build my own linux box but still in testing phase, any help will be greatly app. thnx
|
|
|
Re: requesting a script if possible
[Re: macdaddy]
#204417
19/09/08 11:30 AM
|
Joined: Mar 2003
Posts: 612
billythekid
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
one simple way is...
alias repeat {
if $timer(rpt1) { .timerrpt* off }
else {
var %rpttime $calc( $input("How far apart in minutes?,qeo) * 60)
.timerrpt1 0 %rpttime msg #chan1 message1
.timerrpt2 0 %rpttime msg #chan2 message2
.timerrpt3 0 %rpttime msg #chan3 message3
.timerrpt4 0 %rpttime msg #chan4 message4
.timerrpt5 0 %rpttime msg #chan5 message5
}
}
run it with /repeat from command line or in an event. (i.e. on 1:text:@repeat:#channel:repeat)
billythekid
|
|
|
Re: requesting a script if possible
[Re: billythekid]
#204421
19/09/08 12:39 PM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
am i missing somthing? its not working? do i need to change the 60? or soething? i need to repeat every 30 minutes or so. if i can adjust it it would be great!
alias repeat { if $timer(rpt1) { .timerrpt* off } else { var %rpttime $calc( $input("How far apart in minutes?,qeo) * 60) .timerrpt1 0 %rpttime msg #fun_with_fta test message1 .timerrpt2 0 %rpttime msg #fta4dummies test message2 .timerrpt3 0 %rpttime msg #the-help-channel rest message3 .timerrpt4 0 %rpttime msg #the-ops test message4 .timerrpt5 0 %rpttime msg #bot_testing_channel tes message5 }
|
|
|
Re: requesting a script if possible
[Re: macdaddy]
#204422
19/09/08 12:46 PM
|
Joined: Mar 2003
Posts: 612
billythekid
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
it won't message immediately it'll wait until your timer runs, try /timers to see if they are running. For an immediate output as well use
alias repeat {
if $timer(rpt1) { .timerrpt* off }
else {
var %rpttime $calc( $input("How far apart in minutes?,qeo) * 60)
.timerrpt1 0 %rpttime msg #fun_with_fta test message1
.timerrpt2 0 %rpttime msg #fta4dummies test message2
.timerrpt3 0 %rpttime msg #the-help-channel rest message3
.timerrpt4 0 %rpttime msg #the-ops test message4
.timerrpt5 0 %rpttime msg #bot_testing_channel tes message5
msg #fun_with_fta test message1
msg #fta4dummies test message2
msg #the-help-channel rest message3
msg #the-ops test message4
msg #bot_testing_channel tes message5
}
billythekid
|
|
|
Re: requesting a script if possible
[Re: billythekid]
#204424
19/09/08 01:25 PM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
ok i got this back after doing /timers * Active timers: * Timer uptime 60s delay /updateuptime (network.name.net)
the way you see it here is the way its on bot. should i have anything different ? thnx
alias repeat { if $timer(rpt1) { .timerrpt* off } else { var %rpttime $calc( $input("How far apart in minutes?,qeo) * 60) .timerrpt1 0 %rpttime msg #fun_with_fta test message1 .timerrpt2 0 %rpttime msg #fta4dummies test message2 .timerrpt3 0 %rpttime msg #the-help-channel rest message3 .timerrpt4 0 %rpttime msg #the-ops test message4 .timerrpt5 0 %rpttime msg #bot_testing_channel tes message5 msg #fun_with_fta test message1 msg #fta4dummies test message2 msg #the-help-channel rest message3 msg #the-ops test message4 msg #bot_testing_channel tes message5 }
|
|
|
Re: requesting a script if possible
[Re: macdaddy]
#204425
19/09/08 01:33 PM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
i forgot one thing .. im told i need a script to kick people out if the dont type anything when they first log in. these people think im some kinda pro. i keep telling them i have no idea what the hell im doing. but they like my bot so far. how do you write such a script to kick people out for not typing some thing they asked if they can have 2minute timer on this, if they dont type with in 2 minutes the get kicked out. guess they dont want any lurker's lol thnx my friends you guys are really good at this, hope my old butt gets to be this good one day
CANT KICK OP'S OUT!!!
|
|
|
Re: requesting a script if possible
[Re: macdaddy]
#204428
19/09/08 03:14 PM
|
Joined: Mar 2003
Posts: 612
billythekid
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
again it's done with a timer this time using an on:join and on:text events.
;When someone joins
on 1:join:#channel:{
;set a 2 minute timer to activate an alias.
.timer $+ $nick 0 120 notalkey $nick
}
;If someone speaks
on 1:text:*:#channel:{
;check if their timer is running and if so turn it off
if $timer($nick) { .timer $+ $nick off }
}
alias notalkey {
;this is activated by timer, if the person's not an op it'll kick them
if $1 !isop { kick #channel $1 It's a chat channel, chat already! }
}
That's untested but should work I think
Last edited by billythekid; 19/09/08 03:14 PM.
billythekid
|
|
|
Re: requesting a script if possible
[Re: billythekid]
#204429
19/09/08 03:35 PM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
didnt work, i even tried setting it to a channel i think and that didnt work either
;When someone joins on 1:join:#fta4dummies:{ ;set a 2 minute timer to activate an alias. .timer $+ $nick 0 120 notalkey $nick } ;If someone speaks on 1:text:*:#fta4dummies:{ ;check if their timer is running and if so turn it off if $timer($nick) { .timer $+ $nick off } } alias notalkey { ;this is activated by timer, if the person's not an op it'll kick them if $1 !isop { kick #fta4dummies $1 It's a chat channel, chat already! } }
unless im doing something wrong?
the message one doesnt work either look above.. thnx my friend ..
|
|
|
Re: requesting a script if possible
[Re: macdaddy]
#204430
19/09/08 03:49 PM
|
Joined: Mar 2003
Posts: 612
billythekid
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
where are you putting these? All above code needs to go in your remotes. That's Alt-R (make sure it's the remotes tab and not aliases etc..). If there's already text in that box go to file/new and then paste in the big white box.
...you said a linux box, are you sure you're running mIRC?
Last edited by billythekid; 19/09/08 03:52 PM.
billythekid
|
|
|
Re: requesting a script if possible
[Re: billythekid]
#204431
19/09/08 03:54 PM
|
Joined: Feb 2006
Posts: 181
Crinul
Vogon poet
|
Vogon poet
Joined: Feb 2006
Posts: 181 |
Your 'notalkey' alias should be:
alias notalkey if $1 !isop #fta4dummies { kick $v2 $1 It's a chat channel, chat already! }
|
|
|
Re: requesting a script if possible
[Re: billythekid]
#204432
19/09/08 03:56 PM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
no this is a windbows box
im building a linux box to run eggdrop. im told thats a line command program.. im trying to remember edit config.sys autoexec.bat but that is dos commands, i have to learn linux ubuntu commands,, then someone said get used to say sudo aot-get install ****** so im doing alot of reading and doing this at same time and building 2 websites,,, wow.... alot to learn ill try to remember what you said about loading. i was using /load -rs ****.mrc to load it... guess thats wrong... i should know better than to listen to some people.. thx. ill see if i can figure this out.. sorry to bother you,, ur a good sport,, me dumbazz
|
|
|
Re: requesting a script if possible
[Re: Crinul]
#204433
19/09/08 03:58 PM
|
Joined: Mar 2003
Posts: 612
billythekid
Fjord artisan
|
Fjord artisan
Joined: Mar 2003
Posts: 612 |
oh yeah of course, that always catches me out!
/me mumbles something about $v2
billythekid
|
|
|
Re: requesting a script if possible
[Re: billythekid]
#204434
19/09/08 04:34 PM
|
Joined: Sep 2008
Posts: 9
macdaddy
OP
Nutrimatic drinks dispenser
|
OP
Nutrimatic drinks dispenser
Joined: Sep 2008
Posts: 9 |
cant get this dam thing to work. none of it.. im going nuts, im going to take a nap. maybe later
|
|
|
|
|
|