Rmst Posted November 9, 2007 Posted November 9, 2007 Hello i would like to ask if there is a way to type !ban Hell isntead of !ban hello3424652s24s i tried many things to make a wildcard script but i cant get it to work hope you guys can help me greetz
[UVA]Bart Posted November 9, 2007 Posted November 9, 2007 try this run it in a seperate script on *:SIGNAL:mta.command { if ($3 == !ban) slr.baning $1- } alias slr.baning { var %a = $iif(($4 == $null),$2,$iif(($mta.getid($1,$4) == $null),$2,$v1)) if ($4 == $null) mta.pm $1 $2 Error: !ban <nick or id> else { if ($mta.level($1,$2) < 4) mta.pm $1 $2 Error: Incorrect Level if ($mta.level($1,$2) >= 4) mta.ban $1 %a mta.text $1 $mta.nick($1,$2) Has Just Banned: $mta.nick($1,%a) } }
Rmst Posted November 9, 2007 Author Posted November 9, 2007 I meant for IRC (i forgot to say) and the !ban was just an example
Scooby Posted November 10, 2007 Posted November 10, 2007 try this run it in a seperate script on *:SIGNAL:mta.command { if ($3 == !ban) slr.baning $1- } alias slr.baning { var %a = $iif(($4 == $null),$2,$iif(($mta.getid($1,$4) == $null),$2,$v1)) if ($4 == $null) mta.pm $1 $2 Error: !ban <nick or id> else { if ($mta.level($1,$2) < 4) mta.pm $1 $2 Error: Incorrect Level if ($mta.level($1,$2) >= 4) mta.ban $1 %a mta.text $1 $mta.nick($1,$2) Has Just Banned: $mta.nick($1,%a) } } still forgetting ur else/elseifs! (after getting incorrect level, u would then get the text saying u had banned him) also, u can easily ban yourself with this... not wise a checker for if (%a == $2) would be wise. u can still use mta.getid from irc as long as its in the same mirc running mta. just remember to specify the server number since $1 is different in ur irc script
Rmst Posted November 11, 2007 Author Posted November 11, 2007 k thx but that wont work with wildcard so for example !freeze r Rmst has been frozen by $nick at IRC it wil say mta.freeze invalid parameters couse it says that the name R doesnt exist ingame
Scooby Posted November 11, 2007 Posted November 11, 2007 using the script from irc would mean u need to change the parameters a little, but the script could still be made to work. eg $1 would be !freeze, $2 would be the wilcard u needed to find, $1 is no longer the server ID and there is no $4 which is why u get an invalid parameters error.
[UVA]Bart Posted November 11, 2007 Posted November 11, 2007 /me hates making small mistakes on small script lol cause they look even bigger mistakes
SanZoR Posted November 11, 2007 Posted November 11, 2007 /me hates making small mistakes on small script lol cause they look even bigger mistakes I know your feelings.
Rmst Posted November 11, 2007 Author Posted November 11, 2007 So what do i have to change the MTa.getid ?? im a bit confused, i know what you mean but i dont know what i have to change this is what ive got on *:TEXT:*:#:{ %serverID = 1 var %a = $iif($2-,$iif($mta.nick(%serverID,$2-) != $null,$2-,$mta.getid(%serverID,$2-))) if ($1 == !getid) { if ($2 == $null) { .notice $nick you have to state a name } else { /msg #test1 $mta.nick(%serverid,%a) 's ID: %a } } }
Scooby Posted November 11, 2007 Posted November 11, 2007 sure... thats what i mean, but no need for $2- just $2 would be fine. does it work?
Rmst Posted November 11, 2007 Author Posted November 11, 2007 Nope it works when i type the Full nickname but not when i just type a part of the name
Scooby Posted November 11, 2007 Posted November 11, 2007 ok try something like this for ur var line: var %a = $iif($2 == $null,$nick,$iif($mta.getid(%serverID,* $+ $2 $+ *) == $null,$nick,$v1))
Scooby Posted November 11, 2007 Posted November 11, 2007 np anytime, if u need any other help, and need a quicker response, u can usually find me on irc: server: irc.multitheftauto.com channel: #uva
Recommended Posts