• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
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,392
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