Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

Posted
Anyone go any new scripts?? I wanna add to my 90kb one :P

I improved the ping kicker! (See 1 page back)

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Sorry about this but how come your not on msn Aer0n???

Btw, this part makes the whole script fail..

alias mta.part { 
 !hdel Ping. $+ $1 $2 
} 

Posted
Sorry about this but how come your not on msn Aer0n???

Btw, this part makes the whole script fail..

alias mta.part { 
 !hdel Ping. $+ $1 $2 
} 

Dont load the script if mtama is already running....

load before you run OR rebot MTA:mA ;)

Posted

Ok guys its been some time since someone posted in here so im bringing back attention to it. :lol:

I forgot about this but what is the link to the last man standing script.

Cheers

Posted

Dan, is the 'search' option broken?? For a hint: it's in this forum...

Sorry for giving this answer, but I don;t want to double-post. I'd like to help you, but it's allreasy here, and it's findable. (This tread is extended by this post as well, but this way other peole see they should use the SEARCH OPTION as well). Sorry to say it again, but i'm not a parrot repeating things.... (except searching...)

Posted

well here we go

the new site for the scripts is at http://www.dogtagworks.com

archive and scripts will be there and it should be alot easier to find scripts on there cos its a dedicated site

aeron when you sign up i will make you admin :)

[edit] i forgot to say... if anyone had any ideas or sergestions about the look of the site can you post them on the forum, thanks

Posted

Kooper very very well done. That is nice and hopefully we don't have to browse through 40 pages to find a single script :P.

Good job m8!

Posted

Ok, for all you n00bs now i have made a fully compiled script which should be average for you at least. It's 50kb big and has quite alot of stuff in it which i think you will like. Click here for the script.

Posted

I'm thinking of creating a website/script to autogenerate scripts. You'll have to fill in some configuration boxes, check the options you want, and ready... Are there people that will use it, or is it a waste of time.. Let me know!

Posted

I think it's a very good idea harry for n00bs because if they can't script then they aren't going to get anywhere are they so i say yes go ahead with it.

Posted
I'm thinking of creating a website/script to autogenerate scripts. You'll have to fill in some configuration boxes, check the options you want, and ready... Are there people that will use it, or is it a waste of time.. Let me know!

I build in some script checkers in MTA:mA (Only Double alaises yet...)

Posted

hi ppl, im back from moving house now :)

And i bring a new script with me for u all... ive got like 4 more but they arnt finished debugging yet so tis one will do for now ;)

Its a kinda advacned stats script... !kills

This reports the following information like this:

[FMJ]Oli: !kills 3

<[FMJ]Oli, you have killed lasse 3 times (13 Total). lasse has killed you 0 times (2 Total)>

So here is the script:

alias log.advancedstats {
 writeini -n "MTAstats.ini" $mta.name($1,$3) $mta.name($1,$2) $round($calc($readini( "MTAstats.ini", $mta.name($1,$3), $mta.name($1,$2)) + 1 ) )
 writeini -n "MTAcurrent.ini" $mta.name($1,$3) $mta.name($1,$2) $round($calc($readini( "MTAcurrent.ini", $mta.name($1,$3), $mta.name($1,$2)) + 1 ) )
}

alias rem.advancedstats { 
 set %playerid 0 
 while ( $mta.maxplayers($1) > %playerid ) { 
   if ( $ini( $+ $1 $+ .ini, ID $+ %playerid ) ) {  
     remini "MTAcurrent.ini" $mta.name($1, %playerid) $mta.name($1,$2)
   } 
   %playerid = %playerid + 1 
 } 
 unset %playerid 
}

alias mta.advancedstats {
 if ( $4 == $null ) {
   mta.say $1 Please specify an ID for advanced stats. Syntax: !kills 
 }
 elseif ($mta.name($1,$mta.getid($1,$4)) != unknown) {
   if (($readini( "MTAcurrent.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) && ($readini( "MTAcurrent.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) ) {
     writeini -n "MTAcurrent.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     writeini -n "MTAcurrent.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     if (($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) && ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) ) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     mta.say $1 $mta.name($1,$2) $+ , you have killed $mta.name($1,$mta.getid($1,$4)) $readini( "MTAcurrent.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) Total). $mta.name($1,$mta.getid($1,$4)) has killed you $readini( "MTAcurrent.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) Total)
   }
   elseif ($readini( "MTAcurrent.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) {
     writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     writeini -n "MTAcurrent.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     if (($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) && ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) ) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     mta.say $1 $mta.name($1,$2) $+ , you have killed $mta.name($1,$mta.getid($1,$4)) $readini( "MTAcurrent.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) Total). $mta.name($1,$mta.getid($1,$4)) has killed you $readini( "MTAcurrent.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) Total)
   }
   elseif ($readini( "MTAcurrent.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) {
     writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     writeini -n "MTAcurrent.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     if (($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) && ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) ) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     mta.say $1 $mta.name($1,$2) $+ , you have killed $mta.name($1,$mta.getid($1,$4)) $readini( "MTAcurrent.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) Total). $mta.name($1,$mta.getid($1,$4)) has killed you $readini( "MTAcurrent.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) Total)
   }
   else {
     if (($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) && ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) ) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$2) $mta.name($1,$mta.getid($1,$4)) 0
     }
     elseif ($readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) == $null) {
       writeini -n "MTAstats.ini" $mta.name($1,$mta.getid($1,$4)) $mta.name($1,$2) 0
     }
     mta.say $1 $mta.name($1,$2) $+ , you have killed $mta.name($1,$mta.getid($1,$4)) $readini( "MTAcurrent.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$2), $mta.name($1,$mta.getid($1,$4))) Total). $mta.name($1,$mta.getid($1,$4)) has killed you $readini( "MTAcurrent.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) times ( $+ $readini( "MTAstats.ini", $mta.name($1,$mta.getid($1,$4)), $mta.name($1,$2)) Total)
   }
 }
}

To operate it, you link to these aliases under the existing aliases:

alias mta.text {
 elseif ($3 == !kills) {
   mta.advancedstats $1-
 }
}

alias mta.part {
 rem.advancedstats $1-
 remini "MTAcurrent.ini" $mta.name($1,$2)
}

alias mta.kill {
 log.advancedstats $1-
}

EDIT: why are there so many posts from u dan... seems half the time ure either demanding something or just posting for the hell of it.. can u keep it down as the more u post here, and double post for that matter, the harder its going to be for ppl to find scripts here.. this is a scripts thread.. please bear that in mind when posting.

Posted

Here is a new one, nice and simple but quite useful i find in some ways.

Basically, it reports when a person was last seen, or if they r present then how long they have been present, and if not seen then that they havnt been seen.

Thanks to [FMJ]DomSpy for the idea.

Hope u like..

alias mta.text {
 if (!seen isin $3-) {
   if ($4 != $null) {
     if ( $mta.name($1,$mta.getid($1,$4)) != unknown ) {
       mta.say $1 $mta.name($1,$mta.getid($1,$4)) has been in the server for $duration($mta.online($1,$mta.getid($1,$4)))
     }
     elseif ( $readini( "MTAseen.ini", time, $4 ) != $null ) {
       mta.say $1 $4 was last seen at $readini( "MTAseen.ini", time, $4 ) on the $readini( "MTAseen.ini", date, $4 )
     }
     else {
       mta.say $1 $4 has never been seen in this server.
     }
   }
   else {
     mta.say $1 $mta.name($1,$2) $+ , please specify a name. Syntax !seen 
   }
 }
}

alias mta.part {
 writeini "MTAseen.ini" time $mta.name($1,$2) $time
 writeini "MTAseen.ini" date $mta.name($1,$2) $date
}

Sorry for the double post.

Posted

Hi all, ok, i have one question...how make script which for example:

if (RP isin $3) that player which join the game must let have password (and he have 10 sec). If he not give password, he has been kicked...

If he give invalid password 5 times that he has banned?

Can you help me?? :D:):o

Posted
Hi all, ok, i have one question...how make script which for example:

if (RP isin $3) that player which join the game must let have password (and he have 10 sec). If he not give password, he has been kicked...

If he give invalid password 5 times that he has banned?

Can you help me?? :D:):o

5 time banned thing not included:

alias mta.join {
 if (RP isin $mta.name($1,$2)) {
   mta.say $1 $+(',$mta.name($1,$2),') please login. ("/msg login ", 10 seconds)
   $+(!.timer,$1,.,$2) mta.kick $1 $2
 }
}
alias mta.part {
 $+(!.timer,$1,.,$2) off
}
alias mta.pm {
 if ($3- == login ) {
   mta.say $1 $+(',$mta.name($1,$2),') logged in. 
   $+(!.timer,$1,.,$2) off
 }
}

*Un tested*

Posted

I have finished work on my new TDM (attack/defend/ffa) gang war script for gang wars. As this is the most popular type of match at present, i thought id make a script for it. Here is the readme for it:

TDM GANG WAR SCRIPT V1.0

THIS SCRIPT IS A TDM GANG WAR MODE SCRIPT. IT IS BASED ON THE FOLLOWING RULES:

THERE IS A 3 ROUND GANG WAR. GANGS CHOSE A BASE EACH, THERE IS 1 ROUND OF ATTACK, 1 ROUND OF DEFENSE AND 1 ROUND OF FFA FOR EACH CLAN

ONCE PLAYERS DIE IN A ROUND THEY ARE NOT ALLOWED TO RESPAWN AND MUST WAIT TILL THE ROUND IS OVER.

ONCE A PLAYER IS READY AT THE BEGINNING OF A ROUND, AT THEIR BASE, THEY MUST TYPE !READY. ONCE ALL PLAYERS OF BOTH TEAMS HAVE TYPED !READY THE ROUND IS STARTED. THE SCRIPT COUNTS THE PEOPLE WHO DIE AND THEN DETERMINES THE WINNERS OF THE ROUNDS VIA THIS METHOD.

THIS IS A COMMON TYPE OF MATCH TYPE, RULES OF WHICH CAN BE FOUND AT THE MTA EULEAGUE WEBSITE, http://WWW.MTA-EULEAGUE.COM - RULES

