The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script why my Script changes itself ?!?!!!

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 September 15th, 2020 (1:50 PM). Edited September 15th, 2020 by ronik2014.
ronik2014's Avatar
ronik2014 ronik2014 is offline
 
Join Date: Sep 2020
Posts: 2
I wanted to roll random number between 0-2
and every number will give the player something different
but the script changes itself and ruin everything

my script:
'---------------
#org 0x850E00
random 0x3
compare LASTRESULT 0x0
if 0x1 goto 0x8234561
compare LASTRESULT 0x1
if 0x1 goto 0x8234564
compare LASTRESULT 0x2
if 0x1 goto 0x8234567


'---------------
#org 0x234561
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
end

'---------------
#org 0x234564
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
end

'---------------
#org 0x234567
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
end



The Script that the game gives:
'---------------
#org 0x71A46C
random 0x3
compare LASTRESULT 0x0
if 0x1 goto 0x8234561
compare LASTRESULT 0x1
if 0x1 goto 0x8234564
compare LASTRESULT 0x2
if 0x1 goto 0x8234567
end

'---------------
#org 0x234561
givepokemon 0x1 0x79 0x4 0x5000779 0x0 0x0
nop
nop
nop
nop
nop
nop

end

'---------------
#org 0x234564
givepokemon 0x4 0x79 0x7 0x5 0x0 0x0
nop
nop
nop

end

'---------------
#org 0x234567
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
end



please HELP!!!
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old September 15th, 2020 (2:20 PM).
kalarie kalarie is offline
 
Join Date: Jun 2008
Posts: 760
@ronik2014

From the provided info I can see that both scripts are at completely different offsets. Are you sure you put the correct script offset for the person event/script event in AdvanceMap?
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old September 15th, 2020 (9:24 PM).
Dr. Seuss's Avatar
Dr. Seuss Dr. Seuss is offline
Navegando en mi automóvil, hablando con la nena por el móvil 😎...
 
Join Date: Feb 2014
Location: Guatemala City
Age: 27
Gender: Male
Nature: Brave
Posts: 521
Quote:
Originally Posted by ronik2014 View Post
... ...
I
I'm pretty sure you're getting this error because you're giving only 3 bytes to each jump. The givepokemon command requires 9 bytes so you can try this script. This is just a reference. I'm not sure if you have more free space in this cares of your ROM.

'---------------
#org 0x850E00
random 0x3
compare LASTRESULT 0x0
if 0x1 goto 0x8234561
compare LASTRESULT 0x1
if 0x1 goto 0x823456B
compare LASTRESULT 0x2
if 0x1 goto 0x8234575


'---------------
#org 0x234561
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
end

'---------------
#org 0x23456B
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
end

'---------------
#org 0x234575
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
end[/B]
__________________
Graphic design is my passion...

Click on the picture to see the best hack ever created (?
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old September 15th, 2020 (11:24 PM). Edited September 15th, 2020 by ronik2014.
ronik2014's Avatar
ronik2014 ronik2014 is offline
 
Join Date: Sep 2020
Posts: 2
Quote:
Originally Posted by kalarie View Post
@ronik2014

From the provided info I can see that both scripts are at completely different offsets. Are you sure you put the correct script offset for the person event/script event in AdvanceMap?
yeah my mistake
I didn't copy it good
but it's not the problem

Quote:
Originally Posted by Dr. Seuss View Post
I
I'm pretty sure you're getting this error because you're giving only 3 bytes to each jump. The givepokemon command requires 9 bytes so you can try this script. This is just a reference. I'm not sure if you have more free space in this cares of your ROM.

'---------------
#org 0x850E00
random 0x3
compare LASTRESULT 0x0
if 0x1 goto 0x8234561
compare LASTRESULT 0x1
if 0x1 goto 0x823456B
compare LASTRESULT 0x2
if 0x1 goto 0x8234575


'---------------
#org 0x234561
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
end

'---------------
#org 0x23456B
givepokemon 0x4 0x5 0x0 0x0 0x0 0x0
end

'---------------
#org 0x234575
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
end[/B]
so couldn't I do this script from the beginning ?
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:15 AM.