MapleStory had a "cash shop" in 2004, not loot boxes. Very common design at the time, it was just an in-game store that only took real money in return for items. MS was actually somewhat famous at the time for having a fair, cosmetic-only cash shop (which has now since changed)[0].
PCGamer [1] puts "ZT Online", a Chinese MMO, as starting the lootbox trend in 2006.
[0]: Albeit, this is all coming from my experiences on the Global MapleStory servers. The Korean ones could have been different
[1]: https://www.pcgamer.com/the-evolution-of-loot-boxes/