Page 3 of 12 FirstFirst 12345 ... LastLast
Results 21 to 30 of 111

Thread: lockpicking script

  1. #21

    Default

    Hey Tgo01:

    Here is a script that was posted a while back. It uses vials from anywhere I think, grabs specific ones. In addition I believe it also has calculations for 404/403 with the 403 being similar to yours. Hopefully it helps?

    Code:
    # Pick
    # User settings
    $snp_Meas_override = false
    lm_ptricks = [ "SPIN", "TWIST", "TURN", "TWIRL", "TOSS", "BEND", "FLIP" ]
    
    def snp_GatherPicks()
      picks = [["copper", 1.00],["brass", 1.00],["steel", 1.10],["ivory", 1.20],["gold", 1.20],["silver", 1.30],["mithril", 1.45],["ora", 1.55],["glaes", 1.60],["laje", 1.75],["vultite", 1.80],["rolaren", 1.90],["veniom", 2.20],["invar", 2.25],["alum", 2.30],["golvern", 2.30],["kelyn", 2.40],["vaalin", 2.60]]
      done = false
      array_Pick_Mods = []
      picks.each { |pick|
        GameObj.inv.each { |ivvy|
          if ivvy.name =~ /black leather satchel/i
    	ivvy.contents.each { |conty|
    	  if conty.name =~ / #{pick[0]}( | .+)lockpick$/
    	    array_Pick_Mods.push ["##{conty.id}", pick[1]]
    	    done = true
    	  end
    	  break if done
    	}
          end
          break if done
        }
        done = false
      }
      return array_Pick_Mods
    end
    
    if checkname == "Auryana"
    	$snp_Cont_Caliper = "Sheath"
    	$snp_Cont_Lockpick = "Keyring"
    	$snp_Cont_Lockpick_Broke = "Cloak"
    	$snp_Cont_Dagger = "misericord"
    	$snp_Cont_Wedge = "Cloak"
    	$snp_Pick_Line = "LM PT #{lm_ptricks[rand(lm_ptricks.length)]}"
    	$snp_Array_Pick_Mods = [["Copper lockpick", 1.00],["Steel lockpick", 1.10],["Gold lockpick", 1.20],["Silver lockpick", 1.30],["Mithril lockpick", 1.45],["Ora lockpick", 1.55],["Glaes lockpick", 1.60],["Laje lockpick", 1.75],["Vultite lockpick", 1.80],["Rolaren lockpick", 1.90],["Veniom lockpick", 2.20],["Invar lockpick", 2.25],["Alum lockpick", 2.30],["Kelyn lockpick", 2.40],["Vaalin lockpick", 2.50],["Vaalin lockpick", 2.67]]
    elsif checkname == "Locksmith"
    	$snp_Cont_Caliper = "Black Satchel"
    	$snp_Cont_Lockpick = "Black Satchel"
    	$snp_Cont_Lockpick_Broke = "Pack"
    	$snp_Cont_Dagger = "stiletto"
    	$snp_Cont_Wedge = "Black Satchel"
    	$snp_Pick_Line = "LM PT Twirl"
    	$snp_Array_Pick_Mods = snp_GatherPicks()
    #	$snp_Array_Pick_Mods = [["Invar lockpick", 2.40],["Invar lockpick", 2.50]]
    elsif checkname == "Darkravin"
    	$snp_Cont_Caliper = "Boot"
    	$snp_Cont_Lockpick = "Case"
    	$snp_Cont_Lockpick_Broke = "Cape"
    	$snp_Cont_Dagger = "dagger"
    	$snp_Cont_Wedge = "Cape"
    	$snp_Pick_Line = "LM PT Twirl"
    	$snp_Array_Pick_Mods = [["Copper lockpick", 1.00],["Steel lockpick", 1.10],["Gold lockpick", 1.20],["Silver lockpick", 1.30],["Mithril lockpick", 1.45],["Ora lockpick", 1.55],["Glaes lockpick", 1.60],["Laje lockpick", 1.75],["Black lockpick", 1.80],["Rolaren lockpick", 1.90],["Veniom lockpick", 2.20],["myklian lockpick", 2.25],["Alum lockpick", 2.30],["Kelyn lockpick", 2.40],["Black lockpick", 2.50]]
    elsif checkname == "Nani"
    	$snp_Cont_Caliper = "Kit"
    	$snp_Cont_Lockpick = "Kit"
    	$snp_Cont_Lockpick_Broke = "Cloak"
    	$snp_Cont_Dagger = "dagger"
    	$snp_Cont_Wedge = "Cloak"
    	$snp_Pick_Line = "LM PT Turn"
    	$snp_Array_Pick_Mods = [["Red lockpick", 1.00],["Blued lockpick", 1.10],["Rose lockpick", 1.20],["Silver lockpick", 1.30],["Dark lockpick", 1.45],["Ora lockpick", 1.55],["Wavy lockpick", 1.60],["Rolaren lockpick", 1.90],["Veniom lockpick", 2.20],["Invar lockpick", 2.25],["Thin lockpick", 2.30],["Kelyn lockpick", 2.40],["Black lockpick", 2.50]]
    else
    	exit
    end
    $snp_Pick_Error = 60
    $snp_Trap_Error = 60
    $snp_Box_Cant_Disarm = false
    $snp_Box_Cant_Pick = false
    $snp_Box_Already_Open = false
    
    $snp_Box_Trap_Diff = 2000
    $snp_Box_Lock_Diff = 2000
    $snp_Box_Pick_Sugg = nil
    $snp_Box_Trap_Scle = false
    $snp_Box_Pick_Lore = false
    $snp_Box_Pick_Broke = false
    $snp_Box_Trap_Item = nil
    
    # Global Constants
    $snp_Array_Lock_Diff = ["primitive", "rudimentary", "extremely easy", "very easy", "easy", "very basic", "fairly easy", "simple", "fairly simple", "fairly plain", "moderately well-crafted", "well-crafted", "tricky", "somewhat difficult", "moderately difficult", "very well-crafted", "difficult", "extremely well-crafted", "very difficult", "fairly complicated", "intricate", "amazingly well-crafted", "very complex", "impressively complicated", "amazingly intricate", "extremely difficult", "extremely complex", "masterfully well-crafted", "amazingly complicated", "astoundingly complex", "incredibly intricate", "absurdly well-crafted", "exceedingly complex", "absurdly difficult", "masterfully intricate", "unbelievably complicated"]
    $snp_Array_Trap_Stow = ["^You'll need at least one hand free or to be holding the .+\\.$",
    		"^You'll need both hands free or to be holding the .+\\.$"]
    $snp_Array_Trap_Nrml = ["^After carefully examining the lock, you move on to the hinges of the .+.  Just as you were to pass the .+ off as safe, you notice what appears to be the ends of springs incorporated with the hinges\\.  Seems rather odd to have a .+ designed to spring open when it is unlocked\\.$",
    		"^Carefully, you feel around the lock and notice the inside chamber is coated with a strange white substance\\.  From your experience you recognize this as a common magical\\/chemical detonation system for an explosive mixture that was used to treat the .+\\.$",
    		"^Feeling around the inside of the lock, you notice that the casing is coated with a rough, grainy substance\\.  You lean forward and peer between the walls of the casing\\.  Examining the lock closely, you notice a small bladder filled with a strange liquid wedged between the tumblers\\.  With your face this close to the lock, you pick up the faintest scent of sulphur\\.$",
    		"^Hmmm, you can see what appears to be a tiny hole next to the lock plate which doesn't seem to belong there\\.  Looking closer you see a gleaming sliver of metal recessed in the hole\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small vial of fire-red liquid and a tiny hammer device which seems poised to shatter it if the lock is tampered with\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small vial of liquid and a tiny hammer device which seems poised to shatter it if the lock is tampered with\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small, dark crystal which seems imbedded in the locking mechanism\\.  It looks as if opening the lock without the exact key could shatter it\\.$",
    		"^Looking closely into the keyhole, you notice a pair of small metal rods a hair's width from touching each other\\.  Peering around the inside of the keyhole, you can see that the lock would push the two rods together should the lock be tampered with\\.$",
    		"^Peering closely into the lock, you spy a glimmering opalescent scarab wedged into the lock mechanism\\.  The scarab's surface is etched with tiny runes that seem to writhe as the light strikes them\\.$",
    		"^Peering closely into the lock, you spy a miniature blood red scarab wedged into the lock mechanism\\.  The scarab's shell is etched on the back with a dark teardrop-shaped pattern surrounded by tiny runes\\.$",
    		"^Peering closely into the lock, you spy a miniature sea-green glaes scarab wedged into the lock mechanism\\.  The scarab's surface is etched with tiny runes that seem to writhe as the light strikes them\\.$",
    		"^Peering closely into the lock, you spy a miniature sky-blue glaes scarab wedged into the lock mechanism\\.  The scarab's surface is etched with tiny runes that seem to writhe as the light strikes them\\.$",
    		"^Peering closely into the lock, you spy a tiny onyx scarab wedged into the lock mechanism\\.  The scarab's shell is covered with spiky inward-curving protrusions which resemble fangs\\.$",
    		"^Peering closely into the lock, you spy a tiny translucent scarab wedged into the lock mechanism\\.  The scarab's shell is etched on the back with a large eye that seems to shift lazily about\\.$",
    		"^Peering closely into the lock, you spy a tiny vial placed just past the tumblers of the lock mechanism\\.  It would appear that any tampering with the lock mechanism would cause the tumblers to crush the vial and release whatever substance is inside\\.$",
    		"^Peering into the .+'s lock, you see a small tube towards the bottom of the tumbler mechanism\\.  The tube is capped with a thin membrane, but it seems likely that the tumblers would tear it off while turning\\.$",
    		"^The darn thing is built too tightly\\.  You can't seem to get the trap disarmed without setting it off by accident!$",
    		"^There appears to be a plate over the lock, sealing it and preventing any access to the tumblers\\.$",
    		"^You are not able to disarm the trap but you get a sense that you could have had it with a little more luck\\.$",
    		"^You can see what appears to be a tiny hole next to the lock plate which doesn't seem to belong there\\.  Looking inside, you see what appears to be a little flag rolled around a thin rod\\.$",
    		"^You notice a discolored oval ring around the outside of the .+ which makes you suspicious\\.  Your suspicions are confirmed when you look inside the keyhole and notice the spring-loaded jaws pressed flush against the .+ walls\\.$",
    		"^You notice some spiderweb-like scratches on the lock plate which seem, after some bit of scrutiny, too organized to be just wear and tear -- it might be some type of glyph spell\\.$"]
    $snp_Array_Trap_Dagg = ["^You carefully open the lid of the .+ the tiniest bit, and peer inside\\.  To one side of the locking mechanism, you can see what appears to be a thin cord connecting the lid to something within the .+ itself\\.$",
    		"^You figure that if you had a dagger, you could probably cut the cord\\.$"]
    $snp_Array_Trap_WPik = ["^Examining the .+, you locate a .+ sphere held in a metal bracket towards the back of the lock mechanism\\.  The spherical crystal .+ It appears that were the tumblers to be activated, the gem would be caught amongst them\\.$",
    		"^No matter how you try, your fingers are just too big to get back there to the gem\\.  You'll need some sort of thin, rigid implement like a lockpick\\.$"]
    $snp_Array_Trap_Scle = ["^At first glance, the .+ appears to be covered with hundreds of tiny metal scales\\.  Closer examination reveals the \\\"scales\\\" to be razor sharp at the edges and possessing of a downward-facing needlelike tip\\.  However, you should be able to avoid cutting yourself if you are careful\\.$",
    		"^Despite heavy scrutiny, you can see no way to pry off any of the scales, nor any particular reason to.  With a modicum of caution, they should present no danger\\.  Nothing else about the .+ suggests that it is trapped\\.$"]
    $snp_Array_Trap_DSrb = ["^You carefully nudge the scarab free of its prison without disturbing the lock too much\\.  The scarab falls from the lock and onto the ground in front of you\\.$"]
    $snp_Array_Trap_GSrb = ["^Deciphering the runes is relatively simple, and you're pretty sure you were successful\\.$",
    		"^You feel like you probably rendered the .+ scarab harmless, but can't be sure\\.$",
    		"^\\*scritch scritch\\*  If that had been any easier, you could have done it blindfolded\\.$"]
    $snp_Array_Trap_Wedg = ["^As you poke around inside the lock mechanism, you hear the sound of glass shattering\\.  You peer inside the lock and see that the tumblers have all been fused into a lump of useless metal by the acid spilled from the tiny vial set into the lock\\.$",
    		"^You peer inside the lock and see that the tumblers have been fused into a lump of useless metal\\.$"]
    $snp_Array_Trap_Vial = ["^You don't seem to have any way to get through that metal plate covering the lock\\.  Gonna chew through it\\?$"]
    $snp_Array_Trap_Safe = ["^A thin layer of mud or putty has been dabbed on the connecting point of the striking arm and the white substance to prevent it from igniting the .+ when it is unlocked\\.$",
    		"^A thorough and careful search of the lock mechanism indicates that the entire .+ is MANGLED.  It's probably not trapped anymore\\.$",
    		"^A thorough search of the area inside the tumblers reveals what appears to be a metal bracket of some sort, although it seems to be empty now\\.$",
    		"^Feeling around the inside of the lock, you notice that the casing is coated with a rough, grainy substance\\.  A small section of the casing has been scraped clean of the strange substance\\.  You lean forward and peer between the walls of the casing\\.  Examining the lock closely, you notice a deflated bladder wedged between the tumblers\\.  There is a small hole in the bladder, most likely from whatever ruptured it\\.  The lock emanates a strong scent of sulphur\\.$",
    		"^Knowing how delicate magical glyphs can be, you scrape some extra lines into the markings hoping to alter their meaning and defeat the spell they may hold\\.$",
    		"^Looking closely at the lock, you spy a small metal housing set just inside the lock mechanism, but it appears empty\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small metal housing, which appears to be empty\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small vial of fire-red liquid and a tiny hammer device which has been bent from striking range of the vial\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small vial of liquid and a tiny hammer device which has been bent from striking range of the vial\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a small, dark crystal which seems imbedded in the locking mechanism\\.  It looks as if opening the lock without the exact key could shatter it, but parts of the mechanism have been ground away to avoid unwanted contact with the crystal\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a tiny hammer device and several splinters of glass\\.$",
    		"^Looking closely into the keyhole of the lock, you spy a tiny hammer device which has been bent back slightly\\.$",
    		"^Looking closely into the keyhole, you notice a pair of small metal rods that have a slight reddish glow about them\\.$",
    		"^Looking closely into the keyhole, you notice a pair of small metal rods that have been bent in opposite directions of each other\\.$",
    		"^Peering closely into the lock, you spy a tiny vial placed just past the tumblers of the lock mechanism\\.  A small ball of cotton has been pushed up against the vial, protecting it from anything that may shatter it\\.$",
    		"^Peering in through the crack between the lid and the casing, you see what appears to be a thin cord dangling from the case\\.  It looks to have been sliced through\\.$",
    		"^Peering into the .+'s lock, you see a small tube towards the bottom of the tumbler mechanism\\.  It appears as though the tube has been plugged with something\\.$",
    		"^Peering into the .+'s lock, you see a small tube towards the bottom of the tumbler mechanism\\.  A crimson glow surrounds the mouth of the tube\\.$",
    		"^Peering into the .+'s lock, you see a small tube towards the bottom of the tumbler mechanism\\.  It appears as though the tube used to be covered with a thin membrane, but it has torn mostly away, and greyish-green powder covers the area around it\\.$",
    		"^Reaching inside the hole with the tip of your lockpick, you nudge the end of the flag to one side, so it will collide with the inside of its housing, should it try to emerge\\.$",
    		"^Suddenly, a tiny flag pops out of a hole next to the lockplate with a metallic CLICK!  The flag vibrates there for a moment, then unfurls slowly, revealing a bright red starburst pattern on a white background\\.  Written in big black letters inside the starburst is the word \\\"BOOM!\\\"$",
    		"^Taking a lump of putty from your .+, you carefully apply it to the end of the small tube\\.  That should block whatever it's meant to deploy\\.$",
    		"^The lock appears to be free of all obstructions\\.$",
    		"^Using a bit of putty from your .+, you cake a thin layer on the lock casing, hopefully sufficient to prevent sparks when the metal arm strikes it\\.$",
    		"^Using a bit of putty from your .+, you manage to block the tiny hole in the lock plate\\.$",
    		"^Using a pair of metal grips, you carefully remove a slender steel needle from the .+ and cover the tip with a bit of putty\\.$",
    		"^Using the metal grips from your .+, you manage to reach in and grasp the post of the metal hammer, and bend the weak metal out of striking range of the vial\\.$",
    		"^Using the pair of metal grips, you manage to pull out the two pins that hold the upper and lower jaw pieces together\\.  As the pins are removed, the jaws suddenly close and warp under the tremendous strain applied by their arming mechanism\\.$",
    		"^Using the pair of metal grips, you manage to pull out the two pins that hold the upper and lower jaw pieces together\\.$",
    		"^Using your metal grips, you carefully remove a pair of small steel jaws from the .+ before piecing the apparatus back together\\.$",
    		"^With a little force applied to the springs, you manage to pop them inside the .+, from within which comes the tinkle of breaking glass, followed by a strong acrid smell\\.$",
    		"^With a little force applied to the springs, you manage to pop them inside the .+, where they bounce around for a moment\\.  You also hear something else rolling around in there\\.$",
    		"^With a little ingenuity you manage to grind down parts of the lock mechanism with your metal file, so it won't come in contact with the crystal when you try to open it\\.$",
    		"^With great care you take a pair of metal grips and bend the sensitive metal rods out of alignment\\.  It looks as though they cannot be pressed together by the lock mechanism any more\\.$",
    		"^With utmost care, you slip your .+ into the lock and gently nudge the tiny gem until it begins to work loose and its inner glow begins to fade\\.  Another moment of prodding, and you are able to poke the gem free of its metal housing, whereupon it falls down into the lock mechanism and out of sight\\.$",
    		"^With utmost care, you slip your .+ into the lock and gently nudge the tiny gem until it begins to work loose and its inner glow begins to fade\\.  Suddenly, it violently pops free of its metal housing and bounces around inside the tumblers for a moment before vanishing down into the .+!$",
    		"^With utmost care, you slip your .+ into the lock and gently nudge the tiny gem until it begins to work loose and its inner glow begins to fade\\.  Tilting the .+ forward, you knock the gem free of its metal housing and poke it out through the back of the lock, allowing it to gently roll down the inside of the .+'s front wall\\.$",
    		"^You can see what appears to be a tiny hole next to the lock plate which doesn't seem to belong there\\.  However, nothing about it seems to indicate cause for alarm\\.$",
    		"^You carefully pour the contents of a.+ onto the .+ where you think the keyhole ought to be\\.  Amidst a cloud of acrid smoke, the metal plate covering the lock begins to melt away\\.$",
    		"^You carefully push a small ball of cotton into the lock mechanism, surrounding and protecting the small vial from anything that may shatter it\\.$",
    		"^You carefully use the tip of a small metal file to scrape away the rough, grainy substance which lines the walls of the casing\\.  After a few moments, you feel comfortable with the small section you have cleaned\\.  You take out a thin needle and carefully slide it between the walls of the casing, taking great care not to touch them.  As the tip of the needle punctures the small bladder, a strange clear gel oozes forth from the hole\\.  The gel gives off a strong odor of sulphur\\.  As the air hits the gel, it begins to harden and turn to dust, blowing away in the wind as if it never existed\\.$",
    		"^You discover no traps\\.$",
    		"^You notice a discolored oval ring around the outside of the .+ which makes you suspicious\\.  Your suspicions are confirmed when you look inside the keyhole and notice the spring-loaded jaws pressed flush against the .+ walls, but the pins that hold the jaws together have been pushed out\\.$",
    		"^You notice a discolored oval ring around the outside of the a.+, but further examination gives the impression that some vital part of whatever trap was here has been removed\\.$",
    		"^You notice some spiderweb-like scratches on the lock plate which seem, after some bit of scrutiny, too organized to be just wear and tear -- it might be some type of glyph spell, but some of the markings have been altered\\.  This may prevent any magical nature they have from manifesting itself\\.$",
    		"^You see a metal plate covering the lock plate, but it appears to have been melted through, granting sufficient access to the lock to attempt picking it\\.$",
    		"^You see a tiny hole next to the lock plate which has been completely plugged\\.$",
    		"^You take a vial out of your .+ and carefully pour the contents onto the .+ where you think the keyhole ought to be\\.  Amidst a cloud of acrid smoke, the metal plate covering the lock begins to melt away\\.$"]
    $snp_Array_Trap_Need = ["^It looks like you would need a needle of some sort to puncture that sack\\.$",
    		"^You figure that if you could reach in there, you could pull the jaws apart\\.  You'll probably need some sort of gripping tool\\.$",
    		"^You figure that if you had a cotton ball, you could probably cushion the vial against breakage\\.$",
    		"^You figure that if you had some sort of putty or even some mud, you could block the hole and prevent whatever it contains from coming out, but there is nothing useful to be found here\\.$",
    		"^You figure that if you had some sort of putty or even some mud, you could pack it inside the lock mechanism and prevent the striking arm from igniting it\\.  Unfortunately, nothing like that seems to be handy\\.$"]
    $snp_Array_Trap_Hurt = ["^As you poke around inside the lock mechanism,  you hear the buzzing of a tiny insect coming from within\\.  Suddenly, something darts out of the lock and flies straight at you!  You attempt to duck out of the way, but it weaves with you and lands on your neck!  You gasp in horror as you feel its stinger enter your flesh and you clap your hand to your neck to stop it, but there is nothing there\\.  You suddenly feel very ill\\.$",
    		"^As you poke around inside the lock, you hear a clicking noise coming from within a.+\\.  A tiny blood red insect with a large teardrop etched on its shell scuttles out of the locking mechanism and darts towards you!$",
    		"^Ouch!  You feel a tiny prick in your finger!  You see a needle protruding from a small hole beside the lock plate with a little of your blood on it!$",
    		"^There is a tiny flash from the keyhole and suddenly your entire body jerks from a massive electrical shock\\.\\.\\.$",
    		"^While attemping to scrape away the rough, grainy substance that lines the walls of the casing, your file slips and jars against the interior of the lock just hard enough to give off a single spark\\.  Just as the spark comes to life, a strong scent of sulphur reaches your nostrils\\.  You have enough time to gasp in shock, as two volatile substances meet and ignite into a stream of fire which issues forth from the lock!  Your body is savagely immolated by the flames!$",
    		"^Your heart skips a beat as you hear a small sizzle from the .+'s keyhole\\.  You begin to jump back, but not in time as the entire .+ explodes in a deafening, fiery detonation!$"]
    
    def snp_Trap_Disarm()
    	loop {
    		line = get
    		if line =~ /It looks like a.+ trap \((about |)\-([0-9]+)\)\./ then $snp_Box_Trap_Diff = $2.to_i ; break
    		elsif line =~ /Roundtime: .+ sec\./ then break end
    	}
    	waitrt?
    	if $snp_Box_Trap_Item == "lockpick"
    		$snp_Box_Pick_Sugg = $snp_Array_Pick_Mods[rand($snp_Array_Pick_Mods.length-2)+1][0]
    		snp_Lock_Pick_Get()
    	elsif $snp_Box_Trap_Item == $snp_Cont_Dagger
    		while lefthand? != $snp_Cont_Dagger and righthand? != $snp_Cont_Dagger
    			fput "get my #{$snp_Cont_Dagger}"
    			pause("1s")
    		end
    	elsif $snp_Box_Trap_Item == "vial"
    		vial = []
    		vials = ["clear", "thick", "green"]
    		vials.length.times {
    			vial.push vials[rand(vials.length)]
    			vials = vials - vial
    		}
    		vial.each do |vialy|
    			fput "get my #{vialy} vial"
    			matchtimeout 2, "Get what?", "You remove"
    			pause("0.5s")
    			if righthand? == "vial" or lefthand? == "vial" then break end
    		end
    		if righthand? != "vial" and lefthand? != "vial"
    			echo "I don't got no more vials home slizzle"
    			echo "Can't disarm this box"
    			$snp_Box_Cant_Disarm = true
    			return false
    		end
    	elsif $snp_Box_Trap_Item == nil
    	else ; echo "error" ; exit ; end
    	$snp_Box_Trap_Item = nil
    	maxDisarm = (Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps))
    	maxDisarmLore = (Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps) + (Stats.level / 2) + (Skills.to_bonus(Skills.disarmingtraps) / 10) + (Stats.agi[1] / 2) + (Stats.dis[1] / 2))
    	echo "boxtrapdiff = #{$snp_Box_Trap_Diff} : : : maxDisarm = #{maxDisarm} : : : maxDisarmLore = #{maxDisarmLore}"
    	if maxDisarm > ($snp_Box_Trap_Diff + $snp_Trap_Error)
    		waitrt?
    		fput "Disarm #{$snp_Box_Type}"
    		return true
    	elsif maxDisarmLore > ($snp_Box_Trap_Diff + $snp_Trap_Error)
    		while !checkspell(404)
    			if checkmana(eval(Spell[404].cost)) then fput "incant 404" end
    			pause("1s")
    		end
    		waitrt?
    		fput "Disarm #{$snp_Box_Type}"
    		return true
    	else
    		echo "Can't disarm this box"
    		$snp_Box_Cant_Disarm = true
    		return false
    	end
    end
    
    def snp_Trap_ScarCheck()
    	loop {
    		line = get
    		if line =~ /It looks like a.+ trap \((about |)\-([0-9]+)\)\./ then $snp_Box_Trap_Diff = $2.to_i ; break
    		elsif line =~ /Roundtime: .+ sec\./ then break end
    	}
    	$snp_Box_Trap_Item = nil
    	maxDisarm = (Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps))
    	maxDisarmLore = (Stats.dex[1] + Skills.to_bonus(Skills.disarmingtraps) + (Stats.level / 2) + (Skills.to_bonus(Skills.disarmingtraps) / 10) + (Stats.agi[1] / 2) + (Stats.dis[1] / 2))
    	echo "boxtrapdiff = #{$snp_Box_Trap_Diff} : : : maxDisarm = #{maxDisarm} : : : maxDisarmLore = #{maxDisarmLore}"
    	if maxDisarm > ($snp_Box_Trap_Diff + $snp_Trap_Error + 50)
    		return true
    	elsif maxDisarmLore > ($snp_Box_Trap_Diff + $snp_Trap_Error + 50)
    		return true
    	else
    		echo "Can't disarm this box"
    		$snp_Box_Cant_Disarm = true
    		return false
    	end
    end
    
    def snp_Lock_Pick()
    	snp_Lock_Pick_Get()
    	lockRoll = 0
    	fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    	loop {
    		line = get
    		if line =~ /^You make a.+ attempt \(d100\=([0-9]+)\)\.$|^You make an outstanding attempt \(d100\(open\)=([0-9]+)\)\.$/
    			lockRoll = $1.to_i
    		elsif line =~ /^... wait/
    			waitrt?
    			pause("2s")
    			fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    		elsif line =~ /^It does not appear to be locked\.$|^Um, but it's open\.$/
    			echo "not locked"
    			snp_Lock_Pick_Put()
    			$snp_Box_Already_Open = true
    			exit
    		elsif line =~ /^The .+ appears to have been utterly mangled by some incredible force\.  It looks as though some angry stone giant was intent on making it completely unrecognizable, and did a fair job of it.  Unfortunately, your attempt to pick its lock is now pretty small potatoes in comparison\.$|^There is a big metal plate covering the lock!  What exactly do you hope to accomplish\?$/
    			echo "wedge it"
    			exit
    		elsif line =~ /^You attempt to pick the .+ and fumble about for a bit before you realize you are using a broken lockpick\.$|^You must be holding a lockpick to perform that trick\.$/
    			echo "bad pick / no pick"
    			exit
    		elsif line =~ /^You must have your other hand free or be holding the .+ to do that\.$/
    			echo "full hands"
    			exit
    		elsif line =~ /^You are not able to pick the .+, but you get a sense that it has a.+ lock.  About a \-([0-9]+) difficulty lock \(in thief\-lingo\)\.$/
    			$snp_Box_Lock_Diff = $1.to_i
    			snp_Lock_Pick_Check(lockRoll, 0, 0)
    			waitrt?
    			fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    		elsif line =~ /^Your lockpick gets stuck in the lock!  You carefully try to work it free but end up snapping off the tip!$|^\* SNAP \*  Crud!  You broke your .+ in the attempt!$/
    			$snp_Box_Pick_Broke = true
    			snp_Lock_Pick_Check(lockRoll, 1, 80)
    			waitrt?
    			fput "put lockpick in my #{$snp_Cont_Lockpick_Broke}"
    			fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    		elsif line =~ /^Your lockpick gets stuck in the lock!  You carefully try to work it free but end up bending the tip!$|Your lockpick gets stuck in the lock!  You carefully try to work it free, but it may have been weakened by the stress\./
    			snp_Lock_Pick_Check(lockRoll, 4, 80)
    			waitrt?
    			fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    		elsif line =~ /^You are not able to pick the lock, and learn little about it\.$/
    			snp_Lock_Pick_Check(lockRoll, 40, 40)
    			waitrt?
    			fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    		elsif line =~ /^You are not able to pick the lock, but you get a feeling that it is within your abilities\.$/
    			snp_Lock_Pick_Check(lockRoll, 60, 40)
    			waitrt?
    			fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    		elsif line =~ /^You struggle with the .+\.  As you do, you get a sense that the .+ has a.+ lock \(\-([0-9]+) thief\-lingo difficulty ranking\)\.  Then\.\.\.CLICK!  It opens!$|^The .+ gives off an audible \*click\* as the tumblers snap open\.$/
    			waitrt?
    			snp_Lock_Pick_Put()
    			if !$snp_Box_Trap_Scle
    				$snp_Box_Trap_Diff = 2000
    				$snp_Box_Lock_Diff = 2000
    				$snp_Box_Pick_Sugg = nil
    				$snp_Box_Trap_Scle = false
    				$snp_Box_Pick_Lore = false
    				$snp_Box_Pick_Broke = false
    				$snp_Box_Trap_Item = nil
    				echo "opened!"
    				return
    			else
    				echo "Scales!"
    				fput "Detect #{$snp_Box_Type}"
    				return
    			end
    		elsif line =~ /^I could not find what you were referring to\.$|^You didn't mention what you want to pick the lock with\.$|^You want to pick a lock on what\?\?\?$|^Roundtime\: .+ sec\.$/
    			if lockRoll == 1
    				waitrt?
    				fput "#{$snp_Pick_Line} #{$snp_Box_Type}"
    			else
    				echo line
    				echo "error"
    				exit
    			end
    		end
    	}
    	
    end
    
    def snp_Trap_Wedge()
      waitrt?
      trap_Wedge_Type = ["brittle", "thin", "warped", "solid", "strong", "superior"]
      loop {
        number = 0
        until righthand? == "wedge" or lefthand? == "wedge"
          fput "get my #{trap_Wedge_Type[number]} wedge"
          number += 1
          waitfor "You remove", "Get what?"
          if number >= trap_Wedge_Type.length then break end
        end
        if righthand? != "wedge" and lefthand? != "wedge"
          $snp_Box_Cant_Disarm = true
          break
        else
          waitrt?
          fput "lm wedge #{$snp_Box_Type}"
        end
        line = get
        if line =~ /^The lid of a.+ suddenly splits away from the casing amidst the crunch of splintering wood!$|^The .+ isn't even closed\.  Why bother\?$/
          fput "put my wedge in my #{$snp_Cont_Wedge}"
          break
        end
      }
    end
    
    def snp_Lock_Pick_Check(lockRoll, lockRollBad, lockDiffAdd)
    	if lockRoll > lockRollBad
    		$snp_Box_Lock_Diff += lockDiffAdd
    		snp_Box_Pick_Sugg_Old = $snp_Box_Pick_Sugg
    		snp_Box_Pick_Lore_Old = $snp_Box_Pick_Lore
    		snp_Lock_Rightpick()
    		if snp_Box_Pick_Sugg_Old != $snp_Box_Pick_Sugg or snp_Box_Pick_Lore_Old != $snp_Box_Pick_Lore
    			waitrt?
    			snp_Lock_Pick_Put()
    			snp_Lock_Pick_Get()
    		end
    	end
    end
    
    def snp_Lock_Meas()
      #$snp_Box_Lock_Diff = 250
      #return
      boxlist = ["box", "chest", "coffer", "strongbox", "trunk"]
      while boxlist.include?(lefthand?) and righthand? != nil
        fput "stow right"
      end
      while boxlist.include?(righthand?) and lefthand? != nil
        fput "stow left"
      end
      while righthand? != "calipers" and lefthand? != "calipers"
        fput "get calipers"
        pause("1s")
      end
      fput "lm measure #{$snp_Box_Type}"
      $snp_Box_Lock_Diff = 2000
      snp_Box_Lock_Esti = nil
      loop {
        line = get
        if line =~ /^Measuring carefully, it looks to be (an|a) ([a-z, ,-]+) lock\.$/
          snp_Box_Lock_Esti = $2
          if $snp_Array_Lock_Diff.include?(snp_Box_Lock_Esti) then $snp_Box_Lock_Diff = ((($snp_Array_Lock_Diff.index(snp_Box_Lock_Esti) + 1) * 40) - 5) end
          waitrt?
          fput "put my calipers in my #{$snp_Cont_Caliper}"
          return
        elsif line =~ /has already been unlocked\.$/
          $snp_Box_Lock_Diff = 5
          waitrt?
          fput "put my calipers in my #{$snp_Cont_Caliper}"
          return
        end
      }	
    end
    
    def snp_Lock_Rightpick()
    	pickLoreAmt = 0
    	$snp_Box_Pick_Lore = false
    	$snp_Box_Pick_Sugg = nil
    	numba = 0
    	adder = 0
    	#adder = 100 if checkmind(7)
    	2.times do
    		$snp_Array_Pick_Mods.each do |pickArray|
    			if (pickArray[1] * (pickLoreAmt + Skills.to_bonus(Skills.pickinglocks) + Stats.dex[1])) > ($snp_Box_Lock_Diff + $snp_Pick_Error + adder)
    				$snp_Box_Pick_Sugg = pickArray[0]
    				break
    			end
    		end
    		if $snp_Box_Pick_Sugg != nil then break end
    		numba += 1
    		pickLoreAmt = (Stats.level / 2) + (Skills.pickinglocks / 10) + (Stats.dex[1] / 2) + (Stats.int[1] / 2)
    		$snp_Box_Pick_Lore = true
    	end
    end
    
    def snp_Lock_Pick_Get()
    	lockpickSuggNoun = "lockpick"
    	notdropitems = ["box", "chest", "coffer", "strongbox", "trunk", "lockpick", lockpickSuggNoun]
    	while lefthand? == "vial" or righthand? == "vial"
    		fput "put my vial in my #{$snp_Cont_Wedge}"
    		pause("1s")
    	end
    	while !notdropitems.include?(righthand?) and righthand? != nil
    		fput "drop right"
    		pause("1s")
    	end
    	while !notdropitems.include?(lefthand?) and lefthand? != nil
    		fput "drop left"
    		pause("1s")
    	end
    	while righthand? != lockpickSuggNoun and lefthand? != lockpickSuggNoun
    		fput "get #{$snp_Box_Pick_Sugg} from my #{$snp_Cont_Lockpick}"
    		loop {
    			line = get
    			if line =~ /^You remove .+\.$|^You detach .+\.|You already have that\./
    				break
    			elsif line =~ /^Get what\?$/
    				snp_Box_Pick_Sugg_Old = $snp_Box_Pick_Sugg
    				snp_Box_Pick_Lore_Old = $snp_Box_Pick_Lore
    				until snp_Box_Pick_Sugg_Old != $snp_Box_Pick_Sugg or snp_Box_Pick_Lore_Old != $snp_Box_Pick_Lore or $snp_Box_Pick_Sugg == nil
    					$snp_Box_Lock_Diff += 50
    					snp_Lock_Rightpick()
    				end
    				if $snp_Box_Pick_Sugg != nil then fput "get #{$snp_Box_Pick_Sugg} from my #{$snp_Cont_Lockpick}"
    				else ; $snp_Box_Cant_Pick = true ; return ; end
    			end
    		}
    	end
    	while $snp_Box_Pick_Lore and !checkspell(403)
    		if checkmana(eval(Spell[403].cost)) then fput "incant 403" end
    		pause("1s")
    	end
    	while !$snp_Box_Pick_Lore and checkspell(403)
    		fput "stop 403"
    		pause("1s")
    	end
    end
    
    def snp_Lock_Pick_Put()
    	lockpickSuggNoun = "lockpick"
    	while (righthand? == lockpickSuggNoun or lefthand? == lockpickSuggNoun) and $snp_Box_Pick_Sugg != nil
    		if $snp_Box_Pick_Broke then fput "put #{lockpickSuggNoun} in my #{$snp_Cont_Lockpick_Broke}"
    		elsif !$snp_Box_Pick_Broke then fput "put #{lockpickSuggNoun} in my #{$snp_Cont_Lockpick}"
    		else ; echo "error" ; exit ; end
    		pause("1s")
    	end
    	$snp_Box_Pick_Broke = false
    end
    
    def snp_Begin()
    	$snp_Box_Type = "#{variable[0]}"
    	waitrt?
    	fput "Detect #{$snp_Box_Type}"
    	loop {
    		line = get
    		
    		if line =~ /It looks like a.+ \(\-([0-9]+)\)\./
    			Settings["currentBox"]["trapDiff"] = $1.to_i
    		elsif line =~ /#{$snp_Array_Trap_Stow.join('|')}/ then echo "snp_Array_Trap_Stow"
    		elsif line =~ /#{$snp_Array_Trap_Dagg.join('|')}/ or (line =~ /#{$snp_Array_Trap_Scle.join('|')}/ and $snp_Box_Trap_Scle)
    			echo "snp_Array_Trap_Dagg"
    			$snp_Box_Trap_Item = $snp_Cont_Dagger
    			result = snp_Trap_Disarm()
    			#echo "waiting for verification it's been disarmed"
    			#pause_script("pick")
    			waitrt?
    			fput "put my #{$snp_Cont_Dagger} in my #{$snp_Cont_Lockpick_Broke}"
    			fput "stow my #{$snp_Cont_Dagger}"
    			if !result then exit end
    			fput "Disarm #{$snp_Box_Type}"
    		elsif line =~ /#{$snp_Array_Trap_WPik.join('|')}/
    			echo "snp_Array_Trap_WPik"
    			$snp_Box_Trap_Item = "lockpick"
    			result = snp_Trap_Disarm()
    			waitrt?
    			snp_Lock_Pick_Put()
    			$snp_Box_Pick_Sugg = nil
    			if !result then exit end
    			fput "Detect #{$snp_Box_Type}"
    		elsif line =~ /#{$snp_Array_Trap_Scle.join('|')}/ and !$snp_Box_Trap_Scle
    			echo "snp_Array_Trap_Scle"
    			if snp_Trap_ScarCheck()
    				$snp_Box_Trap_Scle = true
    				waitrt?
    				$snp_Box_Trap_Item = $snp_Cont_Dagger
    				snp_Lock_Meas() if !$snp_Meas_override
    				$snp_Box_Lock_Diff = 350 if $snp_Meas_override
    				snp_Lock_Rightpick()
    				if $snp_Box_Pick_Sugg != nil then snp_Lock_Pick()
    				else ; echo "can't pick it" ; exit ; end
    			else
    				exit
    			end
    		elsif line =~ /#{$snp_Array_Trap_DSrb.join('|')}/
    			echo "snp_Array_Trap_DSrb"
    			waitrt?
    			pause("2s")
    			fput "disarm scarab"
    		elsif line =~ /#{$snp_Array_Trap_GSrb.join('|')}/
    			echo "snp_Array_Trap_GSrb"
    			fput "tap scarab"
    			fput "Detect #{$snp_Box_Type}"
    		elsif line =~ /#{$snp_Array_Trap_Wedg.join('|')}/
    			echo "snp_Array_Trap_Wedg"
    			snp_Trap_Wedge()
    			break
    		elsif line =~ /#{$snp_Array_Trap_Vial.join('|')}/
    			#echo "snp_Array_Trap_Vial"
    			#snp_Trap_Wedge()
    			$snp_Box_Trap_Item = "vial"
    			result = snp_Trap_Disarm()
    			result = snp_Trap_Wedge() if !result
    			if !result then exit end
    		elsif line =~ /#{$snp_Array_Trap_Need.join('|')}/ then echo "snp_Array_Trap_Need"
    		elsif line =~ /#{$snp_Array_Trap_Hurt.join('|')}/ then echo "snp_Array_Trap_Hurt"
    		elsif line =~ /#{$snp_Array_Trap_Nrml.join('|')}/ then echo "snp_Array_Trap_Nrml"
    			waitrt?
    			result = snp_Trap_Disarm()
    			if !result then exit end
    		elsif line =~ /#{$snp_Array_Trap_Safe.join('|')}/ then echo "snp_Array_Trap_Safe"
    			waitrt?
    			snp_Lock_Meas() if !$snp_Meas_override
    			$snp_Box_Lock_Diff = 350 if $snp_Meas_override
    			snp_Lock_Rightpick()
    			if $snp_Box_Pick_Sugg != nil then snp_Lock_Pick()
    			else ; echo "can't pick it" ; $snp_Box_Cant_Pick = true ; exit ; end
    			break
    		end
    	}
    end
    
    snp_Begin()
    Chris

  2. #22

    Default

    Quote Originally Posted by Ohr View Post
    I usually just waggle during down times to keep 402 and 404 up, stopped casting 403 since Tpick stops it anyway.
    If you want tpick to stop doing that you can delete the following line of code:

    fput "stop 403" if Spell[403].active?

    It's in two different spots, under start_solo = proc and start_others = proc.

    Quote Originally Posted by Ohr View Post
    Speak of which one more for ya Tgo01, the script hangs when I try to hand my rogue a box while he is still doing his Waggle spell up.
    I'll be honest, I have no idea why this would happen. Does it only happen if the Waggle script is running? Does tpick not do anything at all, not accept the box or anything?

  3. #23

    Default

    Quote Originally Posted by Buckwheet View Post
    Hey Tgo01:

    Here is a script that was posted a while back. It uses vials from anywhere I think, grabs specific ones. In addition I believe it also has calculations for 404/403 with the 403 being similar to yours. Hopefully it helps?
    Awesome. Who knows that script might work better than mine.
    Last edited by Tgo01; 08-09-2013 at 01:53 PM.

  4. #24

    Default

    Updating the Waggle and script hang bug, Tpick will get stuck in "Using your professional calipers, you carefully begin to measure the lock...
    Roundtime: 9 sec." Loop over and over when Waggle is also running and casting 403, not sure if the spell waggle is casting matters but I'll let you know if I find more.

    Looking forward to your next update Tgo01 Thanks again.
    Last edited by Ohr; 08-09-2013 at 03:28 PM.

  5. #25

    Default

    It keeps measuring the lock over and over again? The script stops? Or does it keep casting 403 over and over again?

    If it's the last one there it should be fixed in the next update, I happened upon a bit of code that was unnecessary and changed it that could have caused this.

  6. #26

    Default

    casting 403 is part of waggle, the bug I described above happens when I run Waggle and Tpick the same time, it seem to cause Tpick to keep measure the lock over and over again, soon as I Kill Waggle it continue on as it normally would.

  7. #27

    Default

    Okay I uploaded a new version to the repo.

    Not only did I fix the lockpick + locklore * pick mod formula but I apparently used the wrong code in the formula so it was only setting your max lockpick skill to about half of what it should have been. My bad. It's fixed now.

    Script no longer stops 403, I'm honestly not sure why I had it doing so to begin with.

    Script should now use wedges when you come across a lock you can't pick with a vaalin pick + locklore. Of course this requires you to actually have wedges in your wedge container.

    Three new variables were added, one is an option to make sure you have 404 on before disarming a trap, one allows you to set the maximum roll number required to pick a lock with a particular pick before moving on to another pick, the last one does pretty much the same thing as the previous except it's just a vaalin lockpick check. Setting that last variable to an impossible number like 2000 should make sure the script never gives up and never uses wedges, instead when you come across a really tough lock it would always use a vaalin pick + 403 until it either opens the lock or breaks your pick.

    Added option to skip measuring a lock and always use a vaalin lockpick + locklore.

    Commands work as follows:

    Type ;tpick to pick your own boxes.
    Type ;tpick <anything (except v)> to pick other people's boxes.
    Type ;tpick v to skip measuring locks and always use a vaalin lockpick + 403 to pick all boxes.
    Type ;tpick v <anything> to pick other people's boxes and always use a vaalin lockpick + 403.
    Last edited by Tgo01; 08-09-2013 at 10:14 PM.

  8. Default

    Thanks .. I can't wait to try it ..

  9. #29

    Default

    Quote Originally Posted by Battlerager View Post
    Thanks .. I can't wait to try it ..
    No problem.

    Quote Originally Posted by Ohr View Post
    casting 403 is part of waggle, the bug I described above happens when I run Waggle and Tpick the same time, it seem to cause Tpick to keep measure the lock over and over again, soon as I Kill Waggle it continue on as it normally would.
    I honestly have no idea why this would be happening, I don't see anything in my script that would cause it to measure a lock over and over again.

    ETA: Sorry to anyone who downloaded version B already, I uploaded version C that fixed a minor bug.
    Last edited by Tgo01; 08-09-2013 at 10:29 PM.

  10. #30

    Default

    Thank you so much Tgo01!

Similar Threads

  1. self lockpicking script
    By trueoutsoldier in forum The Lich Project
    Replies: 2
    Last Post: 04-08-2011, 01:18 PM
  2. My lockpicking script
    By xao92k in forum Miscellaneous Scripts
    Replies: 1
    Last Post: 09-30-2008, 10:05 AM
  3. Lockpicking
    By AestheticDeath in forum Game Mechanics
    Replies: 2
    Last Post: 02-09-2008, 06:25 PM
  4. lockpicking script
    By Eviltwinpsu in forum Scripting Discussion
    Replies: 0
    Last Post: 12-31-2005, 07:19 PM
  5. Lockpicking
    By rpg1313 in forum Rogue
    Replies: 2
    Last Post: 05-13-2005, 06:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •