from pandac.PandaModules import *
from pirates.uberdog.UberDogGlobals import InventoryType
from pirates.inventory import ItemGlobals
from pirates.inventory import ItemConstants
from pandac.PandaModules import VBase4
from pirates.pirate.HumanDNA import hatColorsOld, clothesTopColorsOld, clothesBotColorsOld
from pirates.inventory import InventoryGlobals
from pirates.makeapirate import ClothingGlobals
from pirates.makeapirate import TattooGlobals
from pirates.makeapirate import JewelryGlobals
from pirates.inventory.ItemConstants import DYE_COLORS
ITEM_EXCHANGE_DICT = {InventoryType.ItemTypeWeapon: {InventoryType.CutlassWeaponL1: ItemGlobals.RUSTY_CUTLASS,InventoryType.CutlassWeaponL2: ItemGlobals.IRON_CUTLASS,InventoryType.CutlassWeaponL3: ItemGlobals.STEEL_CUTLASS,InventoryType.CutlassWeaponL4: ItemGlobals.FINE_CUTLASS,InventoryType.CutlassWeaponL5: ItemGlobals.PIRATE_BLADE,InventoryType.CutlassWeaponL6: ItemGlobals.PIRATE_BLADE,InventoryType.PistolWeaponL1: ItemGlobals.FLINTLOCK_PISTOL,InventoryType.PistolWeaponL2: ItemGlobals.DOUBLE_BARREL,InventoryType.PistolWeaponL3: ItemGlobals.TRI_BARREL,InventoryType.PistolWeaponL4: ItemGlobals.HEAVY_TRI_BARREL,InventoryType.PistolWeaponL5: ItemGlobals.GRAND_PISTOL,InventoryType.PistolWeaponL6: ItemGlobals.GRAND_PISTOL,InventoryType.DollWeaponL1: ItemGlobals.VOODOO_DOLL,InventoryType.DollWeaponL2: ItemGlobals.CLOTH_DOLL,InventoryType.DollWeaponL3: ItemGlobals.WITCH_DOLL,InventoryType.DollWeaponL4: ItemGlobals.PIRATE_DOLL,InventoryType.DollWeaponL5: ItemGlobals.TABOO_DOLL,InventoryType.DollWeaponL6: ItemGlobals.TABOO_DOLL,InventoryType.DaggerWeaponL1: ItemGlobals.BASIC_DAGGER,InventoryType.DaggerWeaponL2: ItemGlobals.BATTLE_DIRK,InventoryType.DaggerWeaponL3: ItemGlobals.MAIN_GAUCHE,InventoryType.DaggerWeaponL4: ItemGlobals.COLTELLO,InventoryType.DaggerWeaponL5: ItemGlobals.BLOODLETTER,InventoryType.DaggerWeaponL6: ItemGlobals.BLOODLETTER,InventoryType.GrenadeWeaponL1: ItemGlobals.GRENADE_POUCH,InventoryType.WandWeaponL1: ItemGlobals.CURSED_STAFF,InventoryType.WandWeaponL2: ItemGlobals.WARPED_STAFF,InventoryType.WandWeaponL3: ItemGlobals.REND_STAFF,InventoryType.WandWeaponL4: ItemGlobals.HARROW_STAFF,InventoryType.WandWeaponL5: ItemGlobals.VILE_STAFF,InventoryType.WandWeaponL6: ItemGlobals.VILE_STAFF},InventoryType.ItemTypeClothing: {1: ItemGlobals.CAP,2: ItemGlobals.ROUGH_TRICORNE,3: ItemGlobals.BANDANA,4: ItemGlobals.HEAD_BAND,5: ItemGlobals.DARK_OSTRICH_HAT,6: ItemGlobals.CROSSBONES_BANDANA,7: ItemGlobals.HIGH_WING_HAT,8: ItemGlobals.ADMIRAL_HAT,9: ItemGlobals.BLUE_BANDANA,10: ItemGlobals.BLUE_BAND,11: ItemGlobals.RECRUIT_BANDANA,12: ItemGlobals.TRAVELERS_OSTRICH_HAT,13: ItemGlobals.ADVENTURE_OSTRICH_HAT,14: ItemGlobals.LOYALTY_BANDANA,10000: ItemGlobals.OLD_TANK,10001: ItemGlobals.STRIPED_TANK,10002: ItemGlobals.COTTON_TANK,10003: ItemGlobals.TRIMMED_TANK,10004: ItemGlobals.SUSPENDER_TANK,10005: ItemGlobals.CREW_TANK,10006: ItemGlobals.HOOKED_TANK,10007: ItemGlobals.SEAMED_TANK,10008: ItemGlobals.LAYERD_SHIRTS,10009: ItemGlobals.PUB_SHIRT,10010: ItemGlobals.SWABBIE_SHIRT,10011: ItemGlobals.COTTON_SHORT_SLEEVE,10012: ItemGlobals.LACED_PUFFY_SHIRT,10013: ItemGlobals.REINFORCED_PUFFY_SHIRT,10014: ItemGlobals.COTTON_PUFFY_SHIRT,10015: ItemGlobals.LINEN_PUFFY_SHIRT,10016: ItemGlobals.COTTON_LONG_SLEEVE,10017: ItemGlobals.LINEN_LONG_SLEEVE,10018: ItemGlobals.LINEN_OPEN_LONG_SLEEVE,10019: ItemGlobals.TREASURE_SHORT_SLEEVE,10020: ItemGlobals.OPEN_TREASURE_SHIRT,10021: ItemGlobals.LONG_TREASURE_SHIRT,10022: ItemGlobals.OPEN_TREASURE_LONG_SLEEVE,10023: ItemGlobals.DEALER_SHIRT,10024: ItemGlobals.REINFORCED_TANK,10025: ItemGlobals.PANELED_SHIRT,10026: ItemGlobals.OPEN_COTTON_SHIRT,10027: ItemGlobals.COTTON_OPEN_LONG_SLEEVE,10028: ItemGlobals.LINEN_SHORT_SLEEVE,10029: ItemGlobals.OPEN_LINEN_SHIRT,10030: ItemGlobals.RECRUIT_LONG_SLEEVE,10031: ItemGlobals.TRAVELERS_PUFFY_SHIRT,10032: ItemGlobals.ADVANCED_TANK,10033: ItemGlobals.VALENTINES_SHIRT,20001: ItemGlobals.LEATHER_VEST,20002: ItemGlobals.PATCHWORK_VEST,20003: ItemGlobals.BELTED_VEST,20004: ItemGlobals.SUIT_VEST,20005: ItemGlobals.HUNTING_VEST,20006: ItemGlobals.WOODLAND_VEST,20007: ItemGlobals.NIGHT_VEST,20008: ItemGlobals.DRESSY_VEST,20009: ItemGlobals.SILK_VEST,20010: ItemGlobals.CARPENTER_VEST,20011: ItemGlobals.EMBELLISHED_VEST,20012: ItemGlobals.SACK_VEST,20013: ItemGlobals.SHOP_VEST,20014: ItemGlobals.LONGSHOREMAN_VEST,20015: ItemGlobals.TRAVELERS_VEST,20016: ItemGlobals.OPEN_ADVENTURE_VEST,30001: ItemGlobals.DINGY_LONG_COAT,30002: ItemGlobals.SWABBIE_JACKET,30003: ItemGlobals.EMBROIDERED_LONG_COAT,30004: ItemGlobals.TOURIST_LONG_COAT,30005: ItemGlobals.TRADER_LONG_COAT,30006: ItemGlobals.FOREST_LONG_COAT,30007: ItemGlobals.WOOLEN_LONG_COAT,30008: ItemGlobals.LEATHERCRAFT_LONG_COAT,30009: ItemGlobals.DARKHEART_LONG_COAT,30010: ItemGlobals.WEATHERED_LONG_COAT,30011: ItemGlobals.MERCHANT_LONG_COAT,30012: ItemGlobals.MONEY_JACKET,30013: ItemGlobals.COTTON_JACKET,30014: ItemGlobals.EVENING_JACKET,30015: ItemGlobals.SHIPWRIGHT_JACKET,30016: ItemGlobals.BOUNCER_JACKET,30017: ItemGlobals.WHALING_JACKET,30018: ItemGlobals.MATEY_JACKET,30019: ItemGlobals.ADVENTURE_LONG_COAT,40000: ItemGlobals.LEATHER_HIGHWATERS,40001: ItemGlobals.COTTON_HIGHWATERS,40002: ItemGlobals.DENIM_HIGHWATERS,40003: ItemGlobals.LINEN_HIGHWATERS,40004: ItemGlobals.COTTON_TROUSERS,40005: ItemGlobals.CELTIC_TROUSERS,40006: ItemGlobals.SAIL_TROUSERS,40007: ItemGlobals.LINEN_TROUSERS,40008: ItemGlobals.POTATO_SACK_TROUSERS,40009: ItemGlobals.KAKI_SKULL_SNAP_TROUSERS,40010: ItemGlobals.DENIM_SKULL_SNAP_TROUSERS,40011: ItemGlobals.FADED_SKULL_SNAP_TROUSERS,40012: ItemGlobals.STOWAWAY_TROUSERS,40013: ItemGlobals.DENIM_TROUSERS,40014: ItemGlobals.SWAB_THE_DECK_TROUSERS,40015: ItemGlobals.CIRCUS_BREECHES,40016: ItemGlobals.BUTTONED_BREECHES,40017: ItemGlobals.ARABIAN_TROUSERS,40018: ItemGlobals.SMITHY_TROUSERS,40019: ItemGlobals.RECRUIT_TROUSERS,40020: ItemGlobals.TRAVELERS_TROUSERS,40021: ItemGlobals.ADVENTURE_BREECHES,50001: ItemGlobals.BASIC_SASH,50002: ItemGlobals.BUCKLED_SASH,50003: ItemGlobals.GOLD_SKULL_BELT,50004: ItemGlobals.JOLLY_BONES_BELT,50005: ItemGlobals.BOX_BELT,50006: ItemGlobals.RECRUIT_SASH,50007: ItemGlobals.SQUARE_ADVENTURE_BELT,50008: ItemGlobals.SQUARE_TRAVELERS_BELT,70001: ItemGlobals.COMFY_BOOTS,70002: ItemGlobals.WALLOP_BOOTS,70003: ItemGlobals.WORN_IN_BOOTS,70004: ItemGlobals.HARD_LEATHER_BOOTS,70005: ItemGlobals.BUCKET_BOOTS,70006: ItemGlobals.BUCKLE_BOOTS,70007: ItemGlobals.FISHING_TROPHY_BOOTS,70008: ItemGlobals.OLD_BOOTS,70009: ItemGlobals.RECRUIT_BOOTS,70010: ItemGlobals.TRAVELERS_BOOTS,70011: ItemGlobals.ADVENTURE_BOOTS,80001: ItemGlobals.BROWN_CAVALRY_HAT,80002: ItemGlobals.DINGHY_HAT,80003: ItemGlobals.BANDANA,80004: ItemGlobals.HEAD_BAND,80005: ItemGlobals.CROSSBONES_BANDANA,80006: ItemGlobals.BLUE_BANDANA,80007: ItemGlobals.BLUE_BAND,80008: ItemGlobals.RECRUIT_BANDANA,80009: ItemGlobals.TRAVELERS_CAVALRY_HAT,80010: ItemGlobals.ADVENTURE_CAVALRY_HAT,80011: ItemGlobals.LOYALTY_BANDANA,90001: ItemGlobals.BURLAP_BLOUSE,90002: ItemGlobals.TRIMMED_BLOUSE,90003: ItemGlobals.DINGY_BLOUSE,90004: ItemGlobals.DINGY_PUFF_BLOUSE,90005: ItemGlobals.COTTON_PUFF_BLOUSE,90006: ItemGlobals.FLAPPED_PUFF_BLOUSE,90007: ItemGlobals.FRILLY_BLOUSE,90008: ItemGlobals.DINGY_TOP,90009: ItemGlobals.SKULL_BROACH_TOP,90010: ItemGlobals.COTTON_TOP,90011: ItemGlobals.PANEL_TOP,90012: ItemGlobals.SWASHBUCKLER_TOP,90013: ItemGlobals.RUFFLE_SHIRT,90014: ItemGlobals.FINE_PUFFY_SHIRT,90015: ItemGlobals.HIGH_SEAS_BLOUSE,90016: ItemGlobals.DARK_WATER_BLOUSE,90017: ItemGlobals.BOARDING_BLOUSE,90018: ItemGlobals.DARK_CLOUD_BLOUSE,90019: ItemGlobals.FLEUR_BLOUSE,90020: ItemGlobals.COURT_BLOUSE,90021: ItemGlobals.TAVERN_BLOUSE,90022: ItemGlobals.TAILORED_PUFFY_SHIRT,90023: ItemGlobals.ROUGH_WATER_BLOUSE,90024: ItemGlobals.OPERA_BLOUSE,90025: ItemGlobals.MUSKETEER_BLOUSE,90026: ItemGlobals.TEACHERS_BLOUSE,90027: ItemGlobals.RIDING_BLOUSE,90028: ItemGlobals.COTTON_BLOUSE,90029: ItemGlobals.GARDEN_BLOUSE,90030: ItemGlobals.DAY_DREAM_BLOUSE,90031: ItemGlobals.MORNING_BLOUSE,90032: ItemGlobals.STITCHED_BLOUSE,90033: ItemGlobals.RECRUIT_TOP,90034: ItemGlobals.TRAVELERS_TOP,90035: ItemGlobals.ADVENTURE_TOP,90036: ItemGlobals.VALENTINES_BLOUSE,100001: ItemGlobals.BUTTONED_VEST,100002: ItemGlobals.COTTON_VEST,100003: ItemGlobals.DECK_VEST,100004: ItemGlobals.LACED_VEST,100005: ItemGlobals.LOOSE_BUTTONED_VEST,100006: ItemGlobals.LOOSE_LEATHER_VEST,100007: ItemGlobals.ORCHARD_VEST,100008: ItemGlobals.MESSENGER_VEST,100009: ItemGlobals.ROYAL_CHEST_CORSET,100010: ItemGlobals.ROSE_PETAL_CORSET,100011: ItemGlobals.OLD_GROVE_CORSET,100012: ItemGlobals.RAWHIDE_CORSET,100013: ItemGlobals.EMBROIDERED_CORSET,100014: ItemGlobals.COTTON_CORSET,100015: ItemGlobals.YEOMAN_VEST,100016: ItemGlobals.CORSETED_VEST,100017: ItemGlobals.FOREST_VEST,100018: ItemGlobals.COUNTESS_VEST,100019: ItemGlobals.CITY_VEST,100020: ItemGlobals.COUNTRY_VEST,100021: ItemGlobals.COURT_VEST,100022: ItemGlobals.BAND_VEST,100023: ItemGlobals.CLOVER_VEST,100024: ItemGlobals.GARDEN_VEST,100025: ItemGlobals.PETAL_VEST,100026: ItemGlobals.DARKNESS_VEST,100027: ItemGlobals.GAS_LAMP_CORSET,100028: ItemGlobals.HIGH_TIDE_CORSET,100029: ItemGlobals.MORNING_DEW_CORSET,100030: ItemGlobals.TRAVELERS_LOOSE_VEST,100031: ItemGlobals.ADVENTURE_VEST,110001: ItemGlobals.PATCHWORK_RIDING_COAT,110002: ItemGlobals.LEATHER_RIDING_COAT,110003: ItemGlobals.CROCODILE_FROCK_COAT,110004: ItemGlobals.WOOLEN_FROCK_COAT,110005: ItemGlobals.LEATHER_FROCK_COAT,110006: ItemGlobals.HIGHWAY_COAT,110007: ItemGlobals.MILITIA_RIDING_COAT,110008: ItemGlobals.GOLD_THREAD_RIDING_COAT,110009: ItemGlobals.SUEDE_FROCK_COAT,110010: ItemGlobals.HARBOR_FROCK_COAT,110011: ItemGlobals.ADVENTURE_RIDING_COAT,130000: ItemGlobals.PATCHWORK_CAPRIS,130001: ItemGlobals.TAILORED_CAPRIS,130002: ItemGlobals.MISFITTED_CAPRIS,130003: ItemGlobals.SIDE_STRIPE_CAPRIS,130004: ItemGlobals.IMPROVISED_CAPRIS,130005: ItemGlobals.CANDYSTRIPE_CAPRIS,130006: ItemGlobals.PATCHWORK_SHORTS,130007: ItemGlobals.TIE_SHORTS,130008: ItemGlobals.LINEN_SHORTS,130009: ItemGlobals.FOREST_SHORTS,130010: ItemGlobals.SIDELACE_SHORTS,130011: ItemGlobals.LINEN_SKIRT,130012: ItemGlobals.HAND_ME_DOWN_SKIRT,130013: ItemGlobals.LAYERED_SKIRT,130014: ItemGlobals.POTATO_SACK_SKIRT,130015: ItemGlobals.SILK_SKIRT,130016: ItemGlobals.DENIM_SKIRT,130017: ItemGlobals.WOODLAND_SKIRT,130018: ItemGlobals.PARADE_CAPRIS,130019: ItemGlobals.RUNNERS_CAPRIS,130020: ItemGlobals.RED_VELVET_CAPRIS,130021: ItemGlobals.CASUAL_CAPRIS,130022: ItemGlobals.PATTYS_CAPRIS,130023: ItemGlobals.COURT_CAPRIS,130024: ItemGlobals.PIN_CAPRIS,130025: ItemGlobals.RECRUIT_CAPRIS,130026: ItemGlobals.TRAVELERS_CAPRIS,130027: ItemGlobals.ADVENTURE_CAPRIS,140001: ItemGlobals.BUCKLE_SASH,140002: ItemGlobals.PATTERNED_SASH,140003: ItemGlobals.TASSLES_SASH,140004: ItemGlobals.GOLD_BUCKLE_SASH,140005: ItemGlobals.GOLD_SQUARE_BELT,140006: ItemGlobals.BRASS_SQUARE_BELT,140007: ItemGlobals.WOODLAND_BELT,140008: ItemGlobals.GOLD_BOX_BELT,140009: ItemGlobals.LACED_BELT,140010: ItemGlobals.SIDE_BELT,140011: ItemGlobals.RECRUIT_SASH,140012: ItemGlobals.TRAVELERS_BELT,140013: ItemGlobals.ADVENTURE_BELT,160001: ItemGlobals.DECK_SLAPPER_BOOTS,160002: ItemGlobals.DEER_SKIN_ANKLE_BOOTS,160003: ItemGlobals.LEATHER_ANKLE_BOOTS,160004: ItemGlobals.CLOPPER_ANKLE_BOOTS,160005: ItemGlobals.BUCKLE_SHORT_BOOTS,160006: ItemGlobals.RAMPART_BOOTS,160007: ItemGlobals.GANGPLANK_BOOTS,160008: ItemGlobals.SIDEWALK_BOOTS,160009: ItemGlobals.LEATHER_KNEE_BOOTS,160010: ItemGlobals.PLANKWALKER_BOOTS,160011: ItemGlobals.CASTLE_BOOTS,160012: ItemGlobals.STROLL_BOOTS,160013: ItemGlobals.STITCHED_KNEE_BOOTS,160014: ItemGlobals.CELTIC_TALL_BOOTS,160015: ItemGlobals.FENCER_BOOTS,160016: ItemGlobals.DEER_SKIN_TALL_BOOTS,160017: ItemGlobals.SUEDE_TALL_BOOTS,160018: ItemGlobals.CHILL_BOOTS,160019: ItemGlobals.RICH_KNEE_BOOTS,160020: ItemGlobals.FOREST_KNEE_BOOTS,160021: ItemGlobals.HARD_KNEE_BOOTS,160022: ItemGlobals.RECRUIT_SHORT_BOOTS,160023: ItemGlobals.TRAVELERS_TALL_BOOTS,160024: ItemGlobals.ADVENTURE_SHORT_BOOTS},InventoryType.ItemTypeTattoo: {1: ItemGlobals.TATTOO_CHEST_DAGGER,2: ItemGlobals.TATTOO_CHEST_HEART_TORCH,3: ItemGlobals.TATTOO_CHEST_LOCK_KEY,4: ItemGlobals.TATTOO_CHEST_SKULL_DAGGER,5: {'m': ItemGlobals.TATTOO_CHEST_FULL_SKULL_CROSS,'f': ItemGlobals.TATTOO_CHEST_SMALL_SKULL_CROSS},6: ItemGlobals.TATTOO_CHEST_ANCHOR,7: ItemGlobals.TATTOO_CHEST_COMPASS,8: ItemGlobals.TATTOO_CHEST_DAGGER_SCROLL,9: ItemGlobals.TATTOO_CHEST_SHIP_ANCHOR,10: {'m': ItemGlobals.TATTOO_CHEST_FULL_SKULL_CROSSBONES,'f': ItemGlobals.TATTOO_CHEST_SMALL_SKULL_CROSSBONES},11: ItemGlobals.TATTOO_CHEST_SQUID_AND_SHIP,12: ItemGlobals.TATTOO_CHEST_SAINT_PATRICKS_DAY,13: ItemGlobals.TATTOO_CHEST_CELTIC_LEAF,14: {'m': ItemGlobals.TATTOO_CHEST_FULL_ETHNIC_EAGLE,'f': ItemGlobals.TATTOO_CHEST_SMALL_ETHNIC_EAGLE},15: {'m': ItemGlobals.TATTOO_CHEST_FULL_CROSSED_FLINTLOCKS,'f': ItemGlobals.TATTOO_CHEST_SMALL_CROSSED_FLINTLOCKS},16: ItemGlobals.TATTOO_CHEST_SHAMROCK,17: {'m': ItemGlobals.TATTOO_CHEST_FULL_THAI_MONKEY,'f': ItemGlobals.TATTOO_CHEST_SMALL_THAI_MONKEY},18: ItemGlobals.TATTOO_CHEST_HAWAIIAN_PECTORAL,19: {'m': ItemGlobals.TATTOO_CHEST_FULL_TRIBAL_YAKUZA,'f': ItemGlobals.TATTOO_CHEST_SMALL_TRIBALYAKUZA},20: ItemGlobals.TATTOO_CHEST_SPANISH_SHIP_PVP,21: ItemGlobals.TATTOO_CHEST_FRENCH_SHIP_PVP,22: ItemGlobals.TATTOO_CHEST_CLASSIC_MOTHERS_DAY,23: ItemGlobals.TATTOO_CHEST_HEALED_BULLET_HOLES,24: ItemGlobals.TATTOO_CHEST_PIRATE_BRAND,25: ItemGlobals.TATTOO_CHEST_LARGE_STITCHED_SCAR,26: ItemGlobals.TATTOO_CHEST_STITCHED_BULLET_HOLES,27: ItemGlobals.TATTOO_CHEST_LARGE_X_STITCH,28: ItemGlobals.TATTOO_CHEST_LARGE_Y_STITCH,10001: ItemGlobals.TATTOO_ARM_SHARK,10002: ItemGlobals.TATTOO_ARM_SKULL_PIRATE,10003: ItemGlobals.TATTOO_ARM_SKULL_SHIELD,10004: ItemGlobals.TATTOO_ARM_SKULL_STAB,10005: ItemGlobals.TATTOO_ARM_SNAKES_DAGGER,10006: ItemGlobals.TATTOO_ARM_FANCY_DAGGER,10007: ItemGlobals.TATTOO_ARM_SKULL_FLAG,10008: ItemGlobals.TATTOO_ARM_FANCY_KEY,10009: ItemGlobals.TATTOO_ARM_SKULL_IRON_CROSS,10010: ItemGlobals.TATTOO_ARM_SKULL_SCROLL,10011: ItemGlobals.TATTOO_ARM_NAUTICAL_STAR,10012: ItemGlobals.TATTOO_ARM_MAYAN_FACE,10013: ItemGlobals.TATTOO_ARM_OCTOPUS,10014: ItemGlobals.TATTOO_ARM_TRIBAL_SKULL,10015: ItemGlobals.TATTOO_ARM_SAINT_PATRICK,10016: ItemGlobals.TATTOO_ARM_NATIVE_LIZARDS,10017: ItemGlobals.TATTOO_ARM_TRIBAL_SWIRL,10018: ItemGlobals.TATTOO_ARM_TRIBAL_BIRD,10019: ItemGlobals.TATTOO_ARM_TRIBAL_JELLYFISH,10020: ItemGlobals.TATTOO_ARM_TRIBAL_JELLYFISHES,10021: ItemGlobals.TATTOO_ARM_ASIAN_LEAF,10022: ItemGlobals.TATTOO_ARM_ETHNIC,10023: ItemGlobals.TATTOO_ARM_MAORI_MAN,10024: ItemGlobals.TATTOO_ARM_NATIVE_LEAF,10025: ItemGlobals.TATTOO_ARM_THAI,10026: ItemGlobals.TATTOO_ARM_CELTIC_LEAF,10027: ItemGlobals.TATTOO_ARM_SHAMROCK,10028: ItemGlobals.TATTOO_ARM_TIKI,10029: ItemGlobals.TATTOO_ARM_CELTIC_KNOT,10030: ItemGlobals.TATTOO_ARM_TRIBAL_WAVES,10031: ItemGlobals.TATTOO_ARM_SHARKS,10032: ItemGlobals.TATTOO_ARM_CHINESE_KNOT,10033: ItemGlobals.TATTOO_ARM_WAVE_FAN,10034: ItemGlobals.TATTOO_ARM_CELTIC_DEER,10035: ItemGlobals.TATTOO_ARM_HAWAIIAN,10036: ItemGlobals.TATTOO_ARM_PETROGLYPH,10037: ItemGlobals.TATTOO_ARM_RAVENS,10038: ItemGlobals.TATTOO_ARM_SPANISH,10039: ItemGlobals.TATTOO_ARM_FRENCH,10040: ItemGlobals.TATTOO_ARM_MOTHERS_DAY_FLOWERS_COLOR,10041: ItemGlobals.TATTOO_ARM_MOTHERS_DAY_SPARROWS,10042: ItemGlobals.TATTOO_ARM_OCTOPUS_SLEEVES,10043: ItemGlobals.TATTOO_ARM_HEALED_BULLET_HOLES,10044: ItemGlobals.TATTOO_ARM_PIRATE_BRAND,10045: ItemGlobals.TATTOO_ARM_STITCHED_SCAR,10046: ItemGlobals.TATTOO_ARM_STITCHED_BULLET_HOLES,10047: ItemGlobals.TATTOO_ARM_STITCHED_X,10048: ItemGlobals.TATTOO_ARM_STITCHED_Y,20001: ItemGlobals.TATTOO_ARM_SHARK,20002: ItemGlobals.TATTOO_ARM_SKULL_PIRATE,20003: ItemGlobals.TATTOO_ARM_SKULL_SHIELD,20004: ItemGlobals.TATTOO_ARM_SKULL_STAB,20005: ItemGlobals.TATTOO_ARM_SNAKES_DAGGER,20006: ItemGlobals.TATTOO_ARM_FANCY_DAGGER,20007: ItemGlobals.TATTOO_ARM_SKULL_FLAG,20008: ItemGlobals.TATTOO_ARM_FANCY_KEY,20009: ItemGlobals.TATTOO_ARM_SKULL_IRON_CROSS,20010: ItemGlobals.TATTOO_ARM_SKULL_SCROLL,20011: ItemGlobals.TATTOO_ARM_NAUTICAL_STAR,20012: ItemGlobals.TATTOO_ARM_MAYAN_FACE,20013: ItemGlobals.TATTOO_ARM_OCTOPUS,20014: ItemGlobals.TATTOO_ARM_TRIBAL_SKULL,20015: ItemGlobals.TATTOO_ARM_SAINT_PATRICK,20016: ItemGlobals.TATTOO_ARM_NATIVE_LIZARDS,20017: ItemGlobals.TATTOO_ARM_TRIBAL_SWIRL,20018: ItemGlobals.TATTOO_ARM_TRIBAL_BIRD,20019: ItemGlobals.TATTOO_ARM_TRIBAL_JELLYFISH,20020: ItemGlobals.TATTOO_ARM_TRIBAL_JELLYFISHES,20021: ItemGlobals.TATTOO_ARM_ASIAN_LEAF,20022: ItemGlobals.TATTOO_ARM_ETHNIC,20023: ItemGlobals.TATTOO_ARM_MAORI_MAN,20024: ItemGlobals.TATTOO_ARM_NATIVE_LEAF,20025: ItemGlobals.TATTOO_ARM_THAI,20026: ItemGlobals.TATTOO_ARM_CELTIC_LEAF,20027: ItemGlobals.TATTOO_ARM_SHAMROCK,20028: ItemGlobals.TATTOO_ARM_TIKI,20029: ItemGlobals.TATTOO_ARM_CELTIC_KNOT,20030: ItemGlobals.TATTOO_ARM_TRIBAL_WAVES,20031: ItemGlobals.TATTOO_ARM_SHARKS,20032: ItemGlobals.TATTOO_ARM_CHINESE_KNOT,20033: ItemGlobals.TATTOO_ARM_WAVE_FAN,20034: ItemGlobals.TATTOO_ARM_CELTIC_DEER,20035: ItemGlobals.TATTOO_ARM_HAWAIIAN,20036: ItemGlobals.TATTOO_ARM_PETROGLYPH,20037: ItemGlobals.TATTOO_ARM_RAVENS,20038: ItemGlobals.TATTOO_ARM_SPANISH,20039: ItemGlobals.TATTOO_ARM_FRENCH,20040: ItemGlobals.TATTOO_ARM_MOTHERS_DAY_FLOWERS_COLOR,20041: ItemGlobals.TATTOO_ARM_MOTHERS_DAY_SPARROWS,20042: ItemGlobals.TATTOO_ARM_HEALED_BULLET_HOLES,20043: ItemGlobals.TATTOO_ARM_PIRATE_BRAND,20044: ItemGlobals.TATTOO_ARM_STITCHED_SCAR,20045: ItemGlobals.TATTOO_ARM_STITCHED_BULLET_HOLES,20046: ItemGlobals.TATTOO_ARM_STITCHED_X,20047: ItemGlobals.TATTOO_ARM_STITCHED_Y,30001: ItemGlobals.TATTOO_FACE_SKULL,30002: ItemGlobals.TATTOO_FACE_TWO_CLOVERS,30003: ItemGlobals.TATTOO_FACE_HORSE_SHOES,30004: ItemGlobals.TATTOO_FACE_TRIBAL_FOREHEAD,30005: ItemGlobals.TATTOO_FACE_TRIBAL_CHEEK,30006: ItemGlobals.TATTOO_FACE_TRIBAL_CHIN,30007: ItemGlobals.TATTOO_FACE_JACK_EYES,30008: ItemGlobals.TATTOO_FACE_TRIBAL_GOATEE,30009: ItemGlobals.TATTOO_FACE_MAORI_NOSE,30010: ItemGlobals.TATTOO_FACE_MAORI_CHIN,30011: ItemGlobals.TATTOO_FACE_NATIVE_EYE,30012: ItemGlobals.TATTOO_FACE_MOTHERS_DAY_FLOWER,30013: ItemGlobals.TATTOO_FACE_MOTHERS_DAY_HEARTS,30014: ItemGlobals.TATTOO_FACE_PIRATE_BRAND,30015: ItemGlobals.TATTOO_FACE_STITCHED_SCAR,30016: ItemGlobals.TATTOO_FACE_STITCHED_X,30017: ItemGlobals.TATTOO_FACE_STITCHED_Y},InventoryType.ItemTypeJewelry: {0: ItemGlobals.GOLDEN_BROW_SPIKE,1: ItemGlobals.SILVER_BROW_SPIKE,2: ItemGlobals.GOLDEN_BROW_RING,3: ItemGlobals.SILVER_BROW_RING,4: ItemGlobals.SAPPHIRE_BROW_RING,10000: ItemGlobals.GOLDEN_BROW_SPIKE,10001: ItemGlobals.SILVER_BROW_SPIKE,10002: ItemGlobals.GOLDEN_BROW_RING,10003: ItemGlobals.SILVER_BROW_RING,10004: ItemGlobals.TURQUOISE_BROW_SPIKE,20000: ItemGlobals.GOLDEN_EAR_STUD,20001: ItemGlobals.SILVER_EAR_STUD,20002: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,20003: ItemGlobals.SILVER_EAR_SMALL_LOOP,20004: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,20005: ItemGlobals.SILVER_SMALL_EAR_SPIKE,20006: ItemGlobals.GOLDEN_EAR_DOUBLE_LOOP,20007: ItemGlobals.SILVER_EAR_DOUBLE_LOOP,20008: ItemGlobals.GOLD_AND_SILVER_EAR_DOUBLE_LOOP,20009: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,20010: ItemGlobals.SILVER_SMALL_EAR_SPIKE,20011: ItemGlobals.GOLDEN_LARGE_EAR_LOOP,20012: ItemGlobals.SILVER_LARGE_EAR_LOOP,20013: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,20014: ItemGlobals.SILVER_EAR_SMALL_LOOP,20015: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,20016: ItemGlobals.SILVER_EAR_SMALL_LOOP,20017: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,20018: ItemGlobals.SILVER_EAR_SMALL_LOOP,20019: ItemGlobals.GOLDEN_LARGE_EAR_LOOP_WITH_DOUBLE,20020: ItemGlobals.SILVER_LARGE_EAR_LOOP_WITH_DOUBLE,20021: ItemGlobals.GOLDEN_EAR_CUFFS,20022: ItemGlobals.SILVER_EAR_CUFFS,20023: ItemGlobals.GOLDEN_BROW_SPIKE,20024: ItemGlobals.SILVER_BROW_SPIKE,20025: ItemGlobals.GOLDEN_EAR_CUFFS,20026: ItemGlobals.SILVER_EAR_CUFFS,20027: ItemGlobals.RUBY_AND_AMETHYST_EAR_STUD_AND_RING,30000: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,30001: ItemGlobals.SILVER_EAR_SMALL_LOOP,30002: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,30003: ItemGlobals.SILVER_EAR_SMALL_LOOP,30004: ItemGlobals.GOLDEN_EAR_STUD,30005: ItemGlobals.SILVER_EAR_STUD,30006: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,30007: ItemGlobals.SILVER_SMALL_EAR_SPIKE,30008: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,30009: ItemGlobals.SILVER_SMALL_EAR_SPIKE,30010: ItemGlobals.GOLDEN_LARGE_EAR_LOOP,30011: ItemGlobals.SILVER_LARGE_EAR_LOOP,30012: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,30013: ItemGlobals.SILVER_EAR_SMALL_LOOP,30014: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,30015: ItemGlobals.SILVER_EAR_SMALL_LOOP,30016: ItemGlobals.GOLDEN_LARGE_EAR_LOOP_WITH_DOUBLE,30017: ItemGlobals.SILVER_LARGE_EAR_LOOP_WITH_DOUBLE,30018: ItemGlobals.GOLDEN_EAR_CUFFS,30019: ItemGlobals.SILVER_EAR_CUFFS,30020: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,30021: ItemGlobals.SILVER_SMALL_EAR_SPIKE,30022: ItemGlobals.GOLDEN_EAR_CUFFS,30023: ItemGlobals.SILVER_EAR_CUFFS,30024: ItemGlobals.ONYX_LARGE_EAR_LOOP,40000: ItemGlobals.GOLDEN_NOSE_LOOP,40001: ItemGlobals.SILVER_NOSE_LOOP,40002: ItemGlobals.GOLDEN_NOSE_SPIKE,40003: ItemGlobals.SILVER_NOSE_SPIKE,40004: ItemGlobals.GOLDEN_NOSE_SPIKE,40005: ItemGlobals.SILVER_NOSE_SPIKE,40006: ItemGlobals.GOLDEN_NOSE_LOOP,40007: ItemGlobals.SILVER_NOSE_LOOP,40008: ItemGlobals.GOLDEN_NOSE_CENTER_LOOP,40009: ItemGlobals.SILVER_NOSE_CENTER_LOOP,40010: ItemGlobals.GOLDEN_DOUBLE_NOSE_SPIKE,40011: ItemGlobals.SILVER_DOUBLE_NOSE_SPIKE,40012: ItemGlobals.GOLDEN_NOSE_SPIKE_WITH_LOOP,40013: ItemGlobals.SILVER_NOSE_SPIKE_WITH_LOOP,40014: ItemGlobals.EMERALD_DOUBLE_NOSE_SPIKE,50000: ItemGlobals.GOLDEN_LIP_RING,50001: ItemGlobals.SILVER_LIP_RING,50002: ItemGlobals.GOLDEN_LIP_RING,50003: ItemGlobals.SILVER_LIP_RING,50004: ItemGlobals.GOLDEN_LIP_RING,50005: ItemGlobals.SILVER_LIP_RING,50006: ItemGlobals.GOLDEN_LIP_RING,50007: ItemGlobals.SILVER_LIP_RING,50008: ItemGlobals.GOLDEN_LIP_RING,50009: ItemGlobals.SILVER_LIP_RING,50010: ItemGlobals.GOLDEN_LIP_SPIKE,50011: ItemGlobals.SILVER_LIP_SPIKE,50012: ItemGlobals.GOLDEN_DOUBLE_LIP_RING,50013: ItemGlobals.SILVER_DOUBLE_LIP_RING,50014: ItemGlobals.GOLDEN_DOUBLE_LIP_RING,50015: ItemGlobals.SILVER_DOUBLE_LIP_RING,50016: ItemGlobals.RUBY_LIP_RING,60000: ItemGlobals.GOLDEN_BAND,60001: ItemGlobals.SILVER_BAND,60002: ItemGlobals.GOLDEN_RUBY_RING,60003: ItemGlobals.SILVER_RUBY_RING,60004: ItemGlobals.GOLDEN_AMETHIST_RING,60005: ItemGlobals.SILVER_AMETHIST_RING,60006: ItemGlobals.GOLDEN_SAPPHIRE_RING,60007: ItemGlobals.SILVER_SAPPHIRE_RING,60008: ItemGlobals.GOLDEN_TURQUOISE_RING,60009: ItemGlobals.SILVER_TURQUOISE_RING,60010: ItemGlobals.GOLDEN_EMERALD_RING,60011: ItemGlobals.SILVER_EMERALD_RING,60012: ItemGlobals.GOLDEN_ONYX_RING,60013: ItemGlobals.SILVER_ONYX_RING,60014: ItemGlobals.GOLDEN_BAND,60015: ItemGlobals.SILVER_BAND,60016: ItemGlobals.GOLDEN_RUBY_RING,60017: ItemGlobals.SILVER_RUBY_RING,60018: ItemGlobals.GOLDEN_AMETHIST_RING,60019: ItemGlobals.SILVER_AMETHIST_RING,60020: ItemGlobals.GOLDEN_SAPPHIRE_RING,60021: ItemGlobals.SILVER_SAPPHIRE_RING,60022: ItemGlobals.GOLDEN_TURQUOISE_RING,60023: ItemGlobals.SILVER_TURQUOISE_RING,60024: ItemGlobals.GOLDEN_EMERALD_RING,60025: ItemGlobals.SILVER_EMERALD_RING,60026: ItemGlobals.GOLDEN_ONYX_RING,60027: ItemGlobals.SILVER_ONYX_RING,60028: ItemGlobals.GOLDEN_BAND,60029: ItemGlobals.SILVER_BAND,60030: ItemGlobals.GOLDEN_RUBY_RING,60031: ItemGlobals.SILVER_RUBY_RING,60032: ItemGlobals.GOLDEN_AMETHIST_RING,60033: ItemGlobals.SILVER_AMETHIST_RING,60034: ItemGlobals.GOLDEN_SAPPHIRE_RING,60035: ItemGlobals.SILVER_SAPPHIRE_RING,60036: ItemGlobals.GOLDEN_TURQUOISE_RING,60037: ItemGlobals.SILVER_TURQUOISE_RING,60038: ItemGlobals.GOLDEN_EMERALD_RING,60039: ItemGlobals.SILVER_EMERALD_RING,60040: ItemGlobals.GOLDEN_ONYX_RING,60041: ItemGlobals.SILVER_ONYX_RING,60042: ItemGlobals.GOLDEN_BAND,60043: ItemGlobals.SILVER_BAND,60044: ItemGlobals.GOLDEN_RUBY_RING,60045: ItemGlobals.SILVER_RUBY_RING,60046: ItemGlobals.GOLDEN_AMETHIST_RING,60047: ItemGlobals.SILVER_AMETHIST_RING,60048: ItemGlobals.GOLDEN_SAPPHIRE_RING,60049: ItemGlobals.SILVER_SAPPHIRE_RING,60050: ItemGlobals.GOLDEN_TURQUOISE_RING,60051: ItemGlobals.SILVER_TURQUOISE_RING,60052: ItemGlobals.GOLDEN_EMERALD_RING,60053: ItemGlobals.SILVER_EMERALD_RING,60054: ItemGlobals.GOLDEN_ONYX_RING,60055: ItemGlobals.SILVER_ONYX_RING,60056: ItemGlobals.GOLDEN_DOUBLE_BAND,60057: ItemGlobals.SILVER_DOUBLE_BAND,60058: ItemGlobals.GOLDEN_DOUBLE_BAND,60059: ItemGlobals.SILVER_DOUBLE_BAND,60060: ItemGlobals.GOLDEN_DOUBLE_BAND,60061: ItemGlobals.SILVER_DOUBLE_BAND,70000: ItemGlobals.GOLDEN_BAND,70001: ItemGlobals.SILVER_BAND,70002: ItemGlobals.GOLDEN_RUBY_RING,70003: ItemGlobals.SILVER_RUBY_RING,70004: ItemGlobals.GOLDEN_AMETHIST_RING,70005: ItemGlobals.SILVER_AMETHIST_RING,70006: ItemGlobals.GOLDEN_SAPPHIRE_RING,70007: ItemGlobals.SILVER_SAPPHIRE_RING,70008: ItemGlobals.GOLDEN_TURQUOISE_RING,70009: ItemGlobals.SILVER_TURQUOISE_RING,70010: ItemGlobals.GOLDEN_EMERALD_RING,70011: ItemGlobals.SILVER_EMERALD_RING,70012: ItemGlobals.GOLDEN_ONYX_RING,70013: ItemGlobals.SILVER_ONYX_RING,70014: ItemGlobals.GOLDEN_BAND,70015: ItemGlobals.SILVER_BAND,70016: ItemGlobals.GOLDEN_RUBY_RING,70017: ItemGlobals.SILVER_RUBY_RING,70018: ItemGlobals.GOLDEN_AMETHIST_RING,70019: ItemGlobals.SILVER_AMETHIST_RING,70020: ItemGlobals.GOLDEN_SAPPHIRE_RING,70021: ItemGlobals.SILVER_SAPPHIRE_RING,70022: ItemGlobals.GOLDEN_TURQUOISE_RING,70023: ItemGlobals.SILVER_TURQUOISE_RING,70024: ItemGlobals.GOLDEN_EMERALD_RING,70025: ItemGlobals.SILVER_EMERALD_RING,70026: ItemGlobals.GOLDEN_ONYX_RING,70027: ItemGlobals.SILVER_ONYX_RING,70028: ItemGlobals.GOLDEN_BAND,70029: ItemGlobals.SILVER_BAND,70030: ItemGlobals.GOLDEN_RUBY_RING,70031: ItemGlobals.SILVER_RUBY_RING,70032: ItemGlobals.GOLDEN_AMETHIST_RING,70033: ItemGlobals.SILVER_AMETHIST_RING,70034: ItemGlobals.GOLDEN_SAPPHIRE_RING,70035: ItemGlobals.SILVER_SAPPHIRE_RING,70036: ItemGlobals.GOLDEN_TURQUOISE_RING,70037: ItemGlobals.SILVER_TURQUOISE_RING,70038: ItemGlobals.GOLDEN_EMERALD_RING,70039: ItemGlobals.SILVER_EMERALD_RING,70040: ItemGlobals.GOLDEN_ONYX_RING,70041: ItemGlobals.SILVER_ONYX_RING,70042: ItemGlobals.GOLDEN_BAND,70043: ItemGlobals.SILVER_BAND,70044: ItemGlobals.GOLDEN_RUBY_RING,70045: ItemGlobals.SILVER_RUBY_RING,70046: ItemGlobals.GOLDEN_AMETHIST_RING,70047: ItemGlobals.SILVER_AMETHIST_RING,70048: ItemGlobals.GOLDEN_SAPPHIRE_RING,70049: ItemGlobals.SILVER_SAPPHIRE_RING,70050: ItemGlobals.GOLDEN_TURQUOISE_RING,70051: ItemGlobals.SILVER_TURQUOISE_RING,70052: ItemGlobals.GOLDEN_EMERALD_RING,70053: ItemGlobals.SILVER_EMERALD_RING,70054: ItemGlobals.GOLDEN_ONYX_RING,70055: ItemGlobals.SILVER_ONYX_RING,70056: ItemGlobals.GOLDEN_DOUBLE_BAND,70057: ItemGlobals.SILVER_DOUBLE_BAND,70058: ItemGlobals.GOLDEN_DOUBLE_BAND,70059: ItemGlobals.SILVER_DOUBLE_BAND,70060: ItemGlobals.GOLDEN_DOUBLE_BAND,70061: ItemGlobals.SILVER_DOUBLE_BAND,80000: ItemGlobals.GOLDEN_BROW_SPIKE,80001: ItemGlobals.SILVER_BROW_SPIKE,80002: ItemGlobals.GOLDEN_BROW_RING,80003: ItemGlobals.SILVER_BROW_RING,80004: ItemGlobals.SAPPHIRE_BROW_RING,90000: ItemGlobals.GOLDEN_BROW_SPIKE,90001: ItemGlobals.SILVER_BROW_SPIKE,90002: ItemGlobals.GOLDEN_BROW_RING,90003: ItemGlobals.SILVER_BROW_RING,90004: ItemGlobals.TURQUOISE_BROW_SPIKE,100000: ItemGlobals.GOLDEN_EAR_STUD,100001: ItemGlobals.SILVER_EAR_STUD,100002: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,100003: ItemGlobals.SILVER_EAR_SMALL_LOOP,100004: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,100005: ItemGlobals.SILVER_SMALL_EAR_SPIKE,100006: ItemGlobals.GOLDEN_EAR_DOUBLE_LOOP,100007: ItemGlobals.SILVER_EAR_DOUBLE_LOOP,100008: ItemGlobals.GOLD_AND_SILVER_EAR_DOUBLE_LOOP,100009: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,100010: ItemGlobals.SILVER_SMALL_EAR_SPIKE,100011: ItemGlobals.GOLDEN_LARGE_EAR_LOOP,100012: ItemGlobals.SILVER_LARGE_EAR_LOOP,100013: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,100014: ItemGlobals.SILVER_EAR_SMALL_LOOP,100015: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,100016: ItemGlobals.SILVER_EAR_SMALL_LOOP,100017: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,100018: ItemGlobals.SILVER_EAR_SMALL_LOOP,100019: ItemGlobals.GOLDEN_LARGE_EAR_LOOP_WITH_DOUBLE,100020: ItemGlobals.SILVER_LARGE_EAR_LOOP_WITH_DOUBLE,100021: ItemGlobals.GOLDEN_EAR_CUFFS,100022: ItemGlobals.SILVER_EAR_CUFFS,100023: ItemGlobals.GOLDEN_BROW_SPIKE,100024: ItemGlobals.SILVER_BROW_SPIKE,100025: ItemGlobals.GOLDEN_EAR_CUFFS,100026: ItemGlobals.SILVER_EAR_CUFFS,100027: ItemGlobals.RUBY_AND_AMETHYST_EAR_STUD_AND_RING,110000: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,110001: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,110002: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,110003: ItemGlobals.SILVER_EAR_SMALL_LOOP,110004: ItemGlobals.GOLDEN_EAR_STUD,110005: ItemGlobals.SILVER_EAR_STUD,110006: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,110007: ItemGlobals.SILVER_SMALL_EAR_SPIKE,110008: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,110009: ItemGlobals.SILVER_SMALL_EAR_SPIKE,110010: ItemGlobals.GOLDEN_LARGE_EAR_LOOP,110011: ItemGlobals.SILVER_LARGE_EAR_LOOP,110012: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,110013: ItemGlobals.SILVER_EAR_SMALL_LOOP,110014: ItemGlobals.GOLDEN_EAR_SMALL_LOOP,110015: ItemGlobals.SILVER_EAR_SMALL_LOOP,110016: ItemGlobals.GOLDEN_LARGE_EAR_LOOP_WITH_DOUBLE,110017: ItemGlobals.SILVER_LARGE_EAR_LOOP_WITH_DOUBLE,110018: ItemGlobals.GOLDEN_EAR_CUFFS,110019: ItemGlobals.SILVER_EAR_CUFFS,110020: ItemGlobals.GOLDEN_SMALL_EAR_SPIKE,110021: ItemGlobals.SILVER_SMALL_EAR_SPIKE,110022: ItemGlobals.GOLDEN_EAR_CUFFS,110023: ItemGlobals.SILVER_EAR_CUFFS,110024: ItemGlobals.ONYX_LARGE_EAR_LOOP,120000: ItemGlobals.GOLDEN_NOSE_LOOP,120001: ItemGlobals.SILVER_NOSE_LOOP,120002: ItemGlobals.GOLDEN_NOSE_SPIKE,120003: ItemGlobals.SILVER_NOSE_SPIKE,120004: ItemGlobals.GOLDEN_NOSE_SPIKE,120005: ItemGlobals.SILVER_NOSE_SPIKE,120006: ItemGlobals.GOLDEN_NOSE_LOOP,120007: ItemGlobals.SILVER_NOSE_LOOP,120008: ItemGlobals.GOLDEN_NOSE_CENTER_LOOP,120009: ItemGlobals.SILVER_NOSE_CENTER_LOOP,120010: ItemGlobals.GOLDEN_DOUBLE_NOSE_SPIKE,120011: ItemGlobals.SILVER_DOUBLE_NOSE_SPIKE,120012: ItemGlobals.GOLDEN_NOSE_SPIKE_WITH_LOOP,120013: ItemGlobals.SILVER_NOSE_SPIKE_WITH_LOOP,120014: ItemGlobals.EMERALD_DOUBLE_NOSE_SPIKE,130000: ItemGlobals.GOLDEN_LIP_RING,130001: ItemGlobals.SILVER_LIP_RING,130002: ItemGlobals.GOLDEN_LIP_RING,130003: ItemGlobals.SILVER_LIP_RING,130004: ItemGlobals.GOLDEN_LIP_RING,130005: ItemGlobals.SILVER_LIP_RING,130006: ItemGlobals.GOLDEN_LIP_RING,130007: ItemGlobals.SILVER_LIP_RING,130008: ItemGlobals.GOLDEN_LIP_RING,130009: ItemGlobals.SILVER_LIP_RING,130010: ItemGlobals.GOLDEN_DOUBLE_LIP_RING,130011: ItemGlobals.SILVER_DOUBLE_LIP_RING,130012: ItemGlobals.GOLDEN_DOUBLE_LIP_RING,130013: ItemGlobals.SILVER_DOUBLE_LIP_RING,130014: ItemGlobals.RUBY_LIP_RING,140000: ItemGlobals.GOLDEN_BAND,140001: ItemGlobals.SILVER_BAND,140002: ItemGlobals.GOLDEN_RUBY_RING,140003: ItemGlobals.SILVER_RUBY_RING,140004: ItemGlobals.GOLDEN_AMETHIST_RING,140005: ItemGlobals.SILVER_AMETHIST_RING,140006: ItemGlobals.GOLDEN_SAPPHIRE_RING,140007: ItemGlobals.SILVER_SAPPHIRE_RING,140008: ItemGlobals.GOLDEN_TURQUOISE_RING,140009: ItemGlobals.SILVER_TURQUOISE_RING,140010: ItemGlobals.GOLDEN_EMERALD_RING,140011: ItemGlobals.SILVER_EMERALD_RING,140012: ItemGlobals.GOLDEN_ONYX_RING,140013: ItemGlobals.SILVER_ONYX_RING,140014: ItemGlobals.GOLDEN_BAND,140015: ItemGlobals.SILVER_BAND,140016: ItemGlobals.GOLDEN_RUBY_RING,140017: ItemGlobals.SILVER_RUBY_RING,140018: ItemGlobals.GOLDEN_AMETHIST_RING,140019: ItemGlobals.SILVER_AMETHIST_RING,140020: ItemGlobals.GOLDEN_SAPPHIRE_RING,140021: ItemGlobals.SILVER_SAPPHIRE_RING,140022: ItemGlobals.GOLDEN_TURQUOISE_RING,140023: ItemGlobals.SILVER_TURQUOISE_RING,140024: ItemGlobals.GOLDEN_EMERALD_RING,140025: ItemGlobals.SILVER_EMERALD_RING,140026: ItemGlobals.GOLDEN_ONYX_RING,140027: ItemGlobals.SILVER_ONYX_RING,140028: ItemGlobals.GOLDEN_BAND,140029: ItemGlobals.SILVER_BAND,140030: ItemGlobals.GOLDEN_RUBY_RING,140031: ItemGlobals.SILVER_RUBY_RING,140032: ItemGlobals.GOLDEN_AMETHIST_RING,140033: ItemGlobals.SILVER_AMETHIST_RING,140034: ItemGlobals.GOLDEN_SAPPHIRE_RING,140035: ItemGlobals.SILVER_SAPPHIRE_RING,140036: ItemGlobals.GOLDEN_TURQUOISE_RING,140037: ItemGlobals.SILVER_TURQUOISE_RING,140038: ItemGlobals.GOLDEN_EMERALD_RING,140039: ItemGlobals.SILVER_EMERALD_RING,140040: ItemGlobals.GOLDEN_ONYX_RING,140041: ItemGlobals.SILVER_ONYX_RING,140042: ItemGlobals.GOLDEN_BAND,140043: ItemGlobals.SILVER_BAND,140044: ItemGlobals.GOLDEN_RUBY_RING,140045: ItemGlobals.SILVER_RUBY_RING,140046: ItemGlobals.GOLDEN_AMETHIST_RING,140047: ItemGlobals.SILVER_AMETHIST_RING,140048: ItemGlobals.GOLDEN_SAPPHIRE_RING,140049: ItemGlobals.SILVER_SAPPHIRE_RING,140050: ItemGlobals.GOLDEN_TURQUOISE_RING,140051: ItemGlobals.SILVER_TURQUOISE_RING,140052: ItemGlobals.GOLDEN_EMERALD_RING,140053: ItemGlobals.SILVER_EMERALD_RING,140054: ItemGlobals.GOLDEN_ONYX_RING,140055: ItemGlobals.SILVER_ONYX_RING,140056: ItemGlobals.GOLDEN_DOUBLE_BAND,140057: ItemGlobals.SILVER_DOUBLE_BAND,140058: ItemGlobals.GOLDEN_DOUBLE_BAND,140059: ItemGlobals.SILVER_DOUBLE_BAND,140060: ItemGlobals.GOLDEN_DOUBLE_BAND,140061: ItemGlobals.SILVER_DOUBLE_BAND,150000: ItemGlobals.GOLDEN_BAND,150001: ItemGlobals.SILVER_BAND,150002: ItemGlobals.GOLDEN_RUBY_RING,150003: ItemGlobals.SILVER_RUBY_RING,150004: ItemGlobals.GOLDEN_AMETHIST_RING,150005: ItemGlobals.SILVER_AMETHIST_RING,150006: ItemGlobals.GOLDEN_SAPPHIRE_RING,150007: ItemGlobals.SILVER_SAPPHIRE_RING,150008: ItemGlobals.GOLDEN_TURQUOISE_RING,150009: ItemGlobals.SILVER_TURQUOISE_RING,150010: ItemGlobals.GOLDEN_EMERALD_RING,150011: ItemGlobals.SILVER_EMERALD_RING,150012: ItemGlobals.GOLDEN_ONYX_RING,150013: ItemGlobals.SILVER_ONYX_RING,150014: ItemGlobals.GOLDEN_BAND,150015: ItemGlobals.SILVER_BAND,150016: ItemGlobals.GOLDEN_RUBY_RING,150017: ItemGlobals.SILVER_RUBY_RING,150018: ItemGlobals.GOLDEN_AMETHIST_RING,150019: ItemGlobals.SILVER_AMETHIST_RING,150020: ItemGlobals.GOLDEN_SAPPHIRE_RING,150021: ItemGlobals.SILVER_SAPPHIRE_RING,150022: ItemGlobals.GOLDEN_TURQUOISE_RING,150023: ItemGlobals.SILVER_TURQUOISE_RING,150024: ItemGlobals.GOLDEN_EMERALD_RING,150025: ItemGlobals.SILVER_EMERALD_RING,150026: ItemGlobals.GOLDEN_ONYX_RING,150027: ItemGlobals.SILVER_ONYX_RING,150028: ItemGlobals.GOLDEN_BAND,150029: ItemGlobals.SILVER_BAND,150030: ItemGlobals.GOLDEN_RUBY_RING,150031: ItemGlobals.SILVER_RUBY_RING,150032: ItemGlobals.GOLDEN_AMETHIST_RING,150033: ItemGlobals.SILVER_AMETHIST_RING,150034: ItemGlobals.GOLDEN_SAPPHIRE_RING,150035: ItemGlobals.SILVER_SAPPHIRE_RING,150036: ItemGlobals.GOLDEN_TURQUOISE_RING,150037: ItemGlobals.SILVER_TURQUOISE_RING,150038: ItemGlobals.GOLDEN_EMERALD_RING,150039: ItemGlobals.SILVER_EMERALD_RING,150040: ItemGlobals.GOLDEN_ONYX_RING,150041: ItemGlobals.SILVER_ONYX_RING,150042: ItemGlobals.GOLDEN_BAND,150043: ItemGlobals.SILVER_BAND,150044: ItemGlobals.GOLDEN_RUBY_RING,150045: ItemGlobals.SILVER_RUBY_RING,150046: ItemGlobals.GOLDEN_AMETHIST_RING,150047: ItemGlobals.SILVER_AMETHIST_RING,150048: ItemGlobals.GOLDEN_SAPPHIRE_RING,150049: ItemGlobals.SILVER_SAPPHIRE_RING,150050: ItemGlobals.GOLDEN_TURQUOISE_RING,150051: ItemGlobals.SILVER_TURQUOISE_RING,150052: ItemGlobals.GOLDEN_EMERALD_RING,150053: ItemGlobals.SILVER_EMERALD_RING,150054: ItemGlobals.GOLDEN_ONYX_RING,150055: ItemGlobals.SILVER_ONYX_RING,150056: ItemGlobals.GOLDEN_DOUBLE_BAND,150057: ItemGlobals.SILVER_DOUBLE_BAND,150058: ItemGlobals.GOLDEN_DOUBLE_BAND,150059: ItemGlobals.SILVER_DOUBLE_BAND,150060: ItemGlobals.GOLDEN_DOUBLE_BAND,150061: ItemGlobals.SILVER_DOUBLE_BAND},InventoryType.ItemTypeConsumable: {InventoryType.Potion1: ItemGlobals.TONIC,InventoryType.Potion2: ItemGlobals.REMEDY,InventoryType.Potion3: ItemGlobals.HOLY_WATER,InventoryType.Potion4: ItemGlobals.ELIXIR,InventoryType.Potion5: ItemGlobals.MIRACLE_WATER,InventoryType.PorkChunk: ItemGlobals.ROAST_PORK}}
DYE_TRANSLATE_DICT = {ClothingGlobals.HAT: hatColorsOld,ClothingGlobals.SHIRT: clothesTopColorsOld,ClothingGlobals.VEST: clothesTopColorsOld,ClothingGlobals.COAT: clothesTopColorsOld,ClothingGlobals.PANT: clothesBotColorsOld,ClothingGlobals.BELT: clothesBotColorsOld,ClothingGlobals.SHOE: clothesBotColorsOld}

