unknowncheats uc-forum.com ucdownloads ucdownloads.com

Go Back   UC-Tutorials - Multiplayer Game Hacking and Cheat Tutorials > Web / Scripting > mIRC Script

- Sponsored Advertisement -
http://www.myfpscheats.com/


Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2007, 02:53 PM
Neo_Reloaded Neo_Reloaded is offline
Tutorial Admin
 
Join Date: Dec 2006
Posts: 259
Default [Tip] Using $istok over $isin

There are some cases where you need to search for a certain word in a string of text. Most beginners use $isin, like in this example:

Code:
on *:text:*:#:{
if ($me isin $1-) {
do whatever
}
}
The problem with using isin is that it searches for ANY instance of the text you specify, even if it is in a word. So from the example: If someone says, "Hi uberNeo_Reloadedlol" then the script will activate. A way around this is by using $istok. The syntax for $istok is:

Code:
$istok(string, text to search for, character that separates the text)
Don't get confused by the character part, just put 32 for that value if there are spaces separating the string. here's an example of a working script using $istok:

Code:
on *:text:*:#:{
if ($istok($1-,$me,32)) {
msg $chan That's my name, don't wear it out, $nick $+ .
}
}
When someone says your name in a channel, the script will message "That's my name, don't wear it out, <nick>".
Reply With Quote
Reply

  • Submit Thread to Digg
  • Submit Thread to del.icio.us
  • Submit Thread to StumbleUpon
  • Submit Thread to Google
  • Submit Thread to Facebook
  • Submit Thread to My Yahoo!
  • Submit Thread to MySpace
  • Submit Thread to Twitter
  • Submit Thread to Reddit

Tags
$isin, $istok, tip

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 09:52 AM.