mIRC Homepage
Posted By: PlayLikeFabian [Twitch Bot] Queue Help - 25/06/15 06:33 PM
Hey guys.
First of all, I don't wanna get flamed or something even if it's more or less deserved because I'm a real newcomer to mIRC and the whole language included in it. Like the title says I've got some problems creating a queue controlled by commands.

So here's my goal: I wanna have a .txt or .ini file auto-created by mIRC if the first viewer enters a specified command in the twitch chat. The first guy typing the command should be saved in the file as the first in my virtual queue and the second guy as the second in my queue and so on. A command to dis-/enable the commands to enter the queue is not my problem, but my knowledge for creating something that first says who's first in queue is too small. There should be something like a timed announcer to tell the viewers, who's first in the queue, who's second etc. If you could help me until yet would be best thing of you, but then I have the wish that moderators can enter a command and the queue should remove the first one presented in the timed announcer and in the file and should turn the second one to the first and moving everyone one place higher, if you guys understand what I mean.


Because I have no idea at the moment, how to do this, I won't add any content out of my code, but if you need more explanation or don't understand anything well enough 'cause of my English or 'cause of my bad description, just leave a comment below, I'll answer as fast as I can.



Thanks for reading, helping or trying to help,
Stay Frosty, PlayLikeFabian!
Posted By: splinny Re: [Twitch Bot] Queue Help - 25/06/15 07:06 PM
Check this one, idea looks similar to yours (in general)
https://forums.mirc.com/ubbthreads.php/topics/253603/Re:_Add_onto_.txt_lines
Posted By: PlayLikeFabian Re: [Twitch Bot] Queue Help - 25/06/15 07:22 PM
Thanks. Helped me a bit in doing the announcer and what to announce (txt), but the main thing, the queue, is not really answered in it (especially how to put everyone one place up)
Posted By: splinny Re: [Twitch Bot] Queue Help - 25/06/15 07:39 PM
You can use %variable like there:
Code:
set %x %x New_user

and 1st in queue is
Code:
$gettok(%x,1,32)
Posted By: PlayLikeFabian Re: [Twitch Bot] Queue Help - 27/06/15 12:32 PM
@splinny Well. I just tried to do the things u told me. Now, when I try to tell who's first in the queue, it's always just saying New_User

**EDIT: Fixed it. Just had to clear the %x var in my vars.ini laugh
Posted By: splinny Re: [Twitch Bot] Queue Help - 27/06/15 01:10 PM
Did you try to read instruction before turning it on?
Posted By: PlayLikeFabian Re: [Twitch Bot] Queue Help - 27/06/15 01:16 PM
Fixed it. Just had to clear the %x var in my vars.ini laugh
Posted By: PlayLikeFabian Re: [Twitch Bot] Queue Help - 27/06/15 03:27 PM
I have got a last question. Well, now I'm at a point, where I only need the leave-command to leave the queue. I know, how to read the txt file, but I don't know how to only delete one part of a variable and the txt-file.
Posted By: splinny Re: [Twitch Bot] Queue Help - 27/06/15 04:17 PM
To delete part of variable (if you mean those %x) - use $deltok. To delete line from file use /write. To delet part of line use $read, modify data from $read and re-/write it to same line.
© mIRC Discussion Forums