![]() |
Text Contains...
I was wondering if there was a way to detect if my chat bar contained a certain word. For instance.
NPC Code:I like to sniff socks. Is there a way I can check if my chat bar contains the work sniff? Maybe there is a function like... PHP Code:
|
PHP Code:
|
Additional Information:
haystack.pos(needle) will return the position of needle in the haystack (string/variable). Also since arrays are treated like strings, it can be used as a quick method to search an array as well, for arrays there's also haystack.index(needle). Examples: PHP Code:
|
Thank you!
|
All times are GMT +2. The time now is 12:25 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.