mIRC Homepage

help with an event

Posted By: shamguy4

help with an event - 29/11/07 07:05 PM

I wanted tried making an event where it reads from a text file

ON 1:TEXT:!show *:#shamguy4:/play -cn C:\shamguy4\file.txt

but apparently it doens work cause its not showing and i want it to be a notice so that only the person who triggers it sees it

i also wanted that after he triggers that something else happens -at the end it says a msg as a notice -a message that i set
how do i make a notice in an event?
and how do i make to things happen when one event is triggered?
Posted By: Riamus2

Re: help with an event - 29/11/07 08:46 PM

First of all, you have to tell /play *where* to play the file. You didn't include $nick or $chan, so it won't work. Also, not that you should have a space after the last color (:) in the event or you may have problems. You also don't need /'s in a script. One last thing to keep in mind... you have it triggering on !show *. That means that someone has to type !show then a space and something following it. If that's what you meant to have it do, then that's ok. Otherwise, remove the * and/or the space.

If you want something to happen after the file is played to the user, then look at /help on playend .
Posted By: shamguy4

Re: help with an event - 30/11/07 02:03 AM

now i wanted to make a remote event that plays a song to the user who triggers it
ON 1:TEXT:!song1:#shamguy4:/splay -p C:\shamguy4\file.mp3
but that only makes it that when they trigger it it plays on my computer??
i want it to play on their computer

Posted By: sparta

Re: help with an event - 30/11/07 03:51 AM

If you want it to play on there computer, then they need to have the same file as you..
Posted By: Riamus2

Re: help with an event - 30/11/07 10:40 PM

Like sparta said, you cannot play a sound on someone else's computer if they don't have the sound file. You will have to send the file to them. No way around that. Otherwise, you'd have a ton of spammers playing various sound clips to everyone in a channel and you can imagine the kinds of sounds they'd be playing.
Posted By: sparta

Re: help with an event - 01/12/07 07:55 AM

Just wanted to add, if you want to play music for other people, then you should use a program like SHOUTcast or something like it, then people can connect with winamp and listen to the music you play true a www url.
Posted By: shamguy4

Re: help with an event - 02/12/07 03:47 AM

talking about events..
I discovered the event "play" which plays files in a way that read does not
however im having trouble
ON 1:TEXT:@find *:#shamguy4:.notice $nick 10 $read(c:\list.txt, w, * $+ $2- $+ *)|
will show a line in blueish green (note the color change)
(side question: what if i wanted it to show that line and a few others with the same word?)

but this
ON 1:TEXT:!list *:#shamguy4:play -at $+ $2 .notice $nick c:\list.txt
doesnt let me put color in anywhere? it only shows in black??

and im not really good with aliases... im trying to make one maybe for color so to use instead of .notice after the -at...

im new to mirc but im catching onto the scripting pretty nicely but i need a bit of help...
Posted By: sparta

Re: help with an event - 02/12/07 07:37 AM

put the colors in the txt file directly?

$+(,$chr(3),10,text you want to color)

didnt test it tho, but should work.
Posted By: Riamus2

Re: help with an event - 02/12/07 11:09 AM

Note that you can use an alias with /play using the -a switch. This lets you output the text in any way that you want to.
Posted By: shamguy4

Re: help with an event - 02/12/07 03:48 PM

...yeah how would i make an alias that would help me?
im not good with aliases yet... i havent needed them yet...

and i dont understand you sparta??
where do i put that script? in the textfile... in the scripts somewhere...
what is it?

ok i made an alias- i tried making it simple...
/color /notice $nick 10 and it doesnt work when i put it in the play command?
i write play -athelp color c:\help.txt
Posted By: shamguy4

Re: help with an event - 03/12/07 12:44 AM

someone please help me!!
all i need is this and im complete... for now
if i cant chnage color with play then maybe i can list a topic using $readini -but i want to list the whole topic not just a peice of it

play must change color somehow..
at least -maybe theres a way to write to the file under a topic and have it set the color to what i write
but how do i write under a topic
when i use /write and i scan for [help] it overwrites the line [help]
Posted By: r34dm4n

Re: help with an event - 06/12/07 10:07 AM

you need to put it as $color and not /color on the play command

really all you need is to read carefully the help file

The -c switch forces mIRC to interpret lines as actual commands instead of plain text

in other words you can make the txt file with commands so that mirc reads em like it so that if you add the color it would read like it is


The -n switch makes the play command use /notice instead of /msg

The -a switch makes /play use specified alias instead of /msg or /notice

and about the /write part...really if you think about it thats what youre telling it to do.../write [help] so it will over write it of course

PS:"/help " is your best friend
Posted By: Riamus2

Re: help with an event - 06/12/07 02:55 PM

on *:text:!list *:#shamguy4:play -at $+ $2 coloralias $nick c:\list.txt 1500

alias coloralias {
  .notice $1 12 $+ $2-

Just change the color code to whatever you want. I put it at a 1.5 second delay (1500) to help you avoid being flooded off. You can adjust this if you want.

If you read through the help file information for /play, you'll notice that you cannot put ".notice" in there and that you need to include an alias name if you are using -a.
© 2021 mIRC Discussion Forums