mIRC Home    About    Download    Register    News    Help

Print Thread
auto op script ".aop" #14082 04/03/03 04:50 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
i got this so far:

Code:
on *:TEXT:.aop*:#:{
  if ($nick == xrn0id) {
    var %aop $2-
  }
}
on *:JOIN:#:{
  if ($nick isin %aop) {
    //mode $chan +o $nick
  }
  halt
}


which is completely wrong, but im sure you get the idea of where im going. Please help me if you know how. Thanks.



;Check for Life

if (%life == $null) {
goto getlife
}
Re: auto op script ".aop" #14083 04/03/03 05:17 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
well i have something similar which works a little different like this
Code:
  
on 1:TEXT:!opme:*: {
 if ( $nick isin $read(opnick.txt) ) 
 mode $chan +o $nick
} 
 

Last edited by Cheech; 04/03/03 05:18 AM.
Re: auto op script ".aop" #14084 04/03/03 06:13 AM
Joined: Feb 2003
Posts: 83
L
LO_KEY Offline
Babel fish
Offline
Babel fish
L
Joined: Feb 2003
Posts: 83
Now i havnt tested this, but it should work...

Code:
on *:TEXT:.aop*:#:{  
  if ($nick == xrn0id) {
    if (%aop != $null) { %aop = %aop $+ $chr(44) $+ $2- }
    if (%aop = $null) { %aop = $2- }
  }
}
on *:JOIN:#:{ 
  if ($istok(%aop,$nick,44) = $true) { 
    mode $chan +o $nick
  }
  halt
}  

Now the only thing wrong with this code that i can see, is that eventually, that var will get to long to set...
which i dun know how to get around. :\

Last edited by Hammer; 04/03/03 06:42 AM.

any help would make me happy
Re: auto op script ".aop" #14085 04/03/03 10:25 AM
Joined: Jan 2003
Posts: 148
K
Knappen Offline
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
I think I understand...

on *:TEXT:*:#:{
if (($nick == xrn0id) && ($1 == aop) && ($2 != $null)) {
.write aop.txt $2-
}
}
on *:JOIN:#:{
if ($nick isin $read(aop.txt)) {
mode $chan +o $nick
}
}

Try this.. It should work... :tongue:

Re: auto op script ".aop" #14086 04/03/03 12:42 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
then why isnt this working?

Code:
on *:TEXT:.aop*:#ftpxdcc-wolf-botholding:{
  if ($nick isop $chan) {
    write aop.txt $$2-
  }
  halt
}
on *:JOIN:#ftpxdcc-wolf-botholding:{
  if ($nick isin $read(aop.txt)) { 
    //mode $chan +o $nick
  }
}



;Check for Life

if (%life == $null) {
goto getlife
}
Re: auto op script ".aop" #14087 04/03/03 01:25 PM
Joined: Dec 2002
Posts: 395
M
MonoSex Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
$read(aop.txt) reads a random line from a file.
You'd better use .ini file or hash tables for this.

Re: auto op script ".aop" #14088 04/03/03 05:07 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
how do you use a hash table or an ini file?



;Check for Life

if (%life == $null) {
goto getlife
}
Re: auto op script ".aop" #14089 04/03/03 05:08 PM
Joined: Dec 2002
Posts: 395
M
MonoSex Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
/help hash tables
/help $readini
/help $ini
/help writeini
/help remini

Re: auto op script ".aop" #14090 05/03/03 02:06 AM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
ok i got this, now whats wrong?

Code:
on *:TEXT:.aop*:#ftpxdcc-wolf-botholding:{
  if ($nick isop $chan) {
    /writeini aop.ini AUTOOP nick $nick
  }
  halt
}
on *:JOIN:#ftpxdcc-wolf-botholding:{
  if ($nick isin $readini(aop.ini, AUTOOP, $nick)) {
    //mode $chan +o $nick
  }
}



;Check for Life

if (%life == $null) {
goto getlife
}
Re: auto op script ".aop" #14091 05/03/03 01:20 PM
Joined: Dec 2002
Posts: 143
A
Aubs Offline
Vogon poet
Offline
Vogon poet
A
Joined: Dec 2002
Posts: 143
If you want it to work ONLY on nicks, then this should rectify your problem:
Code:
on *:TEXT:.aop*:#ftpxdcc-wolf-botholding:{
  if ($nick isop $chan) {
    /writeini aop.ini AUTOOP $nick Allow
  }
  halt
}
on *:JOIN:#ftpxdcc-wolf-botholding:{
  if ($readini(aop.ini, AUTOOP, $nick) == Allow) {
    //mode $chan +o $nick
  }
}


Aubs.
cool