TO ACTIVATE THE SCRIPT, THE ADMIN MUST TYPE THE FOLLOWING:

!TDM ON - IE: !TDM ON FMJ ULK

THIS WILL ONLY WORK IF THERE ARE AT LEAST 2 MEMBERS OF EACH CLAN PRESENT. ERROR LOG WARNINGS ARE GIVEN IN CASE OF ERRORS.

THESE ARE THE SCRIPT FUNCTIONS BEFORE ROUNDS START:

!READY - SETS PLAYER TO READY WHEN THEY ARE AT BASE BEFORE A ROUND STARTS (CANNOT PERFORM WHILE OUT OF GAME)

!UNREADY - SETS PLAYER TO NOT READY, IF THEY CRASH OR HAVE TO LEAVE THEIR BASE BEFORE THE ROUND STARTS

!IDLE - SETS THE PLAYER TO "IDLE FOR CURRENT ROUND" AND WILL NOT COUNT THEM IN ANY OF THE KILLS FOR THE ROUND.

!UNIDLE - UNSETS THE IDLE STATUS OF A PLAYER BEFORE THE ROUND STARTS, ALLOWING THEM TO PLAY. THEY STILL THEN HAVE TO TYPE !READY

THESE ARE THE SCRIPT FUNCTIONS AT ANY TIME DURING THE MATCH:

!SCORE - RETURNS THE PLAYERS SCORE, THE TEAMS SCORE AND THE WINNING GANG.

!WINNING - RETURNS THE CURRENTLY WINNING GANG

!ROUND - RETURNS THE CURRENT ROUND

!TEAMS - RETURNS THE CURRENTLY PLAYING TEAMS

THESE ARE THE SCRIPT FUNCTIONS DURING A ROUND:

!CRASHED - IF A PLAYER CRASHES DURING A ROUND, THIS COUNTS THEM AS BEING DEAD IN THE ROUND AND WONT LET THEM PLAY

I SUGGEST ADMINS EXPERIMENT WITH THE FUNCTIONS OF THIS SCRIPT, IT BASICALLY GUIDES THE WHOLE MATCH, DETERMINING THE WINNER AND SET ALL THE MODES AUTOMATICALLY.

IF THERE ARE ANY PROBLEMS, PLEASE CONTACT [FMJ]OLI, [email protected], FOR ASSISTANCE.

CREDITS

SCRIPT CREATED BY [FMJ]OLI

SCRIPT IDEA BY [FMJ]OLI

PLEASE LEAVE THSES CREDITS IN THE SCRIPT AS IT TOOK [FMJ]OLI OVER A WEEK TO DEBUG AND WAS SOLELY CREATED BY [FMJ]OLI

The script itself is quite large, 46KB, so i have a ready made .mrc file u can download here

Please note, this script has been tested, but not extensively, so it MAY go wrong under certain circumstances. If this happens, post IN THIS THREAD and ill modify the script IN THIS POST and the downloadable version to correct the problem.

I hope you all like it.. it took quite some doing. All suggestions welcome

Posted

hmmm...Aeron.. i don't know why but this not work:

alias mta.join { 
 if (RP isin $mta.name($1,$2)) { 
   mta.say $1 $+(',$mta.name($1,$2),') please login. ("/msg login ", 10 seconds) 
   $+(!.timer,$1,.,$2) mta.kick $1 $2 
 } 
} 
alias mta.part { 
 $+(!.timer,$1,.,$2) off 
} 
alias mta.pm { 
 if ($3- == login ) { 
   mta.say $1 $+(',$mta.name($1,$2),') logged in. 
   $+(!.timer,$1,.,$2) off 
 } 
}

If i give password it work (server write "Cube logged in") but if I not give password that server not kicked me, do You know why?

Posted
hmmm...Aeron.. i don't know why but this not work:

alias mta.join { 
 if (RP isin $mta.name($1,$2)) { 
   mta.say $1 $+(',$mta.name($1,$2),') please login. ("/msg login ", 10 seconds) 
   $+(!.timer,$1,.,$2) mta.kick $1 $2 
 } 
} 
alias mta.part { 
 $+(!.timer,$1,.,$2) off 
} 
alias mta.pm { 
 if ($3- == login ) { 
   mta.say $1 $+(',$mta.name($1,$2),') logged in. 
   $+(!.timer,$1,.,$2) off 
 } 
}

If i give password it work (server write "Cube logged in") but if I not give password that server not kicked me, do You know why?

alias mta.join { 
 if (RP isin $mta.name($1,$2)) { 
   mta.say $1 $+(',$mta.name($1,$2),') please login. ("/msg login ", 10 seconds) 
   $+(!.timer,$1,.,$2) 1 10 mta.kick $1 $2 
 } 
} 
alias mta.part { 
 $+(!.timer,$1,.,$2) off 
} 
alias mta.pm { 
 if ($3- == login ) { 
   mta.say $1 $+(',$mta.name($1,$2),') logged in. 
   $+(!.timer,$1,.,$2) off 
 } 
}

^ Fixed ^

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

    • No registered users viewing this page.

×
×
  • Create New...