I too was wondering if I could make a room reset, and I think I've just about solved it! The good news is it's a generic, scalable-to-many-rooms solution that technically works, the bad news is each room takes roughly 37.5 seconds (I think) to load because it resets the room at a rate of 1 tile every 2 frames 
+ Resetting rooms are completely reset on reentry regardless of what item, sprite or world tile changes have been made
+ Exits into a resetting room work as-is
- Exits out of a resetting room don't work (due to the room layout being duplicated on load into an empty room) so any exits in a resetting room need to be done in code with gotos
- Each resetting room takes an entirely impractical amount of time to load!
Here is all the code you need:
In the game
script add this custom event:
on resetRoom do
if resetting==0 then
ignore
destroom = event.room
destx = event.px
desty = event.py
resetting = 1
resetx = 0
resety = 0
end
if resety==15 then
resetx += 1
resety = 0
end
if resetx<25 then
resettile = name resetx,resety
goto destx,desty in "main"
else
listen
resetting = 0
goto destx,desty in "main"
end
end
Create an empty room called main
- this is the room that the resetting rooms are actually copied into during loading - and add this event handler to its script:
on enter do
if resetting==1 then
tell resetx,resety to
swap resettile
end
resety += 1
goto destx,desty in destroom
end
end
Finally, for every room you want to be resettable, add this event handler to the room script:
on enter do
tell event.game to
call "resetRoom"
end
end
Now this looks like an absolute mess when loading, so I covered it all up with a simple loading screen, complete with percentage loaded (which you really need given how long it takes!). Just add this event handler to the player
script:
on draw do
if resetting==1 then
hide
window at 0,0,25,15
resetpercent = resetx
resetpercent *= 15
resetpercent += resety
resetpercent /= 375
resetpercent *= 100
resetpercent = round resetpercent
label "LOADING {resetpercent}%" at 7,7
end
end
Quite neat? I think so. Entirely impractical? Absolutely! That's because it is limited to loading one tile every 2 frames by the constant gotos back-and-forth between the room to be loaded and the main room it is loaded in to.
I think an actually useful version could be made in principle if an independent variable was used to store the tilename for every room tile, but that's 375 tiles that have to be hardcoded rather than using a loop like I do here, so it certainly wouldn't be as neat...
Here's a zip of the json of a demo you can load into pulp:
Resettable Rooms Demo.zip (2.5 KB)