Harry Posted June 15, 2004 Share Posted June 15, 2004 Try this: alias mta.kill { if (($mta.kills($1,$2) == 30) && ($mta.deaths($1,$2) == 00)) { mta.say $1 $mta.name($1,$2) , you are suspected of unsing cheats (reason: 30 kills and 0 deaths), if I am mistaken , sorry ! mta.kick $1 $2 } } Why the $2 and $3 in kills... that are 2 different players.. I suggest using only one. Taking the killed number of kills and the killers deaths is not what you want i think Using right brackets, { and } , is required as well if there are more line within the if statement. Hope this is what you want Link to comment
Cube Posted June 15, 2004 Share Posted June 15, 2004 How make such script to for example: player #Cube(RP)* can join to server only than when his IP = xxx.xxx.xx.xx ?? Can you help me ?? Link to comment
fastphp Posted June 15, 2004 Share Posted June 15, 2004 Hi it can be quite funny, i made a colour coded manhunt once when bored lol... got it somewhere Is it poseble that you sent me that manhunt script Please Grz Michael / (ZC)James Mail : [email protected] Link to comment
Aeron Posted June 15, 2004 Share Posted June 15, 2004 How make such script to for example: player #Cube(RP)* can join to server only than when his IP = xxx.xxx.xx.xx ??Can you help me ?? alias mta.join { if ($mta.name($1,$2) == #Cube(RP)*) && ($mta.ip($2,$2) != xxx.xxx.xxx.xxx) { mta.say $1 $mta.name($1,$2) Reason: IP dismatch. mta.kick $1 $2 } } Link to comment
(cc)Rambo Posted June 15, 2004 Share Posted June 15, 2004 Is it possible that i can place the Manhunt And Vips Kotc scripts of mta ma in one? with my other scripts? Link to comment
Aeron Posted June 15, 2004 Share Posted June 15, 2004 Is it possible that i can place the Manhunt And Vips Kotc scripts of mta ma in one? with my other scripts? Yes. Link to comment
Toreno Posted June 15, 2004 Share Posted June 15, 2004 does anybody have an script that contains the function !alias, that views all names that a player has used on 1 ip? Link to comment
Shib Posted June 15, 2004 Share Posted June 15, 2004 Ok guys, i've put a load of scripts together and i thought i done it right but obviously i didn't, this is a bit big but if anyone can fix for me i would be grateful! alias mta.join { /set %life. [ $+ [ $2 ] ] $ctime } if ($exist(welcome.ini)) { mta.say $1 Hi $mta.name($1,$2) und wilkommen auf dem Server mta.say $1 visit us at www.[ZENSORED].xx } elseif ($len($mta.name($1,$2)) == 1) { mta.ban $1 $2 } } } } alias mta.kill { /mta.say $1 $mta.name($1,$2) survived for $duration($calc($ctime - %life. [ $+ [ $2 ] ] ) ) /set %life. [ $+ [ $2 ] ] $ctime } elseif ($mta.kills($1,$3) == 20) mta.say $1 Now $mta.name($1,$3) is on a warmup! if ($mta.kills($1,$3) == 50) mta.say $1 Now $mta.name($1,$3) has reached 50 kills! if ($mta.kills($1,$3) == 30) mta.say $1 Now $mta.name($1,$3) has reached 100 kills and is turning elite! } } alias mta.text { if (($mta.name($1,$2) == DaNThANuTTa) && ($3 == !shutdown)) { mta.say $1 10 mins for shutdown. .timer 1 60 mta.say $1 9 mins for shutdown. .timer 1 120 mta.say $1 8 mins for shutdown. .timer 1 180 mta.say $1 7 mins for shutdown. .timer 1 240 mta.say $1 6 mins for shutdown. .timer 1 300 mta.say $1 5 mins for shutdown. .timer 1 360 mta.say $1 4 mins for shutdown. .timer 1 420 mta.say $1 3 mins for shutdown. .timer 1 480 mta.say $1 2 mins for shutdown. .timer 1 540 mta.say $1 1 mins for shutdown. .timer 1 600 mta.say $1 Server Shutdown. .timer 1 600 mta.shutdown $1 } } elseif ($4 != $null) { 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.game($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.game($1,$2) == 1,Out Game,In Game) } elseif ($3 == !votekick) { (%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 existing 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 ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } else mta.say $1 $mta.name($1,$2) You have already voted } } elseif ($3 == !countdown) { mta.say $1 Count down! .timer 1 1 mta.say $1 5 .timer 1 2 mta.say $1 4 .timer 1 3 mta.say $1 3 .timer 1 4 mta.say $1 2 .timer 1 5 mta.say $1 1 .timer 1 6 mta.say $1 GO go go go! } alias mta.vote { mta.say $1 Vote kick cancelled: $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] } alias mta.admin { if ($2 == !welcome on) { writeini -n welcome.ini on mta.say Wilkommenstext aktiviert } elseif ($2 == !welcome off) { .remove welcome.ini mta.say Wilkommenstext deaktiviert } Link to comment
fastphp Posted June 15, 2004 Share Posted June 15, 2004 hi How make such script to for example: player #Cube(RP)* can join to server only than when his IP = xxx.xxx.xx.xx ??Can you help me ?? alias mta.join { if ($mta.name($1,$2) == #Cube(RP)*) && ($mta.ip($2,$2) != xxx.xxx.xxx.xxx) { mta.say $1 $mta.name($1,$2) Reason: IP dismatch. mta.kick $1 $2 } } This code is not working on my server, My mirc gives a warning : */mta.getip: insufficient parameters Can someone tel me what i doing wrong ? I have past the script direct under mta.join ; Person $2 joins server $1 alias mta.join { ;$1 = Server ;$2 = Player ID alias mta.join { if ($mta.name($1,$2) == (ZC)James) && ($mta.ip($2,$2) != 192.168.2.100) { mta.say $1 $mta.name($1,$2) Reason: IP dismatch. mta.kick $1 $2 } } if ( $mta.name($1,$2) == Unknown || $2 > $mta.maxplayers($1) ) { echo -s INTERNAL SERVER ERROR, RESTARTING mta.dis $1 Unknows detected! mta.con $1 } Etc Help!! Grz Michael / (ZC)James Link to comment
Guest Posted June 15, 2004 Share Posted June 15, 2004 Hello I have problem with one script: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1-2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } My problem is that when I logging an admin say:"Admin rights given to Unknown" And then i can kick player but i can't use the rest of the scripts Can some1 halp me ? Link to comment
Harry Posted June 15, 2004 Share Posted June 15, 2004 This code is not working on my server,My mirc gives a warning : */mta.getip: insufficient parameters I suggest you search this topic for the mta.getip function.. If something doens't work... UTFS! Link to comment
Shib Posted June 15, 2004 Share Posted June 15, 2004 Hey guys, i finally got my script working, and then it fu*ked up again. I dunno whether you can sort it but it's just one little prob on it. Please spot it!! alias mta.pm { if (password == $3) { .writeini $+(",$scriptdir,$1.ini") ID $+ $2 oper 1 mta.say $1 Admin rights given to $mta.name($1,$2) } if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) >= 5)) { mta.say $1 $mta.name($1,$2) Reason: Please do not use caps! mta.kick $1 $2 } } alias mta.join { mta.say $1 $mta.name($1,$2) Welcome to DaNThANuTTa's Ultimate Stunt Server! mta.say $1 Please visit my website http://www.danthanutta.instantws.com! } } alias mta.text { if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) > 5)) { mta.say $1 $mta.name($1,$2) Reason: Caps usage mta.kick $1 $2 } if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) { if ($3 == !kick) { mta.kick $1 $4 } if ($3 == !ban) { mta.ban $1 $4 } } if (!stats 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) } if ($3 == !ping) { mta.say $1 $mta.name($1,$2) +$ , your ping is: $mta.ping($1,$2) } if ($3 == !players) { var %a = 0,%b,%c while %a < 26 { if ($mta.game($1,%a) == 1) { !inc %b } if ($mta.game($1,%a) == 2) { !inc %c !inc %a } } mta.say $1 $mta.maxplayers($1) player server, $mta.players($1) $+ / $+ $mta.maxplayers($1) $+ , %a player(s) ingame, %b player(s) outgame. } if ($3 == !admin) { var %a = 0,%b while %a < 26 { if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) %b = %b $mta.name($1,$2) !inc %a } mta.say $1 Current admins: %b } if (!count* iswm $3) { mta.say $1 Countdown! .timerc1 1 1 mta.say $1 5 .timerc2 1 2 mta.say $1 4 .timerc3 1 3 mta.say $1 3 .timerc4 1 4 mta.say $1 2 .timerc5 1 5 mta.say $1 1 .timerc6 1 6 mta.say $1 GO GO GO! } if ($3 == !votekick) { 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 existing ID-number: "!votekick " } 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 ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } 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
OpiuM. Posted June 16, 2004 Share Posted June 16, 2004 Hello I have problem with one script: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1-2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } My problem is that when I logging an admin say:"Admin rights given to Unknown" And then i can kick player but i can't use the rest of the scripts Can some1 halp me ? your answer is: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1,$2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } not (1-2) , but (1,2) EDIT: need a $2 instead of regular 2 as well Link to comment
OpiuM. Posted June 16, 2004 Share Posted June 16, 2004 Hey guys, i finally got my script working, and then it fu*ked up again. I dunno whether you can sort it but it's just one little prob on it. Please spot it!!alias mta.pm { if (password == $3) { .writeini $+(",$scriptdir,$1.ini") ID $+ $2 oper 1 mta.say $1 Admin rights given to $mta.name($1,$2) } if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) >= 5)) { mta.say $1 $mta.name($1,$2) Reason: Please do not use caps! mta.kick $1 $2 } } alias mta.join { mta.say $1 $mta.name($1,$2) Welcome to DaNThANuTTa's Ultimate Stunt Server! mta.say $1 Please visit my website http://www.danthanutta.instantws.com! } } alias mta.text { if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) > 5)) { mta.say $1 $mta.name($1,$2) Reason: Caps usage mta.kick $1 $2 } if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) { if ($3 == !kick) { mta.kick $1 $4 } if ($3 == !ban) { mta.ban $1 $4 } } if (!stats 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) } if ($3 == !ping) { mta.say $1 $mta.name($1,$2) +$ , your ping is: $mta.ping($1,$2) } if ($3 == !players) { var %a = 0,%b,%c while %a < 26 { if ($mta.game($1,%a) == 1) { !inc %b } if ($mta.game($1,%a) == 2) { !inc %c !inc %a } } mta.say $1 $mta.maxplayers($1) player server, $mta.players($1) $+ / $+ $mta.maxplayers($1) $+ , %a player(s) ingame, %b player(s) outgame. } if ($3 == !admin) { var %a = 0,%b while %a < 26 { if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) %b = %b $mta.name($1,$2) !inc %a } mta.say $1 Current admins: %b } if (!count* iswm $3) { mta.say $1 Countdown! .timerc1 1 1 mta.say $1 5 .timerc2 1 2 mta.say $1 4 .timerc3 1 3 mta.say $1 3 .timerc4 1 4 mta.say $1 2 .timerc5 1 5 mta.say $1 1 .timerc6 1 6 mta.say $1 GO GO GO! } if ($3 == !votekick) { 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 existing ID-number: "!votekick " } 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 ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } 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 ] ] } well one problem is here: if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) { if ($3 == !kick) { mta.kick $1 $4 } if ($3 == !ban) { mta.ban $1 $4 i personnal dont have a } after mta.kick $1 $4, like this: if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 Link to comment
fastphp Posted June 16, 2004 Share Posted June 16, 2004 This code is not working on my server,My mirc gives a warning : */mta.getip: insufficient parameters I suggest you search this topic for the mta.getip function.. If something doens't work... UTFS! i have only that problem if i past that script in trou my scripts.mrc So if ill removed it then mirc say noting how can i fix the problem Link to comment
Toreno Posted June 16, 2004 Share Posted June 16, 2004 sry i had to repeat this: does anybody have an script that contains the function !alias, that views all names that a player has used on 1 ip? Link to comment
Aeron Posted June 16, 2004 Share Posted June 16, 2004 sry i had to repeat this: does anybody have an script that contains the function !alias, that views all names that a player has used on 1 ip? Ask [FMJ]Oli. Hey guys, i finally got my script working, and then it fu*ked up again. I dunno whether you can sort it but it's just one little prob on it. Please spot it!! Debugged: alias mta.pm { ;Set to your real password if (admin == $3-) { .writeini $+(",$scriptdir,$1.ini") ID $+ $2 oper 1 mta.say $1 Admin rights given to $mta.name($1,$2) } if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) >= 5)) { mta.say $1 $mta.name($1,$2) Reason: Please do not use caps! mta.kick $1 $2 } } alias mta.join { mta.say $1 $mta.name($1,$2) Welcome to DaNThANuTTa's Ultimate Stunt Server! mta.say $1 Please visit my website www.danthanutta.instantws.com! } alias mta.text { if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) > 5)) { mta.say $1 $mta.name($1,$2) Reason: Caps usage mta.kick $1 $2 } if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } if (!stats* 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) } if ($3 == !ping) { mta.say $1 $mta.name($1,$2) $+ , your ping is: $mta.ping($1,$2) } if ($3 == !players) { var %a = 0,%b,%c while %a < 26 { if ($mta.game($1,%a) == 1) !inc %b if ($mta.game($1,%a) == 2) !inc %c inc %a } mta.say $1 $mta.maxplayers($1) player server, $mta.players($1) $+ / $+ $mta.maxplayers($1) $+ , %a player(s) ingame, %b player(s) outgame. } if ($3 == !admin) { var %a = 0,%b while %a < 26 { if ($readini($+($nofile($script(mta.mrc)),$1,.ini),ID $+ $2,oper)) %b = %b $mta.name($1,$2) !inc %a } mta.say $1 Current admins: %b } if (!count* iswm $3) { mta.say $1 Countdown! .timerc1 1 1 mta.say $1 5 .timerc2 1 2 mta.say $1 4 .timerc3 1 3 mta.say $1 3 .timerc4 1 4 mta.say $1 2 .timerc5 1 5 mta.say $1 1 .timerc6 1 6 mta.say $1 GO GO GO! } if ($3 == !votekick) { 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 existing ID-number: "!votekick " } 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 ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) { mta.say $1 $mta.name($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes ur out! mta.kick $1 %vote.nick. [ $+ [ $1 ] ] unset %vote.nick. [ $+ [ $1 ] ] unset %vote.voters. [ $+ [ $1 ] ] .timervote [ $+ [ $1 ] ] off } } 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 ] ] } This code is not working on my server,My mirc gives a warning : */mta.getip: insufficient parameters Sorry I made a typo. Debugged: alias mta.join { if ($mta.name($1,$2) == #Cube(RP)*) && ($mta.ip($1,$2) != xxx.xxx.xxx.xxx) { mta.say $1 $mta.name($1,$2) Reason: IP dismatch. mta.kick $1 $2 } } This code is not working on my server,My mirc gives a warning : */mta.getip: insufficient parameters Can someone tel me what i doing wrong ? I have past the script direct under mta.join ; Person $2 joins server $1 alias mta.join { ;$1 = Server ;$2 = Player ID alias mta.join { if ($mta.name($1,$2) == (ZC)James) && ($mta.ip($2,$2) != 192.168.2.100) { mta.say $1 $mta.name($1,$2) Reason: IP dismatch. mta.kick $1 $2 } } if ( $mta.name($1,$2) == Unknown || $2 > $mta.maxplayers($1) ) { echo -s INTERNAL SERVER ERROR, RESTARTING mta.dis $1 Unknows detected! mta.con $1 } Etc Help!! Grz Michael / (ZC)James Paste it IN the alias not outside: ; Person $2 joins server $1 alias mta.join { ;$1 = Server ;$2 = Player ID alias mta.join { if ($mta.name($1,$2) == (ZC)James) && ($mta.ip($2,$2) != 192.168.2.100) { mta.say $1 $mta.name($1,$2) Reason: IP dismatch. mta.kick $1 $2 } if ($mta.name($1,$2) == Unknown) || ($2 > $mta.maxplayers($1)) { echo -s INTERNAL SERVER ERROR, RESTARTING mta.dis $1 Unknowns detected! mta.con $1 } } Link to comment
Guest Posted June 16, 2004 Share Posted June 16, 2004 Hello I have problem with one script: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1-2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } My problem is that when I logging an admin say:"Admin rights given to Unknown" And then i can kick player but i can't use the rest of the scripts Can some1 halp me ? your answer is: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1,$2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } not (1-2) , but (1,2) EDIT: need a $2 instead of regular 2 as well THX opium now i can log on but the rest of scripts dont work Link to comment
Harry Posted June 16, 2004 Share Posted June 16, 2004 Can i request a split up of this topic? Many people are asking me for some scripts, and if i refer to this page, they can't find it. Also the search only gives the topic, not the right page.. It's getting quite annoing. Or Aeron could start a froum for MTAMA scripting questions only, i think there are enough questions... Harry P.S. My server has been reconnected by my ISP, and i'm working on a new version of my scripts.. Any suggestions? Link to comment
OpiuM. Posted June 16, 2004 Share Posted June 16, 2004 Hello I have problem with one script: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1-2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } My problem is that when I logging an admin say:"Admin rights given to Unknown" And then i can kick player but i can't use the rest of the scripts Can some1 halp me ? your answer is: alias mta.pm { if ($3- == admin ) { mta.say $1 Admin rights given to $mta.name($1,$2) writeini $+(",$scriptdir,$1.ini") ID $+ $2 op 1 } } and in mta.txt alias mta.text { if ($readini($scriptdir $+ $1.ini,ID $+ $2,op)) { if ($3 == !kick) mta.kick $1 $4 if ($3 == !ban) mta.ban $1 $4 } } not (1-2) , but (1,2) EDIT: need a $2 instead of regular 2 as well THX opium now i can log on but the rest of scripts dont work well then there is even more problems with your script that u didnt post, u could PM me the script or post it here Link to comment
Shib Posted June 16, 2004 Share Posted June 16, 2004 Hey Aeron, i don't want to remove your title i just want to add one of my own. And not to replace yours. In scripts.mrc what would be the code for !info and then i can have my own message saying m message or my script that will comeup with your title at same time. Cheers Link to comment
Oli Posted June 16, 2004 Share Posted June 16, 2004 (edited) the |Halt command was removed in version 2.011, so if u add ure own !info part it will not cancel the default MTAmA info response. an !alias script: under mta.join: if ($mta.name($1,$2) == $mta.name($1,$2)) { if ($readini("Alias.ini",IP,$mta.ip($1,$2))) { if ($mta.name($1,$2) $+ , !isin $readini(Alias.ini",IP,$mta.ip($1,$2)) $+ ,) { writeini -n "Alias.ini" IP $mta.ip($1,$2) $readini("Alias.ini",IP,$mta.ip($1,$2)) $+ , $mta.name($1,$2) } } else { writeini -n "Alias.ini" IP $mta.ip($1,$2) $mta.name($1,$2) } } kinda crude i know, but it works. Under mta.text: if ($3 == !aliases) { if ($4 != $null) { if ($readini("Alias.ini",IP,$mta.ip($1,$mta.getid($1,$4)))) { mta.say $1 Aliases used by $mta.name($1,$mta.getid($1,$4)) $+ : $readini("Alias.ini",IP,$mta.ip($1,$mta.getid($1,$4))) } } else { mta.say $1 Syntax: !aliases } } thre u go Edited June 16, 2004 by Guest Link to comment
Shib Posted June 16, 2004 Share Posted June 16, 2004 Yeah, i don't want to replace or remove it i just want code to say !info then something like myscript v 1.0 etc. I tryed but can't get to work Link to comment
Oli Posted June 16, 2004 Share Posted June 16, 2004 if $3 == !info mta.say $1 Your server info here that under mta.text Link to comment
Recommended Posts