1550s, "preserved in a pickle sauce," past-participle adjective from pickle (v.). From 1690s as "roguish;" the slang figurative sense of "drunk" is attested by 1900, American English.
"pertaining to or dealing with rogues or knaves and their adventures," especially in literary productions, 1810, from Spanish picaresco "roguish," from picaro "rogue," a word of uncertain origin, possibly from picar "to pierce," from Vulgar Latin *piccare (see pike (n.1)). Originally in roman picaresque "rogue novel," the classic example being "Gil Blas."
early 15c., "a cheat, a mean ruse," from Old North French trique "trick, deceit, treachery, cheating," from trikier "to deceive, to cheat," variant of Old French trichier "to cheat, trick, deceive," of uncertain origin, probably from Vulgar Latin *triccare, from Latin tricari "be evasive, shuffle," from tricæ "trifles, nonsense, a tangle of difficulties," of unknown origin.
Meaning "a roguish prank" is recorded from 1580s; sense of "the art of doing something" is first attested 1610s. Meaning "prostitute's client" is first attested 1915; earlier it was U.S. slang for "a robbery" (1865).
To do the trick "accomplish one's purpose" is from 1812; to miss a trick "fail to take advantage of opportunity" is from 1889; from 1872 in reference to playing the card-game of whist, which might be the original literal sense. Trick-or-treat as a children's Halloween pastime is recorded from 1927 in Canada. Trick question is from 1907.
"excellent, fine, good, valuable," canting slang, 1560s, also rome, "fine," said to be from Romany rom "male, husband" (see Romany). A very common 16c. cant word (opposed to queer), as in rum kicks "Breeches of gold or silver brocade, or richly laced with gold or silver" [Grose, "Dictionary of the Vulgar Tongue," 1785].
By 1774 it also had come to mean rather the opposite: "odd, strange, bad, queer, spurious," perhaps because it had been so often used approvingly by rogues in reference to one another. Or perhaps this is a different word. This was the main sense after c. 1800.
Rom (or rum) and quier (or queer) enter largely into combination, thus--rom = gallant, fine, clever, excellent, strong; rom-bouse = wine or strong drink; rum-bite = a clever trick or fraud; rum-blowen = a handsome mistress; rum-bung = a full purse; rum-diver = a clever pickpocket; rum-padder = a well-mounted highwayman, etc.: also queere = base, roguish; queer-bung = an empty purse; queer-cole = bad money; queer-diver = a bungling pickpocket; queer-ken = a prison; queer-mort = a foundered whore, and so forth. [John S. Farmer, "Musa Pedestris," 1896]