Jump to content

MTA:MA Scripting


Harry

Recommended Posts

  • Replies 357
  • Created
  • Last Reply

Top Posters In This Topic

Clan news script, useful for getting news to your clan members if they come on you're clanserver a lot ;)

on *:SIGNAL:mta.join {
 if (%clan.news isin $mta.name($1,$2)) {
   if ($readini(clan-news.ini,News,current-news)) {
     if (!$readini(clan-news.ini,News,$mta.name($1,$2))) {
       !.timer 1 2 mta.msg $1 $2 %clan.news News: $readini(clan-news.ini,News,current-news)
       !writeini clan-news.ini News $mta.name($1,$2) read
     }
   }
 }
}
on *:SIGNAL:mta.command:{
 if (($3 == !setnews) && ($mta.level($1,$2) >= 4)) {
   if ($4) {
     !remini mystuff.ini News
     !writeini clan-news.ini News current-news $4-
     var %a = 0
     while (%a < $mta.maxplayers($1)) {
       if (%clan.news isin $mta.name($1,%a)) {
         mta.msg $1 %a %clan.news News: $4-
         !writeini clan-news.ini News $mta.name($1,%a) read
       }
       !inc %a
     }
   }
   else mta.msg $1 $2 You must specify some news.
 }
}

(This is designed for use with the MTAmA:GRS and will need editing to work with other scripts...

It's also a good idea to run it with a script to stop impersonators, which is also in the GRS.)

You must do "/set %clan.news " in mIRC before you start

Use "!setnews " or "/msg !setnews to set the news, this will then be pmed to all people with the clantag in their name. It will also be pmed to any members when they join. It also remembers who it has already PMed, so it won't get annoying for any members

Enjoy :P

Link to comment

This is an add-on for the GRS' secret login, with this you can set an overall password(s) and use any alias to login as level 5 secretly.

on *:SIGNAL:mta.pm:{
 if ($3 == secretlogin) {
   if ($4- == $read(secretlogin.txt,w,$4-)) {
     !writeini $+(",$mta.dir,$1.ini") ID $+ $2 level 5
     !writeini " $+ $grs.dir $+ mta.nickserv.ini" $mta.name($1,$2) secret 1
     mta.msg $1 $2 You are now secretly logged in.
   }
 }
}

Make a file "secretlogin.txt" in the mirc directory and put your password(s) in it, each on a separate line. :)

Then use "/msg secretlogin "

Link to comment
This is an add-on for the GRS' secret login, with this you can set an overall password(s) and use any alias to login as level 5 secretly.

on *:SIGNAL:mta.pm:{
 if ($3 == secretlogin) {
   if ($4- == $read(secretlogin.txt,w,$4-)) {
     !writeini $+(",$mta.dir,$1.ini") ID $+ $2 level 5
     !writeini " $+ $grs.dir $+ mta.nickserv.ini" $mta.name($1,$2) secret 1
     mta.msg $1 $2 You are now secretly logged in.
   }
 }
}

Make a file "secretlogin.txt" in the mirc directory and put your password(s) in it, each on a separate line. :)

Then use "/msg secretlogin "

Great!

Does this physically add to GRS and if so is it a CRC problem

or

Does this load as a psl?

Link to comment

to be Honest i think that the PSL should be just Renamed to something for Addons so people will get less confused :?

Then people can release Parts for GRS like the Secret Logins and it be called a Addon :P

So its less confusing for the People with Simple Minds

:wink:

- If you Understand me :shock:

Link to comment

yes im adding an addon part for script creators to grs in next release.. with several identifiers/events/commands possible.. ill prob remove the PSL in this version and u can just use the mtama scripts loader

Link to comment
My ini is:

[Niels]

cars1=51

cars2=60

and i have this:

if $readini(car.ini,Niels,cars*) {
mta.msg $1 $2 Test
}

The cars* is not working how i do that?

u need a while loop:

var %a = 1,%b
while (%a <= $ini(car.ini,Niels,0)) {
 if ($readini(car.ini,Niels,car $+ %a)) !inc %b
 %inc %a
}
if (%b) mta.msg $1 $2 Test

Link to comment
well thats not the :o same as the last ini u posted u total dunce.

now be a good little idiot and go read the mirc readme

Only $mta.name($1,$2) is not the same, it was Niels. $mta.name($1,$2) must then work?

too funny

Niels seems to have gotten his immunity to insults script going

!headinthesand

Link to comment

I will summarize the opening post for those who cant read:

- Please post only about MTA:MA scripting

- Do not SPAM

- Do not ask stupid questions (Niels!!)

I will summarize this again:

STOP THE POSTS with only 'lol' and so on.. 65 pages wont be any help to scripters.

@Niels:

Get some serious help... These guys cant and wont help you, becasue you're asking too stupid questions. Start reading a tutorial first, so you really KNOW what is happening in your (?) script

--

/me out

Link to comment

I have a idea for a script, but I don't think some of it is possible right now but anyways..

A clan RPG script:

Using some code from the bank rpg script have one for clans, I explain.

The admin of the server and other people can make there own vitural clans on the server and other people can join them (command : !create clan [n00ds] ) and who evers joins the server can join the clans. (an another commands would be !show clans and !show (id/name) clan . the clans can fight in a sealed location by using a !loc commands on a timer or something ( i have no clue) to check if the player is in the clan battle area. and the clans for fight for rep. this can be also hooked to grs and have the top clans the the webpage. also players can join other clans and leave them by using commands like this ex. !join clan [name] or !leave clan {bob} . but the player only can be in one clan at a time. I was thing the clan battle area would be ssv because it has its own little space. and if a player is not in a clan and they enter the clan battle area while a clan is battleing they get slapped to death.... well that s all i have for now, and i hope it makes sense. anymore ideas are welcome.

Link to comment
  • 2 weeks later...

Hi,

I would ask you about something:

I'm writing clanwar script now and I can't do one script. I would do script witch will be countdown 20 mins, and I would ask you how do something witch will do one act/work as each 10 sec (<- I need this to do crash checker, maybe you can do crashgame checker in other way ?? if yes Can you give me script something like this ?)

Can you help me ?? :D thx.

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...