Cube Posted May 29, 2004 Share Posted May 29, 2004 HI, - checkping: not connected to server what this is ???????? Why this not working ?? alias checkpings { set %temp.i 0 while (%temp.i < 26) { set %temp.ping $mta.ping(1, %temp.i) if ( (%temp.ping > 1000) || (%temp.ping < 0) ) { halt } if (%temp.ping != $null) { inc %loop. [ $+ [ %temp.i ] ] 1 if (%loop. [ $+ [ %temp.i ] ] > 12) { set %loop. [ $+ [ %temp.i ] ] 1 } set %ping. [ $+ [ %temp.i ] $+ . $+ [ %loop. [ $+ [ %temp.i ] ] ] ] %temp.ping if (%ping. [ $+ [ %temp.i ] $+ . $+ ] 12 != $null) { set %temp.j 1 set %temp.average 0 while (%temp.j <= 12) { inc %temp.average %ping. [ $+ [ %temp.i ] $+ . $+ [ %temp.j ] ] inc %temp.j 1 } set %temp.average $calc(%temp.average / 12) set %average. [ $+ [ %temp.i ] ] %temp.average if (%temp.average >= %max) { /mta.say 1 Kicking $mta.name(1, %temp.i) for having average ping over %max /mta.kick 1 %temp.i } } } inc %temp.i 1 } unset %temp.* } alias mta.start { timerping 0 10 checkpings } alias mta.join { unset %ping. [ $+ [ $2 ] $+ ] * set %loop. [ $+ [ $2 ] ] 0 } Can you help me AERON ???? Link to comment
Aeron Posted May 30, 2004 Share Posted May 30, 2004 Ok Cube for which server do you use it? If its not number 1 it doesn't work. Link to comment
Cube Posted May 30, 2004 Share Posted May 30, 2004 Ok THX Aeron , and this: /set %max 300 where i muts give it ?? Link to comment
Aeron Posted May 30, 2004 Share Posted May 30, 2004 Ok THX Aeron , and this: /set %max 300 where i muts give it ?? You can put it under 'alias checkpings {' So you get: alias checkpings { set %max 300 set %temp.i 0 ... Link to comment
Cube Posted May 30, 2004 Share Posted May 30, 2004 YEAAaaaa !!!! Very big thx Aeron, working . THX !! Link to comment
Cube Posted May 30, 2004 Share Posted May 30, 2004 Aeron ?? Why if i have this: /set %life. [ $+ [ $2 ] ] $ctime } or this: unset %ping. [ $+ [ $2 ] $+ ] * set %loop. [ $+ [ $2 ] ] 0 } in alias mta.join , doesn't work all scripts in alias mta.text ?? Link to comment
Aeron Posted May 30, 2004 Share Posted May 30, 2004 Aeron ??Why if i have this: /set %life. [ $+ [ $2 ] ] $ctime } or this: unset %ping. [ $+ [ $2 ] $+ ] * set %loop. [ $+ [ $2 ] ] 0 } in alias mta.join , doesn't work all scripts in alias mta.text ?? Just a part for the script to function rite and get no error for unexisting players. Link to comment
Cube Posted May 30, 2004 Share Posted May 30, 2004 WHO want how make script !stats, but !stats ?? Link to comment
Vincent Posted May 30, 2004 Share Posted May 30, 2004 Is there already somebody who spend some time in an !alias script Link to comment
Aeron Posted May 30, 2004 Share Posted May 30, 2004 WHO want how make script !stats, but !stats ?? if (!stat* iswm $3) { if ($4 isnum) mta.say $1 Name: $mta.name($1,$4) - ID: $4 - Ping: $mta.ping($1,$4) - Kills: $mta.kills($1,$4) - Deaths: $mta.deaths($1,$4) - Online: $duration($mta.online($1,$4)) - Status: $iif($mta.status($1,$4) == 1,Out Game,In Game) else mta.say $1 Name: $mta.name($1,$2) - ID: $2 - Ping: $mta.ping($1,$2) - Kills: $mta.kills($1,$2) - Deaths: $mta.deaths($1,$2) - Online: $duration($mta.online($1,$2)) - Status: $iif($mta.status($1,$2) == 1,Out Game,In Game) } Is there already somebody who spend some time in an !alias script What does is supposed to do? Link to comment
Quig Posted May 30, 2004 Share Posted May 30, 2004 hey thx aeron it works but the timer isn't doing anything, i can't get it to stop by itself, so now when i test it everytime i activate a votekick it continues to run, can u see anything else wrong with this?? if ($3 == !votekick) { %vote.percentage = 50 if (%vote.nick. [ $+ [ $1 ] ] == $null) { if ($ini($+(".$scriptdir,$1,.ini,"),ID $+ $4)) { set %vote.nick. [ $+ [ $1 ] ] $4 set %vote.voters. [ $+ [ $1 ] ] $null mta.say $1 Votekick "!vote" if u want that $mta.name($1,$4) shall be kicked.[ $calc($left($did(mta,$1 $+ 21),2) / 2) votes needed] [30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } else mta.say $1 Give up an exisiting ID-number: "!votekick <#ID"> } else mta.say $1 Another votekick is running: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) } if (($3 == !vote) && (%vote.nick. [ $+ [ $1 ] ] != $null)) { if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { %vote.voters [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 mta.say $1 $numtok(%vote.voters. [ $+ $1 ] ],32 votes for $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) if ($calc($numtok(%vote.voters. [ $+ [$1 ] ],32) / $mta.players($1) *100) >= %vote.percentage) { mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $! ] ],32 votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] on } } else mta.say $1 $mta.name($1,$2) You have already voted } } alias mta.vote { mta.say $1 Vote kick cancelled: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } Link to comment
Vincent Posted May 30, 2004 Share Posted May 30, 2004 It had to check all the names that once logged in on the same IP... my english isn't that good so i hope you understand it . If you don't i can explane it in dutch [/img] Link to comment
Quig Posted May 30, 2004 Share Posted May 30, 2004 what i want it to do is if noone votes in say 5mins it would stop itself that way if the server is busy u won't have multiple votekicks running at the same time Link to comment
Aeron Posted May 30, 2004 Share Posted May 30, 2004 what i want it to do is if noone votes in say 5mins it would stop itself that wayif the server is busy u won't have multiple votekicks running at the same time ------------------------------- alias mta.text { if ($3 == !votekick) { %vote.percentage = 50 if (%vote.nick. [ $+ [ $1 ] ] == $null) { if ($ini($+(".$scriptdir,$1,.ini,"),ID $+ $4)) { set %vote.nick. [ $+ [ $1 ] ] $4 set %vote.voters. [ $+ [ $1 ] ] $null mta.say $1 Votekick "!vote" if u want that $mta.name($1,$4) shall be kicked.[ $calc($left($did(mta,$1 $+ 21),2) / 2) votes needed] [30 sec] .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1 } else mta.say $1 Give up an exisiting ID-number: "!votekick <#ID"> } else mta.say $1 Another votekick is running: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) } if (($3 == !vote) && (%vote.nick. [ $+ [ $1 ] ] != $null)) { if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) { %vote.voters [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2 mta.say $1 $numtok(%vote.voters. [ $+ $1 ] ],32 votes for $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) if ($calc($numtok(%vote.voters. [ $+ [$1 ] ],32) / $mta.players($1) *100) >= %vote.percentage) { mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $! ] ],32 votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] on } } else mta.say $1 $mta.name($1,$2) You have already voted } } alias mta.vote { mta.say $1 Vote kick cancelled: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } ------------------- THe script parts in bold should start/stop the timer It had to check all the names that once logged in on the same IP... my english isn't that good so i hope you understand it . If you don't i can explane it in dutch alias mta.join { var %a = 1 while (%a <= $mta.maxplayers($1)) { if ($ini($scriptdir $+ $1.ini,ID $+ %a)) { if (($mta.ip($1,%a) == $mta.ip($1,$2)) && (%a != $2)) { mta.say $1 $mta.name($1,$2) Reason: Clone mta.kick $1 $2 } } inc %a } } Link to comment
Quig Posted May 30, 2004 Share Posted May 30, 2004 ok cool it cancells itself but it does it right away so noone has time to vote at all?????? Link to comment
Aeron Posted May 30, 2004 Share Posted May 30, 2004 ok cool it cancells itself but it does it right away so noone has time to vote at all?????? after 30 seconds if you look good... Link to comment
Vincent Posted May 30, 2004 Share Posted May 30, 2004 Aeron ik bedoel: Stel ik ben een keer op me server ingelogd als Vincent. Dan disconnect ik kom ik terug als Test. Nou wil ik dus dat als ik als admin {dbc}montana !alias vincent doe dat ik iets zie als: Vincent aka Test, etc, etc... You think this is possible Link to comment
Cube Posted May 30, 2004 Share Posted May 30, 2004 Thenks Aeron ! I have 1 question hehe again. How make !stats with total kills and total deaths --> mta.name - kills - deaths - Total kills - total death ?? Link to comment
tbot Posted May 31, 2004 Share Posted May 31, 2004 Aeron ik bedoel:Stel ik ben een keer op me server ingelogd als Vincent. Dan disconnect ik kom ik terug als Test. Nou wil ik dus dat als ik als admin {dbc}montana !alias vincent doe dat ik iets zie als: Vincent aka Test, etc, etc... You think this is possible I just have one thing to say: have about a week (hopefully ) patience Link to comment
Oli Posted May 31, 2004 Share Posted May 31, 2004 Is there already somebody who spend some time in an !alias script yeah im working on a script to do that, nearly done now. msn me about it when i return home on tuesday. Link to comment
Guardians Proper Posted May 31, 2004 Share Posted May 31, 2004 You mean a script that checks IPs and reports what other names that player has used? ... That'd be awesome. Link to comment
Aeron Posted May 31, 2004 Share Posted May 31, 2004 Thenks Aeron !I have 1 question hehe again. How make !stats with total kills and total deaths --> mta.name - kills - deaths - Total kills - total death ?? Ask [FMJ]Oli because he has such script... Aeron ik bedoel:Stel ik ben een keer op me server ingelogd als Vincent. Dan disconnect ik kom ik terug als Test. Nou wil ik dus dat als ik als admin {dbc}montana !alias vincent doe dat ik iets zie als: Vincent aka Test, etc, etc... You think this is possible alias mta.join { var %a = $read(ips.txt,w,$mta.ip($1-2) *) if (%a != $null) { var %a = $gettok(%a,2,32) if ($mta.name($1-2) != %a) { mta.say $1 $mta.name($1-2) is %a } } else !write ips.txt $mta.ip($1-2) $mta.name($1-2) } Link to comment
Vincent Posted May 31, 2004 Share Posted May 31, 2004 Thnx Aeron, But a few more questions $mta.name($1-2) = Unknown? When i change it into $mta.name($1,$2) it works. But then it only writes down one name behind the ip. So i can never check all the names the player on that IP ever used? U think this is possible or am i to (lastig) don't know how to say in english Thnx anyway Link to comment
Recommended Posts