mIRC Homepage

2 ?'s

Posted By: tyler22

2 ?'s - 24/06/05 10:06 AM

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
Posted By: Riamus2

Re: 2 ?'s - 24/06/05 01:09 PM

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)
  }
}
Posted By: Riamus2

Re: 2 ?'s - 24/06/05 04:13 PM

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)
  }
}
Posted By: tyler22

Re: 2 ?'s - 24/06/05 09:33 PM

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


Posted By: MikeChat

Re: 2 ?'s - 24/06/05 10:30 PM

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} 
}
Posted By: tidy_trax

Re: 2 ?'s - 24/06/05 10:55 PM

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 } 
}
Posted By: tyler22

Re: 2 ?'s - 25/06/05 02:49 AM

ok it works now the kick and ban one dont work
Posted By: tidy_trax

Re: 2 ?'s - 25/06/05 11:55 AM

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 
}
Posted By: tyler22

Re: 2 ?'s - 25/06/05 10:40 PM

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~
© 2020 mIRC Discussion Forums