- 29
- Posts
- 10
- Years
- Seen Jul 11, 2014
Alrighty guys, here's my code:
The script is a rival battle. No checkgender is needed, my rival is always a female. I'm honestly unsure of copyvar 0x8000 0x4023, I just copied it from another rival battle in the base Emerald game. I'm fairly sure it checks the starter Pokemon and chooses the trainer battle accordingly, seems to work fine. However, once the script is compiled it turns into:
As you can see, setflag and below in the first set is removed and replaced with another trainerbattle with a return afterwards. Any ideas?
Code:
'---------------
#org 0x9C3400
lockall
setdooropened 0xB 0x4B
doorchange
clearflag 0x1217
applymovement 0x1 0x89C35E1
waitmovement 0x1
setdoorclosed 0xB 0x4B
doorchange
applymovement 0x1 0x89C35E4
applymovement MOVE_PLAYER 0x89C35E8
waitmovement 0x1
applymovement 0x1 0x89C35EB
waitmovement 0x1
msgbox 0x89C349C MSG_NORMAL '"Oh, hey [player]!\pI'm so glad you..."
copyvar 0x8000 0x4023
compare 0x8000 0x0
if 0x1 call 0x89C3478
compare 0x8000 0x1
if 0x1 call 0x89C3484
compare 0x8000 0x2
if 0x1 call 0x89C3490
msgbox 0x89C34E9 MSG_NORMAL '"Well, that's that I suppose.\pI'm ..."
applymovement 0x1 0x89C35F1
waitmovement 0x1
hidesprite 0x1
setflag 0x1217
setvar 6008 0x1
releaseall
end
'---------------
#org 0x9C3478
trainerbattle 0x3 0x8 0x0 0x89C35AD
return
'---------------
#org 0x9C3484
trainerbattle 0x3 0x9 0x0 0x89C35AD
return
'---------------
#org 0x9C3490
trainerbattle 0x3 0xA 0x0 0x89C35AD
return
'---------
' Strings
'---------
#org 0x9C349C
= Oh, hey [player]!\pI'm so glad you caught up. I've\nbeen itching to have a battle!
#org 0x9C34E9
= Well, that's that I suppose.\pI'm heading into Dividing Cave. I\nheard that the city on the other\lside of the cave actually has a\lgym! I feel as if I'm ready.\pYou should come too! Race you\nthere!
#org 0x9C35AD
= Your Pokemon are much stronger\nthan I expected...
'-----------
' Movements
'-----------
#org 0x9C35E1
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements
#org 0x9C35E4
#raw 0x2 'Face Left
#raw 0x56 'Exclamation Mark (!)
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x9C35E8
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x9C35EB
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements
#org 0x9C35F1
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0xFE 'End of Movements
The script is a rival battle. No checkgender is needed, my rival is always a female. I'm honestly unsure of copyvar 0x8000 0x4023, I just copied it from another rival battle in the base Emerald game. I'm fairly sure it checks the starter Pokemon and chooses the trainer battle accordingly, seems to work fine. However, once the script is compiled it turns into:
Code:
'---------------
#org 0x9C3400
lockall
setdooropened 0xB 0x4B
doorchange
clearflag 0x1217
applymovement 0x1 0x89C35E1
waitmovement 0x1
setdoorclosed 0xB 0x4B
doorchange
applymovement 0x1 0x89C35E4
applymovement MOVE_PLAYER 0x89C35E8
waitmovement 0x1
applymovement 0x1 0x89C35EB
waitmovement 0x1
msgbox 0x89C349C MSG_NORMAL '"Oh, hey [player]!\pI'm so glad you..."
copyvar 0x8000 0x4023
compare 0x8000 0x0
if 0x1 call 0x89C3478
compare 0x8000 0x1
if 0x1 call 0x89C3484
compare 0x8000 0x2
if 0x1 call 0x89C3490
msgbox 0x89C34E9 MSG_NORMAL '"Well, that's that I suppose.\pI'm ..."
applymovement 0x1 0x89C35F1
waitmovement 0x1
hidesprite 0x1
trainerbattle 0x3 0x8 0x0 0x89C35AD
return
'---------------
#org 0x9C3478
trainerbattle 0x3 0x8 0x0 0x89C35AD
return
'---------------
#org 0x9C3484
trainerbattle 0x3 0x9 0x0 0x89C35AD
return
'---------------
#org 0x9C3490
trainerbattle 0x3 0xA 0x0 0x89C35AD
return
'---------
' Strings
'---------
#org 0x9C349C
= Oh, hey [player]!\pI'm so glad you caught up. I've\nbeen itching to have a battle!
#org 0x9C34E9
= Well, that's that I suppose.\pI'm heading into Dividing Cave. I\nheard that the city on the other\lside of the cave actually has a\lgym! I feel as if I'm ready.\pYou should come too! Race you\nthere!
#org 0x9C35AD
= Your Pokemon are much stronger\nthan I expected...
'-----------
' Movements
'-----------
#org 0x9C35E1
#raw 0x8 'Step Down (Normal)
#raw 0xFE 'End of Movements
#org 0x9C35E4
#raw 0x2 'Face Left
#raw 0x56 'Exclamation Mark (!)
#raw 0x14 'Delay5
#raw 0xFE 'End of Movements
#org 0x9C35E8
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x9C35EB
#raw 0x8 'Step Down (Normal)
#raw 0x8 'Step Down (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xA 'Step Left (Normal)
#raw 0xFE 'End of Movements
#org 0x9C35F1
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0x38 'Slide Running Right
#raw 0xFE 'End of Movements
As you can see, setflag and below in the first set is removed and replaced with another trainerbattle with a return afterwards. Any ideas?