mIRC Home    About    Download    Register    News    Help

Print Thread
#162023 13/10/06 09:44 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
menu nicklist,channel {
Auser:
.Op $1:auser 250 $1
.Admin $1:auser 500 $1
.Master $1:auser 750 $1
.SuperMaster $1:auser 1000 $1
}
on 250:TEXT:*:#:{
if ($1 == `voice) { mode $chan +v $2 }
if ($1 == `devoice) { mode $chan -v $2 }
if ($1 == `commands) { notice $nick OP Commands for you (250) : `voice :: `devoice :: }
}
on 500:TEXT:*:#:{
if ($1 == `op) { mode $chan +o $2 }
if ($1 == `deop) { mode $chan -o $2 }
if ($1 == `commands) { notice $nick Commands for you (500) : `op :: `deop :: `voice :: `devoice :: }
}
on 750:TEXT:*:#:{
if ($1 == `ban) && ($nick ison $chan) { mode $chan +b $2 }
if ($1 == `kick) { kick $chan $2 }
if ($1 == `kban) { mode $chan +b $2 | kick $chan $2 | halt }
if ($1 == `commands) { notice $nick Commands for you (750) : `op :: `deop :: `voice :: `devoice :: `kick :: `ban :: `kban :: }
}
on 1000:TEXT:*:#:{
if ($1 == `addop) { .guser 250 $2 3 | .mode $chan +o $2 | .msg $chan OP added. }
if ($1 == `addadmin) { .guser 500 $2 3 | .mode $chan +o $2 | .msg $chan Admin added. }
if ($1 == `addMaster) { .guser 999 $2 3 | .mode $chan +o $2 | .msg $chan Master added }
if ($1 == `addSMaster) { .guser 1000 $2 3 | .mode $chan +o $2 | .msg $chan Super master added }
if ($1 == `invite) && ($2 !ison $chan) && ($me isop $chan) { invite $nick $chan }
if ($1 == `invite) { invite $2 $chan | notice $nick Invited $2 $+ . }
if ($1 == `topic) { topic $chan $2- }
if ($1 == `commands) { notice $nick 5Commands for you (1000) : 5`op :: 5`deop :: 5`voice :: 5`devoice :: 5`kick :: 5`ban :: 5`kban :: 5`invite :: 5`addcmds :: 5`join :: 5`part :: }
if ($1 == `addcmds) { notice $nick Add commands are: `addop (250) :: `addadmin (500) :: `addmaster (750) :: }
elseif ($1 == `addcmds) { .msg $chan Access denied $nick }
}
on 1000:JOIN:#: {
.msg $chan Super Master Detected: $nick | .mode $chan +vo $nick
}
on 750:JOIN:#: {
.msg $chan Master Detected: $nick | .mode $chan +vo $nick
}
on 500:JOIN:#: {
.msg $chan Admin Detected: $nick | .mode $chan +vo $nick
}
on 250:JOIN:#: {
.msg $chan Op Detected: $nick | .mode $chan +vo $nick
}


Ok well multible problems here goes every thing works except voice, devoice, op, deop, kick, ban, kban commands and wen some one join the chan were lets say they are master it only voices them an not op same with the others i also cant get ELSEIF to work =/ or any ELSE in that matter please help thanks =)


At Your Service.
#162024 13/10/06 09:54 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Try combining those events into one and using $level to determine if they are the correct level.

The main problem I see is that your first on text is for level 250 and up. That means the other on texts won't work. You can reverse these the way you did with the on joins if you want, or you can set them up to only work on that level (I believe using = with the 250/500/750/1000 will do that, but I don't have mIRC handy to check). I still think the best method is to put everything into one on text and one on join event and use $level with the if statements.

As for elseif/else, they should work fine if you formatted them correctly.

Example:
Code:
on 250:TEXT:*:#:{
  if ($1 == `voice) { mode $chan +v $2 }
  elseif ($1 == `devoice) { mode $chan -v $2 }
  elseif ($1 == `commands) { notice $nick OP Commands for you (250) : `voice :: `devoice :: }
}


Finally, I'd put @ with the events so you don't get errors if you aren't opped.

Example:
Code:
on @250:text:*:#: {


Invision Support
#Invision on irc.irchighway.net
#162025 13/10/06 10:59 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
thanks Riamus2

but can u tell me how i can have a command so i can remove users from the user list?


At Your Service.
#162026 13/10/06 11:00 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
/help /ruser

If you scroll through the page that appears, you'll see other user list commands as well. I'd recommend looking at them all so you understand how it works.


