Jump to content

!new in GUS


Ford

Recommended Posts

Posted (edited)

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
Posted (edited)
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
Posted

Err... !new script doesnt work!

It shows all the time 2 votes needed if there are 2 players on server and both write !new if theres 3 players it all the time says 3 votes needed etc etc.

Could someone do something about it?

Posted

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 
} 

Posted

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

}

Posted
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] 

Posted

Ehm... Still doesnt work, theres one bug, for example if theres seven ppl on server, and one person will write seven times !new the map will change to random :x

Posted
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 
} 

Posted

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 
} 

Posted

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

}

Posted
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] 

Posted

Still doesnt work as it should... It has problems with... counting players on server xD! One time it says votes 3/6, and after few seconds its 2/4 :x

Posted

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 :)

Posted
Still doesnt work as it should... It has problems with... counting players on server xD! One time it says votes 3/6, and after few seconds its 2/4 :x

its because if a player quits it counts the players allready as total in the server - 1

  • 3 weeks later...
Posted

just reading thru, just wanted to point out bart,

its best to write the id, not nick, since the id's never change, but nick's do.

Posted
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.

  • Recently Browsing   0 members

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