Jump to content

wildcard name


Rmst

Recommended Posts

Posted

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

Posted

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) 
  } 
} 

Posted
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 :mrgreen: 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

Posted

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

Posted

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.

Posted

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 
    } 
  } 
} 

Posted

ok try something like this for ur var line:

var %a = $iif($2 == $null,$nick,$iif($mta.getid(%serverID,* $+ $2 $+ *) == $null,$nick,$v1)) 

Posted

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...