|
|
|
Dracoz
|
|
Dracoz
|
I need a script when someone types !target that it will pm him and it will plays a txt file to him... The WHOLE txt file i already tried $read but that does only random things.... I hope soemone can help me
Greetz Dracoz
|
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
On *:Text:!target:#: {
play $chan file 1000
}
|
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
/help Playing Files /help ON TEXT
Example:
ON *:TEXT:!target:#channelname:{ .play $nick C:\directory\file.txt 1500 }
This will private message the file to the nickname that typed !target. If 'file.txt' is NOT in your mIRC directory then you need to specify the directory that it is in as shown above. Otherwise simply specifying 'file.txt' is fine.
The 1500 means a 1.5 second delay will be left between lines (1500 milliseconds).
Note: SladeKraven's example is similar, it just plays to the channel and has a 1 second delay, so don't be confused by that. Simply choose whatever's convenient and make sure you look over the help file as some parameters need editing and above examples can't be used "as is".
Regards,
Last edited by Mentality; 09/05/05 09:12 PM.
|
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
to play directly to the person and not to the channel change the $chan to $nick
On *:Text:!target:#: {
play $nick [color:red]file.txt[/color] $calc($lines([color:red]file.txt[/color]) * 80 )
}
adjust the "80" to speed up or slow down the play so you dont flood and dont bore the reader the file.txt should be changed to your actual file name
|
|
|
|
|
|
Dracoz
|
|
Dracoz
|
Hmm i tried this ON *:TEXT:!target:#targets:{
.play $nick C:\Program Files\mIRC\ranks.txt 1500
}But then my mirc says * $dir: cannot use in an event (line 13, aliases.ini)
|
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
You're not actually putting that code in Aliases are you dude?
|
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
I would assume a separate alias is interfering, go to the Aliases section and look at line 13, see if you need the alias.
If a directory has spaces in it, enclose it in quotation marks otherwise mIRC just sees C:\Program. (E.g. "C:\Program Files\mIRC\blah").
Regards,
|
|
|
|
|
|
Dracoz
|
|
Dracoz
|
Hmm this is my line 13 /play -c # $dir="targets.txt" $mircdir $+ *.txt 1000 I dont know whats wrong there ...
Last edited by Dracoz; 09/05/05 09:25 PM.
|
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
|
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
You've aliased the mIRC /play command. Change the alias name to something else or remove the alias completely.
Regards,
|
|
|
|
|
|
Dracoz
|
|
Dracoz
|
It works  Thanx all 
|
|
|
|
|
|
TotalOnline
|
|
TotalOnline
|
I would actually be interested on this subject as well. Been trying to play text file which are huge as ****.. and well to be honest 1000ms lag doesn't actually cut it. I have used now : play -m1 text.txt 3000 ^-So only 1 can be queued. And this way it works.
but this is darn slow. anything faster than 2700ms will 'Excess Flood' for me. the weird thing - this should go through flood protection as I understanded, but anything apove 10 lines and it blows (I mean with anything less than 2000ms). and I am talking more like 20-60+ Line files directly to users screen.
would need like 20 lines in screen inside 20 Seconds.
Any suggestions?
Last edited by TotalOnline; 10/05/05 08:18 AM.
|
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
For those amounts of data it's probably best to send that via dcc chat. Since dcc chat does not pass via the server, you can send as fast as the connection between you and the other nick allows.
|
|
|
|
|
|
TotalOnline
|
|
TotalOnline
|
For those amounts of data it's probably best to send that via dcc chat. Since dcc chat does not pass via the server, you can send as fast as the connection between you and the other nick allows. Yes I know this, Yes it would work with socks and with DCC is true, but that is exactly my point. Explain: I made the system to queue and be completly usable with anykind of firewall even when I am behind firewall from h**l. So that is why I cannot use DCC Nor Socks or am I wrong? Can I display something through passive to passive connection with DCC or Socks(Or anything else?) usage as in play with out user to make anykinda change to use the play ? If that can actually be done. this is exactly what I was looking for.To Kelder: and DCC does use server.. Of course it does.. it's IP/Host connection to user with certain port on use. This cannot be used as far I tested it with firewalls. Of course Reversing DCC is an option with firewalls, but that wouldn't come through another firewall ever not shadow IP nor anykinda wrongly informed host/ip. So that cannot be used either. Since then users would have to change ports. for some message/list. which would be stupid.
|
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
To Kelder: and DCC does use server.. Of course it does.. it's IP/Host connection to user with certain port on use. To explain: Yes, DCC use DNS/IP information to connect. Even though it can pull that information from the channel/network, it does not actually go through the server itself. It is a direct connection from one computer to another computer (or to a router/firewall if there is one between the two). Is there a reason why you can't have such a large file sent to the person instead? Many networks don't allow you to send a line every second for very long before kicking you off. As far as reverse DCC.... I think you can still make that work. Have your trigger, which is displayed in the channel, be: /dcc chat yournick Then have them type a trigger in the chat to get the text.
|
|
|
|
|
|
TotalOnline
|
|
TotalOnline
|
To explain:
Yes, DCC use DNS/IP information to connect. Even though it can pull that information from the channel/network, it does not actually go through the server itself. It is a direct connection from one computer to another computer (or to a router/firewall if there is one between the two). How Exactly is this done? Can I simply ON *:TEXT:!Trigger:?: { /dcc chat $nick /play $nick sourcetext.txt } or what ? I mean doesn't that then try to DCC chat directly from my ip/host to user who tryies to uses it ip/host and returning if firewalled user connects to my firewalled connection. No reply ? Is there a reason why you can't have such a large file sent to the person instead? Many networks don't allow you to send a line every second for very long before kicking you off. Yes since this is only Messaging system we are talking about and news and lists are required to be on with simply trigger on channel as direct show. As far as reverse DCC.... I think you can still make that work. Have your trigger, which is displayed in the channel, be: /dcc chat yournick
Then have them type a trigger in the chat to get the text. So you mean, I would make users to go to first some port which I would be using as reversing dcc and make them to use /dccserver this actually yes can be done but also throuble with firewalls. and beside the system that would first DCC chat and then there would be triggers..I could as well then build File-server. lol, There would be no use to this. Since I could easily add commands to under dcc chat, but the point is to show those texts directly in channel. Not some messaging service system.
|
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
I'm simply offering you possibilities. You cannot change what a network allows for text before kicking you for flood. If you want it in the channel, or even private message, then you have to abide by the network's rules regarding flooding.
|
|
|
|
|
|
TotalOnline
|
|
TotalOnline
|
I'm simply offering you possibilities. You cannot change what a network allows for text before kicking you for flood. If you want it in the channel, or even private message, then you have to abide by the network's rules regarding flooding. Yes, I understand you try to help and I appreaciate it that you're trying to help me. In here in Mirc forums you people are only ones who actually have helped me & at least try to discuss the difficult subject. My whole point is why I asked because I know passive-passive cannot connect and seen that kinda crap scripts in so many places. Builded perfectly working script myself with /play and it's working wirh 3000ms and I am from firewall from hell here, but as I said it's way too slow for my means. I am now testing style of sending all the larger messages through DCC Chat but I do know how to do that. So I have one request. Simply one. Could someone write help how to "Open DCC Chat With specific trigger > /play file directly when window opens > close DCC Chat" <- style of example. also if there is a difference on : Yes, DCC use DNS/IP information to connect. Even though it can pull that information from the channel/network, it does not actually go through the server itself. It is a direct connection from one computer to another computer (or to a router/firewall if there is one between the two).
|
|
|
|
|
Joined: Apr 2003
Posts: 701
Hoopy frood
|
Hoopy frood
Joined: Apr 2003
Posts: 701 |
Ok, I'll correct myself, the data sent through a dcc connection doesn't pass the server, setting up the dcc connection still uses the server.
As for the dcc chat itself: if server wants to send to client: server uses /dcc chat client server sends a DCC CHAT notice to client with an ip and port to connect to client connects to given address server and client can transfer data
For this to work, the server needs to have a public ip address and be reachable on that port, the client can be behind about anything that allows outgoing connections on that port.
This means you have to have a public ip address if you want to send the data. Apparently this doesn't work for you.
The other way is to have the client open the /dcc chat window, then the client needs to have a public ip. (You have less control about other people's connection...)
For this to work, you just put this in remotes: on *:OPEN:=:{ msg =$nick your first line of text play =$nick yourtextfile.txt 1 }
I don't know if it's possible to trigger or react to what's said in a dcc chat, so you'll probably send it to anywone who opens a dcc chat. You could try to see what channel a nick is in, or have him first send another private message with another trigger...
If both are behind a NAT/router/firewall, then you're stuck using the server I'm afraid.
|
|
|
|
|
Joined: Oct 2004
Posts: 8,061
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,061 |
As TotalOnline mentioned, if you want it to work from a firewalled connection to a firewalled connection where neither can open ports, then you won't be able to use the Chat suggestion or basically any other method other than directly to the channel/query.
However, if you want to play around with it, there are various ways to bypass port issues by using things like HTTP Tunnelers and depending on the firewall/router settings, even using a proxy may work. The tunnelers work by making a firewall or router believe you're using only HTTP (ie. web browsing). I've tried making these work in the past and did not have luck, but I know that if you can get it set up correctly, that they do work in many cases.
If you look up "HTTP Tunneler" on the web, you should find some and also documentation on how they are used. Perhaps someone here knows how to do this as well.
One *very* "of of the box" way of doing this might also be to use sockets and a website and when someone types your trigger (or at specific times), you POST the text onto the site and offer a url link to get it. Not a great way of doing stuff, but I'm running out of possibilities.
|
|
|
|
|