I managed to add 3 type in essentials, so will be used in specific monsters (about 10)
could tell me how to add a shortcut on a hud I use?
've got to make when the mouse is on top works but I can not make the click go straight to the summary Monster
the script modified:
#===============================================================================
# * Simple HUD - by FL (Credits will be apreciated)
#===============================================================================
#
# This script is for Pokémon Essentials. It displays a simple HUD with the
# party icons and some small text.
#
#===============================================================================
#
# To this script works, put it above main.
#
#===============================================================================
class Spriteset_Map
USEBAR=true # Make as 'false' to don't show the blue bar
DRAWATBOTTOM=true # Make as 'true' to draw the HUD at bottom
UPDATESPERSECONDS=0.05 # More updates = more lag
alias :initializeoldFL :initialize
alias :disposeoldFL :dispose
alias :updateoldFL :update
def initialize(map=nil)
#------------------------------------------------------
t = Time.now
@time = t.strftime("%I:%M %p")
@date = t.strftime("%m/%d/%y")
@hud = []
@updateRate = (UPDATESPERSECONDS>0) ?
(Graphics.frame_rate/UPDATESPERSECONDS).floor : 0x3FFF
initializeoldFL(map)
createHud
mouseHud
end
def dispose
disposeoldFL
disposeHud
mouseHud
end
def update
updateoldFL
updateHud
mouseHud
end
def createHud
return if !$Trainer # Don't draw the hud if the player wasn't defined
yposition = DRAWATBOTTOM ? Graphics.height-64 : 0
@hud = []
if USEBAR # Draw the blue bar
bar=IconSprite.new(0,yposition,@viewport1)
bar.x = 0
bar.y = 0
bar.z = 0
bar.bitmap = RPG::Cache.picture("HUD")
@hud.push(bar)
end
#Draw the text
baseColor=Color.new(00,102,255)
shadowColor=Color.new(14,16,18)
@hud.push(BitmapSprite.new(Graphics.width,Graphics.height,@viewport1))
text1=(_INTL("{1}",@time))
text2=(_INTL("{1}",@date))
textPosition=[[text1,Graphics.width-50,yposition+10,2,baseColor,shadowColor],
[text2,Graphics.width-50,yposition+29,2,baseColor,shadowColor]]
pbSetSystemFont(@hud[-1].bitmap)
pbDrawTextPositions(@hud[-1].bitmap,textPosition)
# Draw the pokémon icons
for i in 0...$Trainer.party.size
pokeicon=IconSprite.new(80+52*i,yposition-8,@viewport1)
pokeicon.z=30
pokeicon.setBitmap(pbPokemonIconFile($Trainer.party
))
pokeicon.src_rect=Rect.new(0,0,64,64)
@hud.push(pokeicon)
end
#Adjust z of every @hud sprite
for sprite in @hud
sprite.z+=600
end
end
#------------------------------------------------
def updateHud
if (Graphics.frame_count%@updateRate==0 && [email protected]?)
disposeHud
createHud
end
for sprite in @hud
sprite.update
end
end
#---------------------------------------------------------
def disposeHud
for sprite in @hud
sprite.dispose
end
@hud.clear
end
#------------------------------------------------------------
end
#-------------------------------------------------------------
# Mouse
#-------------------------------------------------------------
def mouseHud
return if !$Trainer
@Buton01 = Sprite.new
@Buton01.bitmap=BitmapCache.picture("buton01")
@Buton01.x=414
@Buton01.y=1
@Buton01.z=0
@Buton01Monster = Sprite.new
@Buton01Monster.bitmap=BitmapCache.picture("buton01Monster")
@Buton01Monster.x=420
@Buton01Monster.y=20
@Buton01Monster.z=10
@Buton01Bestiary = Sprite.new
@Buton01Bestiary.bitmap=BitmapCache.picture("buton01Bestiary")
@Buton01Bestiary.x=485
@Buton01Bestiary.y=20
@Buton01Bestiary.z=10
@Buton01Bag = Sprite.new
@Buton01Bag.bitmap=BitmapCache.picture("buton01Bag")
@Buton01Bag.x=425
@Buton01Bag.y=48
@Buton01Bag.z=10
@Buton01Save = Sprite.new
@Buton01Save.bitmap=BitmapCache.picture("buton01Save")
@Buton01Save.x=485
@Buton01Save.y=50
@Buton01Save.z=10
@Buton01Card = Sprite.new
@Buton01Card.bitmap=BitmapCache.picture("buton01Card")
@Buton01Card.x=452
@Buton01Card.y=27
@Buton01Card.z=10
@Buton01Option = Sprite.new
@Buton01Option.bitmap=BitmapCache.picture("Conf")
@Buton01Option.x=1
@Buton01Option.y=1
@Buton01Option.z=10
if $DEBUG
@Buton01Debug = Sprite.new
@Buton01Debug.bitmap=BitmapCache.picture("Debug")
@Buton01Debug.x=1
@Buton01Debug.y=30
@Buton01Debug.z=10
end
#-------------------------------------------------------------------------------
if $Trainer.party.length>0
if $mouse.inArea?(420, 20, 25, 25)
@Buton01Monster.bitmap=BitmapCache.picture("buton01MonsterS")
if $mouse.inAreaLeft?(420, 20, 25, 25)
pbPlayDecisionSE()
sscene=PokemonScreen_Scene.new
sscreen=PokemonScreen.new(sscene,$Trainer.party)
hiddenmove=nil
pbFadeOutIn(99999) {
hiddenmove=sscreen.pbPokemonScreen
if hiddenmove
@scene.pbEndScene
end
}
end
end
end
if $Trainer.pokedex
if $mouse.inArea?(485, 20, 25, 25)
@Buton01Bestiary.bitmap=BitmapCache.picture("buton01BestiaryS")
if $mouse.inAreaLeft?(485, 20, 25, 25)
pbPlayDecisionSE()
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
}
end
end
end
if $mouse.inArea?(425, 48, 25, 25)
@Buton01Bag.bitmap=BitmapCache.picture("buton01BagS")
if $mouse.inAreaLeft?(425, 48, 25, 25)
pbPlayDecisionSE()
item=0
scene=PokemonBag_Scene.new
screen=PokemonBagScreen.new(scene,$PokemonBag)
pbFadeOutIn(99999) {
item=screen.pbStartScreen
if item>0
break
end
}
if item>0
Kernel.pbUseKeyItemInField(item)
return
end
end
end
if $mouse.inArea?(485, 50, 25, 25)
@Buton01Save.bitmap=BitmapCache.picture("buton01SaveS")
if $mouse.inAreaLeft?(485, 50, 25, 25)
pbPlayDecisionSE()
scene=PokemonSaveScene.new
screen=PokemonSave.new(scene)
if screen.pbSaveScreen
end
end
end
if $mouse.inArea?(452, 27, 25, 25)
@Buton01Card.bitmap=BitmapCache.picture("buton01CardS")
if $mouse.inAreaLeft?(452, 27, 25, 25)
pbPlayDecisionSE()
PBDebug.logonerr {
scene=PokemonTrainerCardScene.new
screen=PokemonTrainerCard.new(scene)
pbFadeOutIn(99999) {
screen.pbStartScreen
@scene.pbRefresh } }
end
end
if $mouse.inArea?(1, 1, 25, 25)
@Buton01Option.bitmap=BitmapCache.picture("ConfS")
if $mouse.inAreaLeft?(1, 1, 25, 25)
pbPlayDecisionSE()
pbFadeOutIn(99999){
scene=PokemonOptionScene.new
screen=PokemonOption.new(scene)
screen.pbStartScreen }
end
end
if $DEBUG
if $mouse.inArea?(1, 30, 25, 25)
@Buton01Debug.bitmap=BitmapCache.picture("DebugS")
if $mouse.inAreaLeft?(1, 30, 25, 25)
pbFadeOutIn(99999) {
pbDebugMenu
}
end
end
end
#-------------------------------------------------------------------------------
for i in 0...$Trainer.party.length
if $mouse.inArea?(80+52*i,313,55,64)
@Buton01Monster = Sprite.new
@Buton01Monster.bitmap=BitmapCache.picture("buton02Monster")
@Buton01Monster.x=80+52*i
@Buton01Monster.y=311
@Buton01Monster.z=0
# if $mouse.inAreaLeft?(80+52*i,313,55,64)
# pbPlayDecisionSE(
# pbSummary(pkmnid))
# end
end
end
#-------------------------------------------------------------------------------
end
last in the command module "$ mouse.in Area?" works usually want to know how to go pro click on summary.
thanks