def findDyeColorFromDNAColor(gender, clothingType, colorIndex):
    oldColorTable = DYE_TRANSLATE_DICT[clothingType]
    if gender == 'f':
        colorValue = oldColorTable[1][colorIndex]
    else:
        colorValue = oldColorTable[0][colorIndex]
    for dyeColorIndex in range(len(DYE_COLORS)):
        dyeColor = DYE_COLORS[dyeColorIndex]
        if dyeColor == colorValue:
            return dyeColorIndex

    print 'Not found %s' % colorIndex
    import pdb
    pdb.set_trace()
    return -1


def printDyeTable():
    print 'DYE_TRANSLATION_DICT = {'
    for typeKey in DYE_TRANSLATE_DICT:
        print '\n    ClothingGlobals.%s : {' % ClothingGlobals.CLOTHING_STRING[typeKey]
        print "        'm' : {"
        table = DYE_TRANSLATE_DICT[typeKey]
        for entryIndex in range(len(table[0])):
            newIndex = findDyeColorFromDNAColor('m', typeKey, entryIndex)
            print '            %s : %s,' % (entryIndex, newIndex)

        print '            },'
        print "        'f' : {"
        table = DYE_TRANSLATE_DICT[typeKey]
        for entryIndex in range(len(table[1])):
            newIndex = findDyeColorFromDNAColor('f', typeKey, entryIndex)
            print '            %s : %s,' % (entryIndex, newIndex)

        print '            },'
        print '    },'

    print '}'


