mIRC Home    About    Download    Register    News    Help

Print Thread
Have a really cool idea. Need help with it though. #257201 20/03/16 01:33 PM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
So basically what I am trying to do is give people the ability to add custom lurker messages. This idea started out when I was creating this offline script that would allow people to set a message and then it would be echoed back on that specific channel. However, I have sorta hit a bump in the road. Here is what I have so far. Any help with this would be much appreciated.

Thanks,
Netct25

Code:

on *:text:!offline on:#: {
  set %offline. [ $+ [ $chan ] ] 1
  msg $chan Offline feature is enabled. Be sure to specify a message for the offline feature.
}

on *:text:!offline off:#: {
  unset %offlinemsg. $+ $2 
  set %offline. [ $+ [ $chan ] ] 0
  msg $chan Offline feature has been disabled.
}
on *:text:!setoffline *:#: {
  set %offlinemsg. $+ $2 
  msg $chan Offline message was set to $2
}

on *:join:#: {
  if ( %offline. [ $+ [ $chan ] ] == 1 ) {
    msg $chan %offlinemsg 
  }
}


Last edited by Netct25; 20/03/16 01:36 PM.
Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257252 25/03/16 05:26 AM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
Any ideas?

Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257255 25/03/16 12:17 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
You want to create a Greet Manager? that when a user joins into the channel to automatically message the channel the set greet for the currently user?

Re: Have a really cool idea. Need help with it though. [Re: westor] #257437 07/04/16 02:23 AM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
Yeah like an offline message. So say the streamer isn't going to be streaming for a while. They make a message saying. Hey I am going to be away for a while, be sure to follow the stream. Or something along those lines. I eventually want to set it to where they can also customize lurking messages. So like each channel can have their own lurker message. So like one channel may have "Hey I see you lurking there, please stop." While another may have "Hey why are you lurking, come chat!" Something like that. Any ideas on how to do this? I have thought of a couple of ways using variables, but I am not exactly sure how I would go about implementing it. As you can see above I have done some of what I thought it would take to customize it.

Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257438 07/04/16 07:05 AM
Joined: Jun 2015
Posts: 84
F
Fonic_Artes Offline
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
While doing an offline message would be simple enough using Twitch's API, I don't recommend calling out lurkers that are in chat. I mean this in the sense of, if you call out the lurker, they may just leave and never come back.

Re: Have a really cool idea. Need help with it though. [Re: Fonic_Artes] #257440 07/04/16 01:59 PM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
To be honest with you that's not entirely true. I have had a lot of lurkers come in my stream, only to be called out and then actually start chatting in the stream.

Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257454 10/04/16 03:18 PM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
Does anyone have any idea how to do this. I have modified my script above, but it still doesn't seem to be grabbing the variable. I am a little confused as to why. Can anyone tell me what I am doing wrong?

Code:

on *:text:!offline on:#: {
  set %offline. [ $+ [ $chan ] ] 1
  msg $chan Offline feature is enabled. Be sure to specify a message for the offline feature.
}

on *:text:!offline off:#: {
  unset %offlinemsg. $+ $2- 
  set %offline. [ $+ [ $chan ] ] 0
  msg $chan Offline feature has been disabled.
}
on *:text:!setoffline*:#: {
  set %offlinemsg. [ $+ [ $chan ] ] $2- 
  msg $chan Offline message was set to $2- $+ .
}

on !*:join:#: {
  if ( %offline. [ $+ [ $chan ] ] == 1 ) {
    msg $chan This is the result of that message: %offlinemsg
  }
}


Last edited by Netct25; 10/04/16 03:19 PM.
Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257456 10/04/16 07:16 PM
Joined: Apr 2016
Posts: 7
W
Weenig Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
W
Joined: Apr 2016
Posts: 7
I gotta agree with Fonic_Artes, you know people lurk because they are doing something else why watching a stream. it could be working, doing laundry, cooking or playing a game themselves. Hitting them with a message like "I see you lurking, please stop." while doing this will most likely make them leave cause they just want to watch, not chat. Just sharing my opinion, take this from a long time twitch user and moderator.

//Weenig

Re: Have a really cool idea. Need help with it though. [Re: Weenig] #257460 11/04/16 09:30 AM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
Can you just take a look at the script to see if I have done something wrong? I may not even use the lurker script, but I think that the offline script is an awesome idea. If you could please help me that would be awesome. I already have a lurker script for the bot anyway, I was just thinking about modifying their messages. I am not the only one who uses the bot, others do and have requested it. I was just seeing if there was a way of doing this and the script above was my theory on how I may or may not go about doing it.

Last edited by Netct25; 11/04/16 09:32 AM.
Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257506 16/04/16 09:41 AM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
Can anyone tell me what I am doing wrong?

Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257516 17/04/16 08:10 PM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
Give this a go, instead of setting something to read you the message you want, why not just write to a txt then call from there?
Let me know how this suits.

