Jump to content

MTAmA - IRC to Game chat?


useless1

Recommended Posts

I know its possible as i've seen it on one of the MTA:SA servers.

for instance if i were to type in IRC...

!msg

it would show up in the MTA:SA server chat as...

Admin:

im just not quite sure how to do that.

on 1:text:*:#CHANNELNAME:{ 
 if ( $nick isop #CHANNELNAME )  {
   if ( !msg isin $1 ) { 
   else mta.text 1 $nick $+ : $1-
   }
 }
}

(ps .. only other ppl in your channel will be able to type that way - not from the same mirc where you loaded it (aka , not you)

- also in this script to be able to use !set that person needs to have OP status in the channel

- oh and ..duh .. change CHANNELNAME to your channel name :D

--- oh .. and the ingame chat will show

admin: nick: text ..

not

admin: text

- i made this in this way because i got tired of guessing which admin said what ;) - but feel free to remove " $nick $+ : "

this will work for server1 tab in mta:ma .. but if you need it on server 2 just change the number after mta.text to mta.text 2

)

Link to comment
only other ppl in your channel will be able to

well I'm in his channel and I got ~Name and it don't work for me either

useless1

test if anything comes up at all if _in the regular mirc status window_

you type

/mta.text 1 blaat

send error here

(you do have mta:ma running and connected right ? )

Link to comment

on *:START:{ 
 set %echoserverid 5
 set %echochan #mytest
}
on *:TEXT:*:%echochan:{
 if ($1 == !msg) mta.text %echoserverid $nick $+ : $2-
}
on *:SIGNAL:mta.text:{
 if ($1 == %echoserverid) /msg #mytest $mta.nick($1,$2) $+ : $3-
}
on *:SIGNAL:mta.join:{
 if ($1 == %echoserverid) /msg #mytest 3 $+ $mta.nick($1,$2) has joined the game.
}
on *:SIGNAL:mta.part:{
 if ($1 == %echoserverid) /msg #mytest 3 $+ $mta.nick($1,$2) has left the game.
}

in following lines change 1

set %echoserverid 1

to your server id, and #mytest

set %echochan #mytest

to your channel

then load the script and restart mirc, connect to an irc server and mta and you're done, i've tested

Link to comment
@CoZ

/mta.text 1 blaat that does work

@lil Toady

that didnt work, and gave me "ON Unknown command" in the irc status window.

this is what i have made.. seems to work

everything a admin says gets said ingame (no need to !say )

on *:SIGNAL:mta.text:{ 
 /msg #CHANNEL $mta.nick($1,$2) $+ : $3- 
}

on *:SIGNAL:mta.command:{ 
 /msg #CHANNEL $mta.nick($1,$2) $+ : $3- 
}

on *:SIGNAL:mta.adcon:{ 
 /msg #CHANNEL $mta.nick($1,$2) $+ : $3- 
}

on *:SIGNAL:mta.death:{
 /msg #CHANNEL $mta.nick($1,$2) Died 
}

on *:SIGNAL:mta.endrace:{
 /msg #CHANNEL $mta.race($1,$2) finished $2
}

on *:SIGNAL:mta.startrace:{
 /msg #CHANNEL $mta.race($1,$2) Started $2
}

on *:SIGNAL:mta.freeze:{
 /msg #CHANNEL $mta.nick($1,$2) Frozen
}

on *:SIGNAL:mta.join:{
 /msg #CHANNEL $mta.nick($1,$2) Joined
}

on *:SIGNAL:mta.mute:{
 /msg #CHANNEL $mta.nick($1,$2) Muted
}

on *:SIGNAL:mta.nick:{
 /msg #CHANNEL $mta.nick($1,$2) changed nick
}

on *:SIGNAL:mta.part:{
 /msg #CHANNEL $mta.nick($1,$2) Left
}

on *:SIGNAL:mta.pm:{
 /msg #CHANNEL $mta.nick($1,$2) to $mta.nick($1,$3) $+ : $4-
}

on 1:text:*:#CHANNEL:{ 
 if ( $nick isop #CHANNEL )  {
   if ( !kick isin $1 ) { 
     mta.kick 1 $2
   }
   if ( !freeze isin $1 ) { 
     mta.freeze 1 $2
   }
   if ( !unfreeze isin $1 ) { 
     mta.unfreeze 1 $2
   }
   if ( !mute isin $1 ) { 
     mta.mute 1 $2
   }
   if ( !unmute isin $1 ) { 
     mta.unmute 1 $2
   }
   elseif ( !restart isin $1 ) { 
     mta.text 1 Reconnecting MTA:mA.
     mta.disconnect 1
     mta.connect 1
     .timer 1 1 mta.text 1 Reconnected
   }
   elseif ( !commands isin $1 ) { 
     /msg #CHANNEL !kick, !(un)freeze, !(un)mute, !restart
   }
   else mta.text 1 $nick $+ : $1-
 }
}

Link to comment
not sure what i did wrong at first, but lil Toady... the one you gave me is working now. ty

now if i could get it to let me know when someone joins/parts/quit IRC, into the game chat.

look at my post ...

on *:SIGNAL:mta.part:{
 /msg #CHANNEL $mta.nick($1,$2) Left
}

on *:SIGNAL:mta.join:{
 /msg #CHANNEL $mta.nick($1,$2) Joined
} 

Link to comment

ok this is the code we've been trying to get to work.

type !mute/ban/freeze JarJar in IRC and it should mute/ban/freeze me in MTA.

it doesn't give any error's but it don't work either

on *:SIGNAL:mta.ban:{ 
 /msg #testserver $mta.nick($1,$2) Banned
}

on *:SIGNAL:mta.freeze:{ 
 /msg #testserver $mta.nick($1,$2) Frozen 
} 

on *:SIGNAL:mta.mute:{ 
 /msg #testserver $mta.nick($1,$2) Muted 
} 

on *:text:#testserver:{ 
   if ( $nick isop #testserver )  { 
   if ( !kick isin $1,$2) { 
     mta.kick $1,$2 
   } 
   if ( !freeze isin $1,$2) { 
     mta.freeze $1,$2 
   } 
   if ( !unfreeze isin $1,$2) { 
     mta.unfreeze $1,$2 
   } 
   if ( !mute isin $1,$2) { 
     mta.mute $1,$2 
   } 
   if ( !unmute isin $1,$2) { 
     mta.unmute $1,$2 
   } 
   if ( !ban isin $1,$2) { 
     mta.ban $1,$2
   } 
   elseif ( !restart isin $1,$2) { 
     mta.text 1 Reconnecting MTA:mA. 
     mta.disconnect 1 
     mta.connect 1 
     .timer 1 1 mta.text 1 Reconnected 
   } 
   elseif ( !commands isin $1,$2) { 
     /msg #testserver  !ban, !kick, !(un)freeze, !(un)mute, !restart 
   } 
   else mta.text 1 $nick $1 : $2 
   }

Link to comment

Bracket error.. also make sure your a server op

on *:SIGNAL:mta.ban:{
 /msg #testserver $mta.nick($1,$2) Banned
}

on *:SIGNAL:mta.freeze:{
 /msg #testserver $mta.nick($1,$2) Frozen
}

on *:SIGNAL:mta.mute:{
 /msg #testserver $mta.nick($1,$2) Muted
}

on *:text:#testserver:{
 if ( $nick isop #testserver )  {
   if ( !kick isin $1,$2) {
     mta.kick $1,$2
   }
   if ( !freeze isin $1,$2) {
     mta.freeze $1,$2
   }
   if ( !unfreeze isin $1,$2) {
     mta.unfreeze $1,$2
   }
   if ( !mute isin $1,$2) {
     mta.mute $1,$2
   }
   if ( !unmute isin $1,$2) {
     mta.unmute $1,$2
   }
   if ( !ban isin $1,$2) {
     mta.ban $1,$2
   }
   elseif ( !restart isin $1,$2) {
     mta.text 1 Reconnecting MTA:mA.
     mta.disconnect 1
     mta.connect 1
     .timer 1 1 mta.text 1 Reconnected
   }
   elseif ( !commands isin $1,$2) {
     /msg #testserver  !ban, !kick, !(un)freeze, !(un)mute, !restart
   }
   else mta.text 1 $nick $1 : $2
 }
}

Link to comment

of course it doesn't work......

stuff like this:

if ( !kick isin $1,$2) {

is wrong, better make it

if ($1 == !kick) {

then.. commands like mta.freeze $1 $2 or mta.kick $1 $2.. wont work also......... How will mtama know in what server it needs to perform commands? $1 - server id, $2 - player id, in your script $1 and $2 mean text from irc chan..

you need to set something as a server id, like

set %serverid 1

and in a command like '!kick n00b', you need to get the players id like

$mta.getid(%serverid,$2)

so it will work

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...