The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Script Help PLEASE!

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 February 20th, 2020 (6:48 PM). Edited February 20th, 2020 by nxjforever.
nxjforever nxjforever is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 9
Hello,

Iv used the Flag, and Variable expansion files and also the Japaneses patch so that those files would run. But now Im just trying to write a simple givepokemon script

Script
#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @t1 0x6
givepokemon 0x01 0x63 0x68 0x0 0x0 0x0
setflag 0x828
release
end

#org @t1
= Hey here's a starter for you. The\nprofessor's will be a whimp\lcompared!

When I go into Advance Map and open the script from there is opens into something gamefreak made. An only plays a sound and nothing after. Can someone give me a hand?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old February 20th, 2020 (7:30 PM). Edited February 20th, 2020 by Droark236.
Droark236's Avatar
Droark236 Droark236 is offline
Derek
 
Join Date: Feb 2020
Location: Bogota, Colombia
Age: 31
Gender: Male
Posts: 12
I've had issues with the "givepokemon" command as well and there are a lot of moving parts here, however, I'll breakdown what I know:

Assuming your flag expand is working here is useful info:

So remember that the numbers you're working with are using the expanded number system and it works like this: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. In this way, Not sure if you want your Poke at 63 or you already know this, but I like to be thorough. Same goes for the item code (I assume you know that, though as the lists already have this in place).

Code that should work (if your flag expand thing is working):

#dynamic 0x800000
#org @start
lock
faceplayer
checkflag 0x828
if 0x1 goto @alreadyreceived
msgbox @t1 0x6
givepokemon 0x01 0x3F 0x68 0x0 0x0 0x0
setflag 0x828
release
end

#org @alreadyreceived
@t2 msgbox 0x6
release
end

#org @t2
= Bro, I just gave it to you!

#org @t1
= Here's a Pokemon, my dude

---------------------------------------------------------
Finally, these are the "duh, how did I make that mistake" problems but they both tripped me up in the past.
1. You're batch compiling to the wrong file. You're copying the correct offset and pasting the correct offset but the code is on another game.
2. If your offset doesn't fill every space available in the offset section, be sure to add 00 at the start. Otherwise, the game will add something like 80 to the end of your correct offset and you'll go to a random offset that's not yours.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old February 21st, 2020 (9:01 AM).
nxjforever nxjforever is offline
 
Join Date: Jul 2013
Gender: Male
Posts: 9
Thank you for responding I’ll try this when I get home. I believe it’s the adding 00!
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:18 AM.