DYE_TRANSLATION_DICT = {ClothingGlobals.HAT: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 7,8: 8,9: 9,10: 10,11: 11,12: 12,13: 13,14: 14,15: 15,16: 16,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}},ClothingGlobals.SHIRT: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 7,8: 8,9: 9,10: 10,11: 11,12: 12,13: 13,14: 14,15: 15,16: 16,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}},ClothingGlobals.VEST: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 7,8: 8,9: 9,10: 10,11: 11,12: 12,13: 13,14: 14,15: 15,16: 16,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}},ClothingGlobals.COAT: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 7,8: 8,9: 9,10: 10,11: 11,12: 12,13: 13,14: 14,15: 15,16: 16,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}},ClothingGlobals.PANT: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 8,8: 42,9: 35,10: 10,11: 11,12: 12,13: 13,14: 15,15: 43,16: 44,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}},ClothingGlobals.BELT: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 8,8: 42,9: 35,10: 10,11: 11,12: 12,13: 13,14: 15,15: 43,16: 44,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}},ClothingGlobals.SHOE: {'m': {0: 0,1: 1,2: 2,3: 3,4: 4,5: 5,6: 6,7: 8,8: 42,9: 35,10: 10,11: 11,12: 12,13: 13,14: 15,15: 43,16: 44,17: 17,18: 18,19: 19,20: 20,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30},'f': {0: 0,1: 1,2: 2,3: 31,4: 32,5: 5,6: 33,7: 7,8: 34,9: 35,10: 36,11: 37,12: 12,13: 38,14: 14,15: 39,16: 18,17: 17,18: 40,19: 19,20: 41,21: 21,22: 22,23: 23,24: 24,25: 25,26: 26,27: 27,28: 28,29: 29,30: 30}}}

def printMaleJewelryDNAHashToOldIdTable():
    print '// InventoryExchange.printMaleJewelryDNAHashToOldIdTable()'
    print '// Hash: locationId*10000 + modelId * 100 + pColor*10 + sColor'
    print 'UINT32 MALE_JEWELRY_HASH_TABLE[] = {'
    count = 0
    for uniqueId, (modelId, location, desc, cost, pColor, sColor, restriction) in JewelryGlobals.jewelry_id.iteritems():
        if uniqueId < 80000:
            count += 1
            hash = getJewelryDNAHash(location, modelId, pColor, sColor)
            print '    %d, %d,' % (hash, uniqueId)

    print '};'
    print '//', count


def printFemaleJewelryDNAHashToOldIdTable():
    print '// InventoryExchange.printFemaleJewelryDNAHashToOldIdTable()'
    print '// Hash: locationId*10000 + modelId * 100 + pColor*10 + sColor'
    print 'UINT32 FEMALE_JEWELRY_HASH_TABLE[] = {'
    count = 0
    for uniqueId, (modelId, location, desc, cost, pColor, sColor, restriction) in JewelryGlobals.jewelry_id.iteritems():
        if uniqueId >= 80000:
            count += 1
            hash = getJewelryDNAHash(location, modelId, pColor, sColor)
            print '    %d, %d,' % (hash, uniqueId)

    print '};'
    print '//', count


