mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2013
Posts: 5
Atomic Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: Nov 2013
Posts: 5
Hi guys,

Having a bit of trouble with creating a dynamic text command for use in Twitch TV. I want to be able to have variable commands such as [command]!Why <variable> [response] Why <variable> Please <variable> Staph <variable>. I have
Code:
on +100:text:!why [dont know what to put here] :#: { msg $chan Why $+ , Please $+ , Staph $+ }


Thanks in advance.

Last edited by Atomic; 12/11/13 07:26 AM.


Thanks
Atomicfirepit
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Where (and how) are the responses stored?

If it's a text file (Questions.txt) with Questions/responses stored such as..
Question1 answer1
Question2 response two
Question3 another response here
then use something like
Code:
on +100:text:!why *:#:{
  ; First check if there is a question/response in the file
  if $read(Questions.txt,sn,$2) {
    ; respond with the answer ($v1 now contains the response from the $read() above)
    msg $chan Why $+ $2. Reason: $v1
  }
}


Link Copied to Clipboard