it can be done in several dozens of ways - if you post one of the ways your tried (screenshots of the events) then we can tell you what went wrong.
Basically you need two full-size pictures, one to make the map dark when the player has no match (completely dark with an opay depending on how much you want the player to see), and one to allow the player to see part of the map when the match is lit (center area transparent and only the parts outside the light radius black like the first picture.
Then use one common event called by the item to change the two pictures and start a second event that changes everything back after a specific time has passed.
Oh I'm aware of the standard way to do it. Sorry. I should have specified that I wanted to use Khas's Ultra Lighting system to do it, which I think is more complex than just swapping out images.
That's why I posted it in this Scripts forum and not in the standard one.
EDIT:
SOLVED. I figured out how to do it. It suddenly hit me like a ton of bricks. For those interested, here's what I did:
First, make a slight modification to the Lantern script, by commenting out this line:
Then, make two items: A match and a lit match.
Take note: First item is the one you want the player to use. The second one is never actually used by the player but replaces the first item when it is used. The match should call a common event, the Lit Match will be unusable but have the comment [light x] (where X is the type of light you want it to produce. I made a custom light called 'match' for this item).
(As a side note: If you don't want your player to spam matches from the inventory menu, make a conditional branch that checks to see if the Match Burn trigger is On, if it is, tell the player they cannot use another match because they already have a lit one. In the 'else' condition, run the following...)
The Match Common event should set up like this:
First it plays the sound effect of your match being used. This is optional, but I added it in.
Second, it removes the match item from the player's inventory and then adds the lit match item in it's place.
It then runs the script $game_player.refresh_lantern to actually make the light turn on.
Then you have to make a variable and a switch. The variable will be your burn timer - basically how long you want the match to burn for before it goes out.
Then a switch that turns the burn timer on. The burn timer itself is actually another custom event that looks like this:
Essentially what this event does is run parallel and is turned on when the Match Burn trigger is turned on. Since we set the Burn timer variable to 0 before turning on the switch, it will start counting at 0. Every 60 frames, or one second, it will add 1 to this variable. Once the Match Burn (our timer) gets to a specified amount, in this case 5 seconds, it will stop looping, turn the light off, destroy the lit match item and turn off the burn timer so that it can be used again.
(You can ignore the Total Items -=1 variable of this setup. I have my game keep track of how many items the player is currently carrying, and this variable simply lets my game know the player has lost an item.)
It works out well, and so far I have not ran into any bugs. So if anyone was curious how to make a temporary, automatic light source using the Khas Lighting package, this is how I got it to work.