mIRC Home    About    Download    Register    News    Help

Print Thread
#123508 24/06/05 10:06 AM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
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
#123509 24/06/05 01:09 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Quote:

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:
Code:
on *:text:!beer*:#: {
  if ($2) {
    .describe $chan hands $2 a beer
  }
  else .describe $chan hands $nick(#,$rand(1,$nick(#,0)) a beer
}



Quote:

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:
Code:
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
#123510 24/06/05 04:13 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Fix for #2 (-k only works with $nick and not $address):

Code:
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
#123511 24/06/05 09:33 PM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
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.
#123512 24/06/05 10:30 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I think you want it like this:
Code:
on *:text:!beer*:#: {
if ($2) { .describe $chan hands $2 a beer }
else { .describe $chan hands $nick(#,$rand(1,$nick(#,0)) a beer} 
}

#123513 24/06/05 10:55 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
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
#123514 25/06/05 02:49 AM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Jun 2005
Posts: 16
ok it works now the kick and ban one dont work


-tyler
#123515 25/06/05 11:55 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
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.

Code:
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
#123516 25/06/05 10:40 PM
Joined: Jun 2005
Posts: 16
T
tyler22 Offline OP
Pikka bird
OP Offline
Pikka bird
T
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

Link Copied to Clipboard