Author Topic: auto talk  (Read 2384 times)

angelicwhimpers

  • Newbie
  • *
  • Posts: 11
auto talk
« on: February 22, 2015, 03:12:38 PM »
ok soo i am setting up a script that will auto talk, i have the codes for it as ...

on *:TEXT:brb:#RoomName:{
/say Well hurry back $nick
}

it works great... but what i am wondering is... if i wanna make it so it only responds to people with either a Cap nick like "Runner" how would i go about that?
and what if i only want it to respond to lower case nicks like "runner" what would that be?
« Last Edit: February 22, 2015, 11:49:10 PM by angelicwhimpers »

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: auto talk
« Reply #1 on: February 22, 2015, 07:22:12 PM »
Then dont use this script type, use the script type you used in the previous post.
This script type you are using in this post is very limited.
`
Also, using /say will say it in the current channel you are in.
So if you happen to be in a different channel, and that event is triggered, it will say it in the current channel.
Using '/msg #channel some message' fixes that.
The IceChat God

angelicwhimpers

  • Newbie
  • *
  • Posts: 11
Re: auto talk
« Reply #2 on: February 22, 2015, 11:51:44 PM »
the other one was an auto voice... i do not know how to change it out... soo i was hoping someone would help me.. i am very new to the codeing thing and the whole Sub thing confuses me.

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: auto talk
« Reply #3 on: February 23, 2015, 10:27:59 AM »
Yes, but instead of doing a /mode, do a /msg

SendCommand "/msg " & Channel & " well hurry back " & Nickname, ServerNumber
The IceChat God

angelicwhimpers

  • Newbie
  • *
  • Posts: 11
Re: auto talk
« Reply #4 on: February 23, 2015, 09:55:50 PM »
that dosnt answer how i make it soo it only responds to people with Capped nicks....... i would like if it only does it to people with Cap nicks... instead of lower case ones. as in Rick could use it but rick wouldnt beable to.

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: auto talk
« Reply #5 on: February 23, 2015, 10:12:49 PM »
You already have that part in the auto voice script as well
"I don't know what World War 3 will be fought with, but I know World War 4 with be fought with sticks and stones." - Albert Einstein

angelicwhimpers

  • Newbie
  • *
  • Posts: 11
Re: auto talk
« Reply #6 on: February 23, 2015, 10:17:52 PM »
okies soo i am guessing that the UCase makes it for the Cap nicks..... instead of UCase what would you type for just lower case nicks? ucase?

angelicwhimpers

  • Newbie
  • *
  • Posts: 11
Re: auto talk
« Reply #7 on: February 23, 2015, 10:23:24 PM »
would this be right then?

Sub ONTEXT:brb:(Nickname,Host,Channel,ServerNumber)
if Channel = "#RoomName" then
   if mid(Nickname ,1,1) = UCase( mid(Nickname,1,1 ) ) then
      SendCommand "/msg #RoomName Hurry back " & Nickname,ServerNumber
   else
'            SendCommand " do something else"
   end if
end if
End Sub

Ndtm

  • Newbie
  • *
  • Posts: 5
Re: auto talk
« Reply #8 on: February 24, 2015, 06:00:58 AM »
Code: [Select]
Sub ONTEXT(Message,Channel,Nickname,Host,ServerNumber)
if Channel = "#RoomName" And lcase(Message) = "brb" then
   if mid(Nickname ,1,1) = UCase( mid(Nickname,1,1 ) ) then
      SendCommand "/msg #RoomName Hurry back " & Nickname,ServerNumber
   end if
end if
End Sub
Don't assume that things from mIRC style works in 'icechat 5 style' (code in .ics format won't work in .ice format)
« Last Edit: February 24, 2015, 06:02:57 AM by Ndtm »