Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Reload this Page [Essentials script] Diamond And Pearl Battle System-CNG

Notices
For all updates, view the main page.

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.



Reply
 
Thread Tools
  #1    
Old August 10th, 2010 (10:20 AM). Edited August 10th, 2010 by nmorr.
nmorr's Avatar
nmorr nmorr is offline
Takin a brake. -_-
 
Join Date: May 2009
Location: Poke City
Age: 19
Gender: Male
Nature: Jolly
Posts: 215
This is a dual screen system created by CNG for his game, here's a quote from him.

Quote:
Well due to the shutdown of Pokemon Twilight, i've decided to release the first version of the battle system.
It's a Diamond/Pearl battle system, fully mouse controlled.

Demo Video:
http://www.youtube.com/watch?v=Vh-eL7gKBgI&feature=player_embedded

Quote:
Just put the scripts in new script sections above main, and the pictures into the Graphics/Pictures folder. And give credit if used!

Must be used with my dual screen system, found here:http://www.planetdev.net/index.php?showtopic=148

Battle System-
http://www.mediafire.com/?hgbay2h3dmi

EXSCLUSIVELY FOR PLANETDEV.
Remember to give credit to CNG, and here's the official thread,
http://www.planetdev.net/index.php?showtopic=448
__________________
This signature has been disabled.
Spoiler tags in Signatures are not allowed
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #2    
Old August 10th, 2010 (10:56 AM).
Crazyninjaguy's Avatar
Crazyninjaguy Crazyninjaguy is offline
I'm back.
 
Join Date: May 2008
Location: England
Age: 23
Gender: Male
Posts: 663
Please read the last line that you quoted.
I don't like to say things like this, but i said exclusively for PlanetDev as i wanted my members to get it first.
__________________
PlanetDev - Game Development Community
Reply With Quote
  #3    
Old August 10th, 2010 (11:08 AM).
carmaniac's Avatar
carmaniac carmaniac is offline
Where the pickle surprise at?
 
Join Date: Apr 2009
Location: England
Age: 20
Nature: Relaxed
Posts: 682
Lmao, is this not the second time now that nmorr has posted a script from planet dev exclusives?
__________________

Pokémon: Lost Souls.







Developed by Carmaniac.


Quote originally posted by Luka S.J.:
My balls seem to be fine.
Reply With Quote
  #4    
Old August 10th, 2010 (11:58 AM).
nmorr's Avatar
nmorr nmorr is offline
Takin a brake. -_-
 
Join Date: May 2009
Location: Poke City
Age: 19
Gender: Male
Nature: Jolly
Posts: 215
Seriously, dang...emarassing. Alright, I'll remove it.

@Carmaniac: No, this is the first time...I think lol.
__________________
This signature has been disabled.
Spoiler tags in Signatures are not allowed
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #5    
Old August 10th, 2010 (01:01 PM).
Crazyninjaguy's Avatar
Crazyninjaguy Crazyninjaguy is offline
I'm back.
 
Join Date: May 2008
Location: England
Age: 23
Gender: Male
Posts: 663
Nono it's fine now, people already have it, but next time just read the post a little more carefully

I usually release all of my scripts to my website only, and then others after a week or so.
__________________
PlanetDev - Game Development Community
Reply With Quote
  #6    
Old August 11th, 2010 (10:35 AM).
nmorr's Avatar
nmorr nmorr is offline
Takin a brake. -_-
 
Join Date: May 2009
Location: Poke City
Age: 19
Gender: Male
Nature: Jolly
Posts: 215
Oh, Okay, srry. I'll let u do it from now on.
__________________
This signature has been disabled.
Spoiler tags in Signatures are not allowed
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #7    
Old August 11th, 2010 (11:58 AM).
Meowth's Avatar
Meowth Meowth is offline
That's Right!
Silver Tier
 
Join Date: Jan 2007
Location: New England
Age: 24
Gender: Male
Nature: Impish
Posts: 1,157
Send a message via AIM to Meowth Send a message via Windows Live Messenger to Meowth
Well, since it's up... can we ask questions about it? :O Like, make an official thread or something maybe..?
__________________
Reply With Quote
  #8    
Old August 11th, 2010 (12:06 PM).
Crazyninjaguy's Avatar
Crazyninjaguy Crazyninjaguy is offline
I'm back.
 
Join Date: May 2008
Location: England
Age: 23
Gender: Male
Posts: 663
Well there's not much point making a whole new thread lol, just ask away in here and i'll try my best to answer.
__________________
PlanetDev - Game Development Community
Reply With Quote
  #9    
Old August 11th, 2010 (01:02 PM).
Meowth's Avatar
Meowth Meowth is offline
That's Right!
Silver Tier
 
Join Date: Jan 2007
Location: New England
Age: 24
Gender: Male
Nature: Impish
Posts: 1,157
Send a message via AIM to Meowth Send a message via Windows Live Messenger to Meowth
I see. Well I'm noticing it isn't working with my version of Essentials... D;
__________________
Reply With Quote
  #10    
Old August 12th, 2010 (08:26 AM).
nmorr's Avatar
nmorr nmorr is offline
Takin a brake. -_-
 
Join Date: May 2009
Location: Poke City
Age: 19
Gender: Male
Nature: Jolly
Posts: 215
I'm using the may 7 version and it works perfectly fine for me. What version r u using?
__________________
This signature has been disabled.
Spoiler tags in Signatures are not allowed
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #11    
Old August 12th, 2010 (12:09 PM). Edited August 12th, 2010 by ashthebest10.
ashthebest10's Avatar
ashthebest10 ashthebest10 is offline
Creator of Pocket Monsters
 
Join Date: May 2010
Location: L.A. Cali
Gender: Male
Nature: Adamant
Posts: 81
I get this error when the battle starts. I am using Luka's animated pokemon script so I dont know if this may be causing the error, but I would appriciate some help. Thanks!

Exception: NoMethodError
Message: undefined method `bitmap' for #<BitmapWrapper:0x72af890>
DP Battle:343:in `setPokemonBitmap'
DP Battle:1545:in `pbStartBattle'
PokeBattle_Battle:585:in `pbStartBattleCore'
PokeBattle_Battle:493:in `pbStartBattle'
PokemonField:766:in `pbWildBattle'
PokemonField:765:in `pbSceneStandby'
PokemonField:767:in `pbWildBattle'
PokemonField:764:in `pbBattleAnimation'
PokemonField:764:in `pbWildBattle'
PokemonField:1103:in `pbBattleOnStepTaken'

EDIT: Okay I removed the Animation script and it works great! Any suggestions on how to add Luka's Animation script? Maybe try adding it now?

EDIT AGAIN!: Sorry, but i readded the animation script after the DP PT battle and it works now. I'm having trouble with the dual screen. sometimes when I move a certain way parts of the top screen will appear on the bottom or the bottom screen shows the below map all together. IDK whats wrong but if anyone has had this problem please help me. Thanks!
__________________
Hi, and good bye, and then hi again.
Reply With Quote
  #12    
Old August 12th, 2010 (12:14 PM).
Yuoaman's Avatar
Yuoaman Yuoaman is offline
Legen- wait for it...
Silver Tier
 
Join Date: Jul 2005
Location: Ontario, Canada
Age: 23
Gender: Male
Nature: Relaxed
Posts: 4,673
Moving this to the Resource Center, where it might fit a little better.
__________________

Suit Up!
Awesome REGULAR MEMBER THAT OCCASIONALLY FREQUENTS FORUMS.

"pps new screenie" - No, really shut up yuoaman.

Haaave you read my LP?
Pokémon Quartz - The only one of mine really worth reading.

What about my [Un]Abridged series?
Aquaman the Unabridged Parody Series - Language warning.

The Playbook: My Anime List | Raptr | BackLoggery | Twitter


83% of this signature is empty space.

-dary!
Reply With Quote
  #13    
Old August 15th, 2010 (04:49 AM).
pokemad's Avatar
pokemad pokemad is offline
Self taught hacker
 
Join Date: Jun 2008
Age: 21
Gender:
Nature: Gentle
Posts: 20
Great.
Any way to stop the cursor from freezing in position while not battling
Reply With Quote
  #14    
Old August 15th, 2010 (12:25 PM).
zingzags's Avatar
zingzags zingzags is offline
PokemonGDX creator
 
Join Date: Jan 2009
Location: Boston
Age: 21
Nature: Adamant
Posts: 560
Quote originally posted by pokemad:
Great.
Any way to stop the cursor from freezing in position while not battling
thats more advance stuff, you need to learn about the updates and etc....
For example

Graphics.update
Input.update
Mouse.update

its required for CNG Dual Screen and Mouse Module.
__________________
Check out the Pokemon Game Engine I am working on:
https://github.com/sjosegarcia/Pokemon
Reply With Quote
  #15    
Old August 15th, 2010 (06:20 PM).
DarkDragonn's Avatar
DarkDragonn DarkDragonn is offline
 
Join Date: Aug 2009
Gender: Male
Nature: Adamant
Posts: 19
Great script Crazyninjaguy, this will be usefull for alot of people including me xD
__________________
My deviantart: http://darkdragonn.deviantart.com/
Reply With Quote
  #16    
Old August 16th, 2010 (01:24 AM).
Crazyninjaguy's Avatar
Crazyninjaguy Crazyninjaguy is offline
I'm back.
 
Join Date: May 2008
Location: England
Age: 23
Gender: Male
Posts: 663
Np

If you're having trouble with this script, please do not use it until i've made it work with the newest version of essentials.
__________________
PlanetDev - Game Development Community
Reply With Quote
  #17    
Old August 16th, 2010 (05:43 AM).
zingzags's Avatar
zingzags zingzags is offline
PokemonGDX creator
 
Join Date: Jan 2009
Location: Boston
Age: 21
Nature: Adamant
Posts: 560
This script is working perfectly with the new essentials im using the may 7th, and the only problem is the icon remove delay on the pokemon. Other than that it is working fine.
__________________
Check out the Pokemon Game Engine I am working on:
https://github.com/sjosegarcia/Pokemon
Reply With Quote
  #18    
Old August 16th, 2010 (06:15 AM).
nmorr's Avatar
nmorr nmorr is offline
Takin a brake. -_-
 
Join Date: May 2009
Location: Poke City
Age: 19
Gender: Male
Nature: Jolly
Posts: 215
I agree, though the icon remove delay isn't really such a big deal. In the actual Pokemon Diamond and Pearl, after you tapped attack, the screen delayed for a second.
__________________
This signature has been disabled.
Spoiler tags in Signatures are not allowed
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #19    
Old August 16th, 2010 (07:37 AM). Edited August 16th, 2010 by zingzags.
zingzags's Avatar
zingzags zingzags is offline
PokemonGDX creator
 
Join Date: Jan 2009
Location: Boston
Age: 21
Nature: Adamant
Posts: 560
Well i found something else, I seen the double battle, and I was wondering how do you move the double battle command box that came with piccol.
__________________
Check out the Pokemon Game Engine I am working on:
https://github.com/sjosegarcia/Pokemon
Reply With Quote
  #20    
Old August 16th, 2010 (08:46 AM).
nmorr's Avatar
nmorr nmorr is offline
Takin a brake. -_-
 
Join Date: May 2009
Location: Poke City
Age: 19
Gender: Male
Nature: Jolly
Posts: 215
Quote originally posted by zingzags:
Well i found something else, I seen the double battle, and I was wondering how do you move the double battle command box that came with piccol.
Yeah, I noticed that too. Except I can't find a way to change it. Any help CNG?
__________________
This signature has been disabled.
Spoiler tags in Signatures are not allowed
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #21    
Old August 16th, 2010 (09:21 AM).
Crazyninjaguy's Avatar
Crazyninjaguy Crazyninjaguy is offline
I'm back.
 
Join Date: May 2008
Location: England
Age: 23
Gender: Male
Posts: 663
As i said four posts above,

Quote originally posted by Crazyninjaguy:
If you're having trouble with this script, please do not use it until i've made it work with the newest version of essentials.
__________________
PlanetDev - Game Development Community
Reply With Quote
  #22    
Old August 16th, 2010 (09:38 AM). Edited August 16th, 2010 by zingzags.
zingzags's Avatar
zingzags zingzags is offline
PokemonGDX creator
 
Join Date: Jan 2009
Location: Boston
Age: 21
Nature: Adamant
Posts: 560
LMao sorry i didnt notice , ill try to fix it brb looking throught 5000 line + of code
__________________
Check out the Pokemon Game Engine I am working on:
https://github.com/sjosegarcia/Pokemon
Reply With Quote
  #23    
Old August 18th, 2010 (11:41 AM).
lark125 lark125 is offline
 
Join Date: Apr 2008
Posts: 33
heey can anyone please help me with somthing i crasyninjaguy's dualscreen and mous input script and now i want to make a touchable menu but its not working for me if i use his tutorial for a touchable menu and this is how it the scripts looks like
Spoiler:
class PokemonMenu_Scene
def pbShowCommands(commands)
ret=-1
cmdwindow=@sprites["cmdwindow"]
cmdwindow.viewport=@viewport
cmdwindow.index=$PokemonTemp.menuLastChoice
cmdwindow.resizeToFit(commands)
cmdwindow.commands=commands
cmdwindow.x=Graphics.width-cmdwindow.width
cmdwindow.y=0
cmdwindow.visible=true
loop do
cmdwindow.update
Graphics.update
Input.update
pbUpdateSceneMap
Mouse.update
$mouse.x = Mouse.pos_x
$mouse.y = Mouse.pos_y
if Input.trigger?(Input::B)
ret=-1
break
end
if Input.trigger?(Input::C)
ret=cmdwindow.index
$PokemonTemp.menuLastChoice=ret
break
end
end
return ret
end
def pbShowInfo(text)
@sprites["infowindow"].resizeToFit(text,Graphics.height)
@sprites["infowindow"].text=text
@sprites["infowindow"].visible=true
@infostate=true
end
def pbShowHelp(text)
@sprites["helpwindow"].resizeToFit(text,Graphics.height)
@sprites["helpwindow"].text=text
@sprites["helpwindow"].visible=true
@helpstate=true
pbBottomLeft(@sprites["helpwindow"])
end
def pbStartScene
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites={}
@sprites["cmdwindow"]=Window_CommandPokemon.new([])
@sprites["menu-bag"]=IconSprite.new(0, 360)
@sprites["menu-bag"].setBitmap("Graphics/Pictures/menu-bag.png")
@sprites["infowindow"]=Window_UnformattedTextPokemon.newWithSize("",0,0,32,32,@viewport)
@sprites["infowindow"].visible=false
@sprites["helpwindow"]=Window_UnformattedTextPokemon.newWithSize("",0,0,32,32,@viewport)
@sprites["helpwindow"].visible=false
@sprites["cmdwindow"].visible=false
@infostate=false
@helpstate=false
pbSEPlay("menu")
end
def pbHideMenu
@sprites["cmdwindow"].visible=false
@sprites["infowindow"].visible=false
@sprites["helpwindow"].visible=false
end
def pbShowMenu
@sprites["cmdwindow"].visible=true
@sprites["infowindow"].visible=@infostate
@sprites["helpwindow"].visible=@helpstate
end
def pbEndScene
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end
def pbRefresh
end
end

class PokemonMenu
def initialize(scene)
@scene=scene
end
def pbShowMenu
@scene.pbRefresh
@scene.pbShowMenu
end
def pbStartPokemonMenu
@scene.pbStartScene
endscene=true
commands=[]
cmdPokedex=-1
cmdPokemon=-1
cmdBag=-1
cmdTrainer=-1
cmdSave=-1
cmdOption=-1
cmdPokegear=-1
cmdDebug=-1
cmdQuit=-1
if !$Trainer
if $DEBUG
Kernel.pbMessage(_INTL("The player trainer was not defined, so the menu can't be displayed."))
Kernel.pbMessage(_INTL("Please see the documentation to learn how to set up the trainer player."))
end
return
end
commands[cmdPokedex=commands.length]=_INTL("POKéDEX") if $Trainer.pokedex
commands[cmdPokemon=commands.length]=_INTL("POKéMON") if $Trainer.party.length>0
commands[cmdBag=commands.length]=_INTL("BAG") if !pbInBugContest?
commands[cmdPokegear=commands.length]=_INTL("POKéGEAR") if $Trainer.pokegear
commands[cmdTrainer=commands.length]=$Trainer.name
if pbInSafari?
@scene.pbShowInfo(_INTL("STEPS: {1}/600\nBALLS: {2}",pbSafariState.steps,pbSafariState.ballcount))
commands[cmdQuit=commands.length]=_INTL("QUIT")
elsif pbInBugContest?
if pbBugContestState.lastPokemon
@scene.pbShowInfo(_INTL("CAUGHT: {1}\nLEVEL: {2}\nBALLS: {3}",
PBSpecies.getName(pbBugContestState.lastPokemon.species),
pbBugContestState.lastPokemon.level,
pbBugContestState.ballcount))
else
@scene.pbShowInfo(_INTL("CAUGHT: None\nBALLS: {1}",pbBugContestState.ballcount))
end
commands[cmdQuit=commands.length]=_INTL("QUIT")
else
commands[cmdSave=commands.length]=_INTL("SAVE") if !$game_system || !$game_system.save_disabled
end
commands[cmdOption=commands.length]=_INTL("OPTION")
commands[cmdDebug=commands.length]=_INTL("DEBUG") if $DEBUG
commands[commands.length]=_INTL("EXIT")
loop do
if Mouse.mouse_in_area?(0, 360, 60, 39)
if Mouse.click?(1)
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
@scene.pbRefresh
}
end
end
command=@scene.pbShowCommands(commands)
if cmdPokedex>=0 && command==cmdPokedex
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
@scene.pbRefresh
}
elsif cmdPokegear>=0 && command==cmdPokegear
pbLoadRpgxpScene(Scene_Pokegear.new)
elsif cmdPokemon>=0 && command==cmdPokemon
sscene=PokemonScreen_Scene.new
sscreen=PokemonScreen.new(sscene,$Trainer.party)
hiddenmove=nil
pbFadeOutIn(99999) {
hiddenmove=sscreen.pbPokemonScreen
if hiddenmove
@scene.pbEndScene
else
@scene.pbRefresh
end
}
if hiddenmove
Kernel.pbUseHiddenMove(hiddenmove[0],hiddenmove[1])
return
end
elsif cmdBag>=0 && command==cmdBag
item=0
scene=PokemonBag_Scene.new
screen=PokemonBagScreen.new(scene,$PokemonBag)
pbFadeOutIn(99999) {
item=screen.pbStartScreen
if item>0
@scene.pbEndScene
else
@scene.pbRefresh
end
}
if item>0
Kernel.pbUseKeyItemInField(item)
return
end
elsif cmdTrainer>=0 && command==cmdTrainer
PBDebug.logonerr {
scene=PokemonTrainerCardScene.new
screen=PokemonTrainerCard.new(scene)
pbFadeOutIn(99999) {
screen.pbStartScreen
@scene.pbRefresh
}
}
elsif cmdQuit>=0 && command==cmdQuit
@scene.pbHideMenu
if pbInSafari?
if Kernel.pbConfirmMessage(_INTL("Would you like to leave the Safari Game right now?"))
@scene.pbEndScene
pbSafariState.decision=1
pbSafariState.pbGoToStart
return
else
pbShowMenu
end
else
if Kernel.pbConfirmMessage(_INTL("Would you like to end the Contest now?"))
@scene.pbEndScene
pbBugContestState.pbStartJudging
return
else
pbShowMenu
end
end
elsif cmdSave>=0 && command==cmdSave
@scene.pbHideMenu
scene=PokemonSaveScene.new
screen=PokemonSave.new(scene)
if screen.pbSaveScreen
@scene.pbEndScene
endscene=false
break
else
pbShowMenu
end
elsif cmdDebug>=0 && command==cmdDebug
pbFadeOutIn(99999) {
pbDebugMenu
@scene.pbRefresh
}
elsif cmdOption>=0 && command==cmdOption
scene=PokemonOptionScene.new
screen=PokemonOption.new(scene)
pbFadeOutIn(99999) {
screen.pbStartScreen
pbUpdateSceneMap
@scene.pbRefresh
}
else
break
end
end
@scene.pbEndScene if endscene
end
end
it doesn't work when i click on it does nothing so can anyone help me please

thanks
Reply With Quote
  #24    
Old August 19th, 2010 (11:34 AM).
Jefelin's Avatar
Jefelin Jefelin is offline
 
Join Date: Sep 2009
Gender: Male
Posts: 38
Good, I have the pokestarter 2008 and modified some scripts (and current pokebattle battle scene, I think) to get movement in the pokes (recommended by Luka) maybe that's why it gives me this error:


I fix it, thank you very much for your scripts are amaizing
I tried it in the version of May 7 and it worked perfect, please do a bit of help and sorry for my English
Attached Thumbnails
Sin título.png‎  
Reply With Quote
  #25    
Old August 20th, 2010 (07:35 AM).
lark125 lark125 is offline
 
Join Date: Apr 2008
Posts: 33
please someone can you anser my question


Quote originally posted by lark125:
heey can anyone please help me with somthing i crasyninjaguy's dualscreen and mous input script and now i want to make a touchable menu but its not working for me if i use his tutorial for a touchable menu and this is how it the scripts looks like
Spoiler:
class PokemonMenu_Scene
def pbShowCommands(commands)
ret=-1
cmdwindow=@sprites["cmdwindow"]
cmdwindow.viewport=@viewport
cmdwindow.index=$PokemonTemp.menuLastChoice
cmdwindow.resizeToFit(commands)
cmdwindow.commands=commands
cmdwindow.x=Graphics.width-cmdwindow.width
cmdwindow.y=0
cmdwindow.visible=true
loop do
cmdwindow.update
Graphics.update
Input.update
pbUpdateSceneMap
Mouse.update
$mouse.x = Mouse.pos_x
$mouse.y = Mouse.pos_y
if Input.trigger?(Input::B)
ret=-1
break
end
if Input.trigger?(Input::C)
ret=cmdwindow.index
$PokemonTemp.menuLastChoice=ret
break
end
end
return ret
end
def pbShowInfo(text)
@sprites["infowindow"].resizeToFit(text,Graphics.height)
@sprites["infowindow"].text=text
@sprites["infowindow"].visible=true
@infostate=true
end
def pbShowHelp(text)
@sprites["helpwindow"].resizeToFit(text,Graphics.height)
@sprites["helpwindow"].text=text
@sprites["helpwindow"].visible=true
@helpstate=true
pbBottomLeft(@sprites["helpwindow"])
end
def pbStartScene
@viewport=Viewport.new(0,0,Graphics.width,Graphics.height)
@viewport.z=99999
@sprites={}
@sprites["cmdwindow"]=Window_CommandPokemon.new([])
@sprites["menu-bag"]=IconSprite.new(0, 360)
@sprites["menu-bag"].setBitmap("Graphics/Pictures/menu-bag.png")
@sprites["infowindow"]=Window_UnformattedTextPokemon.newWithSize("",0,0,32,32,@viewport)
@sprites["infowindow"].visible=false
@sprites["helpwindow"]=Window_UnformattedTextPokemon.newWithSize("",0,0,32,32,@viewport)
@sprites["helpwindow"].visible=false
@sprites["cmdwindow"].visible=false
@infostate=false
@helpstate=false
pbSEPlay("menu")
end
def pbHideMenu
@sprites["cmdwindow"].visible=false
@sprites["infowindow"].visible=false
@sprites["helpwindow"].visible=false
end
def pbShowMenu
@sprites["cmdwindow"].visible=true
@sprites["infowindow"].visible=@infostate
@sprites["helpwindow"].visible=@helpstate
end
def pbEndScene
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end
def pbRefresh
end
end

class PokemonMenu
def initialize(scene)
@scene=scene
end
def pbShowMenu
@scene.pbRefresh
@scene.pbShowMenu
end
def pbStartPokemonMenu
@scene.pbStartScene
endscene=true
commands=[]
cmdPokedex=-1
cmdPokemon=-1
cmdBag=-1
cmdTrainer=-1
cmdSave=-1
cmdOption=-1
cmdPokegear=-1
cmdDebug=-1
cmdQuit=-1
if !$Trainer
if $DEBUG
Kernel.pbMessage(_INTL("The player trainer was not defined, so the menu can't be displayed."))
Kernel.pbMessage(_INTL("Please see the documentation to learn how to set up the trainer player."))
end
return
end
commands[cmdPokedex=commands.length]=_INTL("POKéDEX") if $Trainer.pokedex
commands[cmdPokemon=commands.length]=_INTL("POKéMON") if $Trainer.party.length>0
commands[cmdBag=commands.length]=_INTL("BAG") if !pbInBugContest?
commands[cmdPokegear=commands.length]=_INTL("POKéGEAR") if $Trainer.pokegear
commands[cmdTrainer=commands.length]=$Trainer.name
if pbInSafari?
@scene.pbShowInfo(_INTL("STEPS: {1}/600\nBALLS: {2}",pbSafariState.steps,pbSafariState.ballcount))
commands[cmdQuit=commands.length]=_INTL("QUIT")
elsif pbInBugContest?
if pbBugContestState.lastPokemon
@scene.pbShowInfo(_INTL("CAUGHT: {1}\nLEVEL: {2}\nBALLS: {3}",
PBSpecies.getName(pbBugContestState.lastPokemon.species),
pbBugContestState.lastPokemon.level,
pbBugContestState.ballcount))
else
@scene.pbShowInfo(_INTL("CAUGHT: None\nBALLS: {1}",pbBugContestState.ballcount))
end
commands[cmdQuit=commands.length]=_INTL("QUIT")
else
commands[cmdSave=commands.length]=_INTL("SAVE") if !$game_system || !$game_system.save_disabled
end
commands[cmdOption=commands.length]=_INTL("OPTION")
commands[cmdDebug=commands.length]=_INTL("DEBUG") if $DEBUG
commands[commands.length]=_INTL("EXIT")
loop do
if Mouse.mouse_in_area?(0, 360, 60, 39)
if Mouse.click?(1)
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
@scene.pbRefresh
}
end
end
command=@scene.pbShowCommands(commands)
if cmdPokedex>=0 && command==cmdPokedex
pbFadeOutIn(99999) {
scene=PokemonPokedexScene.new
screen=PokemonPokedex.new(scene)
screen.pbStartScreen
@scene.pbRefresh
}
elsif cmdPokegear>=0 && command==cmdPokegear
pbLoadRpgxpScene(Scene_Pokegear.new)
elsif cmdPokemon>=0 && command==cmdPokemon
sscene=PokemonScreen_Scene.new
sscreen=PokemonScreen.new(sscene,$Trainer.party)
hiddenmove=nil
pbFadeOutIn(99999) {
hiddenmove=sscreen.pbPokemonScreen
if hiddenmove
@scene.pbEndScene
else
@scene.pbRefresh
end
}
if hiddenmove
Kernel.pbUseHiddenMove(hiddenmove[0],hiddenmove[1])
return
end
elsif cmdBag>=0 && command==cmdBag
item=0
scene=PokemonBag_Scene.new
screen=PokemonBagScreen.new(scene,$PokemonBag)
pbFadeOutIn(99999) {
item=screen.pbStartScreen
if item>0
@scene.pbEndScene
else
@scene.pbRefresh
end
}
if item>0
Kernel.pbUseKeyItemInField(item)
return
end
elsif cmdTrainer>=0 && command==cmdTrainer
PBDebug.logonerr {
scene=PokemonTrainerCardScene.new
screen=PokemonTrainerCard.new(scene)
pbFadeOutIn(99999) {
screen.pbStartScreen
@scene.pbRefresh
}
}
elsif cmdQuit>=0 && command==cmdQuit
@scene.pbHideMenu
if pbInSafari?
if Kernel.pbConfirmMessage(_INTL("Would you like to leave the Safari Game right now?"))
@scene.pbEndScene
pbSafariState.decision=1
pbSafariState.pbGoToStart
return
else
pbShowMenu
end
else
if Kernel.pbConfirmMessage(_INTL("Would you like to end the Contest now?"))
@scene.pbEndScene
pbBugContestState.pbStartJudging
return
else
pbShowMenu
end
end
elsif cmdSave>=0 && command==cmdSave
@scene.pbHideMenu
scene=PokemonSaveScene.new
screen=PokemonSave.new(scene)
if screen.pbSaveScreen
@scene.pbEndScene
endscene=false
break
else
pbShowMenu
end
elsif cmdDebug>=0 && command==cmdDebug
pbFadeOutIn(99999) {
pbDebugMenu
@scene.pbRefresh
}
elsif cmdOption>=0 && command==cmdOption
scene=PokemonOptionScene.new
screen=PokemonOption.new(scene)
pbFadeOutIn(99999) {
screen.pbStartScreen
pbUpdateSceneMap
@scene.pbRefresh
}
else
break
end
end
@scene.pbEndScene if endscene
end
end
it doesn't work when i click on it does nothing so can anyone help me please

thanks
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 06:06 PM.