View Full Version : sloot3 troubles
zennsunni
04-22-2012, 11:30 PM
Hey all, I'm trying to get sloot3 to work with my new weather-scripted coat, and am having some troubles. The problem lies in the fact that the coat has custom outputs for putting/removing stuff in/out of the coat. It says "you grab <bler> from a small pocket inside your <coat>.
I have found the two spots in the script in which it says:
You grab .* from inside your .*
and have added it so that it now has:
You grab .* from inside your .* from a small pocket inside your heavy canvas coat .*\.
Still isn't working. I assume I'll have to modify the "you put" parts too. A
Any advice?
DaCapn
04-23-2012, 05:54 AM
Do you know what .* means?
Right now your regex will match a line that looks like this:
You grab a copper lockpick from inside your heavy canvas coat from a small pocket inside your heavy canvas coat and here's some other text for some reason.
What you want is to have your statement match is anything like this:
You grab a copper lockpick from inside your heavy canvas coat.
You grab a copper lockpick from a small pocket inside your heavy canvas coat.
The following will work:
/You grab .* (from inside your|from a small pocket inside your) .*/i
And as long as you don't expect to be running several scripts all doing strange things, this would be sufficient:
/You grab .*/i
Look at some ruby regex references. I use the case insensitive option because I find that my regex statements with leading caps don't match otherwise (I'm not certain why).
This is a handy site for testing regex statements:
http://rubular.com/
zennsunni
04-23-2012, 09:42 AM
I probably should have prefaced my post by saying I don't know squat about ruby scripts.
Thanks for the help, I'll give it a whirl.
zennsunni
04-23-2012, 11:06 AM
Simplified the match and it works fine. Had to add several new lines for that coat though. It has special outputs for different item types.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.