Ford Posted November 1, 2007 Share Posted November 1, 2007 Hi, could someone give me a script for new mp (!new) vote like in PRS but to make it work on GUS? Thx. Link to comment
MB|Lagzilla Posted November 1, 2007 Share Posted November 1, 2007 (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 November 1, 2007 by Guest Link to comment
Ford Posted November 1, 2007 Author Share Posted November 1, 2007 Thx for script I have one more request, is there any warn system for GUS.. ? Link to comment
MB|Lagzilla Posted November 1, 2007 Share Posted November 1, 2007 (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 November 1, 2007 by Guest Link to comment
[UVA]Bart Posted November 1, 2007 Share Posted November 1, 2007 (edited) few small errors not to worry tho make sure you use $gus.warns($1,$2) the same for the new one you missed the $ off Edited November 1, 2007 by Guest Link to comment
Ford Posted November 1, 2007 Author Share Posted November 1, 2007 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? Link to comment
MB|Lagzilla Posted November 1, 2007 Share Posted November 1, 2007 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
[UVA]Bart Posted November 2, 2007 Share Posted November 2, 2007 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
[UVA]Bart Posted November 2, 2007 Share Posted November 2, 2007 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
Ford Posted November 2, 2007 Author Share Posted November 2, 2007 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 Link to comment
[UVA]Bart Posted November 2, 2007 Share Posted November 2, 2007 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
MB|Lagzilla Posted November 2, 2007 Share Posted November 2, 2007 Poop, forot about that 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
Ford Posted November 3, 2007 Author Share Posted November 3, 2007 Still doesnt work.. Only one person writes !new and map changes to random. Pls test before posting Link to comment
[UVA]Bart Posted November 3, 2007 Share Posted November 3, 2007 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
[UVA]Bart Posted November 3, 2007 Share Posted November 3, 2007 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
Ford Posted November 3, 2007 Author Share Posted November 3, 2007 Still doesnt work as it should... It has problems with... counting players on server ! One time it says votes 3/6, and after few seconds its 2/4 Link to comment
Ford Posted November 3, 2007 Author Share Posted November 3, 2007 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
[UVA]Bart Posted November 4, 2007 Share Posted November 4, 2007 Still doesnt work as it should... It has problems with... counting players on server ! One time it says votes 3/6, and after few seconds its 2/4 its because if a player quits it counts the players allready as total in the server - 1 Link to comment
Ford Posted November 4, 2007 Author Share Posted November 4, 2007 And how about this anti flood script? Any help Link to comment
Scooby Posted November 20, 2007 Share Posted November 20, 2007 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. Link to comment
Scooby Posted November 20, 2007 Share Posted November 20, 2007 And how about this anti flood script? Any help 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
Recommended Posts