- 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:
(Where XXX is your ItemId)
In the Script Editor within RPG Maker XP add the following to PItem_ItemEffects:
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:
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)
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:
XXX,LANTERN,Lantern,Lanterns,8,0,"For brighting up dark areas.",2,0,6,
In the Script Editor within RPG Maker XP add the following to PItem_ItemEffects:
Ruby:
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:
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_