Registrarse

Special 0xF5

Estado
Cerrado para nuevas respuestas.

jrlopes

Héroe de WaH
I would like to use the SPECIAL 0XF5 that allows you to battle by choosing three Pokémon, how could you put this code in the trainerbattle scrpit with setflag so it disappears after the battle?
 

Lunos

Enfrentando a La Organización
Miembro insignia
I would like to use the SPECIAL 0XF5 that allows you to battle by choosing three Pokémon, how could you put this code in the trainerbattle scrpit with setflag so it disappears after the battle?
If I understood your message correctly, you want a trainer to dissapear after the battle, correct?
Then you just have to add a "hidesprite 0xTheTrainer'sPersonEventNumber" and give him an empty flag that will act as his PersonID.

Quick example:
Código:
#dynamic 0x800000
#org @start
trainerbattle 0x0 0x001 0x0 @before @after
hidesprite 0xTheTrainer'sPersonEventNumber // You can see an NPC's Person Event Number in Advance Map
setflag 0x200
release
end

#org @before
= Go, all my PIKACHUs!

#org @after
= Nooo! My PIKACHUs!!!!!
Then you go to that exact trainer in Advance Map and you give it "0200" as its PersonID.

A little tip I'd like to add, is that I normally cover the hidesprite by using fadescreens.
You could give it a try and check if you like the result.
Código:
fadescreen 0x1
hidesprite 0xTheTrainer'sPersonEventNumber
fadescreen 0x0
 

jrlopes

Héroe de WaH
Could you send me an example of the code that I made when I change the ex setflag: 0x200 then used 0x201 it does not accept the battle.

#dynamic 0x800000

#org @inicio
lock
faceplayer
msgbox @fala 0x6
if 0x1 goto @battle
release
end

#org @battle
special 0x27
special 0xF5
checkflag 0x222
trainerbattle 0x1 0x70 0x0 @before @defeat @after
release
end

#org @after
msgbox @beaten 0x6
special 0x28
setflag 0x222
fadescreen 0x1
hidesprite 2
fadescreen 0x0
release
end

#org @fala
= [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo.

#org @before
= [black_fr]Será que você escolheu bem?

#org @defeat
= Isso vai ter volta!

#org @beaten
= [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
 

Inferno

Miembro insignia
Miembro insignia
Could you send me an example of the code that I made when I change the ex setflag: 0x200 then used 0x201 it does not accept the battle.

#dynamic 0x800000

#org @inicio
lock
faceplayer
msgbox @fala 0x6
if 0x1 goto @battle
release
end

#org @battle
special 0x27
special 0xF5
checkflag 0x222
trainerbattle 0x1 0x70 0x0 @before @defeat @after
release
end

#org @after
msgbox @beaten 0x6
special 0x28
setflag 0x222
fadescreen 0x1
hidesprite 2
fadescreen 0x0
release
end

#org @fala
= [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo.

#org @before
= [black_fr]Será que você escolheu bem?

#org @defeat
= Isso vai ter volta!

#org @beaten
= [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
In principle, the adaptation of this script with the parameters of some commands should work. You don't need the checkflag, because with the setflag you are making the mini disappear, the script won't longer be repeated.

Código:
#dynamic 0x800000

#org @inicio
lock
faceplayer
msgbox @fala 0x6
waitmsg
special 0x27
special 0xF5
waitstate
pause 0x25
trainerbattle 0x1 0x70 0x0 @before @defeat @after

#org @after
msgbox @beaten 0x6
special 0x28
fadescreen 0x1
hidesprite 0xA
fadescreen 0x0
release
end

#org @fala
= [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo.

#org @before
= [black_fr]Será que você escolheu bem?

#org @defeat
= Isso vai ter volta!

#org @beaten
= [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
 

Cheve

MoonLover~
Miembro de honor
Oh! I just wanna add one little thing, probably the "I See you" thing of the trainer wont work with this script, you should add some Scripts in the floor that trigger the movement and the script itself
 

jrlopes

Héroe de WaH
In principle, the adaptation of this script with the parameters of some commands should work. You don't need the checkflag, because with the setflag you are making the mini disappear, the script won't longer be repeated.

Código:
#dynamic 0x800000

#org @inicio
lock
faceplayer
msgbox @fala 0x6
waitmsg
special 0x27
special 0xF5
waitstate
pause 0x25
trainerbattle 0x1 0x70 0x0 @before @defeat @after

#org @after
msgbox @beaten 0x6
special 0x28
fadescreen 0x1
hidesprite 0xA
fadescreen 0x0
release
end

#org @fala
= [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo.

#org @before
= [black_fr]Será que você escolheu bem?

#org @defeat
= Isso vai ter volta!

#org @beaten
= [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
There's only one problem with the special 0x28 that's supposed to back up my team, not when I lose the battle for the trainerbattle.

How do I activate the special 0x28 even losing the battle.

Oh! I just wanna add one little thing, probably the "I See you" thing of the trainer wont work with this script, you should add some Scripts in the floor that trigger the movement and the script itself
Do you say use an applymovement "S" on the floor? I'm having a problem with backing up the team with the special 0x28 when I lose the battle for the trainerbattle I'm only with the three POKÉMON how could I make the team come back even losing the battle?
 

Inferno

Miembro insignia
Miembro insignia
There's only one problem with the special 0x28 that's supposed to back up my team, not when I lose the battle for the trainerbattle.

How do I activate the special 0x28 even losing the battle.



Do you say use an applymovement "S" on the floor? I'm having a problem with backing up the team with the special 0x28 when I lose the battle for the trainerbattle I'm only with the three POKÉMON how could I make the team come back even losing the battle?
If I'm not mistaken the only way to try to do something like this is to use the trainerbattle 0x9, it's the one that appears in Oak's lab when you fight against the rival, even if you lose the script continues, but you'll have to edit it to remove the dialogue and I think that if you use more than one Pokémon appear bugs. (It doesn't take you to the Pokemon Center).
 

Inferno

Miembro insignia
Miembro insignia

Inferno

Miembro insignia
Miembro insignia
He pensando en crear una duda dedica a la rutina en especial, pero luego pensé en que si alguien quisiese buscar información al respecto sería mejor que todo estuviese en un post.

He estado mirando un poco y la rutina que encontré gracias a la información aportada por Javi fue la siguiente:

Código:
ROM:080E72B8 @ =============== S U B R O U T I N E =======================================
ROM:080E72B8
ROM:080E72B8
ROM:080E72B8 sub_80E72B8:
ROM:080E72B8                 PUSH            {R4-R7,LR}
ROM:080E72BA                 LDR             R0, =dword_300500C
ROM:080E72BC                 LDR             R0, [R0]
ROM:080E72BE                 LDR             R1, =0x55C
ROM:080E72C0                 ADDS            R0, R0, R1
ROM:080E72C2                 LDRB            R0, [R0]
ROM:080E72C4                 LSLS            R0, R0, #0x1F
ROM:080E72C6                 LSRS            R0, R0, #0x1F
ROM:080E72C8                 MOVS            R1, R0
ROM:080E72CA                 MOVS            R7, #0x44
ROM:080E72CC                 CMP             R1, #0
ROM:080E72CE                 BEQ             loc_80E72D2
ROM:080E72D0                 MOVS            R7, #0x45
ROM:080E72D2
ROM:080E72D2 loc_80E72D2:                            @ CODE XREF: sub_80E72B8+16j
ROM:080E72D2                 LDR             R4, =word_20370D0
ROM:080E72D4                 MOVS            R0, #0
ROM:080E72D6                 STRH            R0, [R4]
ROM:080E72D8                 MOVS            R0, R1
ROM:080E72DA                 BL              sub_80E7188
ROM:080E72DE                 LSLS            R0, R0, #0x10
ROM:080E72E0                 LSRS            R0, R0, #0x10
ROM:080E72E2                 CMP             R0, #0x37
ROM:080E72E4                 BLS             loc_80E7320
ROM:080E72E6                 MOVS            R5, #0
ROM:080E72E8                 ADDS            R6, R4, #0
ROM:080E72EA
ROM:080E72EA loc_80E72EA:                            @ CODE XREF: sub_80E72B8+66j
ROM:080E72EA                 LDR             R0, =dword_300500C
ROM:080E72EC                 LDR             R0, [R0]
ROM:080E72EE                 LDR             R1, =0x56D
ROM:080E72F0                 ADDS            R0, R0, R1
ROM:080E72F2                 ADDS            R0, R0, R5
ROM:080E72F4                 LDRB            R0, [R0]
ROM:080E72F6                 SUBS            R0, #1
ROM:080E72F8                 MOVS            R1, #0x64
ROM:080E72FA                 MULS            R1, R0
ROM:080E72FC                 LDR             R0, =unk_2024284
ROM:080E72FE                 ADDS            R4, R1, R0
ROM:080E7300                 MOVS            R0, R4
ROM:080E7302                 MOVS            R1, R7
ROM:080E7304                 BL              sub_803FBE8
ROM:080E7308                 CMP             R0, #0
ROM:080E730A                 BNE             loc_80E731A
ROM:080E730C                 MOVS            R0, #1
ROM:080E730E                 STRH            R0, [R6]
ROM:080E7310                 MOVS            R0, R4
ROM:080E7312                 MOVS            R1, R7
ROM:080E7314                 MOVS            R2, R6
ROM:080E7316                 BL              sub_804037C
ROM:080E731A
ROM:080E731A loc_80E731A:                            @ CODE XREF: sub_80E72B8+52j
ROM:080E731A                 ADDS            R5, #1
ROM:080E731C                 CMP             R5, #2
ROM:080E731E                 BLE             loc_80E72EA
ROM:080E7320
ROM:080E7320 loc_80E7320:                            @ CODE XREF: sub_80E72B8+2Cj
ROM:080E7320                 LDR             R0, =word_20370D0
ROM:080E7322                 LDRH            R0, [R0]
ROM:080E7324                 CMP             R0, #0
ROM:080E7326                 BEQ             loc_80E732E
ROM:080E7328                 MOVS            R0, #0x2A
ROM:080E732A                 BL              sub_8054E90
ROM:080E732E
ROM:080E732E loc_80E732E:                            @ CODE XREF: sub_80E72B8+6Ej
ROM:080E732E                 POP             {R4-R7}
ROM:080E7330                 POP             {R0}
ROM:080E7332                 BX              R0
ROM:080E7332 @ End of function sub_80E72B8
ROM:080E7332
ROM:080E7332 @ ---------------------------------------------------------------------------
ROM:080E7334 off_80E7334:    .long dword_300500C     @ DATA XREF: sub_80E72B8+2r
ROM:080E7334                                         @ sub_80E72B8:loc_80E72EAr
ROM:080E7338 dword_80E7338:  .long 0x55C             @ DATA XREF: sub_80E72B8+6r
ROM:080E733C off_80E733C:    .long word_20370D0      @ DATA XREF: sub_80E72B8:loc_80E72D2r
ROM:080E733C                                         @ sub_80E72B8:loc_80E7320r
ROM:080E7340 dword_80E7340:  .long 0x56D             @ DATA XREF: sub_80E72B8+36r
ROM:080E7344 off_80E7344:    .long unk_2024284       @ DATA XREF: sub_80E72B8+44r

Con esto no estoy confirmando al 100% que sea esta la rutina ya que:
-Javi puede haberse confundido ¿Buen chiste no?(0,00001% de posibilidades y menos viendo que la rutina carga slots de los pokemon)
-Puedo haberme confundido yo (99,99999% de posibilidades) xD
Pero se puede considerar un intento y me da que es esta la rutina.

Como todavía no me he adentrado mucho en el ASM (sé lo básico), se me escapa el motivo del uso de varios comandos (y me llama la atención que a algunos comandos le añada una -S al final), así que si alguien que controle pudiese echar una mano se podría conseguir, ya que yo solo consigo entender los comandos por separado y no lo que hacen en conjunto.
Supongo que los que sabéis ya tendréis vuestra propia database de la RAM, pero yo dejo esto igual.

PD: @jrlopes You need to put:
Código:
compare LASTRESULT 0x0
if 0x1 goto @end
...
...
#org @end
release
end
after the special 0xF5 and the waitstate, since there is the possibility to cancel the choice of Pokémon. If you don't do it the combat will run but you will have all the Pokémon.

PD2: Si no he puesto edit en el anterior mensaje era para no dejar esto muerto, ya que así se actualiza el post y muchos fijo que ya, o ni lo habías visto o no lo ibais a volver a ver.
Siempre podéis borrarlo o fusionarme los dos posts directamente si lo creéis más correcto.
 
Estado
Cerrado para nuevas respuestas.
Arriba