Jump to content

!brb <reason> script


Keslertje2005

Recommended Posts

Posted

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!

Posted

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:

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

Posted

if i load brb.mrc script to the server, then nothing happes, when !brb is typed.

Do i have to attach it to some script?

Posted

They both dont work.. They have to be for mta-sa.. myabe thats the point. But when i use the $4 version it doenst do anything.. Hope it can be fixen :D Thnx already for the fast respons!!!

Posted

on *:SIGNAL:mta.command:{
 if ($3 == !brb) mta.text $1 $mta.nick($1,$2) will be right back! $iff($4,Reason: $4-)
}

if you have it somehting like that then i cant see a problem

Posted (edited)

But do you have to post that one also in the mtagus.mrc? At the bottom with all the other on signal commands? Or is it possible to make it without that on signal?

Edited by Guest
Posted

it doesn't show the reason, when i type !brb something

nor !brb

where "something" should be the reason

iit only shows "me will be right back"

Posted

you would have to put it under mta.command in mtagus.mrc and make sure the $iif( $4, Reason: $4- ) is on the same line as the !brb bit

Posted

does it really matter?

i mean, there is no othe !brb commands in mtagus.mrc

Posted

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

Posted

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?

Posted

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

  • 3 months later...
Posted

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

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

Posted

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

Posted

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

  • Recently Browsing   0 members

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