MTA Scripts

scm, pwn, mirc scripts, game mode management
Bookmark and Share

MTA Scripts

Postby DazzaJay on Fri Oct 26, 2007 1:29 am

First of all, sorry if this is the wrong place, i didnt see an "MTA" section of the forums......

anyways.. NikT, heres the stuff i told ya about...

First up, my Beta Emotes script, i have personalised some commands to work with your server, such as !clan !website !server
here is the script, its a standalone script that you load with MTA:MA

This script is still a beta.... (only reason is because theres a LOT more emotes to come)

Commands to remember....
!emotes
(pm's the user a list of every emote)

(Original Filename: emotes.mrc)
Code: Select all
on *:SIGNAL:mta.command {
  var %a = $iif((!$4),$2,$iif(($daz.getid($1,$4) == $null),$2,$v1)),%race = $replace($mta.race($1),$chr(32),$chr(45))
  if ($3 == !server) mta.text $1 DRuG www.drugcrew.com mta drug.kicks-ass.net
  elseif ($3 == !info) .timer 1 1 mta.text $1 Awesome Emotes Beta1.1 By DazzaJay A.K.A: [PHS]Dan[AU] [www.potholestudios.com]
  elseif ($3 == !emotes) {
    .timer 1 1 mta.pm $1 $2 !website - !afk - !back - !brb - !poof - !stfu - !lol - !lmao - !lmfao - !rofl - !ffs - !boom - !drown - !enemy - !win - !grats - !taunt
    .timer 1 2 mta.pm $1 $2 !gg - !gr - !suck - !clan - !donkey - !fu - !wb - !agree - !amaze - !angry - !apologize - !sorry - !bark - !belch - !bonk - !bored
    .timer 1 3 mta.pm $1 $2 !bow - !bravo - !bye - !cackle - !cat - !cheer - !chicken - !chuckle - !clap - !cold - !confused - !crack - !cry - !doh - !doom
    .timer 1 4 mta.pm $1 $2 !duck - [More emotes comming soon!]
  }
  elseif ($3 == !clan) {
    mta.text $1 Our Clan Tag is: [DRuG]
    .timer 1 1 mta.text $1 More info on our clan is at www.drugcrew.com
  }
  elseif ($3 == !website) || ($3 == !site) || ($3 == !web) mta.text $1 Our website is: www.drugcrew.com
  elseif ($3 == !afk) mta.text $1 $mta.nick($1,$2) is Away From Keyboard.
  elseif ($3 == !back) mta.text $1 $mta.nick($1,$2) has Returned.
  elseif ($3 == !bak) mta.text $1 Guess who's back, Back Again, $mta.nick($1,$2) $+ 's Back, RUN IN FEAR!
  elseif ($3 == !brb) mta.text $1 $mta.nick($1,$2) will Be Right Back.
  elseif ($3 == !poof) mta.text $1 $iif((!$4),There is a Poof in here., $mta.nick($1,%a) is a big Poof.)
  elseif ($3 == !stfu) mta.text $1 $iif((!$4),Everyone SHUT THE FUCK UP., $mta.nick($1,%a) SHUT THE FUCK UP.)
  elseif ($3 == !lol) mta.text $1 $mta.nick($1,$2) Laughs out loud. 
  elseif ($3 == !lmao) mta.text $1 $mta.nick($1,$2) Laughs his arse off. 
  elseif ($3 == !dazzajay) mta.text $1 DazzaJay. The Lean Mean Scripting Queen.... oh wait.. thats just wrong. 
  elseif ($3 == !lmfao) mta.text $1 $mta.nick($1,$2) Laughs his fucking arse off. 
  elseif ($3 == !rofl) mta.text $1 $mta.nick($1,$2) Rolls on the floor laughing. 
  elseif ($3 == !ffs) mta.text $1 $mta.nick($1,$2) exclaims at the top of his voice, FOR FUCKS SAKE! 
  elseif ($3 == !boom) mta.text $1 $mta.nick($1,$2) exploded in a blaze of glory! 
  elseif ($3 == !drown) mta.text $1 $mta.nick($1,$2) is sleeping with the fishies.
  elseif ($3 == !cwin) mta.text $1 Cops Win! Mode Changed to Last Man Standing!
  elseif ($3 == !rwin) mta.text $1 Robbers Win! Mode Changed to Last Man Standing!
  elseif ($3 == !enemy) mta.text $1 Anyone see any Enemys?
  elseif ($3 == !win) mta.text $1 $mta.nick($1,$2) Wins and Jumps around in joy!
  elseif ($3 == !grats) mta.text $1 $iif((!$4),What? No Grats? You guys suck!,Congratulations $mta.nick($1,%a) $+ !)
  elseif ($3 == !taunt) mta.text $1 $mta.nick($1,$2) Taunts $mta.nick($1,%a) $+ ... Ooooh Soooo Scary...
  elseif ($3 == !gg) mta.text $1 Good Game Everyone!
  elseif ($3 == !gr) mta.text $1 Good Race Everyone!
  elseif ($3 == !suck) mta.text $1 $mta.nick($1,%a) Sucks ass.
  elseif ($3 == !donkey) mta.text $1 Who sucks Donkey Dick? $mta.nick($1,%a) Sucks Donkey Dick!
  elseif ($3 == !fu) mta.text $1 $iif((!$4),Fuck You., Fuck You and Everyone that looks like you $mta.nick($1,%a) $+ !)
  elseif ($3 == !wb) mta.text $1 $iif((!$4),Welcome Back,Welcome Back $mta.nick($1,%a))
  elseif ($3 == !agree) mta.text $1 $iif((!$4),$mta.nick($1,$2) Agrees., $mta.nick($1,$2) Agrees with $mta.nick($1,%a) $+ .)
  elseif ($3 == !amaze) mta.text $1 $iif((!$4),$mta.nick($1,$2) is Amazed!, $mta.nick($1,$2) is Amazed by $mta.nick($1,%a) $+ !)
  elseif ($3 == !angry) mta.text $1 $iif((!$4),$mta.nick($1,$2) Raises thier fist in anger!, $mta.nick($1,$2) Raises thier fist in anger at $mta.nick($1,%a) $+ !)
  elseif ($3 == !apologize) || ($3 == !apologise) || ($3 == !sorry) mta.text $1 $iif((!$4),$mta.nick($1,$2) apologizes to everyone. Sorry!, $mta.nick($1,$2) apologizes to $mta.nick($1,%a) Sorry!)
  elseif ($3 == !bark) mta.text $1 $iif((!$4),$mta.nick($1,$2) Barks. Woof Woof!, $mta.nick($1,$2) Barks at $mta.nick($1,%a) $+ .)
  elseif ($3 == !belch) || ($3 == !burp) mta.text $1 $iif((!$4),$mta.nick($1,$2) lets out a loud belch., $mta.nick($1,$2) burps rudeley in $mta.nick($1,%a) $+ 's face.)
  elseif ($3 == !bonk) mta.text $1 $iif((!$4),$mta.nick($1,$2) bonk's himself on the noggin. Doh!, $mta.nick($1,$2) bonk's $mta.nick($1,%a) on the noggin. Doh!)
  elseif ($3 == !bored) mta.text $1 $iif((!$4),$mta.nick($1,$2) is overcome with boredom. Oh the drudgery!, $mta.nick($1,$2) is terribly bored with $mta.nick($1,%a) $+ .)
  elseif ($3 == !bow) mta.text $1 $iif((!$4),$mta.nick($1,$2) bows down graciously., $mta.nick($1,$2) Bows Before $mta.nick($1,%a) $+ .)
  elseif ($3 == !bravo) mta.text $1 $iif((!$4),$mta.nick($1,$2) applaud. Bravo!, $mta.nick($1,$2) applaud's $mta.nick($1,%a) $+ . Bravo!)
  elseif ($3 == !bye) mta.text $1 $iif((!$4),$mta.nick($1,$2) waves goodbye to everyone. Farewall!, $mta.nick($1,$2) waves goodbye to $mta.nick($1,%a) $+ . Farewell!)
  elseif ($3 == !cackle) mta.text $1 $iif((!$4),$mta.nick($1,$2) cackles maniacally at the situation, $mta.nick($1,$2) cackles maniacally at $mta.nick($1,%a) $+ .)
  elseif ($3 == !cat) mta.text $1 $iif((!$4),$mta.nick($1,$2) scratch's themself. Ah much better!, $mta.nick($1,$2) scratch's $mta.nick($1,%a) $+ . Meeeeow.)
  elseif ($3 == !cheer) mta.text $1 $iif((!$4),$mta.nick($1,$2) cheers!, $mta.nick($1,$2) cheers at $mta.nick($1,%a) $+ .)
  elseif ($3 == !chicken) mta.text $1 $iif((!$4), With arms flapping $mta.nick($1,$2) struts around. Cluck Cluck Chicken!, With arms flapping $mta.nick($1,$2) struts around $mta.nick($1,%a) $+ . Cluck Cluck Chicken!)
  elseif ($3 == !chuckle) mta.text $1 $iif((!$4), $mta.nick($1,$2) Lets out a hearty chuckle., $mta.nick($1,$2) chuckles at $mta.nick($1,%a) $+ .)
  elseif ($3 == !clap) mta.text $1 $iif((!$4), $mta.nick($1,$2) claps excitedly., $mta.nick($1,$2) claps excitedly for $mta.nick($1,%a) $+ .)
  elseif ($3 == !cold) mta.text $1 $iif((!$4), $mta.nick($1,$2) Lets everyone know that he is cold., $mta.nick($1,$2) tells $mta.nick($1,%a)  that he is cold.)
  elseif ($3 == !confused) mta.text $1 $iif((!$4), $mta.nick($1,$2) is hopelessly confused., $mta.nick($1,$2) looks at $mta.nick($1,%a) with a confused look.)
  elseif ($3 == !crack) mta.text $1 $iif((!$4), $mta.nick($1,$2) cracks his knckles., $mta.nick($1,$2) cracks his nuckles while staring at $mta.nick($1,%a) $+ .)
  elseif ($3 == !cry) mta.text $1 $iif((!$4), $mta.nick($1,$2) crys like a big baby., $mta.nick($1,$2) crys on $mta.nick($1,%a) shoulder.)
  elseif ($3 == !doh) mta.text $1 $iif((!$4),$mta.nick($1,$2) bonk's himself on the noggin. Doh!, $mta.nick($1,$2) bonk's $mta.nick($1,%a) on the noggin. Doh!)
  elseif ($3 == !doom) mta.text $1 $iif((!$4), $mta.nick($1,$2) threatens everyone with the wrath of DOOM., $mta.nick($1,$2) threatens $mta.nick($1,%a) with the wrath of DOOM.)
  elseif ($3 == !duck) mta.text $1 $iif((!$4), $mta.nick($1,$2) ducks for cover., $mta.nick($1,$2) Yells at $mta.nick($1,%a) DUCK FOR COVER!)
}
alias daz.getid {
  var %a = 0
  while (%a < %loop) {
    if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a
    !inc %a
  }
}



Here is a Script written by Toady (from the MTA forums)... the script is designed to punish PEOPLE THAT TALK IN ALL CAPS.
i have slightly modified the script and added a Timed Unmute for offenders that unmutes them 10 minutes after they were muted for talking in all caps.

it is also a Standalone script, that is loaded the same way as the emotes.

(Original Filename: capsmutetoady.mrc)
Code: Select all
on *:SIGNAL:mta.text:{
  if ($len($3-) > 4) && ($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.70)) {
    !writeini -n $+(",$mta.dir,$1.ini,") $2 warnings $calc($readini($mta.dir $+ $1.ini,$2,warnings) + 1)
    var %a = $readini($mta.dir $+ $1.ini,$2,warnings)
    if (%a >= 3) {  mta.text $1 $mta.nick($1,$2) reached the warnings limit and will be muted for Ten minutes! (Too much caps used)
      mta.mute $1 $2
      .timerunmute $+ $2 1 600 mta.unmute $1 $2
    }
    else mta.text $1 $mta.nick($1,$2) has been warned! $calc(3 - %a) more $iif($calc(3 - %a) == 1,warning,warnings) and he will be Muted! (too much caps used)
  }
}


Here is a fun script for Dis-allowing ceartian nick's, and is the script that PHS uses to keep idiots named "Player" out of our server.

all banned names are admin-defineable.
the script is set to work WITH PRS...
the commands will only work if you are admin level 5 in PRS.

and again, this is a standalone script.

Commands to remember:
!bannick <name>
!unbannick <name>

(Original Filename: forbiddennames.mrc)
Code: Select all
REMOVED UNTILL IT IS FIXED.



here is a script that i got from some random on the MTA forums...
we use it for Random timed messages in our server INSTEAD of the timed message thats built into PRS.

and again, its a Standalone script.

there is 2 files required for this script to function...

The first is the script itself. it is set to fire a random message off every 180 seconds (3 minutes).
(Original Filename: randommessage.mrc)
Code: Select all
on *:SIGNAL:mta.connect: {
  .timerrnd 0 180 randommessage $1
}
alias randommessage {
  var %a = $ini(randommessage.ini,msg,0)
  var %b = $rand(1,%a)
  if ($prs.players($1) > 0) mta.text $1 $readini(randommessage.ini,msg,%b)
}

the second is a file that has your random messages stored in it.
im pretty sure this file MUST be named randommessage.ini
Here is an idea of the contents of our randommessage.ini file...
Code: Select all
[msg]
1=Remember, if you dont like the map you can type !new to vote for a new map!
2=Visit www.PotholeStudios.com for the Server info, rules and Championship info!
3=Visit www.PotholeStudios.com for some Crazy Machinima series' and other fun stuff!
4=Rules: NO CHEATING - Dont be an arse - Be original - Dont dis-respect Admins - Have Fun!
5=Cheaters are Ban-On-Sight, No warnings, No excuses!
6=Yes! We have Teamspeak! Server Address: ts.potholestudios.com:8767

You can add as many random messages as you like, just remember to start the line of the ini with (for example) "6=" and so on. hell we have 16 different random messages at PHS.
Note: the randommessage.ini file MUST start with [msg]


ok... here is a !trace script. its not the best that i have seen.... but its ok...
all it does is show the Country of the person being !trace

Commands to remember:
!trace <name>

and yet again, its a standalone script.
(original file name: trace.mrc)
Code: Select all
on *:SIGNAL:mta.command:{
  var %a = $iif((!$4),$2,$iif($mta.getid($1,* $+ $4 $+ *),$v1,$2))
  if ($3 == !trace) my.trace $1 %a
}
alias my.trace {
  set %my.trace $1 $2
  if (!$sock(my.trace $+ $mta.ip($1,$2))) sockopen my.trace $+ $mta.ip($1,$2) www.completewhois.com 80
}
on *:SOCKOPEN:my.trace*:{
  tokenize 32 %my.trace
  if ($sockerr > 0) {
    sockclose $sockname
    mta.text $1 Trace: An error has occured.
  }
  else {
    sockwrite -n $sockname GET /cgi2/rbl_lookup.cgi?query= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1
    sockwrite -n $sockname User-Agent: MSIE 6.0
    sockwrite -n $sockname Host: www.completewhois.com
    sockwrite $sockname $crlf
  }
}
on *:SOCKCLOSE:my.trace*:{
  unset %tr.*
}
on *:SOCKREAD:my.trace*:{
  var %t
  sockread %t
  if (country-rirdata isin %t) {
    tokenize 32 %my.trace
    mta.text $1 $mta.nick($1,$2) - Location: $gettok(%t,2-,58)
    sockclose $sockname
  }
}


i hope you guys find some of those scripts fun / usefull.
Last edited by DazzaJay on Sat Oct 27, 2007 10:36 pm, edited 1 time in total.
User avatar

DazzaJay
 


Re: MTA Scripts

Postby [DRuG]NikT on Fri Oct 26, 2007 12:41 pm

Great collection of script mods there... When I have a clear mind I'll look at integrating them with our PRS.

I'm going to move this one to the modding showroom, under misson mods, which covers scm/mirc/everything.


"But my head's all messed up, so you better driive brother"
User avatar

[DRuG]NikT
[DRuG] cofounder & your host

Status:
Check out the downloads and members areas on drugcrew.com

[DRuG] cofounder & your host
[DRuG] coleader
[DRuG] member
DRuG server admin
[AGS] member
]DR[ member
 
Posts: 2532
Joined: Sat Jul 28, 2007 10:39 am
Location: Melbourne, Victoria, Australia


Re: MTA Scripts

Postby DazzaJay on Fri Oct 26, 2007 1:16 pm

you dont have to intergrate ANY of these with PRS.

you just have to copy them to new .mrc files put them in your mirc directory,

then with MTAMA, click [General] [Scripts] [Load]
and do that with all of them.
User avatar

DazzaJay
 


Re: MTA Scripts

Postby [DRuG]NikT on Fri Oct 26, 2007 1:20 pm

Ah, nice.. the update races one I think added to the code, so I was just basing it off that experience. I've always just tweaked what we had running... nice, so these add a little more independence to the functions. Also less risk when it comes to screwing with what's already there, I tend to save that for my 'clearer moments'.


"But my head's all messed up, so you better driive brother"
User avatar

[DRuG]NikT
[DRuG] cofounder & your host

Status:
Check out the downloads and members areas on drugcrew.com

[DRuG] cofounder & your host
[DRuG] coleader
[DRuG] member
DRuG server admin
[AGS] member
]DR[ member
 
Posts: 2532
Joined: Sat Jul 28, 2007 10:39 am
Location: Melbourne, Victoria, Australia


Re: MTA Scripts

Postby DazzaJay on Fri Oct 26, 2007 1:26 pm

The updateraces script is full standalone aswell.

We like to keep all our scripts standalone... the less screwing with PRS... the better.

and when an update comes out for a script, i dont have to fuck with PRS, i just unload the standalone script and reload the new one.
User avatar

DazzaJay
 


Re: MTA Scripts

Postby DazzaJay on Sat Oct 27, 2007 10:35 pm

NOTE:

There is a massive error in the Forbiddennames script, Dont use it untill i figure out what the issue is.
User avatar

DazzaJay
 


Re: MTA Scripts

Postby DazzaJay on Mon Oct 29, 2007 3:17 am

Problem solved, it was interfering with PRS, turns oit that PRS has the same system built into itself.

!banname <name>
!unbanname <name>

when somone joins with a banned name, they are PM'd a warning, then kicked shortly after.
User avatar

DazzaJay
 


Re: MTA Scripts

Postby [DRuG]NikT on Mon Oct 29, 2007 8:13 am

Ahhh this makes a lot of sense, so this is why people sometimes complain that I have unbanned them, but they are still banned? Perhaps the two ban systems interfere, such, that unbanning on just one of them isn't sufficient? Annoying... I'm really starting to consider that ooso might have the right direction moving back to GRS, the stat files are flat & organized, only concern is making sure logon can be controlled by rcon, so we don't get the issue of clones.

With Dazza's fine work here on all the other free standing scripts, perhaps we could all just tool together something from GRS that has stats, maybe even ones that share data between servers ?? Now that could be inneresting.


"But my head's all messed up, so you better driive brother"
User avatar

[DRuG]NikT
[DRuG] cofounder & your host

Status:
Check out the downloads and members areas on drugcrew.com

[DRuG] cofounder & your host
[DRuG] coleader
[DRuG] member
DRuG server admin
[AGS] member
]DR[ member
 
Posts: 2532
Joined: Sat Jul 28, 2007 10:39 am
Location: Melbourne, Victoria, Australia


Re: MTA Scripts

Postby DazzaJay on Mon Oct 29, 2007 4:23 pm

i have noticed with PRS, that i need to Unbanip, unbanname, and there was one more thing i cant think of at the moment to fully unban somone.
it might be !unban <fullname>

We switched to PRS because GUS was a pile of horseshit. We had so many problems with it it wasnt funny.

And after using PRS for so long, i myself have over 9000 races races on the scripts, i dont really want to loose all my stats, and we have a lot of toptimes that Demonseed would probably go Nuculear about if he lost them, so sadly, for us, Switching Scripting systems is not an option.
User avatar

DazzaJay
 


Re: MTA Scripts

Postby [DRuG]NikT on Mon Oct 29, 2007 5:05 pm

Same, same issues, same.

But argh... I sooo want web stats... maybe just a free standing script that counts points and wins... hmmmm.


"But my head's all messed up, so you better driive brother"
User avatar

[DRuG]NikT
[DRuG] cofounder & your host

Status:
Check out the downloads and members areas on drugcrew.com

[DRuG] cofounder & your host
[DRuG] coleader
[DRuG] member
DRuG server admin
[AGS] member
]DR[ member
 
Posts: 2532
Joined: Sat Jul 28, 2007 10:39 am
Location: Melbourne, Victoria, Australia


Next

Return to Mission Mods

Who is online

Users browsing this forum: No registered users and 2 guests