def getJewelryDNAHash(location, modelId, pColor, sColor):
    return location * 10000 + modelId * 100 + pColor * 10 + sColor


def printJewelryTranslateTable():
    print '// InventoryExchange.printJewelryTranslateTable()'
    print 'UINT32 TRANSLATE_JEWELRY[] = {'
    for old, new in ITEM_EXCHANGE_DICT[InventoryType.ItemTypeJewelry].iteritems():
        print '    %d, %d,' % (old, new)

    print '};'


def printJewelryEquipLocations():
    print '// InventoryExchange.printJewelryEquipLocations()'
    print 'UINT8 JEWELRY_BODY_LOCATION_TO_EQUIP_LOCATION[] = {'
    for e, l in InventoryGlobals.Locations.JEWELRY_RANGE_TO_LOCATION.iteritems():
        print '    %d, %d,' % (l, e[0])

    print '};'


def printStackTranslationTable():
    print '// InventoryExchange.printStackTranslationTable()'
    print 'UINT16 TRANSLATE_STACKS[] = {'
    print '\n    // Weapons'
    for old, new in ITEM_EXCHANGE_DICT[InventoryType.ItemTypeWeapon].iteritems():
        print '    %d, %d,' % (old, new)

    print '\n    // Consumables'
    for old, new in ITEM_EXCHANGE_DICT[InventoryType.ItemTypeConsumable].iteritems():
        print '    %d, %d,' % (old, new)

    print '};'


