Page 1 of 1
Cant find certain NPCs
Posted: Fri Mar 04, 2011 9:41 am
by RicalEyl
My bot sometimes cant find NPCs even if he stands directly in front of them. How can I fix that?
e.g. I use: player:target_Object("Marliss-Schwester"); and the bot says: Cant find the NPC Marliss-Schwester.
I have tried everything and have no Idea anymore.
The funny thing is: Sometimes when I start the bot it works for the first time but not anymore the second time the bot runs the exactly same script.
Re: Cant find certain NPCs
Posted: Fri Mar 04, 2011 9:56 am
by rock5
'-' has a special meaning when the bot compares strings so it doesn't work.
Just replace any special characters with '.' and it should work ('.' means it will match any character).
Re: Cant find certain NPCs
Posted: Fri Mar 04, 2011 12:15 pm
by RicalEyl
ty works fine now:)
Re: Cant find certain NPCs
Posted: Fri Mar 04, 2011 8:58 pm
by lisa
Don't forget you don't need to have the NPC full name
that would also work
Re: Cant find certain NPCs
Posted: Sat Mar 05, 2011 5:38 am
by Auto Pilot
About string stuff ... Can you use all the regexp metacharacters for matching names in profile/waypoints ? Thinking about ^ and $ to make sure the bot only checks the the desired item/buff and not for a slightly different one ? (like "Wave Armor" and "Wave Armor Ineffective")
Re: Cant find certain NPCs
Posted: Sat Mar 05, 2011 6:50 pm
by Administrator
Auto Pilot wrote:About string stuff ... Can you use all the regexp metacharacters for matching names in profile/waypoints ? Thinking about ^ and $ to make sure the bot only checks the the desired item/buff and not for a slightly different one ? (like "Wave Armor" and "Wave Armor Ineffective")
You should be able to. Try "^Wave Armor$" and see if it works.