Download
(2 Kb)
Download
Updated: 10-03-11 07:44 PM
Pictures
File Info
Updated:10-03-11 07:44 PM
Created:03-01-10 11:06 AM
Downloads:1,945
Favorites:18
MD5:
Criminal
Version: 40200.2-Beta
by: p3lim [More]
This addon is discontinued.
Functionality added to Molinari.

Description:
Criminal is an addon designed to make [Pick Locking] a bit easier.

While you might do it the old fashion way, by clicking the spell first, then selecting the item to pick.
Why do it the hard way?

Criminal lets you pick locks without clicking the spell first!
Simply hold the <Alt> key down and click on box you want to "crack". Voilá!

This also semi-works in the trade window aswell, only that the spell won't apply to the item automagically.
Changes in 40200.2-Beta:
  • A long overdue fix
  • Update version
Archived Files (1)
File Name
Version
Size
Author
Date
30300.1-Beta
2kB
p3lim
03-01-10 11:06 AM


Post A Reply Comment Options
Unread 07-25-11, 05:51 AM  
PROXiCiDE
A Kobold Labourer
 
PROXiCiDE's Avatar
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 22
Uploads: 1
FIX 4.2

I've got this to work with the following

Line 9:

Code:
local LOCKED_SKILL = string.gsub(ERR_USE_LOCKED_WITH_SPELL_KNOWN_SI, '%%s %%d', string.format('%s', GetSpellInfo(1810)).." %(.*%)")
old cold had format options all wrong due to the percent signs
__________________
Last edited by PROXiCiDE : 07-25-11 at 05:51 AM.
PROXiCiDE is offline Report comment to moderator  
Reply With Quote
Unread 07-15-10, 11:02 PM  
Katardre
A Kobold Labourer

Forum posts: 1
File comments: 59
Uploads: 0
to make it work, just change line 9 to read

local LOCKED_SKILL = string.gsub(ERR_USE_LOCKED_WITH_SPELL_KNOWN_SI, '%%s %%d', string.format('%s ()', GetSpellInfo(1810)))

there is an error in the code...according to the online database regarding .lua, you cannot use a * in a string command in .lua which is why it keeps spitting out the error...the above line of code however will make the add on function as intended...
Katardre is offline Report comment to moderator  
Reply With Quote
Unread 04-04-10, 01:47 PM  
mizrolist
A Deviate Faerie Dragon

