mIRC Home    About    Download    Register    News    Help

Print Thread
Please someone help #257442 08/04/16 11:22 AM
Joined: Apr 2016
Posts: 1
U
Unknownmanc Offline OP
Mostly harmless
OP Offline
Mostly harmless
U
Joined: Apr 2016
Posts: 1
Hello. Perhaps this question has been asked on the forum, but I have not found. I want that after people write in the chat this command (for example !Addgame Garrysmod), the text "garrysmod" would be added to my own site to the list. To then I could choose one of the games selected by subscribers. How can I make something like this? Sorry for bad english.

Re: Please someone help [Re: Unknownmanc] #257523 18/04/16 01:00 AM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
So you want subscribers to collectively write a list of games then you to choose?
If so, try this. It will allow users to use command !Addgame followed by a game, then it would write the list in a text file in your C:\Users\Administrator\AppData\Roaming\mIRC folder under the name GamesToPlay.txt.
Code:
on *:text:!Addgame *:#: {
  .write GamesToPlay.txt $2- Chosen by: $nick
  msg # $nick added $2- to the list 
}


If you wanted you could randomise the choice by using this. It would choose a random line to read from the file when you type !selectgame. Or you could just select manually by looking in the file.

Code:
on *:text:!selectgame:#: {
  var %Line $lines(GamesToPlay.txt)
  var %LineToRead $rand(1,%Line)

  msg # The next game to play: $read(GamesToPlay.txt,%LineToRead)
}


Let me know how you get on.