useless1

MTAmA - IRC to Game chat?

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.

Share this post


Link to post
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

)

Share this post


Link to post

hmm, doesn't seem to work for me. and no errors either. I even have channel name correct, and have IRC OP status.

Share this post


Link to post
Guest
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

Share this post


Link to post
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 ? )

Share this post


Link to post

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

Share this post


Link to post

@CoZ

/mta.text 1 blaat that does work

@lil Toady

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

Share this post


Link to post
@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-
 }
}

Share this post


Link to post

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.

Share this post


Link to post
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
} 

Share this post


Link to post

CoZ, that is when somebody joins/parts mta, its in my script and he wants when some1 joins/parts mirc (lazy to write one, will post a little bit later if no1 does before me)

Share this post


Link to post

Like this (I think it works :P)

on *:QUIT:#: {
 mta.text $1 $nick left the channel!
}
on *:JOIN:#: {
 mta.text $1 $nick joined the channel!
}

Share this post


Link to post
Like this (I think it works :P)
on *:QUIT:#: {
 mta.text $1 $nick left the channel!
}
on *:JOIN:#: {
 mta.text $1 $nick joined the channel!
}

nope, didnt work

Share this post


Link to post
Guest

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 
   }

Share this post


Link to post

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
 }
}

Share this post


Link to post
Guest

thanks for the fast reply yea I'm an Op and that still does not work not even the network Admin can use it :/

Share this post


Link to post

what errors do you get .. duh ?

oh and you could have used the other irc topic ..

this code is almost a duplicate of it :roll:

Share this post


Link to post
Guest

there's another IRC topic? ok so i'm blind.

well as I posted it doesn't give any error's but it don't work either

Share this post


Link to post

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

Share this post


Link to post
Guest

so somethig like?

if ($1 == !freeze) { 
     set %serverid 1
     $mta.getid(%serverid,$2) 
   }

Share this post


Link to post
there's another IRC topic? ok so i'm blind.

np

well as I posted it doesn't give any error's but it don't work either

your not the only one thats blind appearantly :D

Share this post


Link to post

download the script here

change in the following lines %echoserverid to your server ID in mtama and %echochan to your channel

on *:START:{
 set %echoserverid 5
 set %echochan #mytest
}

Load the script, restart mirc and you're done

Share this post


Link to post

  • Recently Browsing   0 members

    No registered users viewing this page.