The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Give pokemon to NPC

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 December 2nd, 2015 (2:09 PM). Edited December 3rd, 2015 by PokemonValor.
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
How can I make a script in which the player gives an NPC a pokemon? It would probably just have to open up the party, but I'm not even sure how to do that. Hopefully this isn't a difficult thing to do. Thanks!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old December 2nd, 2015 (5:48 PM).
Vendily's Avatar
Vendily Vendily is offline
 
Join Date: Aug 2015
Nature: Calm
Posts: 1,604
Quote:
Originally Posted by PokemonValor View Post
How can I make a script in which the player gives an NPC a pokemon? It would probably just have to open up the party, but I'm not even sure how to do that. Hopefully this isn't a difficult thing to do. Thanks!
Firered:
Well, you can use Special 0x9F to have the player select a slot. which returns the selected slot to var 0x8004.
There is no special that removes Pokemon permanently but you can use one of the daycare specials, 0xBB which stores the pokemon in the slot saved in var 0x8004.
Special list: http://www.pokecommunity.com/showthread.php?t=184273
__________________
| VPP Stats

Common Errors (and How to Fix Them) in Essentials
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old December 2nd, 2015 (7:05 PM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Okay so if I use that daycare method, there's no way it will appear in a separate daycare somewhere else, is there?
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old December 2nd, 2015 (7:36 PM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Also, I accidentally left out an important part of my problem, the pokemon that you give has to be a magikarp...So the script is that the NPC will give you a Good Rod if you give him a magikarp. Although if actually removing it will be too difficult, I would settle for just having him look at your party to see if you have one with you
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old December 2nd, 2015 (10:15 PM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 625
http://www.pokecommunity.com/showthread.php?t=206138
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (4:52 AM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Sorry to be picky, but does anyone have any non-ASM ways? I can tell you're good at it, but I don't know the first thing about it...
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (5:26 AM). Edited December 3rd, 2015 by Vendily.
Vendily's Avatar
Vendily Vendily is offline
 
Join Date: Aug 2015
Nature: Calm
Posts: 1,604
Quote:
Originally Posted by PokemonValor View Post
Also, I accidentally left out an important part of my problem, the pokemon that you give has to be a magikarp...So the script is that the NPC will give you a Good Rod if you give him a magikarp. Although if actually removing it will be too difficult, I would settle for just having him look at your party to see if you have one with you
Well, you still would use special 9F, then you use special 147, which returns the index number of the pokemon.
Then you compare the return to this list: http://bulbapedia.bulbagarden.net/wiki/List_of_Pok%C3%A9mon_by_index_number_(Generation_III)
As for deleting the pokemon, the daycare is the only non-asm way I know.

EDIT: you could use the smaller daycare's special, 176, to store the pokemon.
__________________
| VPP Stats

Common Errors (and How to Fix Them) in Essentials
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (6:21 AM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Alright thanks! I'm sure I could make that work. So just to be clear, this would mess with the smaller day care right?
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (7:27 AM).
Vendily's Avatar
Vendily Vendily is offline
 
Join Date: Aug 2015
Nature: Calm
Posts: 1,604
Quote:
Originally Posted by PokemonValor View Post
Alright thanks! I'm sure I could make that work. So just to be clear, this would mess with the smaller day care right?
Yep, but there's omly one pokemon slot, any new pokemon taken like this with special 0x176 will overwrite the last.
__________________
| VPP Stats

Common Errors (and How to Fix Them) in Essentials
Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (7:31 AM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Ohh okay cool, that's good. But so, say someone gives the fisherman the magikarp, then goes to the day care. Will the guy there be like "do you want your magikarp back?"?
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (7:49 AM).
Vendily's Avatar
Vendily Vendily is offline
 
Join Date: Aug 2015
Nature: Calm
Posts: 1,604
Quote:
Originally Posted by PokemonValor View Post
Ohh okay cool, that's good. But so, say someone gives the fisherman the magikarp, then goes to the day care. Will the guy there be like "do you want your magikarp back?"?
Unfortunately, yes. You either remove the smaller daycare, or use the ASM Touched linked.
__________________
| VPP Stats

Common Errors (and How to Fix Them) in Essentials
Reply With Quote
  #12   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (8:05 AM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Alright well thanks for the help. One last thing just so I'm sure I got it, when checking for the species, special 0x147 will get the ID of the Pokemon in in 0x8004? Then I could just do like...
compare LASTRESULT 0xmagikarp
If != jump @wrongpokemon
Kind of?
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #13   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (8:13 AM). Edited December 3rd, 2015 by Vendily.
Vendily's Avatar
Vendily Vendily is offline
 
Join Date: Aug 2015
Nature: Calm
Posts: 1,604
Quote:
Originally Posted by PokemonValor View Post
Alright well thanks for the help. One last thing just so I'm sure I got it, when checking for the species, special 0x147 will get the ID of the Pokemon in in 0x8004? Then I could just do like...
compare LASTRESULT 0xmagikarp
If != jump @wrongpokemon
Kind of?
LASTRESULT is 0x800D if I remember correctly but that's basically it.
Also, special 147 requires Special2. The thread I linked explains it.
__________________
| VPP Stats

Common Errors (and How to Fix Them) in Essentials
Reply With Quote
  #14   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (8:32 AM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Got it. Thanks again for the help
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
Reply With Quote
  #15   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (8:35 AM).
Touched's Avatar
Touched Touched is offline
Resident ASMAGICIAN
 
Join Date: Jul 2014
Gender: Male
Posts: 625
Quote:
Originally Posted by PokemonValor View Post
Sorry to be picky, but does anyone have any non-ASM ways? I can tell you're good at it, but I don't know the first thing about it...
You literally insert the ASM at offset X, then do callasm X + 1. The slot is in var 0x8004. You don't have to understand it to use it, and pretty much the only difference to the daycare is that you callasm instead of special. The advantage of this approach is that it doesn't break the daycare system.
__________________

A Pokemon that is discriminated!
Support squirtle and make it everyone's favourite.
Reply With Quote
  #16   Link to this post, but load the entire thread.  
Old December 3rd, 2015 (8:02 PM).
PokemonValor's Avatar
PokemonValor PokemonValor is offline
 
Join Date: Oct 2015
Location: Celadon City, Kanto
Gender: Male
Nature: Lax
Posts: 98
Quick update, I got it working completely good enough for me. The NPC doesn't take the magikarp but just checks to see if you have one with you. Thanks again Vendily
__________________
Check out our hack, POKEMON VALOR in the Progressing Hacks page!
Always looking for feedback and suggestions.
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:10 AM.