- 215
- Posts
- 12
- Years
- Seen Jul 14, 2020
Alright so I am working on a script for my game and I was wondering if someone would be able to help me. What I want is, when you run into a trainer, he will battle you. Pretty simple right? However the difficult part is getting his pokemon to change depending on how far you have progressed through the game. For example, if 0x4012 is set to 0x0, you will fight a weak pokemon. However, if 4012 is set to 0x1, you will fight something stronger. This is the script that I have.
'---------------
#org 0x8084DA
lock
faceplayer
textcolor 0x0
compare 0x4012 0x0
if 0x1 goto 0x8808502
compare 0x4012 0x1
if 0x1 goto 0x880851B
compare 0x4012 0x2
if 0x1 goto 0x8808534
release
end
'---------------
#org 0x808502
trainerbattle 0x0 0x3 0x0 0x880854D 0x8808559
msgbox 0x8808565 MSG_NORMAL '"Talking 3"
release
end
'---------------
#org 0x80851B
trainerbattle 0x0 0x4 0x0 0x880854D 0x8808559
msgbox 0x8808565 MSG_NORMAL '"Talking 3"
release
end
'---------------
#org 0x808534
trainerbattle 0x0 0x5 0x0 0x880854D 0x8808559
msgbox 0x8808565 MSG_NORMAL '"Talking 3"
release
end
'---------
' Strings
'---------
#org 0x80854D
= Talking 1
#org 0x808559
= Talking 2
#org 0x808565
= Talking 3
See, I am doing this using JPANs hack applier. In order to make the JPANs hack applier option work, you need to set the 'Unknown' value to be anything but 00. So in this case mine is set to 01. The script works perfectly fine except for one thing. Once you finish the battle, you can talk to the trainer and everything is normal. However once you leave the map and come back the trainer spots you again, does the talking, but doesn't do the battle. I don't want that to happen. The trainer should NEVER spot you again. The trainer should just be standing there and will say "Talking 3" if you talk to him. Anyone know how to fix this issue? If you are still confused please let me know and I will explain in more detail.
Please only answer if you have a good understanding of JPANs hack applier. I feel like I am a pretty decent hacker and this error isn't something simple.
Spoiler:
'---------------
#org 0x8084DA
lock
faceplayer
textcolor 0x0
compare 0x4012 0x0
if 0x1 goto 0x8808502
compare 0x4012 0x1
if 0x1 goto 0x880851B
compare 0x4012 0x2
if 0x1 goto 0x8808534
release
end
'---------------
#org 0x808502
trainerbattle 0x0 0x3 0x0 0x880854D 0x8808559
msgbox 0x8808565 MSG_NORMAL '"Talking 3"
release
end
'---------------
#org 0x80851B
trainerbattle 0x0 0x4 0x0 0x880854D 0x8808559
msgbox 0x8808565 MSG_NORMAL '"Talking 3"
release
end
'---------------
#org 0x808534
trainerbattle 0x0 0x5 0x0 0x880854D 0x8808559
msgbox 0x8808565 MSG_NORMAL '"Talking 3"
release
end
'---------
' Strings
'---------
#org 0x80854D
= Talking 1
#org 0x808559
= Talking 2
#org 0x808565
= Talking 3
See, I am doing this using JPANs hack applier. In order to make the JPANs hack applier option work, you need to set the 'Unknown' value to be anything but 00. So in this case mine is set to 01. The script works perfectly fine except for one thing. Once you finish the battle, you can talk to the trainer and everything is normal. However once you leave the map and come back the trainer spots you again, does the talking, but doesn't do the battle. I don't want that to happen. The trainer should NEVER spot you again. The trainer should just be standing there and will say "Talking 3" if you talk to him. Anyone know how to fix this issue? If you are still confused please let me know and I will explain in more detail.
Please only answer if you have a good understanding of JPANs hack applier. I feel like I am a pretty decent hacker and this error isn't something simple.