Jump to content

!new in GUS


Ford

Recommended Posts

Stand Alone Script:

alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0) 
  
on *:SIGNAL:mta.command:{ 
  if ($3 == !new) { 
    !writeini -n gus.map.ini NEW SERVER $+ $1 $calc(gus.new($1) + 1) 
    if (gus.new($1) > $calc($mta.server($1).players)) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc($mta.server($1).players - gus.new($1)) $+ ! 
    } 
    else { 
      mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting! 
      .timer 1 1 mta.startrace $1 $rand(1,$mta.races($1)) 
      !writeini -n gus.map.ini NEW SERVER $+ $1 0 
    } 
  } 
} 
  
on *:SIGNAL:mta.endrace:{ 
  !writeini -n gus.map.ini NEW SERVER $+ $1 0 
}  

Edited by Guest
Link to comment
alias gus.warns !return $iif($readini(gus.warns.ini,WARNS,$mta.nick($1,$2)),$v1,0) 
  
alias gus.getid { 
  var %a = 0 
  while (%a <= $mta.server($1).cmax) { 
    if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a 
    !inc %a 
  } 
  !return -1 
} 
  
on *:SIGNAL:mta.command:{ 
  var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2) 
  if ($3 == !warn) { 
    if ($gus.level($1,$2) < 1) Error - Level Needed 1 
    else { 
      !writeini -n gus.warns.ini WARNS $mta.nick($1,%a) $calc($gus.warns($1,%a) + 1) 
      if ($gus.warns($1,%a) < 3) { 
        mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , total warns $gus.warns($1,%a) $+ /3 ! 
      } 
      else { 
        mta.text $1 Admin $mta.nick($1,$2) warned $mta.nick($1,%a) $+ , warns $gus.warns($1,%a) $+ /3, kicking $mta.nick($1,%a) $+ ! 
        .timer 1 1 mta.kick $1 %a 
        !writeini -n gus.warns.ini WARNS $mta.nick($1,%a) 0 
      } 
    } 
  } 
} 

Edited by Guest
Link to comment

Oppps, silly mistake.

alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0) 
      
on *:SIGNAL:mta.command:{ 
  if ($3 == !new) { 
    !writeini -n gus.map.ini NEW SERVER $+ $1 $calc(gus.new($1) + 1) 
    if (gus.new($1) < $calc($mta.server($1).players)) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc($mta.server($1).players - gus.new($1)) $+ ! 
    } 
    else { 
      mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting! 
      .timer 1 1 mta.startrace $1 $rand(1,$mta.races($1)) 
      !writeini -n gus.map.ini NEW SERVER $+ $1 0 
    } 
  } 
} 
      
on *:SIGNAL:mta.endrace:{ 
  !writeini -n gus.map.ini NEW SERVER $+ $1 0 
} 

Link to comment

whats the calc for in this line

 if (gus.new($1) < $calc($mta.server($1).players)) 

alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0)

on *:SIGNAL:mta.command:{

if ($3 == !new) {

!writeini -n gus.map.ini NEW SERVER $+ $1 $calc($gus.new($1) + 1)

if ($gus.new($1) < $calc($mta.server($1).players - 1)) && ($gus.nick($1.$2) != Unknown) {

mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc(($calc($mta.server($1).players - 1) )- $gus.new($1)) $+ / $+ $calc($mta.server($1).players - 1)

}

else {

if ($gus.new($1) == $calc($mta.server($1).players -1)) {

mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting!

.timer 1 1 mta.startrace $1 $rand(1,$mta.races($1))

!remini -n gus.map.ini NEW SERVER $+ $1

}

}

}

}

on *:SIGNAL:mta.endrace:{

!writeini -n gus.map.ini NEW SERVER $+ $1 0

}

Link to comment
whats the calc for in this line

 if (gus.new($1) < $calc($mta.server($1).players)) 

 alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0) 
      
on *:SIGNAL:mta.command:{ 
  if ($3 == !new) { 
   !writeini -n gus.map.ini NEW SERVER $+ $1 $calc($gus.new($1) + 1) 
   if ($gus.new($1) < $calc($mta.server($1).players - 1))  && ($gus.nick($1.$2) != Unknown) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc(($calc($mta.server($1).players - 1) )- $gus.new($1)) $+ / $+ $calc($mta.server($1).players - 1)  
    } 
    else { 
      if ($gus.new($1) == $calc($mta.server($1).players -1)) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting! 
      .timer 1 1 mta.startrace $1 $rand(1,$mta.races($1)) 
      !remini -n gus.map.ini NEW SERVER $+ $1  
    } 
   } 
  } 
} 
      
on *:SIGNAL:mta.endrace:{ 
 !remini -n gus.map.ini NEW SERVER $+ $1  
}[/quote] 

Link to comment
alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0) 
alias gus.vote !return $readini(gus.map.ini,Voted,$mta.nick($1,$2))      
on *:SIGNAL:mta.command:{ 
  if ($3 == !new) && ($gus.vote($1,$2) == $null) { 
  !writeini -n gus.map.ini NEW SERVER $+ $1 $calc($gus.new($1) + 1) 
   !writeini -n gus.map.ini NEW $mta.nick($1,$2) voted 
   if ($gus.new($1) < $calc($mta.server($1).players - 1))  && ($gus.nick($1.$2) != Unknown) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc(($calc($mta.server($1).players - 1) )- $gus.new($1)) $+ / $+ $calc($mta.server($1).players - 1)  
    } 
    else { 
      if ($gus.new($1) == $calc($mta.server($1).players -1)) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting! 
      .timer 1 1 mta.startrace $1 $rand(1,$mta.races($1)) 
      !remini -n gus.map.ini NEW SERVER $+ $1  
      !remini -n gus.vote.ini Voted 
     } 
   } 
  } 
} 
      
