mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2015
Posts: 40
J
jimieo Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2015
Posts: 40
So, I am a Harry Potter nerd, and my twitch viewers know it. I brought my addiction to my bot. I will be creating commands for those in each house.

Just in case anyone would appreciate this, here you go!

Code:
alias sort_ravenclaw return $readini(C:\Users\Jimie\AppData\Roaming\mIRC\sort_ravenclaw.ini,#,$1)
alias sort_hufflepuff return $readini(C:\Users\Jimie\AppData\Roaming\mIRC\sort_hufflepuff.ini,#,$1)
alias sort_gryffindor return $readini(C:\Users\Jimie\AppData\Roaming\mIRC\sort_gryffindor.ini,#,$1)
alias sort_slytherin return $readini(C:\Users\Jimie\AppData\Roaming\mIRC\sort_slytherin.ini,#,$1)

on *:text:!resort*:#jimieo:{
  if ((%floodresort) || ($($+(%,floodresort.,$nick),2))) { return }
  set -u3 %floodresort On
  set -u3600 %floodresort. $+ $nick On   
  var %dosort = $rand(1,4)
  if (%dosort == 1) { 
    msg $chan /me The Sorting Hat says $nick belongs in Ravenclaw!
    writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_ravenclaw.ini # $nick 1           
    if ($sort_gryffindor($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_gryffindor.ini # $nick
    if ($sort_hufflepuff($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_hufflepuff.ini # $nick
    if ($sort_slytherin($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_slytherin.ini # $nick      
  }
  if (%dosort == 2) { 
    msg $chan /me The Sorting Hat says $nick belongs in Gryffindor!
    writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_gryffindor.ini # $nick 1     
    if ($sort_ravenclaw($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_ravenclaw.ini # $nick
    if ($sort_hufflepuff($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_hufflepuff.ini # $nick
    if ($sort_slytherin($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_slytherin.ini # $nick         
  }
  if (%dosort == 3) { 
    msg $chan /me The Sorting Hat says $nick belongs in Hufflepuff!
    writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_hufflepuff.ini # $nick 1     
    if ($sort_ravenclaw($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_ravenclaw.ini # $nick
    if ($sort_gryffindor($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_gryffindor.ini # $nick
    if ($sort_slytherin($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_slytherin.ini # $nick    
  }
  if (%dosort == 4) {   
    msg $chan /me The Sorting Hat says $nick belongs in Slytherin!
    writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_slytherin.ini # $nick 1     
    if ($sort_ravenclaw($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_ravenclaw.ini # $nick
    if ($sort_gryffindor($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_gryffindor.ini # $nick
    if ($sort_hufflepuff($nick)) remini C:\Users\Jimie\AppData\Roaming\mIRC\sort_hufflepuff.ini # $nick
  }
}

on *:text:!sort*:#jimieo:{
  if ((%floodsort) || ($($+(%,floodsort.,$nick),2))) { return }
  set -u5 %floodsort On
  set -u5 %floodsort. $+ $nick On
  if ($sort_ravenclaw($nick)) msg # /me $nick you have already been sorted into Ravenclaw.
  elseif ($sort_gryffindor($nick)) msg # /me $nick you have already been sorted into Gryffindor.
  elseif ($sort_hufflepuff($nick)) msg # /me $nick you have already been sorted into Hufflepuff.
  elseif ($sort_slytherin($nick)) msg # /me $nick you have already been sorted into Slytherin.
  else {
    var %dosort = $rand(1,4)
    if (%dosort == 1) { 
      msg $chan /me The Sorting Hat says $nick belongs in Ravenclaw!
      writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_ravenclaw.ini # $nick 1           
    }
    if (%dosort == 2) { 
      msg $chan /me The Sorting Hat says $nick belongs in Gryffindor!
      writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_gryffindor.ini # $nick 1          
    }
    if (%dosort == 3) { 
      msg $chan /me The Sorting Hat says $nick belongs in Hufflepuff!
      writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_hufflepuff.ini # $nick 1     
    }
    if (%dosort == 4) {   
      msg $chan /me The Sorting Hat says $nick belongs in Slytherin!
      writeini C:\Users\Jimie\AppData\Roaming\mIRC\sort_slytherin.ini # $nick 1     
    }
  }
}

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Don't think "msg $chan /me" does what you want it to do. Try "describe #" instead smile

Joined: Dec 2014
Posts: 68
M
Babel fish
Offline
Babel fish
M
Joined: Dec 2014
Posts: 68
On twitch.tv msg $chan /me makes the text appear differently, Here is an example of normal text

No /me Image http://gyazo.com/97d2130c58030af86d11d7653e3a7475

Here is the /me after it
With /me Image

Last edited by michaelukz; 02/02/15 07:20 AM.
Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
Heh, you're right, they appear the same in Twitch chat. I think I'd still use "describe #" since "msg # /me" will look strange to any mIRC users you might have in your chat.


<bot> /me does things
* bot does things

Joined: Jun 2014
Posts: 248
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
Originally Posted By: Sakana
Heh, you're right, they appear the same in Twitch chat. I think I'd still use "describe #" since "msg # /me" will look strange to any mIRC users you might have in your chat.


<bot> /me does things
* bot does things

Twitch chat doesn't act like typical irc. Sending .me or /me is the correct way to send an action on twitch.

Joined: Jan 2015
Posts: 40
J
jimieo Offline OP
Ameglian cow
OP Offline
Ameglian cow
J
Joined: Jan 2015
Posts: 40
Belhifet is right.

On twitch users using the web client see coloured names. Using /me allows someone to have their text appear in that colour. Something I have my bot do on each command.

Joined: Sep 2014
Posts: 259
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Sep 2014
Posts: 259
You both missed my (mostly irrelevant) point :P

In the Twitch chat on a browser, 'describe # blabla' will look identical to 'msg # /me blabla'

So /describe seems to be the strictly better option, though it doesn't really matter much if the script is only intended for Twitch


Link Copied to Clipboard