Jump to content

!brb <reason> script


Keslertje2005

Recommended Posts

Hi all, ive got some problems with this script:

  elseif ($3 == !brb) {
   if ($1 == -1) mta.pm $1 $2 Error - Absent ID
   else mta.text $1 $mta.nick($1,$2) will be right back!  $iif($5,reason: $5-,) !

I want to make it possible for people to say that they will brb with or without a reason. I now got this. When they fill in no reason it is working. But with reason it doenst show the first word. So when I do: !brb have to eat, it says: B!G-BO$$ will be right back! Reason: to eat . Does anyone know how this can be fixen? Thanks!

And a second thing, should be an easy thing I think. I red the topic from [sA] where he asks about a win script. I tryed the script by putting it at the bottom of mtagus.mrc with all the other on signal scripts but it doenst work. This is the script:

on *:SIGNAL:mta.endrace: { 
 var %a = 0 
 while (%a < $mta.server($1).cmax) { 
   if ($mta.nick($1,%a) != -1) { 
     if ($calc($mta.dead($1) + $mta.frozen($1) + 1) == $mta.server($1).players) { 
       if ($mta.dead($1,%a) != 1 && $mta.dead($1,%a) != 2 && $mta.dead($1,%a) == $null) { 
         mta.text $1 $mta.nick($1,%a) won! 
       } 
     } 
   } 
   !inc %a 
 } 
}

I aslo tryed it with death. I hope someone could help me.

Thanks!

Link to comment
the first is just:

  elseif ($3 == !brb) mta.text $1 $mta.nick($1,$2) will be right back! $iff($4,Reason: $5-)

I don't know the other one cause I scripted that myself and it doesn't work :cry:

surely thats

  elseif ($3 == !brb) mta.text $1 $mta.nick($1,$2) will be right back! $iff($4,Reason: $4-)

Link to comment

I dont gettit, ive copied the commands exactly as above. Have put it with the others, tryed to create my own one with that $4 reason thing. But it just doesnt work :S Its not saying the thing I want it to say :S Maybe my script is bugged? Or maybe my script doesnt know that commands yet? It is the newest one, X16... Please let there be a way to fix this :( I really need this $4 commands :(

Thanks already...

Link to comment

help! script not workind, when added to mtagus.mrc

i put it there:

on *:SIGNAL:mta.command: {
 ;Parameters:
 ;$1 = Server
 ;$2 = ID
 ;$3 = Command
 ;$4- = Parameters
 var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2)
 /*
 /////////////////////////////////////////////////////
 //////////////      MTA:mA:GUS RPG      /////////////
 /////////////////////////////////////////////////////
 //               ..Work in Progress..              //
 //           ..Please remember to update..         //
 /////////////////////////////////////////////////////
elseif ($3 == !setstats) || ($3 == !setstatus) {
if ($4) {
mta.text $1 $mta.nick($1,$2) muutis staatuse. Tema uus staatus on $4-
writeini -n " $+ $scriptdir $+ mode.ini" STATUS $mta.nick($1,$2) $4-
}
if ($3 == !brb) mta.text $1 $mta.nick($1,$2) on kohe tagasi! $iff($4,Ajend: $4-)
}

the text lines are translated. Did I make a mystake with spaces?commas? worngly placed in the script? or what?

Link to comment

try this:

on *:SIGNAL:mta.command:{
 ;Parameters:
 ;$1 = Server
 ;$2 = ID
 ;$3 = Command
 ;$4- = Parameters
 var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2)

 /////////////////////////////////////////////////////
 //////////////      MTA:mA:GUS RPG      /////////////
 /////////////////////////////////////////////////////
 //               ..Work in Progress..              //
 //           ..Please remember to update..         //
 /////////////////////////////////////////////////////

 if ($3 == !brb) mta.text $1 $mta.nick($1,$2) on kohe tagasi! $iif($4,Ajend: $4-,n/a)
 elseif ($3 == !setstats) || ($3 == !setstatus) {
   if ($4) {
     mta.text $1 $mta.nick($1,$2) muutis staatuse. Tema uus staatus on $4-
     writeini -n " $+ $scriptdir $+ mode.ini" STATUS $mta.nick($1,$2) $4-
   }
 }
}

Link to comment
  • 3 months later...

i've made brb-script with(out) reasons.

Try it:

 elseif $3 == !brb) {
   if ($4 == $null) {
     mta.text $1 $mta.nick($1,$2) will be right back.
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
   else {
     mta.text $1 $mta.nick($1,$2) will be right back.
     mta.text $1 Reason: $4-
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
 }
 elseif ($3 == !back) {
   mta.text $1 $mta.nick($1,$2) is back.
   if ($gus.level($1,$2) >= 3) {
     mta.unfreeze $1 $2
   }
 }

Link to comment
i've made brb-script with(out) reasons.

Try it:

 elseif $3 == !brb) {
   if ($4 == $null) {
     mta.text $1 $mta.nick($1,$2) will be right back.
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
   else {
     mta.text $1 $mta.nick($1,$2) will be right back.
     mta.text $1 Reason: $4-
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
 }
 elseif ($3 == !back) {
   mta.text $1 $mta.nick($1,$2) is back.
   if ($gus.level($1,$2) >= 3) {
     mta.unfreeze $1 $2
   }
 }

umhh Why you make freeze in it ? if you race behint a guy that typ !brb ...

and why gus lvl 3?? normal ppl can also be brb :roll:

Link to comment

Standalone version:

on *:SIGNAL:mta.command:{
elseif ($3 == !brb) {
   if ($4 == $null) {
     mta.text $1 $mta.nick($1,$2) will be right back.
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
   else {
     mta.text $1 $mta.nick($1,$2) will be right back.
     mta.text $1 Reason: $4-
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
 }
 elseif ($3 == !back) {
   mta.text $1 $mta.nick($1,$2) is back.
   if ($gus.level($1,$2) >= 3) {
     mta.unfreeze $1 $2
   }
 } 

...And this one can be added in gus or another:

elseif ($3 == !brb) {
   if ($4 == $null) {
     mta.text $1 $mta.nick($1,$2) will be right back.
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
   else {
     mta.text $1 $mta.nick($1,$2) will be right back.
     mta.text $1 Reason: $4-
     if ($gus.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
 }
 elseif ($3 == !back) {
   mta.text $1 $mta.nick($1,$2) is back.
   if ($gus.level($1,$2) >= 3) {
     mta.unfreeze $1 $2
   }
 } 

Well, are you happy now? =D

Link to comment

NO!!! how do you make your scripts? Notepad or something?

And why do you still use GUS in standalone -_-

Standalone

on *:SIGNAL:mta.command:{
 elseif ($3 == !brb) {
   if ($4 == $null) {
     mta.text $1 $mta.nick($1,$2) will be right back.
     if ($mta.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
   else {
     mta.text $1 $mta.nick($1,$2) will be right back.
     mta.text $1 Reason: $4-
     if ($mta.level($1,$2) >= 3) {
       mta.freeze $1 $2
     }
   }
 }
 elseif ($3 == !back) {
   mta.text $1 $mta.nick($1,$2) is back.
   if ($mta.level($1,$2) >= 3) {
     mta.unfreeze $1 $2
   }
 }
}

Link to comment
  • Recently Browsing   0 members

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