Code:
on *:TEXT:!offline on:#: {
  if ($nick isop #) {
    unset %offline. $+ $chan    
    msg $chan Offline mode Activated. 
  }
}

on *:TEXT:!setoffline*:#: {
  write -c OFFLINEMSG.txt 
  write OFFLINEMSG.txt $2-
  msg # Offline Message set to: $2-
}

on *:TEXT:!offline off:#: { 
  if ($nick isop #) {
    set %offline. $+ $chan On    
    msg $chan Offline mode deactivated.
  }
}


on !*:join:#: {
  if ($($+(%,offline.,$chan),2)) { OffLine $chan}
    if ($($+(!%,offline.,$chan),2)) { return }
  }


  alias OffLine {
    if ((%floodhell_*) || ($($+(%,floodhell_*.,$nick),2))) { return }
    set -u30 %floodhell_* On
    set -u3600 %floodhell_*. $+ $nick 
    msg $chan $read(OFFLINEMSG.txt,1) 
  }


  on 1:OPEN:/msg # %offline. $+ $chan On

Note: This is just a slightly modified script I made for someone else a while ago.

Re: Have a really cool idea. Need help with it though. [Re: JB_uk] #257526 18/04/16 12:13 PM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
This works great. Is it possible to make the on !*:join:#: only pull the message that other channels have created? For example in the text file it says "the message that was set" Would it be possible to have it pull by a specific channel? So like #thisuser this users message. Thanks again!

Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257527 18/04/16 12:36 PM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
So you would like to have a custom message for each channel the bot is in? Am I right in saying that?

Re: Have a really cool idea. Need help with it though. [Re: JB_uk] #257528 18/04/16 02:40 PM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
Yes that is correct. Would that be possible to do when writing into the text file?

Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257529 18/04/16 02:57 PM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
Very easily. Just add
Code:
$+ $chan $+


Code:
on *:TEXT:!offline on:#: {
  if ($nick isop #) {
    unset %offline. $+ $chan    
    msg $chan Offline mode Activated. 
  }
}

on *:TEXT:!setoffline*:#: {
  write -c OFFLINEMSG $+ $chan $+ .txt 
  write OFFLINEMSG $+ $chan $+ .txt  $2-
  msg # Offline Message set to: $2-
}

on *:TEXT:!offline off:#: { 
  if ($nick isop #) {
    set %offline. $+ $chan On    
    msg $chan Offline mode deactivated.
  }
}


on !*:join:#: {
  if ($($+(%,offline.,$chan),2)) { OffLine $chan }
  if ($($+(!%,offline.,$chan),2)) { return }
}



alias OffLine {
  if ((%floodhell_*) || ($($+(%,floodhell_*.,$nick),2))) { return }
  set -u30 %floodhell_* On
  set -u3600 %floodhell_*. $+ $nick 
  msg $chan $read(OFFLINEMSG $+ $chan $+ .txt ,1) 
}


on 1:OPEN:/msg # %offline. $+ $chan On


Again if you would test this that'd be great

Re: Have a really cool idea. Need help with it though. [Re: JB_uk] #257530 18/04/16 03:37 PM
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
So I tested it and it didn't work, however I modified your code and got everything to work. On the: { OffLine $chan } I just changed it to { Offline $chan} and it works just fine. Any ideas why? It is kinda funny because you move the bracket away from $chan and everything is fine, but it doesn't work. Thanks again for your help with this! If at all possible could you take a look at my queue thread? Thanks again!

Code:

on *:TEXT:!offline on:#: {
  if ($nick isop #) {
    unset %offline. $+ $chan    
    msg $chan Offline mode Activated. 
  }
}

on *:TEXT:!setoffline*:#: {
  write -c OFFLINEMSG $+ $chan $+ .txt 
  write OFFLINEMSG $+ $chan $+ .txt  $2-
  msg # Offline Message set to: $2-
}

on *:TEXT:!offline off:#: { 
  if ($nick isop #) {
    set %offline. $+ $chan On    
    msg $chan Offline mode deactivated.
  }
}


on !*:join:#: {
  if ($($+(%,offline.,$chan),2)) { OffLine $chan}
    if ($($+(!%,offline.,$chan),2)) { return }
  }



  alias OffLine {
    if ((%floodhell_*) || ($($+(%,floodhell_*.,$nick),2))) { return }
    set -u30 %floodhell_* On
    set -u3600 %floodhell_*. $+ $nick 
    msg $chan $read(OFFLINEMSG $+ $chan $+ .txt ,1) 
  }


  on 1:OPEN:/msg # %offline. $+ $chan On




Last edited by Netct25; 18/04/16 03:38 PM.
Re: Have a really cool idea. Need help with it though. [Re: Netct25] #257538 18/04/16 05:04 PM
Joined: Oct 2014
Posts: 49
JB_uk Offline
Ameglian cow
Offline
Ameglian cow
Joined: Oct 2014
Posts: 49
Probably didn't help that I moved that bracket...
Whoops.

Last edited by JB_uk; 18/04/16 05:04 PM.