Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub > Beginner’s Lounge
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

Beginner’s Lounge Where all good (and bad) ideas start. This is the Beginner’s Lounge, where if you need a helping hand or want to develop your small ideas, you bring it here. We won't bite.



Closed Thread
 
Thread Tools
  #5101    
Old January 15th, 2011 (04:19 PM).
Rayce's Avatar
Rayce Rayce is offline
Nooo0000OOB
 
Join Date: Dec 2010
Location: USA
Age: 18
Gender: Male
Nature: Impish
Posts: 107
I have a simple and probably stupid question. I'm using XSE and cannot find the way to save my scripts to the game. Any help please?
__________________
I'm just here to play some Pokemon...


  #5102    
Old January 15th, 2011 (04:54 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,247
Quote originally posted by Rayce:
I have a simple and probably stupid question. I'm using XSE and cannot find the way to save my scripts to the game. Any help please?
follow this link here...
http://www.pokecommunity.com/showthread.php?t=185188
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

~Serge,
Chrono Cross


  #5103    
Old January 15th, 2011 (09:20 PM).
Rayce's Avatar
Rayce Rayce is offline
Nooo0000OOB
 
Join Date: Dec 2010
Location: USA
Age: 18
Gender: Male
Nature: Impish
Posts: 107
Quote originally posted by destinedjagold:
Thanks a lot, I feel kinda stupid with how simple that was but I had no way of knowing
__________________
I'm just here to play some Pokemon...


  #5104    
Old January 16th, 2011 (12:56 AM).
Binary's Avatar
Binary Binary is offline
え?
 
Join Date: Aug 2007
Age: 20
Posts: 3,994
Quote originally posted by FireFox:
[Fire Red] Hey folks, got an issue hiding sprites. Basically I'm trying to set a scene up similar to the S.S. Anne part where your Rival appears. Natually the sprite is invisible and when you step over the script tile, poof! He appears. My problem is, with my scene, I cannot hide the sprite, it's always there when I enter the map. I checked around the S.S. Anne Rival script but could not find an initial "hidesprite 0xRIVAL". I've tried making more script tiles and doing "hidesprite" on them but it still won't vanish.

What am I missing?
Thanks in advance.

-FireFox
I don't know which script you're talking about (I haven't been playing any Pokemon games lately, and have a bad memory ><) and I haven't really looked at the script. Try assigning the Movement Type of the Rival OW to Hidden. Then use an applymovement at the beginning of the script and include a #raw 0x61 before any of the other movements. #raw 0x61 is basically a Show Sprite movement. You can also use #raw 0x61, which is a Hide Sprite movement raw.
Should work. :/
__________________
  #5105    
Old January 16th, 2011 (06:14 AM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by FireFox:
[Fire Red] Hey folks, got an issue hiding sprites. Basically I'm trying to set a scene up similar to the S.S. Anne part where your Rival appears. Natually the sprite is invisible and when you step over the script tile, poof! He appears. My problem is, with my scene, I cannot hide the sprite, it's always there when I enter the map. I checked around the S.S. Anne Rival script but could not find an initial "hidesprite 0xRIVAL". I've tried making more script tiles and doing "hidesprite" on them but it still won't vanish.

What am I missing?
Thanks in advance.

-FireFox
The two ways I do it are to use person IDs. If you put 2C as the person ID, the sprite will be hidden on the map until you use the showsprite command on it in a script (for FireRed, anyway). The sprite will only appear during the course of the script, and will be hidden any time you enter that map.

If you need to have the sprite reappear permanently after the script, but be hidden before it, you can set the person ID of the sprite to an unused flag, then use the header in A-Map to create a script that hides the sprite and sets the sprite's flag when you enter the map when the variable for the script event is set to 0x0, and clears the flag and shows the sprite when it's not.

I've never tried Binary's method ... maybe that would be better/easier.
__________________
  #5106    
Old January 16th, 2011 (06:37 AM).
Shukumei's Avatar
Shukumei Shukumei is offline
Teh Haxxorz
 
Join Date: Nov 2009
Location: Austin TX.
Gender: Male
Nature: Quiet
Posts: 27
Quote originally posted by metapod23:
The two ways I do it are to use person IDs. If you put 2C as the person ID, the sprite will be hidden on the map until you use the showsprite command on it in a script (for FireRed, anyway). The sprite will only appear during the course of the script, and will be hidden any time you enter that map.
Excuse me but that seems a little sloppy. For one thing you can only use it on one sprite per rom. My advice would be to experiment in a clean rom with flags, variables, and person IDs until you feel comfortable hiding and showing sprites. That way you're doing it the way the programmers do and you can do it on more than one sprite per rom. Of course it's been over a year since I last hacked a rom so I may be wrong.
__________________
(Enter clever observation here)
Shukumei's PokePet

Shade the level 50 Umbreon!
  #5107    
Old January 16th, 2011 (10:35 AM).
FireFox's Avatar
FireFox FireFox is offline
Dialga Fangirl
 
Join Date: Aug 2004
Location: UK
Age: 29
Gender: Female
Nature: Timid
Posts: 58
Send a message via AIM to FireFox Send a message via Windows Live Messenger to FireFox Send a message via Yahoo to FireFox
Quote originally posted by Binary:

I don't know which script you're talking about (I haven't been playing any Pokemon games lately, and have a bad memory ><) and I haven't really looked at the script. Try assigning the Movement Type of the Rival OW to Hidden. Then use an applymovement at the beginning of the script and include a #raw 0x61 before any of the other movements. #raw 0x61 is basically a Show Sprite movement. You can also use #raw 0x61, which is a Hide Sprite movement raw.
Should work. :/
That worked like a charm, thank you! Got a bit confused at 1st as there were 3 hidden sections in the list in A-Map. The 1st one resets the ROM when the sprite should be on screen (quite funny actually!). The 2nd one only hid the bottom half of the sprite and the 3rd was a total hide. Thank you once again. :)

I have another one now.

Is it possible to change the trainer battle music for a specific battle? EG, play the Champion music for trainer ID 004?
__________________
  #5108    
Old January 16th, 2011 (11:08 AM). Edited January 16th, 2011 by metapod23.
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by Shukumei:
Excuse me but that seems a little sloppy. For one thing you can only use it on one sprite per rom. My advice would be to experiment in a clean rom with flags, variables, and person IDs until you feel comfortable hiding and showing sprites. That way you're doing it the way the programmers do and you can do it on more than one sprite per rom. Of course it's been over a year since I last hacked a rom so I may be wrong.
You're definitely wrong about that. You can use it on many, many sprites, in one map, in many maps. It works very well, imho, for sprites you only need to show for one event or script, and never need to see again on the map. Maybe it's lazy (not sloppy, because you'd still have the same sprite on the map, with a different ID anyway), but it's also more convenient and works like a charm to do what you need it to do.

EDIT: Also, I just realized Binary's method might not be the optimal way to do it, because setting the Movement Type to Hidden only makes the sprite invisible - it's still on the map, you can still bump into it, and you can still interact with it, you just can't see it. So you would probably really want to use either 2C, or use Map Scripts in the header and the hidesprite command.

Yay, I just proved I'm not sloppy.

EDIT 2: Also, the script FireFox is referring to on the SS Anne has the rival sprite set to 3D, which I would believe provides the same function as 2C - that's why she couldn't figure out how the sprite was hidden - it was done with a special ID #, similar to 2C. If you used Hidden as the Movement Type in this script, you'd never be able to go up the stairs, because you'd be bumping into an invisible sprite.
__________________
  #5109    
Old January 16th, 2011 (11:19 AM).
Binary's Avatar
Binary Binary is offline
え?
 
Join Date: Aug 2007
Age: 20
Posts: 3,994
Quote originally posted by FireFox:
That worked like a charm, thank you!
XD;
You're welcome! n_n


Quote originally posted by SPG:
im using a fire red rom,
ok i want a pokemon in a pokeball (like playing a game you see a random pokeball and it has an item in it) but when i write a script and enter it it just beeps and nothing happens here is my script
Spoiler:
#dynamic 0x71A5CC
#org @start
lockall
faceplayer
checkflag 0x828
if 0x1 goto @done
msgbox @talk1 0x6
givepokemon 0xFD 0x5 0x0 0x0 0x0 0x0
setflag 0x828
releaseall
end
#org @done
msgbox @talk2 0x6
release
end
#org @talk1
= Player obtained a MEW2KNIGHT!
#org @talk2
= it's empty!


can some one tell me what is wrong with it cuz i know its wrong for a fact
Are you using a person event?
And I think you could just do with a simple "lock" and "release"
__________________
  #5110    
Old January 16th, 2011 (12:13 PM). Edited January 16th, 2011 by Spherical Ice.
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
Team Rocket Grunt would like to battle!
ModeratorCS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,662
Okay, I think you should start with a clean offset, first. If you use #dynamic 0x800000 at the beginning of every script, XSE will provide you the offset you need when you compile. Here's what you should enter:
Spoiler:
#dynamic 0x800000 // Begin all your scripts with this to be safe.

#org @start
checkflag 0x828
if 0x1 goto @done
lock
// A bit of re-organising will help save a bit of space, so you don't need that release at @done. Also, you don't need lockall.
faceplayer
msgbox @talk1 0x6
givepokemon 0xFD 0x5 0x0 0x0 0x0 0x0
bufferpokemon 0x0 0xFD // In case you happen to rename the Pokémon at 0xFD, it'll save some space and time if you use buffers instead.
setflag 0x828
release // Again, you don't need releaseall or lockall.
end

#org @done
msgbox @talk2 0x6
end // You don't need any for of release because you've not locked, if you're here.

#org @talk1
= [PLAYER] obtained a [buffer1]! // The buffer in action. Although you use bufferpokemon 0x0, it'll be stored in [buffer1]. Also, "Player" won't display the Player's name, [PLAYER] will. Similarly, [RIVAL] will display the Rival's name :D

#org @talk2
= It's empty! // Rawr I'm a Grammar Nazi. Sersiouly though, grammar is important in hacks. :D

When you've loaded your ROM into XSE and hit Compile, the offset next to @start is what you need to copy, and then paste onto the Person Event in Advance Map. Also, you should probably save the .log and .rbc files, for future reference if you hack happens to corrupt.

Does that help?
__________________

"Develop amnesia conveniently and forget everything you've heard!"
spheal clicker | rom hacking | pokémon gaia
staff antagonists collab 2015
  #5111    
Old January 16th, 2011 (12:45 PM).
Binary's Avatar
Binary Binary is offline
え?
 
Join Date: Aug 2007
Age: 20
Posts: 3,994
Quote originally posted by metapod23:
Also, I just realized Binary's method might not be the optimal way to do it, because setting the Movement Type to Hidden only makes the sprite invisible - it's still on the map, you can still bump into it, and you can still interact with it, you just can't see it. So you would probably really want to use either 2C, or use Map Scripts in the header and the hidesprite command.

Yay, I just proved I'm not sloppy. :)
Hmm ..yeah. But I've never really acknowledged having bumped into a Hidden OW. Mainly because I find it better if you place the Hidden OW off the Map, or some place unreachable before the script activates (e.g. Over a Tree, The black outlines of a building). That way you can Show the OW after it comes on the GBA screen.
But yeah, your method works well too.

Yes, yes you did. :)
__________________
  #5112    
Old January 16th, 2011 (12:56 PM).
Binary's Avatar
Binary Binary is offline
え?
 
Join Date: Aug 2007
Age: 20
Posts: 3,994
Quote originally posted by SPG:
its saying unknown keyword "checkflag" at line 3

how do i fix this?
It might be because of a spelling mistake, or any other mistake in the keyword.
__________________
  #5113    
Old January 16th, 2011 (12:58 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
Team Rocket Grunt would like to battle!
ModeratorCS
 
Join Date: Nov 2007
Location: Leicester, UK
Posts: 3,662
If not, I'd suggest redownloading XSE or just closing it and reopening it. :/
__________________

"Develop amnesia conveniently and forget everything you've heard!"
spheal clicker | rom hacking | pokémon gaia
staff antagonists collab 2015
  #5114    
Old January 16th, 2011 (01:02 PM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by Binary:

Hmm ..yeah. But I've never really acknowledged having bumped into a Hidden OW. Mainly because I find it better if you place the Hidden OW off the Map, or some place unreachable before the script activates (e.g. Over a Tree, The black outlines of a building). That way you can Show the OW after it comes on the GBA screen.
But yeah, your method works well too.

Yes, yes you did.
Yeah, I guess you could do it that way, too. It might be easier than using Map Scripts to hide the sprite, anyway, for a sprite you want to stay on the map after it appears.
__________________
  #5115    
Old January 17th, 2011 (08:09 PM).
deoxys121's Avatar
deoxys121 deoxys121 is offline
White Kyurem Cometh
Gold Tier
 
Join Date: Dec 2010
Location: Flat Rock, MI, United States
Age: 23
Gender: Male
Nature: Calm
Posts: 1,260
Send a message via Yahoo to deoxys121
Does anybody know the offset of the script in Pokemon Ruby that gives you the Pokedex for the first time? If I can find that, I will be able to modify it to give a national Pokedex from the start.
__________________
  #5116    
Old January 18th, 2011 (12:50 AM).
fizzmaister's Avatar
fizzmaister fizzmaister is offline
 
Join Date: Jan 2008
Posts: 20
So I'm trying to get the Lab in Cinnabar to allow me to revive all three Kanto fossils. I've commented a lot of the original code, and I'm trying to find where it prevents the Dome fossil from being recognized. I've caught the part at the beginning where it checks if either of the story fossils were revived, and I know that part works because after reviving the Old Amber and Helix fossil, the crazy scientist performs says the line if you don't have a fossil, instead of the one when there are no more fossils to revive.

commented original code:
Code:
#include stditems.rbh
#include stdpoke.rbh

//---------------
#org 0x16E459
lock
faceplayer
setvar LASTRESULT 0x0    //clear last result
checkflag 0x2EE            //check if Aerodactyl has been revived
if 0x1 call 0x816E87D    //if revived, check if a story fossil was  revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E873    //if a story fossil and Aerodactyl were  revived, end script
compare 0x406A 0x2
if 0x1 goto 0x816E712
compare 0x406A 0x1
if 0x1 goto 0x816E708
call 0x816E4C8            //check if Helix Fossil is in inventory
compare LASTRESULT 0x1
if 0x1 goto 0x816E520    //if yes go to check if Old Amber and ask which  (if any) of those two to revive
call 0x816E4E0            //check if Dome Fossil is in inventory
compare LASTRESULT 0x1
if 0x1 goto 0x816E562    //if yes, go to check if old Amber and ask  which (if any) of the two to revive.
call 0x816E4F8            //check if Old amber is picked up and not  revived.
compare LASTRESULT 0x1
if 0x1 goto 0x816E5A4    //if so, ask whether to revive old Amber
msgbox 0x819A25E MSG_KEEPOPEN //"Hiya!\pI am important doctor.\nYes..."
goto 0x816E516

//---------------
#org 0x16E87D
checkflag 0x273            //if we got helix fossil
if 0x1 goto 0x816E895    //return 1 if in inventory, else 0
checkflag 0x272            //if we got dome fossil
if 0x1 goto 0x816E8A4    //return 1 if in inventory, else 0
goto 0x816E510            //else return 0

//---------------
#org 0x16E873
msgbox 0x819A4BD MSG_KEEPOPEN //"Aiyah!\nYou come again!"
release
end

//---------------
#org 0x16E712
compare 0x4069 0x1
if 0x1 goto 0x816E734
compare 0x4069 0x2
if 0x1 goto 0x816E779
compare 0x4069 0x3
if 0x1 goto 0x816E7BE
end

//---------------
#org 0x16E708
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
release
end

//---------------
#org 0x16E4C8
checkflag 0x273            //was helix fossil picked up
if 0x0 goto 0x816E510    //if not
checkflag 0x2ED            //or if already revived
if 0x1 goto 0x816E510    //return 0
setvar LASTRESULT 0x1    //
return                    //else return has Helix Fossil

//---------------
#org 0x16E520
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
call 0x816E4F8            //check if old amber is picked up and not  revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E5D6    //if so, go here
multichoice 0x0 0x0 0x15 0x0    //ask if Helix fossil or none
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E644    //if Helix Fossil revive it
compare 0x8000 0x1
if 0x1 goto 0x816E516    //if no, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516    //else, end script
end

//---------------
#org 0x16E4E0
checkflag 0x272            //was dome fossil picked up
if 0x0 goto 0x816E510    //if not
checkflag 0x2EC            //or if already revived
if 0x1 goto 0x816E510    //return 0
setvar LASTRESULT 0x1
return                    //else return has Dome Fossil

//---------------
#org 0x16E562
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
call 0x816E4F8            //check if Old Amber is picked up and not  revived
compare LASTRESULT 0x1
if 0x1 goto 0x816E60D    //if so go to Dome and Amber choice
multichoice 0x0 0x0 0x16 0x0    //revive Dome?
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0        //if Dome
if 0x1 goto 0x816E682    //go to Dome revive
compare 0x8000 0x1        //
if 0x1 goto 0x816E516
compare 0x8000 0x7F
if 0x1 goto 0x816E516
end

//---------------
#org 0x16E4F8
checkflag 0x25E            //was Old Amber picked up
if 0x0 goto 0x816E510    //if not
checkflag 0x2EE            //or if already revived
if 0x1 goto 0x816E510    //return 0
setvar LASTRESULT 0x1
return                    //else return has Old Amber

//---------------
#org 0x16E5A4
preparemsg 0x819A25E //"Hiya!\pI am important doctor.\nYes..."
waitmsg
multichoice 0x0 0x0 0x17 0x0    //ask whether to revive old Amber
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E6C0        //if Old Amber, revive it
compare 0x8000 0x1
if 0x1 goto 0x816E516        //if none, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516        //else end script
end

//---------------
#org 0x16E516
msgbox 0x819A2F0 MSG_KEEPOPEN //"No!\nIs too bad!"
release
end

//---------------
#org 0x16E895
checkflag 0x2ED            //check if Helix Fossil is revived
if 0x0 goto 0x816E510    //if not revived, return 0
setvar LASTRESULT 0x1    
return                    //else return story fossil revived

//---------------
#org 0x16E8A4
checkflag 0x2EC            //check if Dome Fossil is revived
if 0x0 goto 0x816E510    //if not revived, return 0
setvar LASTRESULT 0x1
return                    //else return story fossil revived

//---------------
#org 0x16E510
setvar LASTRESULT 0x0
return

//---------------
#org 0x16E734
setvar 0x4001 0x8A
bufferpokemon 0x0 PKMN_OMANYTE
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_OMANYTE 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2ED
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end

//---------------
#org 0x16E779
setvar 0x4001 0x8C
bufferpokemon 0x0 PKMN_KABUTO
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_KABUTO 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2EC
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end

//---------------
#org 0x16E7BE
setvar 0x4001 0x8E
bufferpokemon 0x0 PKMN_AERODACTYL
msgbox 0x819A32B MSG_KEEPOPEN //"You late.\nWhere were you?\pYour f..."
givepokemon PKMN_AERODACTYL 0x5 ITEM_NONE 0x0 0x0 0x0
compare LASTRESULT 0x2
if 0x1 goto 0x81A9258
setflag 0x2EE
compare LASTRESULT 0x0
if 0x1 goto 0x816E803
compare LASTRESULT 0x1
if 0x1 goto 0x816E837
end

//---------------
#org 0x16E5D6
multichoice 0x0 0x0 0x18 0x0    //ask if Helix Fossil or Old Amber
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E644        //if Helix fossil, revive it.
compare 0x8000 0x1
if 0x1 goto 0x816E6C0        //if Old Amber, revive it
compare 0x8000 0x2
if 0x1 goto 0x816E516        //if none, end script
compare 0x8000 0x7F
if 0x1 goto 0x816E516        //else end script
end

//---------------
#org 0x16E644
bufferpokemon 0x0 PKMN_OMANYTE
bufferitem 0x1 ITEM_HELIXFOSSIL
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_HELIXFOSSIL 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x1
release
end

//---------------
#org 0x16E60D
multichoice 0x0 0x0 0x19 0x0
copyvar 0x8000 LASTRESULT
compare 0x8000 0x0
if 0x1 goto 0x816E682
compare 0x8000 0x1
if 0x1 goto 0x816E6C0
compare 0x8000 0x2
if 0x1 goto 0x816E516
compare 0x8000 0x7F
if 0x1 goto 0x816E516
end

//---------------
#org 0x16E682
bufferpokemon 0x0 PKMN_KABUTO
bufferitem 0x1 ITEM_DOMEFOSSIL
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_DOMEFOSSIL 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x2
release
end

//---------------
#org 0x16E6C0
bufferpokemon 0x0 PKMN_AERODACTYL
bufferitem 0x1 ITEM_OLDAMBER
msgbox 0x819A3B0 MSG_YESNO //"Oh!\nThat is [buffer2], it is!\pIt..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E6FE
msgbox 0x819A439 MSG_KEEPOPEN //"So!\nYou hurry and give me that!\p..."
textcolor 0x0
removeitem ITEM_OLDAMBER 0x1
msgbox 0x819A487 MSG_KEEPOPEN //"I take a little time!\nYou go for ..."
setvar 0x406A 0x1
setvar 0x4069 0x3
release
end

//---------------
#org 0x1A9258
textcolor 0x3
msgbox 0x81A5E0D MSG_KEEPOPEN //"There's no more room for POKéMON!\..."
release
end

//---------------
#org 0x16E803
textcolor 0x3
fanfare 0x101
preparemsg 0x819A37A //"[player] received the [buffer1]\nf..."
waitmsg
waitfanfare
setvar 0x406A 0x0
msgbox 0x81A5683 MSG_YESNO //"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E871
call 0x81A8C03
call 0x81A74C7
goto 0x816E871

//---------------
#org 0x16E837
textcolor 0x3
fanfare 0x101
preparemsg 0x819A37A //"[player] received the [buffer1]\nf..."
waitmsg
waitfanfare
setvar 0x406A 0x0
msgbox 0x81A5683 MSG_YESNO //"Do you want to give a nickname to\..."
compare LASTRESULT 0x0
if 0x1 goto 0x816E866
call 0x81A8C0F
goto 0x816E866

//---------------
#org 0x16E6FE
msgbox 0x819A4BD MSG_KEEPOPEN //"Aiyah!\nYou come again!"
release
end

//---------------
#org 0x16E871
release
end

//---------------
#org 0x1A8C03
countpokemon
subvar LASTRESULT 0x1
copyvar 0x8004 LASTRESULT
return

//---------------
#org 0x1A74C7
fadescreen 0x1
special 0x9E
waitstate
return

//---------------
#org 0x16E866
call 0x81A8C18
goto 0x816E871

//---------------
#org 0x1A8C0F
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return

//---------------
#org 0x1A8C18
bufferboxname 0x0 0x4037
bufferpokemon 0x1 0x4001
checkflag 0x834
if 0x0 call 0x81A8C33
checkflag 0x834
if 0x1 call 0x81A8C5E
return

//---------------
#org 0x1A8C33
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C4C
msgbox 0x81A5CCD MSG_KEEPOPEN //"[buffer2] was transferred to\nSome..."
return

//---------------
#org 0x1A8C5E
special2 LASTRESULT 0x165
compare LASTRESULT 0x1
if 0x1 goto 0x81A8C77
msgbox 0x81A5D0D MSG_KEEPOPEN //"[buffer2] was transferred to\nBILL..."
return

//---------------
#org 0x1A8C4C
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D4A MSG_KEEPOPEN //"BOX ["][buffer3]" on\nSomeone's PC..."
return

//---------------
#org 0x1A8C77
special2 LASTRESULT 0x18A
bufferboxname 0x2 LASTRESULT
msgbox 0x81A5D8D MSG_KEEPOPEN //"BOX ["][buffer3]" on\nBILL'S PC wa..."
return


//---------
// Strings
//---------
#org 0x19A25E
= Hiya!\pI am important doctor.\nYes, very much so, indeed.\pHere, I  study rare POKéMON fossils.\nAll the time, I study.\pYou!\nHave you a  fossil for me?

#org 0x19A4BD
= Aiyah!\nYou come again!

#org 0x19A487
= I take a little time!\nYou go for walk a little while!

#org 0x19A2F0
= No!\nIs too bad!

#org 0x19A32B
= You late.\nWhere were you?\pYour fossil is back to life!\nIt was  [buffer1] like I think!

#org 0x19A3B0
= Oh!\nThat is [buffer2], it is!\pIt is fossil of [buffer1],\na POKéMON  that is already extinct!\pMy Resurrection Machine will make\nthat  POKéMON live again!

#org 0x19A439
= So!\nYou hurry and give me that!\p\c\h06Á[player] handed over  the\n[buffer2] to the weird doctor.

#org 0x1A5E0D
= There's no more room for POKéMON!\pThe POKéMON BOXES are full  and\ncan't accept any more!

#org 0x19A37A
= [player] received the [buffer1]\nfrom the doctor.

#org 0x1A5683
= Do you want to give a nickname to\nthis [buffer1]?

#org 0x1A5CCD
= [buffer2] was transferred to\nSomeone's PC.\pIt was placed in \nBOX  ["][buffer1]."

#org 0x1A5D0D
= [buffer2] was transferred to\nBILL'S PC.\pIt was placed in \nBOX  ["][buffer1]."

#org 0x1A5D4A
= BOX ["][buffer3]" on\nSomeone's PC was full.\p[buffer2] was  transferred to\nBOX ["][buffer1]."

#org 0x1A5D8D
= BOX ["][buffer3]" on\nBILL'S PC was full.\p[buffer2] was transferred  to\nBOX ["][buffer1]."
my replacement code:
Code:
#include stditems.rbh
#include stdpoke.rbh
#dynamic 0x800140

//---------------
#org @Start
lock
faceplayer
setvar LASTRESULT 0x0    //clear last result
checkflag 0x2EE        //check if Aerodactyl has been revived
if 0x1 call @CheckHelix
compare LASTRESULT 0x1
if 0x1 goto 0x816E873    //if both story fossils and Aerodactyl were  revived, end script
compare 0x406A 0x2
if 0x1 goto 0x816E712
compare 0x406A 0x1
if 0x1 goto 0x816E708
call @HelixI
compare LASTRESULT 0x1
if 0x1 goto 0x816E520    //if yes go to check if Old Amber and ask which  (if any) of those two to revive
call @DomeI
compare LASTRESULT 0x1
if 0x1 goto 0x816E562    //if yes, go to check if old Amber and ask  which (if any) of the two to revive.
call 0x816E4F8            //check if Old amber is picked up and not  revived.
compare LASTRESULT 0x1
if 0x1 goto 0x816E5A4    //if so, ask whether to revive old Amber
msgbox 0x819A25E MSG_KEEPOPEN //"Hiya!\pI am important doctor.\nYes..."
goto 0x816E516

//------------
#org @CheckHelix
checkflag 0x2ED
if 0x1 goto @CheckDome
return

//--------------
#org @CheckDome
checkflag 0x2EC
if 0x1 goto @Yes
return

//-------------
#org @Yes
setvar LASTRESULT 0x1
return

//-------------
#org @DomeI
checkitem 0x165 0x1
if 0x1 goto @Yes
return

//-------------
#org @HelixI
checkitem 0x166 0x1
if 0x1 goto @Yes
return
Any help would be appreciated.
  #5117    
Old January 18th, 2011 (11:23 AM).
Civet's Avatar
Civet Civet is offline
Civet the Cat
 
Join Date: Dec 2010
Location: England
Gender: Male
Posts: 31
Hello, I'm looking for a solution for one of my scripts. It's a script which stops the player from walking out the village into the first route. However once I put it into the game as a script box, it freezes once the player steps on it. Here's the script:

Code:
#org $start
checkflag 0x828
if b_true goto $done
message $1
boxset 6
applymovement 0x02 $move
pausemove 0x0
applymovement 0xFF $move2
pause 0x30
message $2
boxset 6
playsound 0x13E
nop
applymovement 0x02 $move3
applymovement 0xFF $move3
pausemove 0
fadesound 0x12C
nop
release
end

#org $done
release
end

#org $move
#raw 0x62 0x10 0x10 0x10 0x10 0xFE

#org $move2
#raw 0x01 0xFE

#org $move3
#raw 0x11 0x11 0x11 0x11 0xFE

#org $1
$1 1 =Hey, you!

#org $2
$2 1 =You can't go out there\nwithout your own Pokémon.\pWild Pokémon will hurt you!
A solution would be appreciated. Thanks in advance.
  #5118    
Old January 18th, 2011 (01:45 PM).
metapod23's Avatar
metapod23 metapod23 is offline
Hardened Trainer
 
Join Date: Mar 2009
Gender: Male
Nature: Timid
Posts: 673
Quote originally posted by Civet:
Hello, I'm looking for a solution for one of my scripts. It's a script which stops the player from walking out the village into the first route. However once I put it into the game as a script box, it freezes once the player steps on it. Here's the script:
You need to set a variable # for the script in A-Map. Also, in your script, you need setvar 0x(variable #) 0x1 (for XSE, not sure for PokeSav or whatever you're using)... if you want the script to activate only once.

For instance - place the var # as 5000 in A-Map, and put "setvar 0x5000 0x1" in your script so it won't activate again. Or make the $done script be:

Code:
#org $done
setvar 0x5000 0x1
release
end
to have it repeat unless that flag is set, and to have it stop running the script completely once it is set.
__________________
  #5119    
Old January 18th, 2011 (02:03 PM).
SPG's Avatar
SPG SPG is offline
Pyroblock
 
Join Date: Dec 2010
Age: 18
Gender: Male
Posts: 88
Send a message via Skype™ to SPG
how would i make this script? plz dont make it for me i need to learn on my own (and with tutorials lol)
Spoiler:
ok this is what i want scripted~ happends after you get mewtwoknight, brother comes in and walks up to you "hello player, funny seeing you here. did your stupid mom send you? "[player]:why are you calling her stupid? she is your mother to, you know that." "[rival]:perhaps, but she is still naeve..." "[player]:why do you say that? she taught use everything we know, and it was hard for her to take care of us sence dad left her on this cursed island!" "[rival]:true, true, but she told me something she shouldnt have. Plus she sent you witch is realy stupid! you will never ruine my plans! i will rule this world and bring it into darkness! i'll start my rain of darknkess starting with bringing you down! (they battle and here is what happends if you lose) what did i tell you? i will rule the world and no one will stop me! fufufu! player runs home and mom heals pokemon

(here is what happends if you win) this cant be! my first battle to rule this pointless world and i lost? fine, i'll take this pitiful defet, but you havent heard the last of me! i'll bild my army of hench men and bring you down!u can never stop me! rival runs north off screen or in the cave after he leaves you folow and get warped in your house and you are forced to talk to your mom mom: "oh your back so soon? did you find your brother?" [player] explains everything that happends in mewtwo island cave mom: "What! he wants to rule the world? this cant be! youir older brother was very peaceful and coulnd her a fly.... wait! i remember a legend about something i told your brother the other day. it goes something like this, who ever hears the tale of the forbidden pokemon there heart gets filled with darkness, doesn't madder how pure there heart is. thats the tale, short isn't it? [player]: ya, but quick question, why isnt your heart dark and filled with shadow? mom: it was at one point but i was cured with a special pokemon. [player]: what was the pokemon? mom: i dont know, i was so deep in the evil trance i barley remember anything. but your brother's effects just started so it can be cured with out the pokemon but you will need the 8 emblems to cure him. go get them now before your brother's heart is seald with darkness! [player]:but where do i find them? mom: last i heard they are under towns but the entrance is unknown, so you need to explore the town and talk to the people there to see if they have any info.
if its possible could you just join my hack? ya i know there are MANY grammer errors and spelling errors but i made this on my ipad and to lazy to edit for the forum but it will be better in the hacke (little/no errors for grammer and spelling)
__________________
want to help with forbidden version? or want more details about it? pm me or contact me at [email protected]
  #5120    
Old January 19th, 2011 (02:52 PM).
Dark pokemon's Avatar
Dark pokemon Dark pokemon is offline
Beginner Hacker
 
Join Date: Mar 2010
Location: Jacksonville
Gender: Male
Nature: Calm
Posts: 43
This was one of the scripts that won't compile. I'm using a pokemon ruby rom

#dynamic 0x900000
#org @start
lock
faceplayer
msgbox @blah 0x6
release
end

#org @blah
= Hello I'm part\nof team Aqua
__________________
Hacks I support:




  #5121    
Old January 19th, 2011 (02:59 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,247
Quote originally posted by Dark pokemon:
This was one of the scripts that won't compile. I'm using a pokemon ruby rom

#dynamic 0x900000
#org @start
lock
faceplayer
msgbox @blah 0x6
release
end

#org @blah
= Hello I'm part\nof team Aqua
won't compile? it looks really really compilable(?) to me...
did you load your ROM through XSE?
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

~Serge,
Chrono Cross


  #5122    
Old January 19th, 2011 (03:04 PM).
Dark pokemon's Avatar
Dark pokemon Dark pokemon is offline
Beginner Hacker
 
Join Date: Mar 2010
Location: Jacksonville
Gender: Male
Nature: Calm
Posts: 43
Quote originally posted by destinedjagold:

won't compile? it looks really really compilable(?) to me...
did you load your ROM through XSE?
yes I did. I think I said it wrong. it compiled but when I talk to the sprite it just makes a beep and ends the scripts.
__________________
Hacks I support:




  #5123    
Old January 19th, 2011 (03:08 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,247
after compiling, did you copied the offset XSE gave to you and pasted it on the NPC's offset box on Advance Map?
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

~Serge,
Chrono Cross


  #5124    
Old January 19th, 2011 (03:12 PM).
adhdguitar's Avatar
adhdguitar adhdguitar is offline
Newbie Pokémon Hacker
 
Join Date: May 2010
Gender: Male
Nature: Adamant
Posts: 210
I put the below script in a script event near the entrance of a town, (as well as three others with a different variable-defining script, but calling the same main script.) The first message displays, but after that nothing happens, the person events are still stuck there not doing anything, ect.
Spoiler:

'---------------
#org 0x801300
lock
setvar 0x5007 0x1
call 0x8801350
release
end

'---------------
#org 0x801350
msgbox 0x8801500 MSG_FACE '"THEIF!"
compare 0x5007 0x1
if 0x1 goto 0x8801450
compare 0x5007 0x2
if 0x1 goto 0x8801570
compare 0x5007 0x3
if 0x1 goto 0x8801590
compare 0x5007 0x4
if 0x1 goto 0x88015B0
applymovement 0x9 0x8801470
waitmovement 0x9
msgbox 0x8801400 MSG_FACE '"Oh crap! Uh.... Err...\nHere! Take..."
applymovement 0x9 0x8801490
waitmovement 0x9
applymovement 0x10 0x88014B0
waitmovement 0x10
msgbox 0x88015D0 MSG_FACE '"Come back with my Coin Case!"
applymovement 0x10 0x88014D0
waitmovement 0x10
hidesprite 0x9
hidesprite 0x10
giveitem 0x104 0x1 0x2
setvar 0x5006 0x1
release
end

'---------------
#org 0x801450
movesprite 0x9 0x14 0x20
movesprite 0x10 0x14 0x20
return

'---------------
#org 0x801570
movesprite 0x9 0x15 0x20
movesprite 0x10 0x15 0x20
return

'---------------
#org 0x801590
movesprite 0x9 0x16 0x20
movesprite 0x10 0x16 0x20
return

'---------------
#org 0x8015B0
movesprite 0x9 0x17 0x20
movesprite 0x10 0x17 0x20
return


'---------
' Strings
'---------
#org 0x801500
= THEIF!

#org 0x801400
= Oh crap! Uh.... Err...\nHere! Take this!\lYou never saw me!

#org 0x8015D0
= Come back with my Coin Case!


'-----------
' Movements
'-----------
#org 0x801470
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x7 'Face Right (Faster)

#org 0x801490
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)

#org 0x8014B0
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1D 'Step Down (Fast)

#org 0x8014D0
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
__________________


Yellow: Complete
Crystal:
Complete
Sapphire: Not Started
Cherrim: Not Started
  #5125    
Old January 19th, 2011 (03:40 PM). Edited January 19th, 2011 by destinedjagold.
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,247
Quote originally posted by Dark pokemon:
yes I did....................................
I found the problem...
Well, you have to have an empty line between the #dynamic 0x900000 and your #org @start...
So your script should look like this...

Code:
#dynamic 0x900000

#org @start
lock
faceplayer
msgbox @blah 0x6
release
end

#org @blah
= Hello I'm part\nof team Aqua


Quote originally posted by adhdguitar:
I put the below script in a script event near the entrance of a town, (as well as three others with a different variable-defining script, but calling the same main script.) The first message displays, but after that nothing happens, the person events are still stuck there not doing anything, ect.
Spoiler:

'---------------
#org 0x801300
lock
setvar 0x5007 0x1
call 0x8801350
release
end

'---------------
#org 0x801350
msgbox 0x8801500 MSG_FACE '"THEIF!"
compare 0x5007 0x1
if 0x1 goto 0x8801450
compare 0x5007 0x2
if 0x1 goto 0x8801570
compare 0x5007 0x3
if 0x1 goto 0x8801590
compare 0x5007 0x4
if 0x1 goto 0x88015B0
applymovement 0x9 0x8801470
waitmovement 0x9
msgbox 0x8801400 MSG_FACE '"Oh crap! Uh.... Err...\nHere! Take..."
applymovement 0x9 0x8801490
waitmovement 0x9
applymovement 0x10 0x88014B0
waitmovement 0x10
msgbox 0x88015D0 MSG_FACE '"Come back with my Coin Case!"
applymovement 0x10 0x88014D0
waitmovement 0x10
hidesprite 0x9
hidesprite 0x10
giveitem 0x104 0x1 0x2
setvar 0x5006 0x1
release
end

'---------------
#org 0x801450
movesprite 0x9 0x14 0x20
movesprite 0x10 0x14 0x20
return

'---------------
#org 0x801570
movesprite 0x9 0x15 0x20
movesprite 0x10 0x15 0x20
return

'---------------
#org 0x801590
movesprite 0x9 0x16 0x20
movesprite 0x10 0x16 0x20
return

'---------------
#org 0x8015B0
movesprite 0x9 0x17 0x20
movesprite 0x10 0x17 0x20
return


'---------
' Strings
'---------
#org 0x801500
= THEIF!

#org 0x801400
= Oh crap! Uh.... Err...\nHere! Take this!\lYou never saw me!

#org 0x8015D0
= Come back with my Coin Case!


'-----------
' Movements
'-----------
#org 0x801470
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x7 'Face Right (Faster)

#org 0x801490
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)

#org 0x8014B0
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1F 'Step Left (Fast)
#raw 0x1D 'Step Down (Fast)

#org 0x8014D0
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
I'm not really an expert on those variables, but, shouldn't you be using "call" instead of "goto" after each compare commands...?

Also, shouldn't you be adding the command #raw 0xFE after the movements?
Like this for instance...
Code:
#org 0x8014D0
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0x1D 'Step Down (Fast)
#raw 0xFE
__________________


3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)

~Serge,
Chrono Cross


Closed Thread
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 08:06 PM.