Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

thanks for replying

your script sounds good, please keep me posted on its progress cos i wouldnt mind having a go at using it.

i have been having a go at making it but i have only been irc scripting for 3 days so i get so far then my own script starts to confuse me

[uVA]sc00by has been halping me out alot but i dont want to ask for hs help too much incase i become that realy anoying person who wont leave him alone, lol

i will keep having a stab at it and if i can do it i will post it

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

Top Posters In This Topic

Top Posters In This Topic

yes my admin script uses an away system and a brb system... its even got a "going out for a beer" function. Not hard to script.

I have finished work on a warn script now. If anyone wants it then just pm me, i cant be bothered to post it here atm, maybe if a lot of ppl want it i will.

Link to comment

ok here goes:

The actual warn script is its own alias thats linked to:

alias mta.warn {
 if ($4 != $null) {
   if ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 1 ) {
     if ($5 != $null) {
       mta.say $1 $mta.name($1,$4) $+ : 2nd warning. 1 more warning and you will be kicked. Reason: $5-
       writeini "MTAwarn.ini" main $mta.name($1,$4) 2
       writeini "MTAwarn.ini" reasons $mta.name($1,$4) $5-
     }
     else {
       mta.say $1 $mta.name($1,$4) $+ : 2nd warning. 1 more warning and you will be kicked.
       writeini "MTAwarn.ini" main $mta.name($1,$4) 2
     }
   }
   elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 2 ) {
     if ($5 != $null) {
       mta.say $1 $mta.name($1,$4) $+ : 3rd and final warning. Reason: $5- $+ . Goodbye!
       mta.kick $1 $4 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 3
       writeini "MTAwarn.ini" reasons $mta.name($1,$4) $5-
     }
     else {
       mta.say $1 $mta.name($1,$4) $+ : 3rd and final warning. Goodbye!
       mta.kick $1 $4 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 3
     }
   }
   else {
     if ($5 != $null) {
       mta.say $1 $mta.name($1,$4) $+ : 1st warning. 2 more warnings and you will be kicked. Reason: $5- 
       writeini "MTAwarn.ini" main $mta.name($1,$4) 1
       writeini "MTAwarn.ini" reasons $mta.name($1,$4) $5-
     }
     else {
       mta.say $1 $mta.name($1,$4) $+ : 1st warning. 2 more warnings and you will be kicked.
       writeini "MTAwarn.ini" main $mta.name($1,$4) 1
     }
   }
 }
 else {
   mta.say $1 $mta.name($1,$2) $+ : Syntax - !warn 
 }
}

Then I have under mta.join:

    elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$2) ) == 3 ) {
   mta.say $1 $mta.name($1,$2) $+ : Access denied - exceeded warn quota 
   writeini "MTAwarn.ini" joinkick $mta.name($1,$2) $mta.ip($1,$2)
   mta.kick $1 $2
 }

Under mta.text:

  elseif (($3 == !warn) && %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true ) {
   mta.warn $1-
 }
 elseif ($3 == !warnings) {
   if ($4 != $null) {
     if ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 1 ) {
       mta.say $1 $mta.name($1,$4) has been warned 1 time.
     }
     elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$4) ) == 2 ) {
       mta.say $1 $mta.name($1,$4) has been warned 2 times.
     }
     else {
       mta.say $1 $mta.name($1,$4) has been warned 0 times.
     }
   }
   else {
     if ( $readini( "MTAwarn.ini", main, $mta.name($1,$2) ) == 1 ) {
       mta.say $1 $mta.name($1,$2) $+ : you have been warned 1 time.
     }
     elseif ( $readini( "MTAwarn.ini", main, $mta.name($1,$2) ) == 2 ) {
       mta.say $1 $mta.name($1,$2) $+ : you have been warned 2 times.
     }
     else {
       mta.say $1 $mta.name($1,$2) $+ : you have been warned 0 times.
     }
   }
 }
 elseif (($3 == !erasewarn) && %isadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] == true ) {
   if ($4 != $null) { 
     mta.say $1 $mta.name($1,$2) $+ : Removed warnings on $4
     remini "MTAwarn.ini" main $4 
     remini "MTAwarn.ini" joinkick $4
     remini "MTAwarn.ini" reasons $4
   } 
   else {
     mta.say $1 Syntax: !erasewarn 
   }
 }

