View Single Post
  #7    
Old January 9th, 2010 (06:51 AM).
liuyanghejerry's Avatar
liuyanghejerry
Trainer
 
Join Date: Jan 2008
Location: China,Xi'an
Nature: Calm
Send a message via ICQ to liuyanghejerry Send a message via Windows Live Messenger to liuyanghejerry Send a message via Yahoo to liuyanghejerry
Quote originally posted by ZodiacDaGreat:
trainerbattle 0x3 also allows continuation of script execution.
Code:
...
trainerbattle 0x3 0x245 0x0 0x8809DA4
...
Thing is for 0x3 type, only battle defeat text.
Is this can keep running your script and not white out?
I'll try while my computer get update...(It's broken...and I'm using my father's...)

Quote originally posted by Juan:
trainerbattle is a command that allows you to use with different parameters.





Some subroutines called by the command 0x5C





At least in Fire Red, the maximum that can be used in the first parameter is 10(0x0-0x9).
And each of them calls a different subroutine.


Code:
ROM:08080228
ROM:08080228 @ ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦ S U B R O U T I N E ¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦
ROM:08080228
ROM:08080228
ROM:08080228 sub_8080228:                            @ CODE XREF: cmd_0x5C+6p
ROM:08080228                 PUSH    {R4,R5,LR}
ROM:0808022A                 ADD     R5, R0, #0
ROM:0808022C                 BL      sub_8080110
ROM:08080230                 LDR     R4, =0x20386AC
ROM:08080232                 ADD     R0, R5, #0
ROM:08080234                 BL      Read8bitsValue
ROM:08080238                 LSL     R0, R0, #0x18
ROM:0808023A                 LSR     R0, R0, #0x18
ROM:0808023C                 STRH    R0, [R4]
ROM:0808023E                 LDRH    R0, [R4]
ROM:08080240                 SUB     R0, #1
ROM:08080242                 CMP     R0, #8
ROM:08080244                 BHI     loc_8080318     @ 0x0 or > 0x9
ROM:08080246                 LSL     R0, R0, #2
ROM:08080248                 LDR     R1, =off_8080258
ROM:0808024A                 ADD     R0, R0, R1
ROM:0808024C                 LDR     R0, [R0]
ROM:0808024E                 MOV     PC, R0
ROM:0808024E @ ---------------------------------------------------------------------------
ROM:08080250 dword_8080250:  .long 0x20386AC         @ DATA XREF: sub_8080228+8r
ROM:08080254 off_8080254:    .long off_8080258       @ DATA XREF: sub_8080228+20r
ROM:08080254                                         @ 
ROM:08080258 off_8080258:    .long loc_808028C       @ DATA XREF: sub_8080228:off_8080254o
ROM:08080258                                         @ 0x1
ROM:0808025C                 .long loc_808028C       @ 0x2
ROM:08080260                 .long loc_808027C       @ 0x3
ROM:08080264                 .long loc_8080284       @ 0x4
ROM:08080268                 .long loc_80802D8       @ 0x5
ROM:0808026C                 .long loc_8080294       @ 0x6
ROM:08080270                 .long loc_80802AC       @ 0x7
ROM:08080274                 .long loc_8080294       @ 0x8
ROM:08080278                 .long loc_8080304       @ 0x9
ROM:0808027C @ ---------------------------------------------------------------------------
...
...
...

[2] :D


In fire red has scripts that use this type of script.




Code:
0x0:
VIRIDIAN FOREST [1.0]
Person 3
0x160571
trainerbattle 0x0 0x66 0x0 0x81722C7 0x81722F9
 
0x1:
VIRIDIAN CITY [5.1]
Person 8
0x169ECA
trainerbattle 0x1 0x15E 0x0 0x818F352 0x818F43F 0x8169F04
 
0x2:
ROCKET HIDEOUT [1.42]
Person 5
0x16120A
trainerbattle 0x2 0x16A 0x0 0x817503A 0x817505A 0x8161225
 
0x3:
MT. MOON [1.3]
Person 3
0x1606C2
trainerbattle 0x3 0xAA 0x0 0x8172B99
 
 
0x4:
VICTORY ROAD [1.41]
Person 11
0x16115F
trainerbattle 0x4 0x1E5 0x0 0x8174D0C 0x8174D45 0x8174D96
 
0x5:
ROUTE 3 [3.21]
Person 2
0x1A957B
trainerbattle 0x5 0x76 0x0 0x81C15F9 0x8183891
 
0x6:
none
 
0x7:
ROUTE 8 [3.26]
Person #12
0x1AA349
trainerbattle 0x7 0x1E4 0x0 0x81C19E5 0x81845D0 0x8184616
 
0x8:
none
 
0x9:
ROUTE 22 [3.41]
Script 0
0x16828C
trainerbattle 0x9 0x149 0x0 0x8188959 0x818DE1A
OBS: copied from the dump done by HackMew
This is a HUGE routine,and seems much more difficult than item running.I just saw your item subject.I'm also interesting in item running.So I decide to research items firstAnd research trainerbattle commands later(If I can...)
__________________
Zel,thethethethe,LU-HO,Darthatron,HackMew,ZodiacDaGreat,Juan,score_under,JPAN,Tamah-chan,I really appreciate your kindness and your help!:D


I did something that really bad.But made all Chinese can hack Pokemon, too.If you guys hate me, I totally understand,but cannot do anything but force to keep everything.
If there must be someone to undertake all spit and curse, it must be me.
Reply With Quote