The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Script for Nickname causes error

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old November 24th, 2020 (6:15 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Hi,
I wrote this Script for an event on a Scripting Tile (Green "S" Tile).
My Problem is whenever it reaches the Nickname Part and one selects YES the script ends and the player can move around and
even step back on the Script Tile again.
I would like to know why it does that.
Any Help is welcome.😄

Here is the Script:

#dynamic 0x800000
#org @start
lock
faceplayer
spriteface 0xA 0x2
spriteface 0xFF 0x1
msgbox @talk 0x6
applymovement 0xA @m1
waitmovement 0x0
msgbox @t1 0x6
givepokemon 0x19 0x2D 0xCA 0x0 0x0 0x0 //gives a lvl45 Pikachu

fanfare 0x13E
msgbox @notify 0x4 //msgbox that you got a Pokemon
waitfanfare
closeonkeypress
msgbox @qname 0x5 //Asks the player if they want to nickname their pokemon
compare 0x800D 0x1 //Checks to see if the player selected 'Yes'
if 0x1 gosub @nickname //If yes then the @nickname script will run and then return
giveitem 0xC5 0x2 MSG_OBTAIN //gives 2 Lucky Eggs


msgbox @t2 0x6
applymovement 0xA @m2
waitmovement 0x0
hidesprite 0xA
setflag 0x286
hidesprite 0xA
setvar 0x4018 0x1
release
end

#org @m1
#raw 0x12
#raw 0x12
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0xFE

#org @talk
= WAIT, [PLAYER]!\nHOLD UP, WAIT A MINUTE!!!

#org @t1
= ..... //omitted

#org @t2
= .... //omitted

#org @nickname
call 0x1A74E
return

#org @notify
= [Player] received a PIKACHU!

#org @qname
= Would you like to give PIKACHU a\nnickname?

#org @m2
#raw 0x10
#raw 0x12
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old November 24th, 2020 (4:15 PM).
mcferaligatr's Avatar
mcferaligatr mcferaligatr is offline
 
Join Date: Nov 2018
Posts: 120
I'm pretty sure that this script part of the script will only nickname the first pokemon in the party but here it goes

msgbox @nicknamemsg 0x5
compare lastresult 0x1
if 0x1 call @nickname

#org @nickname
setvar 0x8004 0x0
fadescreen 0x1
special 0x9E
waitstate
return

'-----------------------------
this may help for pokemon received in the middle of the game:


#org @nickname
countpokemon
subvar 0x800D 0x1
copyvar 0x8004 0x800D
call @namethepokemon
release
end

#org @namethepokemon
fadescreen 0x1
special 0x9E
waitstate
return
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old November 25th, 2020 (4:08 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Thanks mcferaligatr.😄
It works now.
Only Problem is it deletes your sixth slot Party pokemon if you have one.😅
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

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 GMT -8. The time now is 9:16 AM.