- 6
- Posts
- 8
- Years
- Germany, Hessen
- Seen Jul 14, 2016
Hello,
I have a little problem with this IV/EV script from the wiki
It doesnt show them in the correct spot. Also I only have 5 tabs instead of 6
https://i.imgur.com/TvQr00F.png
Thats in my PScreen_Summary
I dont get any error messages. so I think Ive edited everything else right. Im start learning Java and you have to put in the x and y coordinates for a text and I hope the same thing is in Ruby :D so if any1 could tell me where it says x and y then i can edit it ^^ i didnt know where to post it sry if its in the wrong sub forum ^^
Script from:
https://pokemonessentials.wikia.com/wiki/Tutorial:View_IV/EV_on_Pokemon_Summary
greetings,
crispybutt
I have a little problem with this IV/EV script from the wiki
It doesnt show them in the correct spot. Also I only have 5 tabs instead of 6
https://i.imgur.com/TvQr00F.png
Thats in my PScreen_Summary
Spoiler:
######################################################################
#########
#IV PAGE#
#########
######################################################################
def drawPageFour(pokemon)
overlay=@sprites["overlay"].bitmap
overlay.clear
@sprites["background"].setBitmap("Graphics/Pictures/summary3")
imagepos=[]
if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
status=6 if pbPokerus(pokemon)==1
[email protected] if @pokemon.status>0
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
end
if pokemon.isShiny?
imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
end
if pbPokerus(pokemon)==2
imagepos.push([sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
end
[email protected] ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
imagepos.push([ballimage,14,60,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
base=Color.new(248,248,248)
shadow=Color.new(104,104,104)
statshadows=[]
for i in 0...5; statshadows=shadow; end
if !(pokemon.isShadow? rescue false) || pokemon.heartStage<=3
natup=(pokemon.nature/5).floor
natdn=(pokemon.nature%5).floor
statshadows[natup]=Color.new(136,96,72) if natup!=natdn
statshadows[natdn]=Color.new(64,120,152) if natup!=natdn
end
pbSetSystemFont(overlay)
abilityname=PBAbilities.getName(pokemon.ability)
abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
itemname=pokemon.item==0 ? _INTL("None") : PBItems.getName(pokemon.item)
[email protected]
if @pokemon.name.split().last=="♂" || @pokemon.name.split().last=="♀"
[email protected][0..-2]
end
textpos=[
[_INTL("EV & IV"),84,4,0,base,shadow],
[pokename,68,72,0,base,shadow],
[_INTL("Lv. {1}",pokemon.level),42,104,0,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Item"),6,417,0,base,shadow],
[itemname,130,417,0,base,shadow],
[_INTL("HP"),398,92,2,base,shadow],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[0],pokemon.iv[0]),562,90,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Attack"),358,140,0,base,statshadows[0]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[1],pokemon.iv[1]),560,140,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Defense"),358,172,0,base,statshadows[1]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[2],pokemon.iv[2]),560,172,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Atk."),358,204,0,base,statshadows[3]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[4],pokemon.iv[4]),560,204,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Def."),358,236,0,base,statshadows[4]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[5],pokemon.iv[5]),560,236,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Speed"),358,268,0,base,statshadows[2]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[3],pokemon.iv[3]),560,268,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Ability"),312,314,0,base,shadow],
[abilityname,418,314,0,Color.new(64,64,64),Color.new(176,176,176)],
]
if pokemon.gender==0
textpos.push([_INTL("♂"),178,62,0,Color.new(24,112,216),Color.new(136,168,208)])
elsif pokemon.gender==1
textpos.push([_INTL("♀"),178,62,0,Color.new(248,56,32),Color.new(224,152,144)])
end
pbDrawTextPositions(overlay,textpos)
drawTextEx(overlay,224,316,282,2,abilitydesc,Color.new(64,64,64),Color.new(176,176,176))
drawMarkings(overlay,15,291,72,20,pokemon.markings)
if pokemon.hp>0
hpcolors=[
Color.new(24,192,32),Color.new(0,144,0), # Green
Color.new(248,184,0),Color.new(184,112,0), # Orange
Color.new(240,80,32),Color.new(168,48,56) # Red
]
hpzone=0
hpzone=1 if pokemon.hp<=(@pokemon.totalhp/2).floor
hpzone=2 if pokemon.hp<=(@pokemon.totalhp/4).floor
overlay.fill_rect(360,110,pokemon.hp*96/pokemon.totalhp,2,hpcolors[hpzone*2+1])
overlay.fill_rect(360,112,pokemon.hp*96/pokemon.totalhp,4,hpcolors[hpzone*2])
end
end
################################################################
#########
#IV PAGE#
#########
######################################################################
def drawPageFour(pokemon)
overlay=@sprites["overlay"].bitmap
overlay.clear
@sprites["background"].setBitmap("Graphics/Pictures/summary3")
imagepos=[]
if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
status=6 if pbPokerus(pokemon)==1
[email protected] if @pokemon.status>0
status=5 if pokemon.hp==0
imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
end
if pokemon.isShiny?
imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
end
if pbPokerus(pokemon)==2
imagepos.push([sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
end
[email protected] ? @pokemon.ballused : 0
ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
imagepos.push([ballimage,14,60,0,0,-1,-1])
pbDrawImagePositions(overlay,imagepos)
base=Color.new(248,248,248)
shadow=Color.new(104,104,104)
statshadows=[]
for i in 0...5; statshadows=shadow; end
if !(pokemon.isShadow? rescue false) || pokemon.heartStage<=3
natup=(pokemon.nature/5).floor
natdn=(pokemon.nature%5).floor
statshadows[natup]=Color.new(136,96,72) if natup!=natdn
statshadows[natdn]=Color.new(64,120,152) if natup!=natdn
end
pbSetSystemFont(overlay)
abilityname=PBAbilities.getName(pokemon.ability)
abilitydesc=pbGetMessage(MessageTypes::AbilityDescs,pokemon.ability)
itemname=pokemon.item==0 ? _INTL("None") : PBItems.getName(pokemon.item)
[email protected]
if @pokemon.name.split().last=="♂" || @pokemon.name.split().last=="♀"
[email protected][0..-2]
end
textpos=[
[_INTL("EV & IV"),84,4,0,base,shadow],
[pokename,68,72,0,base,shadow],
[_INTL("Lv. {1}",pokemon.level),42,104,0,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Item"),6,417,0,base,shadow],
[itemname,130,417,0,base,shadow],
[_INTL("HP"),398,92,2,base,shadow],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[0],pokemon.iv[0]),562,90,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Attack"),358,140,0,base,statshadows[0]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[1],pokemon.iv[1]),560,140,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Defense"),358,172,0,base,statshadows[1]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[2],pokemon.iv[2]),560,172,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Atk."),358,204,0,base,statshadows[3]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[4],pokemon.iv[4]),560,204,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Def."),358,236,0,base,statshadows[4]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[5],pokemon.iv[5]),560,236,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Speed"),358,268,0,base,statshadows[2]],
[_ISPRINTF("{1:3d}/{2:3d}",pokemon.ev[3],pokemon.iv[3]),560,268,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Ability"),312,314,0,base,shadow],
[abilityname,418,314,0,Color.new(64,64,64),Color.new(176,176,176)],
]
if pokemon.gender==0
textpos.push([_INTL("♂"),178,62,0,Color.new(24,112,216),Color.new(136,168,208)])
elsif pokemon.gender==1
textpos.push([_INTL("♀"),178,62,0,Color.new(248,56,32),Color.new(224,152,144)])
end
pbDrawTextPositions(overlay,textpos)
drawTextEx(overlay,224,316,282,2,abilitydesc,Color.new(64,64,64),Color.new(176,176,176))
drawMarkings(overlay,15,291,72,20,pokemon.markings)
if pokemon.hp>0
hpcolors=[
Color.new(24,192,32),Color.new(0,144,0), # Green
Color.new(248,184,0),Color.new(184,112,0), # Orange
Color.new(240,80,32),Color.new(168,48,56) # Red
]
hpzone=0
hpzone=1 if pokemon.hp<=(@pokemon.totalhp/2).floor
hpzone=2 if pokemon.hp<=(@pokemon.totalhp/4).floor
overlay.fill_rect(360,110,pokemon.hp*96/pokemon.totalhp,2,hpcolors[hpzone*2+1])
overlay.fill_rect(360,112,pokemon.hp*96/pokemon.totalhp,4,hpcolors[hpzone*2])
end
end
################################################################
I dont get any error messages. so I think Ive edited everything else right. Im start learning Java and you have to put in the x and y coordinates for a text and I hope the same thing is in Ruby :D so if any1 could tell me where it says x and y then i can edit it ^^ i didnt know where to post it sry if its in the wrong sub forum ^^
Script from:
https://pokemonessentials.wikia.com/wiki/Tutorial:View_IV/EV_on_Pokemon_Summary
greetings,
crispybutt
Last edited: