Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(25 Kb)
Download
Updated: 10-17-12 11:15 AM
Updated:10-17-12 11:15 AM
Created:10-15-12 02:39 PM
Downloads:873
Favorites:9
MD5:
GardenShed
Version: 50001.3
by: dewin [More]
GardenShed is a quick little addon I wrote that deletes gardening tools from your inventory if you spend more than 30 seconds or so outside Sunsong Ranch, The Halfhill Market, or Halfhill.

There's currently zero configuration available or required; just move out of the Sunsong Ranch area with gardening tools in your inventory and they'll be deleted. The addon reports status messages in your default chat window when you move into or out of the gardening area and when it performs the deletions.

Disclaimer: While there are no known issues, this is an alpha version. It may destroy your computer, murder your dog, shard your epics, or implode the universe. The probability of any of these events is very near to zero, however. Not tested on non-English clients, but should work. (Please post in the comments if it doesn't.)

Changelog
50001.3 - 10/17/2012 - Fix support for non-English clients.

50001.2 - 10/16/2012 - Add The Lazy Turnip (inn at Halfhill) to the list of whitelisted subzones.

50001.1 - 10/16/2012 - Minor restructuring, and removed dependency on LibBabble-SubZone, drastically reducing file sizes. 99% less fat, 100% delicious flavor.

50001.0 - 10/14/2012 - Initial alpha release
Optional Files (0)


Archived Files (3)
File Name
Version
Size
Author
Date
50001.2
25kB
dewin
10-16-12 12:57 PM
50001.1
25kB
dewin
10-16-12 12:30 PM
50001.0
593kB
dewin
10-15-12 02:39 PM


Post A Reply Comment Options
Unread 10-15-12, 04:22 PM  
dewin
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 6
File comments: 29
Uploads: 3
Originally Posted by p3lim
A way of ditching the localization would be using GetCurrentMapAreaID() to get the general zone the player is in (Valley's ID is 807), and then using a coordinate restriction. [...]
This is something I was looking into, though it's not perfect -- it especially breaks if you look at other areas on the map.

Borrowing from LibBabble-SubZone and just taking the three zone names in question seems like a much more likely scenario -- but this was a first release and I wanted to get the basics out first.
dewin is offline Report comment to moderator  
Reply With Quote
Unread 10-15-12, 04:11 PM  
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 4437
File comments: 2041
Uploads: 40
Alternatively, you should just copy/paste the 3 subzone names you need per locale, instead of including the entire 2mb+ LibBabbleSubZone.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline Report comment to moderator  
Reply With Quote
Unread 10-15-12, 03:59 PM  
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view AddOns

Forum posts: 1297
File comments: 1181
Uploads: 25
A way of ditching the localization would be using GetCurrentMapAreaID() to get the general zone the player is in (Valley's ID is 807), and then using a coordinate restriction.

Code:
x, y = GetPlayerMapPosition('player')
A rough estimate of the size of Sunsong Ranch would be the following:
TOPLEFT = 0.50228101015091, 0.46364974975586
BOTTOMRIGHT = 0.53614771366119, 0.50563138723373

Code:
local topleftX = 0.50228101015091
local topleftY = 0.46364974975586
local bottomrightX = 0.53614771366119
local bottomrightY = 0.50563138723373

local function SomeFunction()
    local x, y = GetPlayerMapPosition('player')
    if((x > topleftX or x < bottomrightX) and (y > topleftY or y < bottomrightY)) then
         -- player is within Sunsong Ranch
    end
end
p3lim is offline Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: