View Full Version : lich picking script question
Vividarium
01-26-2011, 12:46 AM
im wondering how to make my script cast 404 only if a trap is over or at a limit i set? im using picker.lic <i modified it a lil bit>
thanks fer any help
pm or post is fine
vivid
Vanatar
01-27-2011, 02:38 PM
im wondering how to make my script cast 404 only if a trap is over or at a limit i set? im using picker.lic <i modified it a lil bit>
thanks fer any help
pm or post is fine
vivid
Generally, you'll want to use regular expressions to pull out the text you want. Then a simple comparison of whatever match you found to your trap limit will determine whether or not to use 404.
Vividarium
01-31-2011, 03:37 PM
It looks like a somewhat difficult trap (-117). like that?
Joseph
02-01-2011, 11:27 AM
an example of regex for pulling trap difficulty. old code not sure if it still works.
def get_trap_diff
trap_diff_des = waitfor("It looks like ")
if trap_diff_des =~ /It looks like[^\n]+\((about\s|)-(\d+)\)\./
Settings['trap_diff'] = "#{$2}".to_i
waitfor("You still have a good enough picture of the trap in your mind, that you could try to disarm it.")
end
return Settings['trap_diff']
end
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.