Author Topic: Slap bot script?  (Read 11126 times)

Rho

  • Guest
Slap bot script?
« on: December 18, 2008, 09:51:24 PM »
A guy and me are in a scripting war. He has now made another screen name that responds to his comands.

He would say "!lamp" and his bot would hit my over the head with a lamp.

How can I make a script that recognizes certain words, but only from me? 

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Slap bot script?
« Reply #1 on: December 19, 2008, 09:56:37 AM »
If you want a Script to recognize what you type, use the OUTTEXT event.

There are a few examples in the Forum, just search for OUTTEXT.
The IceChat God

Rho

  • Guest
Re: Slap bot script?
« Reply #2 on: December 19, 2008, 09:23:44 PM »
Okay, I've reviewed the search results but I cannot find something that will do what I want it to do.

So could someone start me out with a script like this:
sub OUTTEXT
If
Text "!slap [insert name here]"
then enter text "Slaps [insert name here] around a bit with a large trout"
end if
end sub

Do you understand what I'm asking for?
If so, I will give you an E-cookie to make that for me.

Morio

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 256
Re: Slap bot script?
« Reply #3 on: December 20, 2008, 12:45:37 AM »
Code: [Select]
Function OUTTEXT(OutGoingText)
  If Left(OutGoingText,6) = "!slap " and Len(OutGoingText) > 6 then
    SendCommand "/me  Slaps " & Mid(OutGoingText,7) & " around a bit with a large trout"
 
  End If
End Function

That should work, but you could also make an alias like this:

Code: [Select]
/slap://me slaps $1 around a bit with a large trout
then you could type /slap nickname
"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

Rho

  • Guest
Re: Slap bot script?
« Reply #4 on: December 20, 2008, 02:04:02 AM »
Delivered