The !warn part is setup so that only admins using my particular admin script can use it, you can customise that part however you like. Players can find out how many times they have been warned by typing !warnings or can find out how many times another player has been warned by typing !warnings . You can also specify reasons people were warned, ie: !warn 6 speak english , and this would add the reason to the ini as a record.

It remembers people who was warned, and kicks them automatically on entry to the server if they were warned 3 times. You can remove people using !erasewarn and this will delete their warn history. (note: the erasewarn function is based on name not ID number).

I wrote this code only today, so I will be updating it myself over the next few days.. if i have any large additions ill post them, otherwise you can just modify it yourself to suit yourself.

Link to comment

well ive got some which im keeping just at the FMJ server atm cos they are constantly being updated... infact ive already updated that warn one too, but not significantly yet, ive just got it so that when i do !ban 5 stop cheating it adds a warn of level 4 to the mtawarn.ini and then instantly bans the people of level 4 warn on entry to the server, this is useful to help against people with proxies.

Ill have a look through my script and see if there is anything useful i can extract from it for u guys.

And yes panther, u can just remove warns manually from the ini aswell :)

Oh, finally, yes the warn is based on ID number... "!warn 5 no spawnkilling" but the erasewarn is based on name "erasewarn warnedperson"

Oh one thing i might mention is that ppl with spaces in their names can mess this script up a bit as mIRC parses the two parts as seperate things.

Link to comment

Just for the few people with out the no spaces script thinggy here it is, i dont no how to make the nice little box cuz i am new to this forum :P

alias mta.join

elseif ( $chr(32) isin $mta.name($1,$2) ) {

mta.say $1 $mta.name( $1 , $2 ) , spaces are not allowed in nickname. Please remove it before joining

mta.kick $1 $2

}

That would kick anyone and everyone with spaces in there name :)

o yea Oli, how BIG is your script :?:

Link to comment

sorry Aeron,

Can anyone help me out? I have to logins, one admin and one member on my script, both read different INI files

else {

%isadmin = $readini( "MTAscript.ini", admins, $mta.name( $1 , $2 ))

if (%isadmin) {

mta.say $1 The name $mta.name( $1 , $2 ) is a Server Admin Name. Please Login to use Features!

set %badadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] $2

.timeradmin 1 30 mta.badadmin $1 $2

}

}

else {

%ismember = $readini( "members.ini", members, $mta.name( $1 , $2 ))

if (%ismember) {

mta.say $1 The name $mta.name( $1 , $2 ) is a server member Name. Please Login now!

}

}

The problem is that only one of them works,what ever is the top one will work, so i got the admin one at the top, wen u join server it says please login bla bla bla, but if ur a member and join server then it dosnt work! :S

can som1 help me out?

Link to comment

Hmm this script looks familiar.. ;)

Anyway, because you're using 'else' in the first case without any 'if' statement, there can be no second 'else'.

This should work:

else { 
 %isadmin = $readini( "MTAscript.ini", admins, $mta.name( $1 , $2 )) 
 %ismember = $readini( "members.ini", members, $mta.name( $1 , $2 )) 
 if (%isadmin) { 
   mta.say $1 The name $mta.name( $1 , $2 ) is a Server Admin Name. Please Login to use Features! 
   set %badadmin. [ $+ [ $1 ] $+ . $+ [ $2 ] ] $2 
   .timeradmin 1 30 mta.badadmin $1 $2 
 } 
 else if (%ismember) { 
   mta.say $1 The name $mta.name( $1 , $2 ) is a server member Name. Please Login now! 
 } 
} 

If you didn't remove all the indenting, this could be easily seen.

Link to comment

hi i'm lookin for any new scripts. now i can't write them myself yet but i'm teaching myself so i will be able to soon, but until then i would appreciate alittle help i have all the basic scripts and the ones i've found on here so if anyone has some they could send to me that would be great..

and if anyone knows about any good books or site that could help with understanding how to write this stuff pls post a link

thx

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

    • No registered users viewing this page.

×
×
  • Create New...