The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Giveitem not working

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 20th, 2015 (10:55 AM). Edited May 20th, 2015 by ShadowSorcererX.
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
So when I use the following script on my Pokemon Ruby version the pokeball just sits there and does nothing. It acts like there's no script in it, and there is, I close ExtremeSciptEditor after compiling it and what I put in is still there. Maybe I'm using the wrong command? I have no idea, all I know is that I cant get 1 potion with the following script like I want to.

'---------------
#org 0x8076E0
giveitem2 0x1 0xD 0xFE
end
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 20th, 2015 (10:58 AM).
Joexv's Avatar
Joexv Joexv is offline
ManMadeOfGouda
joexv.github.io
 
Join Date: Oct 2012
Location: Oregon
Age: 25
Gender: Male
Nature: Sassy
Posts: 1,035
Quote:
Originally Posted by ShadowSorcererX View Post
So when I use the following script on my Pokemon Ruby version the pokeball just sits there and does nothing. It acts like there's no script in it, and there is, I close ExtremeSciptEditor after compiling it and what I put in is still there. Maybe I'm using the wrong command? I have no idea, all I know is that I cant get 1 potion with the following script like I want to.

'---------------
#org 0x8076E0
giveitem2 0x1 0xD 0xFE
end
Try it like this:
Giveitem 0x1 0xd 0x1

this will display the obtained message and hide the sprite and set the person id so it stays hidden. If you want a fanfare add just add
"fanfare 0xfe
waitfanfare"
__________________
New living flesh vessel who dis?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 20th, 2015 (11:02 AM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
Quote:
Originally Posted by ShadowSorcererX View Post
So when I use the following script on my Pokemon Ruby version the pokeball just sits there and does nothing. It acts like there's no script in it, and there is, I close ExtremeSciptEditor after compiling it and what I put in is still there. Maybe I'm using the wrong command? I have no idea, all I know is that I cant get 1 potion with the following script like I want to.

'---------------
#org 0x8076E0
giveitem2 0x1 0xD 0xFE
end

Is there a reason you're using giveitem2 over giveitem?

Try giveitem 0xD 0x1 0x1, the potion byte, 'D' comes before the quantity.


// Ninja'd! :D

For extra info you can learn how to use giveitem2 here under 'Custom Item Dialog'.
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 20th, 2015 (11:28 AM).
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
I tried both of your suggestions but I get the same result. No idea why.

Also, I tried copying a script of a pokeball in game and pasted it onto the one that won't work, but even that wouldn't work...
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 20th, 2015 (11:57 AM).
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
Ok guys so it turns out that the command is broken for me unless you spot something wrong in the following. I've been working on a script to where when you step on a tile, an npc will appear before you, say some stuff, and then battle you. Why is this relevant? Because I wanted to make it to where after you win the npc gives you some pokeballs, so the text below shows what should give me pokeballs. (this is part of a script, not all of it) But when I tried this in game, the entire script worked, but I didn't get 5 pokeballs. So for person events as well as scripts, the giveitem command will not work for me. If they're alternate commands I could use instead of giveitem or you guys spot something wrong with my script please tell me. I have no idea why giveitem is not working.

fanfare 0xFE
msgbox @pokeball 0x6
giveitem 0x4 0x5 0xFE
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 20th, 2015 (12:39 PM).
JaDe.X105's Avatar
JaDe.X105 JaDe.X105 is offline
 
Join Date: Apr 2015
Age: 32
Gender: Male
Posts: 379
Quote:
Originally Posted by ShadowSorcererX View Post
fanfare 0xFE
msgbox @pokeball 0x6
giveitem 0x4 0x5 0xFE
Ok, a few things that I'm noticing:
The system already plays a fanfare when you use giveitem, so you don't have to play your own,
Instead of 0xFE at the end of giveitem, it should be something like 0x0

the syntax for giveitem is: [Item # to add] [Quantity] [Message type]
A resource that I found to be very beneficial is YouTube channel PokemonXSE101 for some of the basics of scripting (the account is inactive now, but the videos are very informative). They have a 10 part lesson covering some helpful introductory parts of XSE, I would recommend you look at parts 4 and 5 as those cover giveitem from an NPC and from on the ground, respectively.
__________________

Come join us in The Underground
Or check out my latest blog post in Genwunner No More!
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old May 20th, 2015 (12:59 PM).
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
Alright so I made a warp out of the area I was in to see if I could pick up any pokeballs that you can normally pick up in game, and alas I was startled to find out I could pick up none! So the player cannot pickup any items off the ground, even ones that are normally in game. So you are all probably thinking what I thought, the rom I have is busted/glitchy. Well I got the same pokemon ruby rom from the original file I downloaded, and the first pokeball I saw I could pickup. So I don't think my script is wrong, but I think there is a flag/special I haven't set for the player that enables you to pickup items. But I haven't a clue if this flag/special exists. I will look through an unedited copy of pokemon ruby for now and maybe I will find something.
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old May 20th, 2015 (1:03 PM).
Mana's Avatar
Mana Mana is offline
 
Join Date: Jan 2009
Location: UK
Age: 31
Gender: Male
Posts: 10,075
There's no flag or special for that ^

There was probably an error made in your ROM if it originally worked. Not really clear but if you're 100% no item scripts are working in your edited ROM it's probably best to start again.
__________________
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old May 20th, 2015 (1:30 PM).
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
Alright guys I did some testing and the strangest thing happened. The giveitems don't work on a specific route. Now I know I contradict myself in the first sentence from my last post, but hear me out. So I put a potion in the first area the player starts in, works. Put a potion in the first town the player warps to, works. Then I put one in the route I've been working on. Doesn't work. But I think I know why. When I first started working on this route, on the Header section of advance map I was looking around at the map script. I actually messed around with that and I'm almost 100% sure that's why picking up items on this specific route doesn't work. Why it stopped working on the route thats normally in the game, no idea. But everything is all well now because all I had to do was move my map over to a new location and viola! It works! Thank you all so much, PokeCommunity, Best Community! :D
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.