IceChat Forums

IceChat 5 Scripting => Scripting => Topic started by: Rho on December 18, 2008, 09:51:24 PM

Title: Slap bot script?
Post by: Rho 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? 
Title: Re: Slap bot script?
Post by: Snerf 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.
Title: Re: Slap bot script?
Post by: Rho 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.
Title: Re: Slap bot script?
Post by: Morio 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
Title: Re: Slap bot script?
Post by: Rho on December 20, 2008, 02:04:02 AM
Delivered


(http://www.gift-baskets-4u.com/images/Cookies/Chocolate%20Cookie%20With%20White%20Chocolate%20Chips%20.jpg)