Invision Support
#Invision on irc.irchighway.net
#162027 13/10/06 11:08 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
ok thank you


At Your Service.
#162028 14/10/06 03:43 AM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
Code:
  elseif ($1 == `deluser) { .ruser $2 3 | .mode $chan -o $2 | /msg $chan User $2 Deleted From List. } 


well thats what i got and it works =) but is there away were if somone says `users it showes all the users in the list and what level they have and one more thing i need a really good prot script for my bot but i cant make one and cant find any please help thanks =)


At Your Service.
#162029 14/10/06 01:11 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
can somone help me please i would really appreciate it thanks. confused


At Your Service.
#162030 14/10/06 06:39 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Be patient. smile

You can read it right out of users.ini (or whatever file it is saved as).

Press Alt-R, then click the Users tab. On the bottom of that window, it should tell you the filename and path for the users.ini file. In one client, it's called users.ini and is in my main folder, in another client, it's called u_users.ini and is in my script folder. That's why you need to check. Put that filename/path into the red part below.

After you know where it's at, you can do this in the part where you want it to display:

Code:
play -a listusers $nick [color:red]users.ini[/color] 1000


Then, also include this at the end of your script:

Code:
alias -l listusers {
  if ($2 != [users]) {
    msg $1 $gettok($2-,2,61)
  }
}


Invision Support
#Invision on irc.irchighway.net
#162031 14/10/06 06:54 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
were do i put the codes in remote?


At Your Service.
#162032 14/10/06 06:58 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Put this in whatever section you want to be able to use the command. Put the alias at the bottom of the file, after all other text and brackets.

elseif ($1 == `users) { play -a listusers $nick users.ini 1000 }


Invision Support
#Invision on irc.irchighway.net
#162033 14/10/06 11:16 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
it did not work
Code:
   elseif ($1 == `addcmds) { notice $nick .: 5Add User Commands Are :. | notice $nick .: 5`addop (250) :: 5`addadmin (500) :: 5`addmaster (750) :. | notice $nick .: 5Delete User Command :. | notice $nick .: 5`deluser :. }
   elseif ($1 == `users) { play -a listusers $nick C:\mIRC\remote.ini 1000 }
}
alias -l listusers {
  if ($2 != [users]) {
    msg $1 $gettok($2-,2,61)
  }
} 


thats the bottom bit

Last edited by BuTLeR; 14/10/06 11:29 PM.
#162034 15/10/06 03:01 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
What doesn't work? Does it give an error? Do you see the notice from mIRC saying it's playing a file? If you see nothing at all, then you're missing something in the rest of your script... perhaps a }.


Invision Support
#Invision on irc.irchighway.net
#162035 15/10/06 04:00 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
ok its workin but it wont just play the users part its playin the whole file so its playin the [variables] part to confused


At Your Service.
#162036 15/10/06 04:06 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
Change this: elseif ($1 == `users) { play -a listusers $nick C:\mIRC\remote.ini 1000 }
To: elseif ($1 == `users) { play -a[color:red]tusers listusers $nick C:\mIRC\remote.ini 1000 }[/color]

#162037 15/10/06 04:12 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
thanks it works grin


At Your Service.
#162038 15/10/06 04:30 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Quote:
ok its workin but it wont just play the users part its playin the whole file so its playin the [variables] part to confused


That is interesting. My variables aren't in my users file on either of my clients. Sorry about that. I'd have set it up for just users if I had realized that they might be combined like that.


Invision Support
#Invision on irc.irchighway.net
#162039 15/10/06 04:33 PM
Joined: Oct 2006
Posts: 68
B
BuTLeR Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Oct 2006
Posts: 68
no worrys i should of told you =P thanks anyway =)


At Your Service.
#162040 15/10/06 04:35 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Btw, since you're playing the topic, you can remove the check for [users] in the alias. It won't hurt if it's there, but it's not needed anymore.


Invision Support
#Invision on irc.irchighway.net
#162041 15/10/06 04:40 PM
Joined: Jun 2006
Posts: 508
D
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
That's where mIRC stores them by default, you can of course change variables and/or users to different files, So maybe you should $readini($mircini,rfiles,n0) for the filename. If it isnt an .inifile (such as Users.mrc/Users.txt) it won't have a section name either laugh

#162042 15/10/06 05:33 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I must have saved them separately in the past. I have a users.ini and a vars.ini in one script, and in my trivia bot script, which I know was changed to follow a specific format, I have u_users.ini and v_variables.ini.

I haven't used a "clean" mIRC in 5 years. wink


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard