Jump to content

Scripting problem


BetaDevil

Recommended Posts

I have a problem with my script:

alias gus.warnings !return $iif($readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),$readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),0)

and

  elseif (!givewarning* iswm $3) {
   if ($gus.level($1,$2) >= 10) {
     if (%a == -1) { mta.pm $1 $2 Error - Absent ID }
     else { 
       !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $gus.add($gus.warnings($1,$2),1)
       mta.text $1 $mta.nick($1,%a) has got a warning! }
   }

The script is just like like the stats-system.

But now I need a code if you have 3 warnings you will get an auto-ban, can somebody help me with that code?

Link to comment

elseif (!givewarning* iswm $3) {
 if ($gus.level($1,$2) >= 10) {
   if (%a == -1) mta.pm $1 $2 Error - Absent ID
   else {
     !writeini -n " $+ $scriptdir $+ warnings.ini" WARNINGS $mta.nick($1,%a) $calc($gus.warnings($1,%a)+1)
     if ($gus.warnings($1,%a) >= 3) {
       mta.text $1 $mta.nick($1,%a) has reached the warnings limit and will be banned!
       mta.ban $1 %a
     }
     else mta.text $1 $mta.nick($1,%a) has got a warning! $calc(3-$gus.warnings($1,%a)) more warnings and he will be banned.
   }
 }
}

alias gus.warnings !return $iif($readini($scriptdir $+ warnings.ini,WARNINGS,$mta.nick($1,$2)),$v1,0)

Link to comment
  • Recently Browsing   0 members

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