def printTattooDNAHashtoOldIdTable():
    print '// InventoryExchange.printTattooDNAHashtoOldIdTable()'
    print '// Hash: textureId*10 + zoneId'
    print 'UINT16 TATTOO_HASH_TABLE[] = {'
    count = 0
    hashes = set()
    for uniqueId, (zoneId, textureId, type, desc, cost, maleOffsets, femaleOffsets, restriction) in TattooGlobals.tattoos.iteritems():
        count += 1
        hash = getTattooDNAHash(zoneId, textureId)
        hashes.add(hash)
        print '    %d, %d,' % (hash, uniqueId)

    print '};'
    print '//', count, len(hashes)


def getTattooDNAHash(zoneId, textureId):
    return textureId * 10 + zoneId


def printMaleTattooTranslateTable():
    print '// InventoryExchange.printMaleTattooTranslateTable()'
    print 'UINT32 TRANSLATE_MALE_TATTOOS[] = {'
    for old, new in ITEM_EXCHANGE_DICT[InventoryType.ItemTypeTattoo].iteritems():
        if isinstance(new, int):
            print '    %d, %d,' % (old, new)
        else:
            print '    %d, %d,' % (old, new['m'])

    print '};'


def printFemaleTattooTranslateTable():
    print '// InventoryExchange.printFemaleTattooTranslateTable()'
    print 'UINT32 TRANSLATE_FEMALE_TATTOOS[] = {'
    for old, new in ITEM_EXCHANGE_DICT[InventoryType.ItemTypeTattoo].iteritems():
        if isinstance(new, int):
            print '    %d, %d,' % (old, new)
        else:
            print '    %d, %d,' % (old, new['f'])

    print '};'


def printTattooEquipLocations():
    print '// InventoryExchange.printTattooEquipLocations()'
    print 'UINT16 TATTOO_ZONE_TO_EQUIP_LOCATION[] = {'
    for equip, zone in InventoryGlobals.Locations.TATTOO_RANGE_TO_LOCATION.iteritems():
        print '    %d, %d,' % (zone, equip[0])

    print '};'