Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

Is there any way you can keep your copy of MTAMA from running scripts on specific servers? I'm usually connected to several at a time, and either the owners don't want scripts running, or it could conflict in some way. I don't really like to disconnect, because sometimes I want to monitor it or log the chat for later use.

Link to comment
  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Is there any way you can keep your copy of MTAMA from running scripts on specific servers? I'm usually connected to several at a time, and either the owners don't want scripts running, or it could conflict in some way. I don't really like to disconnect, because sometimes I want to monitor it or log the chat for later use.

Amen

Also it seems to disconnect and reconnect everytime the page fills. I can't read what was written earlier but worse yet it resets everyone's time online and idle time and cuts off any running scripts

Link to comment

Some scripts:

-------PLACE UNDER mta.text:----------

Lag-calculator

 if ($3 == !lag) {
   if ($5 == $null) mta.say $1 Syntax: !lag 
   else {
     mta.say $1 Lagtime $mta.name($1,$4) - $mta.name($1,$5) $+ : $calc($mta.ping($1,$4) / 2 + $mta.ping($1,$5) / 2)
   }
 }

Idle responder

 if (!idle == $3) {
   if ($4 != $null) mta.say $1 $mta.name($1,$4) is idle for $duration($mta.idle($1,$4))
   else mta.say $1 $mta.name($1,$2) Give up a ID number: !idle 
 }

Countdown script

 if (!count* iswm $3) {
   mta.say $1 Countdown!
   .timerc1 1 1 mta.say $1 5
   .timerc2 1 2 mta.say $1 4
   .timerc3 1 3 mta.say $1 3
   .timerc4 1 4 mta.say $1 2
   .timerc5 1 5 mta.say $1 1
   .timerc6 1 6 mta.say $1 GO GO GO!
 }

Stats

 if (!stats == $3) {
   mta.say $1 Name: $mta.name($1,$2) - ID: $2 - Ping: $mta.ping($1,$2) - Kills: $mta.kills($1,$2) - Deaths: $mta.deaths($1,$2) - Online: $duration($mta.online($1,$2)) - Status: $iif($mta.game($1,$2) == 1,Out Game,In Game)
 }

-------------------

----PLACE UNDER mta.text OR/AND mta.pm OR/AND mta.action -------

Caps kicker

if (($calc($len($3-) - $len($removecs($3-,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z))) >= $calc($len($3-) * 0.5)) && ($len($3-) >= 5)) {
   mta.say $1 $mta.name($1,$2) Reason: Caps usage
   mta.kick $1 $2
 }

Crack site kicker

if ((www isin $3-) && (ack isin $3-)) {
   mta.say $1 $mta.name($1,$2) Reason: Cracks sites
   mta.kick $1 $2
 }

---------------------

-----------PLACE UNDER mta.join-----------

Color codes kicker

if (($chr(1) isin $mta.name($1,$2)) || ($chr(255) isin $mta.name($1,$2)) || ($chr(7) isin $mta.name($1,$2))) {
   mta.say $1 $mta.name($1,$2) Reason: Color Codes
   mta.kick $1 $2
 }

Shitlist kicker

if ($read(shitlist.txt,w,$mta.name($1,$2))) {
   mta.say $1 $mta.name($1,$2) Reason: Shit-listed
   mta.ban $1 $2
 }

NOTE: set all or ur forbidden/banned/whatever names in shitlist.txt in the same dir as mirc.exe

---------------

--------PLACE UNDER mta.part---------

Kick counter (mine is now 851 :))

 if ($3 == kicked) {
   inc %kick
   .timer -m 1 1 mta.say $1 %kick $+ th idiot to get kicked
 }

-------------------

Link to comment

awesome thanks Aeron. I hope everyone including the Officials start using the !stats script.

Can you tell me why the connection resets whenever thier is a new page. This resets the timers.

thanks

[edit]

All set I added the !stats and the counter to the Partyserver and it works great. It also seems to have stopped disconnecting/reconnecting at least I hope it stopped that makes the timer useless.

I changed some of the text, go in there and try some commands I think it's funny

Try @kick # when you are not the admin for instance or put in a wrong pass /msg login wrongpass it's funny

Thanks aeron,

later

Link to comment

Anoter kelw script:

----PLACE UNER mta.join---

Clone kicker

 var %a = 1
 while (%a <= $mta.maxplayers($1)) {
   if ($ini($scriptdir $+ $1.ini,ID $+ %a)) {
     if (($mta.ip($1,%a) == $mta.ip($1,$2)) && (%a != $2)) {
       mta.say $1 $mta.name($1,$2) Reason: Clone
       mta.kick $1 $2
     }
   }
   inc %a
 }

----------------

Link to comment
Anoter kelw script:

Clone kicker

Use this script with caution. There are people playing from with a proxy or an DSL modem that acts as an router. If there are more people behind one of these, they get the same IP address, but are not clones.

Please take this in consideration before using the script above

Link to comment

i've edited the stats script, not great, but a little bit ;)

if ($4 != $null) {
   mta.say $1 Name: $mta.name($1,$4) - ID: $4 - Ping: $mta.ping($1,$4) - Kills: $mta.kills($1,$4) - Deaths: $mta.deaths($1,$4) - Online: $duration($mta.online($1,$4)) - Status: $iif($mta.game($1,$4) == 1,Out Game,In Game)
 }
 else mta.say $1 Name: $mta.name($1,$2) - ID: $2 - Ping: $mta.ping($1,$2) - Kills: $mta.kills($1,$2) - Deaths: $mta.deaths($1,$2) - Online: $duration($mta.online($1,$2)) - Status: $iif($mta.game($1,$2) == 1,Out Game,In Game)

and now i need help:

when someone writes a word, 4 example fu*k, he should get kicket, like that way:

  if (fu*k isin $3-) {
   mta.say $1 kicking $mta.name($1,$2) 4 saying a bad word
   mta.kick $1 $2
 }

so, now i want, that everitime someone say that word, he should get kicked, but if he's doing that 10 times in 30 minutes he get banned, so i thing, the script must make an ini file and write in that file everitime, he says that word, of course more people can get in this file, but there should be a own "word counter" 4 eauch people... i hope u understand :P

And Aeron, theres an error in mtama :(

look, if there are 5 players, in the mtama admin tool and in the player client u can see:

0 player 0

1 player 1

2 player 2

3 player 3

4 player 4

5 player 5

but, if player 3 parts (or another player, just an example) u can see in the mtama admin tool:

0 player 0

1 player 1

2 player 2

4 player 4

5 player 5

and in the player client:

0 player 0

1 player 1

2 player 2

3 player 4

4 player 5

so, if an player want see the stats from player 5 hes typing: !stats 4 but bekomes the stats from player 4, thats not so good, hope u edit this ;)

Link to comment

It's not a bug of MTAMA

IT'S A BUG OF MTA!

Check the in-game score bord and u see that there the id's are right.

Try to kick ID 4 (in MTAMA) and you see in the client that 'ID 3' is kicked ;) And a new person is 'ID 3'

Link to comment

Is it posible to make a script that kicks out people that are ourside the game for like more than 10 minutes..??

just a simple kick with a message why they got kicked out..

I am getting tyerd of all those peeps who fill up slot's in our server, just to be shure they can play when ever they want or save their score for like 5 days..:)

Link to comment
Is it posible to make a script that kicks out people that are ourside the game for like more than 10 minutes..??

just a simple kick with a message why they got kicked out..

I am getting tyerd of all those peeps who fill up slot's in our server, just to be shure they can play when ever they want or save their score for like 5 days..:)

I want an attendence script that you can run to have ppl verify they are not idle. Someone outside the game can still vote but they are there still.

Right now I will occasionally use the teamscript for this but some ppl are so dumb they don't get what I am up to and yell at ppl for teamkilling 5 mins after the script is off.

Link to comment

Is there any way possible to write a script that would kick a player if they jack a car more than 2 or 3 times? This would be great for stunt.

I figure since nobody has made it, its impossible, because I can't be the first person to think of this.

Link to comment
Aeron, i think u are one of the greateast people, but the mtama update dont work i think... i was going on http://home.dds.nl/~aeron/files/mta.tmp but there was an apache error message :(

and... am i right, if i think that u speak german? if it's true, let me say something to u:

Aeron, du bist der beste, wenn du ICQ oder ähnliches hast, dann lass es mich wissen ;)

its DEDS!

http://home.deds.nl/~aeron/files/mta.tmp

:D

Link to comment
Aeron, i think u are one of the greateast people, but the mtama update dont work i think... i was going on http://home.dds.nl/~aeron/files/mta.tmp but there was an apache error message :(

and... am i right, if i think that u speak german? if it's true, let me say something to u:

Aeron, du bist der beste, wenn du ICQ oder ähnliches hast, dann lass es mich wissen ;)

he's dutch! dutch pwns! :P

Link to comment

Hi, I was just wondering if there is a command in a script for shutting down the server?

if ($2 == 0) {

mta.say $1 Server restarting

mta.shutdown $1

}

This is an example of the part where I ned it.

I am making a script that once activated counts down from 10mins, saying every minute how long till the shutdown, and then when the time runs out I want the script to shut the server down. I have done the script and it works fine all I need to know is the command for server shutdown in a script?

cheers

Link to comment
Hi, I was just wondering if there is a command in a script for shutting down the server?

if (($2 == 0) && ($3 == )) {

mta.say $1 Server restarting

mta.shutdown $1

}

This is an example of the part where I ned it.

I am making a script that once activated counts down from 10mins, saying every minute how long till the shutdown, and then when the time runs out I want the script to shut the server down. I have done the script and it works fine all I need to know is the command for server shutdown in a script?

cheers

alias mta.text {

if (($mta.name($1,$2) == [FMH]Oli) && ($3 == !shutdown)) {

mta.say $1 10 mins for shutdown.

.timer 1 60 mta.say $1 9 mins for shutdown.

.timer 1 120 mta.say $1 8 mins for shutdown.

.timer 1 180 mta.say $1 7 mins for shutdown.

.timer 1 240 mta.say $1 6 mins for shutdown.

.timer 1 300 mta.say $1 5 mins for shutdown.

.timer 1 360 mta.say $1 4 mins for shutdown.

.timer 1 420 mta.say $1 3 mins for shutdown.

.timer 1 480 mta.say $1 2 mins for shutdown.

.timer 1 540 mta.say $1 1 mins for shutdown.

.timer 1 600 mta.say $1 Server Shutdown.

.timer 1 600 mta.shutdown $1

}

}

Link to comment

ok thanks for that command, one small other prob though. I want it to be activated via the admin, so i have:

alias fmj {

if ($2 isnum) {

if ($2 == 0) {

mta.say $1 Server restarting

mta.shutdown $1

}

else {

mta.say $1 Server restarting in $2 mins.

.timerfmj $+ $1 1 60 fmj $1 $calc($2 - 1)

}

}

if ($2 == on) {

.timerfmj $+ $1 1 60 fmj $1 9

mta.say $1 An FMJ event will start in 10mins.

mta.say $1 The Server will restart and be passworded at this time.

}

if ($2 == off) {

unset % [ $+ [ $1 ] ]

mta.say $1 FMJ Event Cancelled.

.timerfmj $+ $1 off

}

}

alias mta.admin {

if ($2 == !fmj) fmj $1 $3

}

however, when i type !fmj off in admin, it says event cancelled, but the countdown continues and it still shots down. Anything wrong with that script?

cheers for your help again m8 :)

Edit: I have solved this prob myself thanks. The script on this post works fine now.

Link to comment

ok,

I dont know if this is possible, and I dont know all the commands to do it, but is there a way to make a script to tell you who is in game and who is out of game when u type !playing ?

cheers

Link to comment

Hmm not really, not accurately anyway. As said in the mtama manual the ingame/outgame status merely represents the players last actions, not necessarily thier current 'state'. So yes, you could get mtama to report that, but it would be misleading. The player may well have said, "Hi", in-client 10 minutes ago and then gone ingame since.

Link to comment

For manhunt purposes I suppose, but hey, I been wondering bout this,

UNDER

alias mta.text {
 if (!stats == $3) { 
   mta.say $1 Name: $mta.name($1,$2) - ID: $2 - Ping: $mta.ping($1,$2) - Kills: $mta.kills($1,$2) - Deaths: $mta.deaths($1,$2) - Online: $duration($mta.online($1,$2)) - Status: $iif($mta.game($1,$4) == 1,Out Game,In Game) 
 } 

PLACE

  elseif (!status == $3) { 
   if ($4 != $null) mta.say $1 $mta.name($1,$4) is $iif($mta.game($1,$4) == 1,Out Game,In Game) 

   else mta.say $1 $mta.name($1,$2) Give up a ID number: !status 
 } 

use: !status (player id here)

Just glued bits together really, I used Aeron's idle counter as a template and replaced idle parts with the !stats ingame/out game bits, so pretty much all credit goto him :mrgreen:

MrBump - I thought it also counted if the person died or killed as ingame?

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...