Forum posts: 14
File comments: 55
Uploads: 0
Originally posted by Jzar
Code:
Date: 2010-03-05 11:34:11
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\Criminal\Criminal.lua line 9:
   invalid option in `format'
Debug:
   [C]: ?
   [C]: format()
   Criminal\Criminal.lua:9: in main chunk
I had this error too, and Criminal didn't work for me too (enGB client). Any news about a fix?
mizrolist is offline Report comment to moderator  
Reply With Quote
Unread 03-10-10, 06:56 PM  
Katardre
A Kobold Labourer

Forum posts: 1
File comments: 59
Uploads: 0
Originally posted by p3lim
The whole point of this addon is to aid you with lockpicking, holding down alt and clicking on any lockbox and such items that can be unlocked.

It does not check for skill required and the error should pop up like it should if you don't meet the requirements.

The whole point of the syntax is to check for the exact string inside the tooltip and match it to allow the button that overlaps the bag item to work.

I use the GetSpellInfo merely for localization, but I have only tested this on enGB.

I'll test this when I have the time for it during this week, so check in with my github page for new commits if you'd like to test it.

Direct link to the alpha here: http://github.com/p3lim/Criminal/
I assumed that was the purpose of it...tho it was like 20 minutes after I made the baby rogue I realized that the lockpicking skill level of the rogue didn't matter which was why I made the second edit to my post...

the third edit was an attempt to understand the exact reason for the %(.*%) part of the code...since if you were just looking for the name of the spell the $s part should give you that regardless of localization since the first value returned should always be the spell name...

further testing on both the tiny rogue who couldn't unlock even the easiest of boxes and the level 80 rogue who has maxed lockpicking '$s' works just fine...it glows nicely when I press alt and mouseover the box and it attempts to cast "Pick Lock" when I click on it...I'm using the enUS client...I'd help you test further but you likely need someone with a non-english client to make sure it really does work in other localizations...
Katardre is offline Report comment to moderator  
Reply With Quote
Unread 03-10-10, 04:39 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1263
File comments: 1186
Uploads: 25
Originally posted by Lemons224
This is a bit of a feature request...could u make it so that when you right click the box it simply unlocks? There was an addon that did this a while back but it's now defunct.
I might just change it to this, but I'm still unsure if I want to.
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 03-10-10, 04:38 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1263
File comments: 1186
Uploads: 25
The whole point of this addon is to aid you with lockpicking, holding down alt and clicking on any lockbox and such items that can be unlocked.

It does not check for skill required and the error should pop up like it should if you don't meet the requirements.

The whole point of the syntax is to check for the exact string inside the tooltip and match it to allow the button that overlaps the bag item to work.

I use the GetSpellInfo merely for localization, but I have only tested this on enGB.

I'll test this when I have the time for it during this week, so check in with my github page for new commits if you'd like to test it.

Direct link to the alpha here: http://github.com/p3lim/Criminal/
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 03-10-10, 02:17 PM  
Katardre
A Kobold Labourer

Forum posts: 1
File comments: 59
Uploads: 0
tossing in my two cents after much trial and error....I'm no coder but sometimes I can make things work that don't....


local LOCKED_SKILL = string.gsub(ERR_USE_LOCKED_WITH_SPELL_KNOWN_SI, '%%s %%d', string.format('%s ()', GetSpellInfo(1810)))

works....at least on the boxes I played with unlocking....tho my skill is maxed at 400 so there aren't any boxes I can't unlock....

but the shiny shows up when i press the alt key and the box unlocks when i click it...

edit 1: I'll go level a baby rogue and see what happens when I don't have the required skills....

edit 2: I found a level 175 required box for my baby rogue to play with...when I alt-click the box it says "Item is Locked" but it still glows like it needs unlocking...I'm not yet high enough level to have the Pick Lock spell yet...else I would assume it would pop a message that says "Skill not High Enough" knowing Blizzard...

edit 3: if I understand the code right you are using this to look for something like "Lockpicking (175)" in the tooltip to determine it's a locked box that can be unlocked since you can't just look for the word "Locked" since some items contain that word in the tooltip without actually being an unlockable item...you also cannot just look for the word "Lockpicking" alone...since that too is a possible false positive...so '%s ()' should work as it would always return ''Lockpicking ()'' the actually value that exists inside the () is immaterial...it only matter that the () are there along with the word Lockpicking....because that is what tells us the box is unlockable...yes?

Do hope I'm not being a pest...I like puzzles, and this certainly is one
Last edited by Katardre : 03-10-10 at 04:17 PM.
Katardre is offline Report comment to moderator  
Reply With Quote
Unread 03-09-10, 05:25 PM  
Lemons224
A Defias Bandit

Forum posts: 2
File comments: 15
Uploads: 0
This is a bit of a feature request...could u make it so that when you right click the box it simply unlocks? There was an addon that did this a while back but it's now defunct.
Lemons224 is offline Report comment to moderator  
Reply With Quote
Unread 03-09-10, 04:11 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1263
File comments: 1186
Uploads: 25
Originally posted by Jzar
Then '%s' should work just fine.
The spell name, not the expression
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 03-09-10, 10:35 AM  
Jzar
A Chromatic Dragonspawn
 
Jzar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 157
File comments: 299
Uploads: 5
Then '%s' should work just fine.
Jzar is offline Report comment to moderator  
Reply With Quote
Unread 03-09-10, 09:33 AM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1263
File comments: 1186
Uploads: 25
Originally posted by Jzar
Upon actually finally getting to someplace where I can find lockboxes, I find that my fix didn't fix anything. Upon further investigation, it turns out that the second returned argument from GetSpellInfo(1810) is "Journeyman" on my rogue atm. I'm guessing you're using this to try to verify that the rogue is high-enough to actually pick the lockbox. But even if the rank of Lock picking returned as "125" instead of "Journeyman", the lockbox would still say what it requires, which wouldn't equal the rogue's exact skill except very rarely, wouldn't it?

I've now changed mine formatstring to '%s' and am ignoring all but the first argument returned from GetSpellInfo and it works fine for lockboxes I'm high enough to pick. I'm not sure how you'd actually check if I'm high enough level for a box, but I hope you can get it working!
I'm trying to get a localized string of "Lockpicking"
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 06:16 PM  
Jzar
A Chromatic Dragonspawn
 
Jzar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 157
File comments: 299
Uploads: 5
Upon actually finally getting to someplace where I can find lockboxes, I find that my fix didn't fix anything. Upon further investigation, it turns out that the second returned argument from GetSpellInfo(1810) is "Journeyman" on my rogue atm. I'm guessing you're using this to try to verify that the rogue is high-enough to actually pick the lockbox. But even if the rank of Lock picking returned as "125" instead of "Journeyman", the lockbox would still say what it requires, which wouldn't equal the rogue's exact skill except very rarely, wouldn't it?

I've now changed mine formatstring to '%s' and am ignoring all but the first argument returned from GetSpellInfo and it works fine for lockboxes I'm high enough to pick. I'm not sure how you'd actually check if I'm high enough level for a box, but I hope you can get it working!
Jzar is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 05:48 PM  
Jzar
A Chromatic Dragonspawn
 
Jzar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 157
File comments: 299
Uploads: 5
And so it does. Thank you for providing me with some good sample code for tracking down some more thorough documentation on Lua patterns than I've previously found. I've copied a few tricky functions that use patterns for my addons, but never really delved into understanding them.

My apologies if I sounded cocky and just came across as stupid. I'm not sure what motivated me to try putting extra % symbols in there, but it made the error go away, and then your mod worked fine.

Here's the replacement that after some digging, I believe does what you intend: '%s (%s)'

According to the lua-users wiki, string.format takes a formatstring as its first argument, not a Lua pattern. Thus you just have to tell it what types of data it should insert into the string, and the first two returned arguments from GetSpellInfo are both strings. You don't have to actually match the characters in the strings it returns.

If I'm still wrong, please forgive me; I'm really curious now what the correct solution to this puzzle is.
Jzar is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 05:02 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1263
File comments: 1186
Uploads: 25
Thats not a fix, its a temporary change, which also breaks the whole point of the syntax
p3lim is offline Report comment to moderator  
Reply With Quote
Unread 03-08-10, 06:31 AM  
Jzar
A Chromatic Dragonspawn
 
Jzar's Avatar
AddOn Author - Click to view AddOns

Forum posts: 157
File comments: 299
Uploads: 5
Fix: Line 9, just change '%s %(.*%)' after the string.format to '%s %%(.*%%)'

Voila!
Jzar is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: