mIRC Home    About    Download    Register    News    Help

Print Thread
#246391 08/06/14 10:00 AM
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
Hello there, i'm kind of noob on scripting lol. but so far i made a few easy scripts..

But now i'm trying to find how i could make a script,
if you type like !members

The person who does it, gets a list of all the name's that are added in that list..

Example:


on *:text:!members:#:{ msg $chan members ReDwAtcH: $+
1. name1..
2. name 2
3. name 3
4. name 4
5. name 5
}

this is what i have so far, (i know it sucks)..
and also, only the one who ask it, may see it.


Greetz.

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
There are several ways you can read a list and several ways to create one. How do you want to create the list? By typing it in the chat or create one manually? And how many rows do you want to read at a time, do you want them on a single row... etc.

You want to use .notice $nick or .msg $nick .query $nick ... etc instead of msg $chan, to be able to send a private message to the user.

Please provide as many details as possible. You can read up on /help $read, /help /write for some basic scripts like what you're asking for.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
Hey, i want it to active, when someone typ !members
and just 1 list with all the names.
it must be like 15 line's

and the person need to get a meassage in the chan (not prive) with the list.
all the other ppl in that room are not supposed to see that msg then

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
That's a .notice $nick you're looking for then.
Code:
on *:text:!members:#: { 
  var %l $lines(members.txt)
  while (%l) { 
    .notice $nick $read(members.txt,nt,%l)
    dec %l
  }
}
This is a very simple example of how you can do it. Just make a textfile called members.txt in your mircdir (//echo $mircdir if you don't know where it is) and there you have it.
Since you didn't specify if you want to manipulate the list through mIRC or anything like that, I didn't include anything of the sort. So just create and edit it manually.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
Thx! that would work.
but how i make that members file in mircdir? (never made a file there)

Last edited by Pluffie; 08/06/14 10:55 AM.
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
If you want to manipulate the file through mirc, you use the /write command. This writes a file with text to the mircdir by default if not specified a full path.
But you just go there, should be C:\Users\Username\AppData\Roaming\mIRC if you're not running a portable application, if you are you just go to where the .exe is located and create a textfile. Type "//echo $mircdir" to know for sure where it is.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
if i go there, i come out here.

[img]http://prntscr.com/3qrpbf[/img]

Is this good?

and then in the file, i just add the name's each on a new line?

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Yes.
Each row will be sent to the user, so you can put whatever you want on the rows, such as info about the user, titles or w/e you want.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
[img]http://prntscr.com/3qrpbf[/img]
[img]http://prntscr.com/3qrqlp[/img]
[img]http://prntscr.com/3qrqqo[/img]

So normaly everything is good now?
someone just typed !members
but he dont see anything..

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I see that you have 60 lines above this, do you have an event that uses "On *:text:*:#: {" by any chance? Any text event underneath that one will never trigger. Either place the script I gave you above it or create a new file by going to File > New and paste the script there.

Edit: Note that you're not gonna see the notifications yourself, since i put .notice - If you want to see it yourself as well, use /notice instead.

Last edited by Nillen; 08/06/14 11:26 AM.

Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
ok, yes i had some other things above it.

i pasted it in a new file, and still.. no reaction

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I do not know where you went wrong then. I tried the script myself with success. Just to make sure, you're saying that the user who wrote !members is not getting any notices? Cause you're not supposed to see them. So hopefully that's not what confuses you.

Example of what it looks like. Left = Your window, Right = Other user's window.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 7
P
Pluffie Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: Jun 2014
Posts: 7
Originally Posted By: Nillen
I do not know where you went wrong then. I tried the script myself with success. Just to make sure, you're saying that the user who wrote !members is not getting any notices? Cause you're not supposed to see them. So hopefully that's not what confuses you.

Example of what it looks like. Left = Your window, Right = Other user's window.


nop, he dont get annything..
dont understand lol

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
What server is this on?
Does the server allow features like notice?
What version of mIRC are you running?
What application is your friend running?
Try seeing if something doesn't add up or w/e.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard