mIRC Home    About    Download    Register    News    Help

Print Thread
small on text problem #3402 25/12/02 03:16 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
ok i made this script
but when i use it, it will work as long as there isnt an thing in the varible %newslvlbut when there is a # there it does nothing and its really annoying me like hell could some one please help me!!
---------------------------------------------------------------------
on *:text:!news*:#: {
if ($level >= %newslvl) {
//set %news $2-
//notice $nick Updated News To: %news
//msg # Current News: %news
}
elseif ($level < %newslvl) {
//notice You do not have access to this command.
}
}
---------------------------------------------------------------------


Need amazing web design for low price: http://www.matrixn3t.net
Re: small on text problem #3403 25/12/02 03:29 AM
Joined: Dec 2002
Posts: 40
L
Lucifer Offline
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 40
the alias $level requires that you provide a adress. I would do something like
Code:
on *:text:!news*:#: {
if ($level($address($nick,1)) &gt;= %newslvl) {
set %news $2-
notice $nick Updated News To: %news
msg # Current News: %news
}
elseif ($level($address($nick,1)) &lt; %newslvl) {
notice You do not have access to this command. 
}
}

I haven't tested that and I don't use levels much but that should work.

Re: small on text problem #3404 25/12/02 03:31 AM
Joined: Dec 2002
Posts: 30
A
arps Offline
Ameglian cow
Offline
Ameglian cow
A
Joined: Dec 2002
Posts: 30
Your using $level wrong its $level(address-of-user)
/help $level

Re: small on text problem #3405 25/12/02 03:40 AM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
what if i used /auser would i have to use some other way? confused


Need amazing web design for low price: http://www.matrixn3t.net
Re: small on text problem #3406 25/12/02 03:51 AM
Joined: Dec 2002
Posts: 40
T
Time4aHoliday Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Dec 2002
Posts: 40
You will also need to specifiy $nick if they don't have access otherwise the notice will get sent to the user with the nick 'You'

i.e. .notice $nick You do not have access to this command.


~ @#FunFactory / @#WorldChat ~ on DALnet ~
Re: small on text problem #3407 25/12/02 04:19 AM
Joined: Dec 2002
Posts: 144
D
Dana Offline
Vogon poet
Offline
Vogon poet
D
Joined: Dec 2002
Posts: 144
You'd use:

Code:
if ($level(nickname) == level) { commands }


"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
Re: small on text problem #3408 25/12/02 02:59 PM
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
ok im not quiet understanding what u are talking about right here i have tryied modifying the script in all kinds of ways and it still doesnt work wtf is with it could some one give me a working version of the script?????????!!?!?!??!
confused confused confused confused mad


Need amazing web design for low price: http://www.matrixn3t.net
Re: small on text problem #3409 25/12/02 11:35 PM
Joined: Dec 2002
Posts: 40
T
Time4aHoliday Offline
Ameglian cow
Offline
Ameglian cow
T
Joined: Dec 2002
Posts: 40
I have written and tested this. The following will allow only ops opped in a channel to add news and/or to view the news.
Code:
on *:TEXT:*:#:{
  if ( $chr(33) $+ news isin $1 ) { goto next }
  else goto end
  :next
  if ( $nick isop # ) &amp;&amp; ( $2- != $null ) { .set %news $2- | notice $nick Updated News To: %news | msg # Current News: %news | goto end }
  if ( $nick isop # ) &amp;&amp; ( $2- = $null ) { msg # Current News: %news | goto end }
  elseif ( $nick !isop # ) { notice $nick You do not have access to this command. | goto end }
  :end
}


~ @#FunFactory / @#WorldChat ~ on DALnet ~