• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Resource icon

Lantern Item [HM Item for Flash] 1

Pokémon Essentials Version
v19.1 ➖
Hi guys,

Have made a pretty simple resource that I decided to share. Allows you to add a Key Item that can brighten up caves. It's not perfect but it does the job!

In items.txt add the following:
Ruby:
Expand Collapse Copy
XXX,LANTERN,Lantern,Lanterns,8,0,"For brighting up dark areas.",2,0,6,
(Where XXX is your ItemId)

In the Script Editor within RPG Maker XP add the following to PItem_ItemEffects:
Ruby:
Expand Collapse Copy
ItemHandlers::UseFromBag.add(:LANTERN,proc{|item|
darkness = $PokemonTemp.darknessSprite
next false if !darkness || darkness.disposed?
   next 2
})

ItemHandlers::UseInField.add(:LANTERN,proc{|item|
  darkness = $PokemonTemp.darknessSprite
  next false if !darkness || darkness.disposed?
  pbMessage(_INTL("You took out your lantern!"))
  $PokemonGlobal.flashUsed = true
  radiusDiff = 8*20/Graphics.frame_rate
  while darkness.radius<darkness.radiusMax
    Graphics.update
    Input.update
    pbUpdateSceneMap
    darkness.radius += radiusDiff
    darkness.radius = darkness.radiusMax if darkness.radius>darkness.radiusMax
  end
  next true
  })

You can change the name of the LANTERN item by editing its internal name in the above scripts as well.

Here is a GIF of it in action:
lantern.gif


I've also included an icon graphic as well. Include it within Graphics/Icons/ with the name itemXXX.png (corresponding to item id in your PBS)
Credits
Rua
Maruno et al. Essentials Flash Script
ThatWelshOne_
  • item801.png
    item801.png
    2.4 KB · Views: 340
Author
Rua
Views
2,386
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from Rua

Latest reviews

Thank you very much. Easy to install. No headaches and is great for getting rid of HM's.
Back
Top