Jump to content

Ranking system, what do I wrong?


Convirion

Recommended Posts

Hi, I'm making my own ranking system, I already made a !setrank but the online problem is !rank.

elseif ($3 == !rank) {
if (%a == -1) mta.pm $1 $2 Error - Absent ID
else mta.text $1 $mta.nick($1,%a) rank is: $readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a))

}

what do I wrong? I think it's something with the $readini

edit: is it also possible to add a thing like this: !rank (on someone who hasn't a rank) Player doesn't have a rank

thank you :)

Link to comment

why :P it will only write to a file called rank.ini ( i know that that works :) )

but ok here it is:

elseif ($3 == !setrank) {
if (gus.level($1,$2) >= 7) {
if (%a == -1) mta.pm $1 $2 Error - Absent ID
elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself.
elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level.
else {
!writeini -n " $+ $scriptdir $+ rank.ini" ranked $4 $5-
mta.text $1 $mta.nick($1,$2) your rank is set to: $5-
}
}
else mta.pm $1 $2 Error - You need to be level 7 to use this command.
}

this was it i thought, couldn't copy it.

Link to comment

I made this:

  elseif ($3 == !points) {
   if (%a == -1) mta.pm $1 $2 Absent ID!
   else mta.text $1 $mta.nick($1,%a) has $readini($scriptdir $+ points.ini,POINTS,$mta.nick($1,%a)) points!
 }
}

It's almost the same only I use !points and points.ini, dunno if something is different...

Link to comment
why :P it will only write to a file called rank.ini ( i know that that works :) )

but ok here it is:

elseif ($3 == !setrank) {
if (gus.level($1,$2) >= 7) {
if (%a == -1) mta.pm $1 $2 Error - Absent ID
elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself.
elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level.
else {
!writeini -n " $+ $scriptdir $+ rank.ini" ranked $4 $5-
mta.text $1 $mta.nick($1,$2) your rank is set to: $5-
}
}
else mta.pm $1 $2 Error - You need to be level 7 to use this command.
}

this was it i thought, couldn't copy it.

i'd not say that it works fine :P

Link to comment

This works (I think), but more of my scripts don't work :P so you have to try.[syntax=mIRC] elseif ($3 == !setrank) {

if (gus.level($1,$2) >= 7) {

if (%a == -1) mta.pm $1 $2 Error - Absent ID

elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself.

elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level.

else {

!writeini -n " $+ $scriptdir $+ rank.ini" ranked $4 $5-

mta.text $1 $mta.nick($1,%a) your rank is set to: $5-

}

}

else mta.pm $1 $2 Error - You need to be level 7 to use this command.

}

elseif ($3 == !rank) {

if (%a == -1) mta.pm $1 $2 Error - Absent ID

else mta.text $1 $mta.nick($1,%a) $+ 's rank is: $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank)

}[/lua]

Link to comment

uhmm sorry, doesn't work :lol: this is a fixed one.

[syntax=mIRC] elseif ($3 == !setrank) {

if (gus.level($1,$2) >= 7) {

if (%a == -1) mta.pm $1 $2 Error - Absent ID

elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself.

elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level.

else {

!writeini -n " $+ $scriptdir $+ rank.ini" ranked $mta.nick($1,%a) $5-

mta.text $1 $mta.nick($1,%a) your rank is set to: $5-

}

}

else mta.pm $1 $2 Error - You need to be level 7 to use this command.

}

elseif ($3 == !rank) {

if (%a == -1) mta.pm $1 $2 Error - Absent ID

else mta.text $1 $mta.nick($1,%a) $+ 's rank is: $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank)

}[/lua]

Link to comment

would this make it a wency bit smaller

  elseif ($3 == !setrank) && (gus.level($1,$2) >= 7) { 
     if (%a == -1) mta.pm $1 $2 Error - Absent ID 
     elseif (%a == $2) mta.pm $1 $2 Error - cannot $3 yourself. 
     elseif ($gus.level($1,%a) >= $gus.level($1,$2)) mta.pm $1 $2 Error - cannot $3 a person with same or higher level. 
     else { 
       !writeini -n " $+ $scriptdir $+ rank.ini" ranked $mta.nick($1,%a) $5- 
       mta.text $1 $mta.nick($1,%a) your rank is set to: $5- 
     } 
   } 
   else mta.pm $1 $2 Error - You need to be level 7 to use this command. 
 } 
 elseif ($3 == !rank) { 
   if (%a == -1) mta.pm $1 $2 Error - Absent ID 
   else mta.text $1 $mta.nick($1,%a) $+ 's rank is:  $iif($readini($scriptdir $+ rank.ini,ranked,$mta.nick($1,%a)),$v1,No Rank) 
 }

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...