Originally Posted by
askf
Hey guys,
I want to be able to accept a trade from a specific player in the chat. The only solution I have is to split the Chat box into multiple TBoxs and then check each tbox with ogl.getChars(box[i]).
Just wanted to check if there isn't a better way to do this?
Cheers,
askf
Simba Code:
if execRegExpr('(?i).*wishes to trade with you.*', chat.getChat()[0]) then
mouse.click('wishes to trade with you');
Could also use ogl.getChars().toString() instead of chat.getChat() if you want to detect any text not in the chatbox, since the regular expression will narrow everything down fine. There might be a better regular expression to use as well for the situation.