|
|
Joined: Jun 2005
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Jun 2005
Posts: 16 |
i have to scripts i need help on...one is almost done just need to figure out one small thing..these scripts are for a bot i just made and finnishing...
1st one: on *:text:!beer*:#: {/.describe $chan hands $2 a beer }
ok i want it to give a beer to a random person if they dont type anything after !beer
2nd one: on *:text:op me*:#: {/.describe $chan if u ask for that one more time i will kick you and than ban you from ever coming in here }
ok as u can see it dont kick them if they say op me agian i want this to change right now i have to manualy do it i want the bot to give them a warnig and then kick them
-tyler
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
1st one: on *:text:!beer*:#: {/.describe $chan hands $2 a beer }
ok i want it to give a beer to a random person if they dont type anything after !beer
Use:
on *:text:!beer*:#: {
if ($2) {
.describe $chan hands $2 a beer
}
else .describe $chan hands $nick(#,$rand(1,$nick(#,0)) a beer
}
2nd one: on *:text:op me*:#: {/.describe $chan if u ask for that one more time i will kick you and than ban you from ever coming in here }
ok as u can see it dont kick them if they say op me agian i want this to change right now i have to manualy do it i want the bot to give them a warnig and then kick them
Use:
on *:text:op me*:#: {
if ($level($address($nick,2)) != warn && $level($address($nick,2)) != ban) {
.describe $chan If u ask for that one more time i will kick you and then ban you from ever coming in here.
alevel warn $address($nick,2)
}
else {
ban -k $chan $address($nick,2)
alevel ban $address($nick,2)
}
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Fix for #2 (-k only works with $nick and not $address):
on *:text:op me*:#: {
if ($level($address($nick,2)) != warn && $level($address($nick,2)) != ban) {
.describe $chan If u ask for that one more time i will kick you and then ban you from ever coming in here.
alevel warn $address($nick,2)
}
else {
ban $chan $address($nick,2)
kick $chan $nick Don't request OPs.
alevel ban $address($nick,2)
}
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jun 2005
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Jun 2005
Posts: 16 |
thank u so much now i am officaly done with my bot
the first one dont work...it dont do anything if u dont type in anything after !beer if u type in ex. !beer nick it will give nick a beer i think the random thing is wrong
im getting this
Invalid format: $nick (line 4, script1.txt)
i played around with it a little and got it to give no one a beer the randome thing wont work
on *:text:!beer*:#: { if ($2) { } .describe $chan hands $2 a beer else { .describe $chan hands $nick(#,$rand(1,$nick(#,0)) a beer}
thats wat i used
maybe its me but the 2nd one didnt work it just keeps say i will ban u never does...i had a friend do it
Last edited by tyler22; 24/06/05 09:58 PM.
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
I think you want it like this:
on *:text:!beer*:#: {
if ($2) { .describe $chan hands $2 a beer }
else { .describe $chan hands $nick(#,$rand(1,$nick(#,0)) a beer}
}
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
on *:text:!beer*:#: {
if ($2) { .describe $chan hands $2 a beer }
else { .describe $chan hands $nick(#,$rand(1,$nick(#,0))[color:red])[/color] a beer }
}
New username: hixxy
|
|
|
|
Joined: Jun 2005
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Jun 2005
Posts: 16 |
ok it works now the kick and ban one dont work
-tyler
|
|
|
|
Joined: Nov 2003
Posts: 2,327
Hoopy frood
|
Hoopy frood
Joined: Nov 2003
Posts: 2,327 |
Riamus2 used the wrong command to add users to the userlist, but I'd go with a different approach anyway. on *:text:op me*:#: {
if (!$eval($+(%,opask,$site),2)) { .describe $chan if u ask for that one more time i will kick you and than ban you from ever coming in here }
else {
ban -k $chan $nick 2 I warned you!
unset %opask $+ $site
}
inc %opask $+ $site
}
New username: hixxy
|
|
|
|
Joined: Jun 2005
Posts: 16
Pikka bird
|
OP
Pikka bird
Joined: Jun 2005
Posts: 16 |
IT WORKS!!!! thank u so much now my bot is officaly done yea...thanks to all that helped me and i might have a few more ?'s when i do model 1.2 thanx again, ~ tyler22~
-tyler
|
|
|
|
|
|