on *:SIGNAL:mta.endrace:{ 
 !remini -n gus.map.ini NEW SERVER $+ $1  
      !remini -n gus.vote.ini Voted 
} 

Link to comment

Poop, forot about that :lol:

alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0) 
alias gus.vote !return $iif($readini(gus.map.ini,VOTED,$mta.nick($1,$2)),$v1,False) 
          
on *:SIGNAL:mta.command:{ 
  if ($3 == !new) { 
    if ($gus.vote($1,$2) != True) { 
      !writeini -n gus.map.ini NEW SERVER $+ $1 $calc(gus.new($1) + 1) 
      !writeini -n gus.map.ini VOTED $mta.nick($1,$2) True 
      if (gus.new($1) < $calc($mta.server($1).players)) { 
        mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc($mta.server($1).players - gus.new($1)) $+ ! 
       } 
       else { 
         mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting! 
         .timer 1 1 mta.startrace $1 $rand(1,$mta.races($1)) 
         !remove gus.map.ini 
       } 
    } 
    else mta.pm $1 $2 Error - You have all ready voted! 
  } 
} 
  
on *:SIGNAL:mta.endrace:{ 
  !remove gus.map.ini 
} 

Link to comment

dont strop at me omg i cant test things at the mo cause mi othere computer down!

spotted the error on my version

alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0)

alias gus.vote !return $readini(gus.map.ini,Voted,$mta.nick($1,$2))

on *:SIGNAL:mta.command:{

if ($3 == !new) && ($gus.vote($1,$2) == $null) {

!writeini -n gus.map.ini NEW SERVER $+ $1 $calc($gus.new($1) + 1)

!writeini -n gus.map.ini Voted $mta.nick($1,$2) voted

if ($gus.new($1) < $calc($mta.server($1).players - 1)) && ($gus.nick($1.$2) != Unknown) {

mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc(($calc($mta.server($1).players - 1) )- $gus.new($1)) $+ / $+ $calc($mta.server($1).players - 1)

}

else {

if ($gus.new($1) == $calc($mta.server($1).players - 1)) {

mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting!

.timer 1 1 mta.startrace $1 $rand(1,$mta.races($1))

!remini -n gus.map.ini NEW SERVER $+ $1

!remini -n gus.map.ini Voted

}

}

}

}

on *:SIGNAL:mta.endrace:{

!remini -n gus.map.ini

}

Link to comment
dont strop at me omg i cant test things at the mo cause mi othere computer down!

spotted the error on my version

alias gus.new !return $iif($readini(gus.map.ini,NEW,SERVER $+ $1),$v1,0) 
alias gus.vote !return $readini(gus.map.ini,Voted,$mta.nick($1,$2))      
on *:SIGNAL:mta.command:{ 
  if ($3 == !new) && ($gus.vote($1,$2) == $null) { 
  !writeini -n gus.map.ini NEW SERVER $+ $1 $calc($gus.new($1) + 1) 
   !writeini -n gus.map.ini Voted $mta.nick($1,$2) voted 
   if ($gus.new($1) < $calc($mta.server($1).players - 1))  && ($gus.nick($1.$2) != Unknown) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! Votes needed $calc(($calc($mta.server($1).players - 1) )- $gus.new($1)) $+ / $+ $calc($mta.server($1).players - 1)  
    } 
    else { 
      if ($gus.new($1) == $calc($mta.server($1).players - 1)) { 
      mta.text $1 $mta.nick($1,$2) voted a new race! No Votes needed random map starting! 
      .timer 1 1 mta.startrace $1 $rand(1,$mta.races($1)) 
      !remini -n gus.map.ini NEW SERVER $+ $1  
      !remini -n gus.map.ini Voted 
     } 
   } 
  } 
} 
      
on *:SIGNAL:mta.endrace:{ 
 !remini -n gus.map.ini  
}[/quote] 

Link to comment

And, could you tell me how to make this anti-flood script work? Becouse it doesnt mute...

on *:SIGNAL:mta.connect: {

if ($hget(mta.flood. $+ $1) == $null) {

!hmake mta.flood. $+ $1 32

}

}

on *:SIGNAL:mta.disconnect: {

if ($hget(mta.flood. $+ $1) != $null) {

!hfree mta.flood. $+ $1

}

}

on *:SIGNAL:mta.text {

var %a = $hget(mta.flood. $+ $1,$2)

if (%a > 5) {

mta.mute $1 $2

$+(!.timermta.unmute.,$1,.,$2) 1 30 mta.unmute $1 $2

}

else {

!inc %a 2

!hadd -z mta.flood. $+ $1 $2 %a

}

}

Thx :)

Link to comment
  • 3 weeks later...
And how about this anti flood script? Any help :D

why dont u just use a script with all these things in, instead of us making the same commands all over again to run in gus....

just doesnt make sense... it would have been 100 times faster to just write an alias to import all ur current stats into a new script if thats what ur worried about, gus has nothing in comparison to the stuff packed into prs and slr, yet u want us to make all the commands from our scripts to run in gus which isnt really active and which, lets be honest, isnt too great.

Link to comment
  • Recently Browsing   0 members

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