Party Hat, Straw Hat, Cowboy Hat, Sombrero, Beanie starts with Hat Merchant in Inside Lutie (35, 30). The steps below are read from the quest's script on this server, in the order the script's quest stage moves through them.
Walkthrough

1 Talk to Hat Merchant in Inside Lutie (35, 30)
When Room in your inventory for what you get Choose “Party Hat” then “Yes.” Have with you 1 ×
Santa Hat, 100 ×
Oil Paper, 100 ×
Slick PaperIt takes 1 ×
Santa Hat, 100 ×
Oil Paper, 100 ×
Slick PaperYou get 1 ×
Party Hat; 10 ×
Fluff*Squick Squick Grind Grind*
*Swish Swish Rustle Rustle*
It's done! Your new life, as the life of the party, has officially begun. All you need to do is wear this Party Hat. Though, knowing a couple jokes would probably help too.
Oh by the way, there's some stuff left over. I guess you should hold onto it. You know, in case you need it later.
Script:
npc/quests/newgears/2004_headgears.txt:1493
2 Talk to Hat Merchant in Inside Lutie (35, 30)
When Room in your inventory for what you get Choose “Straw Hat” then “Yes.” Have with you 1 ×
Sakkat, 300 ×
Tough Vines, 300 ×
Piece of BambooIt takes 1 ×
Sakkat, 300 ×
Tough Vines, 300 ×
Piece of BambooYou get 1 ×
Straw Hat*Crunch Crunch Tap Tap*
It's done!
Now you can wear this hat, feel cool, and relax with style.
Please come again~
Script:
npc/quests/newgears/2004_headgears.txt:1549
3 Talk to Hat Merchant in Inside Lutie (35, 30)
When Room in your inventory for what you get Choose “Cowboy Hat” then “Yes.” Have with you 1 ×
Western Grace, 108 ×
Claw of Desert Wolf, 108 ×
Soft Blade of Grass, 4 ×
Burning HorseshoeIt takes 1 ×
Western Grace, 108 ×
Claw of Desert Wolf, 108 ×
Soft Blade of Grass, 4 ×
Burning HorseshoeYou get 1 ×
Cowboy Hat*Clik-clak Clik-clak Pam Pam Pam Pam*
*Bang Bang Ping Ping*
*Uk Uk Uk Uk Uhoh Uhoh*
Yeeeeehaw! With this hat on, you can tame broncos, rob stagecoaches, and look really stylish in duels!
Script:
npc/quests/newgears/2004_headgears.txt:1601
4 Talk to Hat Merchant in Inside Lutie (35, 30)
When Room in your inventory for what you get Choose “Sombrero” then “Yes.” Have with you 1 ×
Straw Hat, 50 ×
Cactus Needle, 1 ×
GuitarIt takes 1 ×
Straw Hat, 50 ×
Cactus Needle, 1 ×
GuitarYou get 1 ×
SombreroZinga Zinga Zang Zang
Ding Ding Ding Dan Dan Dan
Adios Amigo
With this Sombrero, you'll look like you have all kinds of style. Adios, cool guy~
Script:
npc/quests/newgears/2004_headgears.txt:1653
5 Talk to Hat Merchant in Inside Lutie (35, 30)
When Room in your inventory for what you get Choose “Beanie” then “Yes.” Have with you 1 ×
Cap, 500 ×
YarnIt takes 1 ×
Cap, 500 ×
YarnYou get 1 ×
Beanie*Crunch Crunch Tap Tap*
There you go! Your very own Beanie! Cute, but still 'dope!'
Uh! Uh!
I'm in da house!
Script:
npc/quests/newgears/2004_headgears.txt:1705
Rewards over the whole quest
1 ×
Party Hat; 10 ×
Fluff; 1 ×
Straw Hat; 1 ×
Cowboy Hat; 1 ×
Sombrero; 1 ×
Beanie
How this page is made: every step comes from the NPC scripts the server loads for Episode 13.2 (the file and line are under each step). "When" lists the checks the script makes before that branch runs; "Have with you" are the items it counts; experience from getexp is multiplied by the server's 50x quest rate. NPC lines are the script's own text.