mIRC Home    About    Download    Register    News    Help

Print Thread
[Twitch] !love command #255279 04/10/15 03:14 PM
Joined: Sep 2015
Posts: 8
N
Nordy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Sep 2015
Posts: 8
Hey world i am new to mIRC. Is someone out there who could help me to understand how the !love command from Moobot exactly works? Like how can i create a "$user variable" just for the streamer and just for the bot. Thanks a lot for the help. Best regards.

Last edited by Nordy; 04/10/15 03:56 PM.
Re: [Twitch] !love command [Re: Nordy] #255280 04/10/15 07:28 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Your explanation is insufficient, would you mind trying again?
What is the trigger, does it require any parameters, is it conditional at all, what's the expected result?
What is your definition of "$user variable"?


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: [Twitch] !love command [Re: Nillen] #255286 05/10/15 12:48 PM
Joined: Sep 2015
Posts: 8
N
Nordy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Sep 2015
Posts: 8
i used one of your codes
Code:
 on *:text:!love &:#: { msg # There's $rand(1,100) % <3 between $nick and $2 . 


from here:
Html:
 http://forums.mirc.com/ubbthreads.php/topics/249996/Nightbots_@touser@ 



but now i want to make a custom response for the streamer and the channel bot with the same command like:



if $2 is "streamer" =

The love $nick has for our beloved Dear Leader $2 transcends all <3 .



if $2 is "bot" =

Silly organic, bots cannot know love BibleThump


I hope you understand what i mean.

Re: [Twitch] !love command [Re: Nordy] #255287 05/10/15 01:31 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Fair enough, you're looking for something like this I take it? This is a hardcoded static version, you can create something more dynamic in the future if you learn more about variables and values in programming.

Code:
on *:text:!love &:#: { 
var %user $$2
var %rng $rand(1,100)
var %streamer $remove(#,$chr(35)) 
if (%user == $me) var %message Silly organic, bots cannot know love BibleThump
elseif (%user == %streamer) var %message The love $nick has for our beloved Dear Leader %user transcends all <3 .
else var %message There's %rng $chr(37) <3 between $nick and %user $+ .
msg # %message
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: [Twitch] !love command [Re: Nillen] #255288 05/10/15 02:25 PM
Joined: Sep 2015
Posts: 8
N
Nordy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Sep 2015
Posts: 8
Yeah awesome thx! grin

One last question is there a way to make it like that?

"Bot": There's 25 % <3 between "user" and "Streamer".

"Bot": There's 43 % <3 between "user" and "Streamer".

"Bot": The love "user" has for our beloved Dear Leader "Streamer" transcends all <3 .

best regards

Re: [Twitch] !love command [Re: Nordy] #255289 05/10/15 04:07 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
elseif (%user == %streamer) var %message The love $nick has for our beloved Dear Leader %user transcends all <3 .

Change the message in that line to what you want.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: [Twitch] !love command [Re: Nillen] #255291 05/10/15 04:26 PM
Joined: Sep 2015
Posts: 8
N
Nordy Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
N
Joined: Sep 2015
Posts: 8
Code:
 elseif (%user == %streamer) var %message $read(testtest.txt) 


testtest.txt
Code:
The love $nick has for our beloved Dear Leader %user transcends all <3 .
There's 1 % <3 between $nick and %user .
There's 44 % <3 between $nick and %user .
There's 99 % <3 between $nick and %user .
There's 69 % <3 between $nick and %user .
There's 25 % <3 between $nick and %user .
There's 3 % <3 between $nick and %user .
There's 9 % <3 between $nick and %user .
There's 50 % <3 between $nick and %user .
There's 33 % <3 between $nick and %user .
There's 70 % <3 between $nick and %user . 


i mean like getting multiple anwsers like how i do it atm :-D

Re: [Twitch] !love command [Re: Nordy] #255294 05/10/15 08:03 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
From what it looks like, you have a bunch of unneccesary lines in a textfile. Most lines just reappear with changing values that can be set dynamically instead.

Let's say the chance is 1 in 10 to get the trancends all message, in that case it would look something like this.
Code:
on *:text:!love &:#: { 
var %user $$2
var %rng $rand(1,100)
var %streamer $remove(#,$chr(35)) 
if (%user == $me) var %message Silly organic, bots cannot know love BibleThump
elseif (%user == %streamer) var %message The love $nick has for our beloved Dear Leader %user transcends all <3 .
else { 
var %chance 10
var %chance_rng $rand(1,%chance)
if (%chance_rng == %chance) var %message The love $nick has for our beloved Dear Leader %user transcends all
else var %message There's %rng $chr(37) <3 between $nick and %user $+ .
}
msg # %message
}


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