The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other find item script

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 May 29th, 2015 (7:26 AM).
juliannom juliannom is offline
 
Join Date: May 2015
Gender: Male
Posts: 22
Hi, I've got a problem when trying to add "pokeballs" to my maps so the player can find items there.
I've tried many different ways to do that both on PokeScript and XSE. The script looks just the same
as the ones that were originally in the game, but for some reason after I get the item it reappears when I walk away.

How do I solve this issue?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 29th, 2015 (7:38 AM).
Anexenaumoon Anexenaumoon is offline
 
Join Date: May 2015
Gender: Male
Posts: 16
Quote:
Originally Posted by juliannom View Post
Hi, I've got a problem when trying to add "pokeballs" to my maps so the player can find items there.
I've tried many different ways to do that both on PokeScript and XSE. The script looks just the same
as the ones that were originally in the game, but for some reason after I get the item it reappears when I walk away.

How do I solve this issue?
theres a number of things you possibly couldve done wrong, i would never use poketscript, its old and outdated... can you post the script youre writing? we cant help unless if we have an example. Did you use hidesprite command as well? With the person id to hide? as well, make sure you use a different offset when inserting the script as you dont want to overwrite data!
~Anexenaumoon
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 29th, 2015 (3:57 PM).
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Did you remember to set a Person ID just below the "Script offset" Box in advance map?
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 30th, 2015 (4:03 AM). Edited June 2nd, 2015 by juliannom.
juliannom juliannom is offline
 
Join Date: May 2015
Gender: Male
Posts: 22
This is how the script looks like

XSE:
#org 0x7B70D8
giveitem 0x3 0x1 MSG_FIND
end

PokéScript
#org 0x87B70D8
'-----------------------------------
copyvarifnotzero 0x8000 GREATBALL
copyvarifnotzero 0x8001 0x1
callstd MSG_FIND ' PLAYER found one XXXXXX!
end


These scripts look exactly like the ones that were on the original game, so that's why I can't understand what's wrong.

Squeetz, since I didn't see any Person ID on the Find_Item scripts on the original game, I haven't set any, should I do that? I've found many tutorials on how to make a character give you an item, and I can do that with no problem, but when it comes to these simple items scattered on the map I dunno what to do to make them work...


I managed to solve the problem. If anybody else that's new to hacking faces the same problem, here's the solution:
I thought it worked, but apparently it only took longer to reappear. In maps that existed previously, they reappear after I battle a wild pokémon or trainer. In maps I added they reappear after I walk about 4-5 steps. Please, can anybody help me find a solution for that? I looked for tutorials concerning this everywhere and I can't see what I'm doing wrong...
This is the script I'm currently using:

XSE:
#org 0x7B70D8
hidesprite 0x1 (here change '1' for the person event number)
giveitem 0x3 0x1 MSG_FIND
setflag 0x9001 (use the same flag number as the person ID)
release
end
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old June 2nd, 2015 (6:36 AM).
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Are you really using flag 9001? There's your problem right there.
Using flags that high is unsafe. If you're hacking Fire Red, you should stick to flags 200-2FF
I'll quote karatekid552 from PHO: "Flags 0x900 and up overlap the RAM used for script variables and hence ARE NOT SAFE TO USE."
Use this as a reference:
http://pokemonhackersonline.com/showthread.php?t=14110-Flags-Vars-and-Script-Tiles
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old June 3rd, 2015 (12:25 PM).
juliannom juliannom is offline
 
Join Date: May 2015
Gender: Male
Posts: 22
Dude, that was exactly my problem! Thank you very much for that, now everything is working fine.
I still can't believe the problem was so simple and I was so dumb to realize that.
Thx a lot for your help.
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:11 AM.