The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Nicknaming screen not showing. (https://www.pokecommunity.com/showthread.php?t=453505)

James Emerald June 8th, 2021 6:05 AM

Nicknaming screen not showing.
 
There was a problem after a Pokémon is given. You know, after a Pokémon was given, we had a chance to nickname it or not..

But this time it's different..

This was my script.

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x240
if 0x1 goto @Done
msgbox @question 0x5
compare LASTRESULT 0x1
if 0x1 goto @Yes
msgbox @saidnomsg 0x6
release
end

#org @Yes
countpokemon
compare 0x800D 0x6
if 0x1 goto @Full
msgbox @take 0x6
givepokemon 0x199 0x15 0x0 0x0 0x0 0x0
fanfare 0x101
msgbox @receive 0x4
waitfanfare
closeonkeypress
msgbox @nick 0x5
compare LASTRESULT 0x1
if 0x1 call @YesToNick
msgbox @Donemsg 0x6
setflag 0x240
release
end

#org @YesToNick
setvar 0x8004 0x0
call 0x81A74EB
return

#org @Full
msgbox @Fullmsg 0x6
release
end

#org @Done
msgbox @Donemsg 0x6
release
end

#org @question
= Do you like a legendary Pokémon?

#org @saidnomsg
= Too bad[.]

#org @Fullmsg
= You don't have enough room for your party.

#org @Donemsg
= Bye!

#org @take
= You can have one of mine!

#org @receive
= You received a JIRACHI

#org @nick
= Give a nickname to JIRACHI?



The problem is after I receive a Pokémon, the nicknaming screen doesn't show up. And it keeps on repeating the same script again and again after I pressed yes.. help me out.

Pyxal June 8th, 2021 10:53 PM

Quote:

Originally Posted by James Emerald (Post 10368997)
<snip>

Try this:
Spoiler:
Code:

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x240
if 0x1 goto @Done
msgbox @question 0x5
compare LASTRESULT 0x1
if 0x1 goto @Yes
msgbox @saidnomsg 0x6
release
end

#org @Yes
countpokemon
compare 0x800D 0x6
if 0x1 goto @Full
msgbox @take 0x6
givepokemon 0x199 0x15 0x0 0x0 0x0 0x0
fanfare 0x101
msgbox @receive 0x4
waitfanfare
closeonkeypress
msgbox @nick 0x5
compare LASTRESULT 0x0
if 0x1 goto @Done
call @YesToNick
goto @Done

#org @YesToNick
setvar 0x8004 0x0
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return

#org @Full
msgbox @Fullmsg 0x6
release
end

#org @Done
msgbox @Donemsg 0x6
setflag 0x240
release
end

#org @question
= Do you like a legendary Pokémon?

#org @saidnomsg
= Too bad[.]

#org @Fullmsg
= You don't have enough room for your party.

#org @Donemsg
= Bye!

#org @take
= You can have one of mine!

#org @receive
= You received a JIRACHI

#org @nick
= Give a nickname to JIRACHI?



James Emerald June 9th, 2021 8:45 PM

I wrote out your script... it seemed had the same issue but this time only the fadescreen command works. There were also parts missing.. the setflag 0x860 which gives access to Pokémon Menu.. and then, the script goes on over again.

Is there anything that is missing there yet?

I would have been wondering and yet, I was hacking Pokemon Emerald...

Setflag for Pokemon Emerald:
0x860 (gives access to PKMN Menu)

The nicknaming address:
special 0x166 / call 0x81A74EB

In this script:

#org @YesToNick
setvar 0x8004 0x0
fadescreen 0x1
special 0x166
waitstate
lock
faceplayer
return

only the fadescreen worked...but not appearing the nicknaming screen..

The script also repeats over and over again without saying the @donemsg

Pyxal June 10th, 2021 4:30 AM

Quote:

Originally Posted by James Emerald (Post 10369673)
<snip>


Ah, you should've mentioned you're on Emerald.
Try this, then:
Spoiler:
Code:

#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x240
if 0x1 goto @Done
msgbox @question 0x5
compare LASTRESULT 0x1
if 0x1 goto @Yes
msgbox @saidnomsg 0x6
release
end

#org @Yes
countpokemon
compare 0x800D 0x6
if 0x1 goto @Full
msgbox @take 0x6
givepokemon 0x199 0x15 0x0 0x0 0x0 0x0
fanfare 0x101
msgbox @receive 0x4
waitfanfare
closeonkeypress
msgbox @nick 0x5
compare LASTRESULT 0x1
if 0x1 goto @YesToNick
compare LASTRESULT 0x0
if 0x1 goto @Done
end

#org @YesToNick
setvar 0x8004 0x0
call @nickname
goto @Done

#org @nickname
fadescreen 0x1
special 0xA1
waitstate
return

#org @Full
msgbox @Fullmsg 0x6
release
end

#org @Done
msgbox @Donemsg 0x6
release
end

#org @question
= Do you like a legendary Pokémon?

#org @saidnomsg
= Too bad[.]

#org @Fullmsg
= You don't have enough room for your party.

#org @Donemsg
= Bye!

#org @take
= You can have one of mine!

#org @receive
= You received a JIRACHI

#org @nick
= Give a nickname to JIRACHI?




This is at x1A74EB in Emerald; not sure why you were
calling
it:
Code:

'---------------
#org 0x1A74EB
jumpram
nop1
comparefarbytes 0x34014004 0xF0001C20
comparefarbytes 0x44802FD 0x1BC1080
virtualcallif 0x0 0xF0000047
showpokepic 0x203 0x0 0xB5
if 0x48 call 0x49076800
warp4 0x18 0x0 0x88 0x2804 0xD80F
goto 0x480649



James Emerald June 11th, 2021 7:30 PM

Yes! It worked now... Thank you...
Thanks for the help, never thought I mistakenly wrote out 0x166... It was 0xA1.

Thanks a lot, mate...


All times are GMT -8. The time now is 9:14 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.