This is the adventure command, which will give a lot of XP and coins.
To do the adventure command, you have to write rpg adventure or rpg adv for short. There is also adventure hardmode that unlocks at Area 14 which gives a ton of XP, coins, and a better chance to drop higher tier lootboxes; however, the damage output is staggeringly high.
If you die while doing an adventure, you lose 1 level. If you have a tier IV horse (or better) however, instead of dying and losing a level, your horse will save you and you will stay at 1 HP. You will not get any rewards for failed adventures.
So as long as you do not have a tier IV horse, always make sure to heal! Life Potions are rather cheap, so better be safe and heal more often.
BEWARE: When clearing a dungeon and entering an area which is a bit high for your current stats, adventures might one-shot you. If you think that might be the case, then better be safe and go back to a lower area in order to do adventures, and then return to the higher area for hunting by using the rpg area [area number] command. Generally a rule of thumb it's that if you are able to survive 3 hunts consecutive without healing, you will survive the adventure of that area.
The damage you receive from adventure is reduced by your AT and DEF stats. 1 more point in one of those means 1 less damage taken. Thus, it is possible to take 0 damage from adventure if your stats are high enough.
In addition, there is a chance to get a lootbox from adventures. Each lootbox tier is rarer than the previous tier. Most lootboxes will be common and uncommon or maybe even a rare lootbox, although higher tier lootboxes become rarer or even EXTREMELY rare. If you get a lootbox, open it with rpg open (lootbox type) (amount).