FFCFoo Posted November 26, 2007 Share Posted November 26, 2007 I am not A very good scripter can someone make me a !tempban script for my new script i am writing so i dont have to use GRS i want my script's to be wrote not from GRS just where i can see them Link to comment
ImJohnMclane Posted November 28, 2007 Share Posted November 28, 2007 I am not A very good scripter can someone make me a !tempban script for my new script i am writing so i dont have to use GRS i want my script's to be wrote not from GRS just where i can see them umm, I hope that works, MTA:VC on *:SIGNAL:mta.command: { if ($3 == !ban) { if ($mta.level($1,$2) == 5) mta.kick $1 $4 !writeini -n " $+ $scriptdir $+ badguys.ini" NICK $4 True } else mta.pm $1 $2 Error - You have 2 be level 5 to use this command!. } } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ badguys.ini,NICK,$mta.name($1,$2)) == True) { mta.msg $1 $2 Sorry You're Banned from this server. mta.ban $1 %a It's just a Banning script and I hope that works I haven't tested it yet, maybe mta.ban $1 %a should be mta.ban $1 $4 or $2 Link to comment
lil Toady Posted November 28, 2007 Share Posted November 28, 2007 that's not what he wants ImJohnMclane. I could write one a bit later, if nobody does it sooner Link to comment
FFCFoo Posted November 29, 2007 Author Share Posted November 29, 2007 what you meen i think that script is a waste of time i need a real script i tryed it it didnt work then i found a tempban but lost it and i came back here but no working no more so that script does not work Link to comment
[UVA]Bart Posted November 29, 2007 Share Posted November 29, 2007 is it for mtasa or 0.5 ? this ones for mtasa on *:SIGNAL:mta.join: { if ($readini(slrtempban.ini,Tempban,$mta.name($1,$2)) == banned) { mta.text $1 $2 Sorry You're temporarly Banned from this server. mta.kick $1 %a } on *:SIGNAL:mta.command: { var %a = $iif(($4 == $null),$2,$iif(($mta.getid($1,$4) == $null),$2,$v1)) if ($3 == !tempban) { if ($mta.level($1,$2) < 4) mta.pm $1 $2 Error: Incorrect Level elseif ($mta.level($1,$2) >= 4) { !writeini -n slrtempban.ini Tempban %a banned mta.kick $1 %a } } } Link to comment
Guest Posted November 30, 2007 Share Posted November 30, 2007 Try this is a ban script on *:SIGNAL:mta.command: { if ($3 == !ban) { if ($mta.level($1,$2) >= 2) mta.kick $1 $4 !writeini -n " $+ $scriptdir $+ banned.ini" Nick $4 True } else mta.msg $1 $2 Error - You have 2 be level 5 to use this command!. } on *:SIGNAL:mta.join: { if ($readini($scriptdir $+ banned.ini,Nick,$mta.name($1,$2)) == True) { mta.msg $1 $2 Sorry You're Banned from this server. mta.ban $1 $2 } } This is a ban script not a tempban just edit into tempban Link to comment
FFCFoo Posted December 1, 2007 Author Share Posted December 1, 2007 OKay Why does every one give me a !ban script i just need a temp ban script for MTA:VC OKay Link to comment
Scooby Posted December 4, 2007 Share Posted December 4, 2007 ok since i dont know what kind of script/login u have, i'll leave the level part out, it can be added whenever... on *:SIGNAL:mta.command: { var %a = $iif($4 == $null,$2,$iif($mta.getid($1,$4) == -1,-1,$v1)) if ($3 == !tban) && ($mta.name($1,$2) == YOURNAME) { if (%a == $2) mta.msg $1 $2 Error, Cannot Ban Self elseif (%a == -1) mta.msg $1 $2 Error, Invalid Name/ID else { var %bantime = $iif($5 !isnum,30,$iif($5 > 1,$5)) mta.say $1 $mta.name($1,$2) Is Tempbanning $mta.name($1,%a) For %bantime Mins. .timer $+ $mta.name($1,%a) 1 $calc(%bantime * 60) mta.unban $1 $mta.ip($1,%a) mta.ban $1 %a } } } !tban - bans player for 30mins !tban - bans player for specified time in minutes. this is just something quick, Note: if u ban someone then switch off mirc, they will stay banned. i havent tested this, so any probs just post here and i will get back to u asap. Link to comment
FFCFoo Posted December 5, 2007 Author Share Posted December 5, 2007 thanks ill see if it works Link to comment
Scooby Posted December 5, 2007 Share Posted December 5, 2007 actually i spotted a small bug here var %bantime = $iif($5 !isnum,30,$iif($5 > 1,$5)) replace the line with this: var %bantime = $iif($5 !isnum,30,$iif($5 > 1,$5,30)) sry Link to comment
lil Toady Posted December 5, 2007 Share Posted December 5, 2007 i'd suggest writing to an ini the unban time and ip though, in case you close mirc or it crashes Link to comment
Scooby Posted December 5, 2007 Share Posted December 5, 2007 yeah id suggest that too.. i just couldnt be bothered to write it off my head. ive figured out how to do so much cool stuff just lately, like a proper login system for ALL users, for mta race, uploading server info to a website etc, all with only a normal irc script. i just cant be bothered to make it now... is it really worth it roll on DM! Link to comment
lil Toady Posted December 12, 2007 Share Posted December 12, 2007 here's a tempban script i've just written (not tested!) usage: !tempban <#time> (like '!tempban scooby 1 day' - 1 day ban or '!tempban scooby 5 m' - 5 minutes ban) on *:SIGNAL:mta.connect:{ var %a = 1,%ip,%time while (%a <= $ini($scriptdir $+ $1.tempbans.ini,0)) { %ip = $ini($scriptdir $+ $1.tempbans.ini,%a) %time = $readini($scriptdir $+ $1.tempbans.ini,%ip,time) if ($ctime >= %time) mta.tempunban $1 %ip else !.timer 1 $calc(%time - $ctime) mta.tempunban $1 %ip !inc %a } } on *:SIGNAL:mta.command:{ var %a = $iif($4,$iif($mta.getid($1,$4),$v1,-1),$2) if ($3 == !tempban) { if ($mta.level($1,$2) < 3) mta.pm $1 $2 Error - Higher level required elseif (%a == $2) mta.pm $1 $2 Error - You cant tempban yourself elseif (%a == -1) mta.pm $1 $2 Error - Absent ID elseif ($mta.level($1,$2) <= $mta.level($1,%a)) mta.pm $1 $2 Error - Can't ban a player with the same or higher level else { if ($5 isnum) { if (m* iswm $6) { mta.text $1 $mta.nick($1,%a) has been banned for $5 minute $+ $iif($5 != 1,s) $+ , by $mta.nick($1,$2) $+ . $iif($7,Reason: $7-) mta.tempban $1 %a $calc($5 * 60) } elseif (h* iswm $6) { mta.texxt $1 $mta.nick($1,%a) has been banned for $5 hour $+ $iif($5 != 1,s) $+ , by $mta.nick($1,$2) $+ . $iif($7,Reason: $7-) mta.tempban $1 %a $calc($5 * 3600) } elseif (d* iswm $6) { mta.text $1 $mta.nick($1,%a) has been banned for $5 day $+ $iif($5 != 1,s) $+ , by $mta.nick($1,$2) $+ . $iif($7,Reason: $7-) mta.tempban $1 %a $calc($5 * 86400) } else mta.pm $1 $2 Invalid time } else mta.pm $1 $2 Invalid time } } } alias mta.tempban { !writeini " $+ $scriptdir $+ $1.tempbans.ini" $mta.ip($1,$2) nick $mta.nick($1,$2) !writeini " $+ $scriptdir $+ $1.tempbans.ini" $mta.ip($1,$2) time $calc($ctime + $3) mta.ban $1 $2 !.timer 1 $3 mta.tempunban $1 $mta.ip($1,$2) } alias mta.tempunban { mta.unban $1 $2 mta.text $1 $readini($scriptdir $+ $1.tempbans.ini,$2,nick) has been unbanned. (Tempban) !remini " $+ $scriptdir $+ $1.tempbans.ini" $2 } Link to comment
FFCFoo Posted December 13, 2007 Author Share Posted December 13, 2007 Thank's lil toady man very much that is a good script Link to comment
FFCFoo Posted December 13, 2007 Author Share Posted December 13, 2007 lil Toady the script it doesent work it doesent say inything and there is a mta level in it i took that out i dont need that i got a admin system script that doesent need that also i dono what's rong Link to comment
lil Toady Posted December 13, 2007 Share Posted December 13, 2007 You just took off the line? change 'elseif' to 'if' in the next line then Link to comment
Scooby Posted December 13, 2007 Share Posted December 13, 2007 hehehe... looks kinda big lil toady... ur slacking mate.. u should have use a multiplier for the d/h/m then u wouldnt have needed the same code 3 times. also, 1 timer running a check on the banned people might be better than a timer per person, although i guess thats debatable. good work all the same. foo, I havent tried it, but maybe u should have tried it before u took stuff out. now noone knows if its broke because of what uve changed. Link to comment
lil Toady Posted December 13, 2007 Share Posted December 13, 2007 shh scooby! Im forgetting mirc scripting, was putting 'then' and 'end' all over everywhere instead of brackets writing that And one timer won't be that accurate! Link to comment
Scooby Posted December 13, 2007 Share Posted December 13, 2007 shh scooby! Im forgetting mirc scripting, was putting 'then' and 'end' all over everywhere instead of brackets writing that And one timer won't be that accurate! lol.. i bet accurate.. hmm well im sure it doesnt need to be to the nearest second, i have mine as mins/hours/weeks/days/months every 60 secs it checks the file for names to be unbanned. both are as good i guess, its just if people used it a lot they could end up with a lot of timers running, rather than just 1. anyway its all good i guess. Link to comment
lil Toady Posted December 13, 2007 Share Posted December 13, 2007 Else if they used it much it'd have to go through a big file to check who to unban every minute /me hides Link to comment
Scooby Posted December 13, 2007 Share Posted December 13, 2007 hehe like i said... debatable Link to comment
Recommended Posts