AssignTurnBattle

Removes ATB-bars and let variable #3350 decide who gets next turn in default battle-screen.

Originally made and first released by bugmenot.

RPG2003
1.00UNKNOWN1UNKNOWN21.0.2.1
1.0.2.1
1.0.3.0
1.0.4.0
1.0.5.0
1.0.5.0
1.0.6.0
1.0.6.0
1.0.7.0
1.0.7.0
1.0.8.0
1.0.8.0
1.0.9.1
1.0.9.1
1.101.111.12mp210414

Segment 1/5

Offsets

RPG2003
1.0.8.0
1.0.8.0
00495834h
00094C34h

Sourcecode

__00495834h:
			PUSH EAX
			PUSH EDX
			CMP EDX, 1
			JNE __0049586Fh
			CALL PROC__00495AE1h
			PUSH EDX
			MOV EAX, [004CDC7Ch]
			MOV EAX, [EAX]
			PUSH EAX
			CALL PROC__0048B398h
			CMP EAX, 8
			JL __00495858h
			CMP EAX, 10
			JLE __0049585Ch
__00495858h:
			POP EDX
			POP EAX
			JMP __0049586Fh
__0049585Ch:
			ADD EAX, 3
			MOV ECX, EAX
			POP EAX
			POP EDX
			CALL PROC__0048B3B0h
			POP EDX
			POP EAX
			JMP __004B3158h
__0049586Fh:
			POP EDX
			POP EAX
			CMP BYTE PTR [EAX+EDX+2Bh], 0
			JMP __004B3152h
__0049587Bh:
			CALL PROC__00495AE1h
			MOV EAX, [004CDC7Ch]
			MOV EAX, [EAX]
			CALL PROC__0048B398h
			CMP EAX, 8
			JL __004958A6h
			CMP EAX, 10
			JG __004958A6h
			XOR EDX, EDX
			XOR ECX, ECX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			CALL PROC__00499800h
__004958A6h:
			POP ECX
			POP EDX
			POP EBP
			POP EDI
			POP ESI
			POP EBX
			RET
			49 NOPs
PROC__004958DEh:
			PUSH EDI
			XOR EDI, EDI
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			MOV EDX, EDI
			CALL PROC__004A6014h
			MOV EDX, EAX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			CALL PROC__0049A450h
			INC EDI
			DEC ESI
			JNZ __004958E1h
			POP EDI
			RET
PROC__00495903h:
			MOV EAX, [004CDE64h]
			MOV EAX, [EAX]
			MOV EAX, [EAX+08h]
			MOV EAX, [EAX+08h]
			MOV ESI, EAX
			DEC ESI
			TEST ESI, ESI
			JL __0049593Ch
			INC ESI
			PUSH EDI
			XOR EDI, EDI
__0049591Bh:
			MOV EAX, [004CDE64h]
			MOV EAX, [EAX]
			MOV EDX, EDI
			CALL PROC__004BE860h
			MOV EDX, EAX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			CALL PROC__0049A450h
			INC EDI
			DEC ESI
			JNZ __0049591Bh
			POP EDI
__0049593Ch:
			RET

Bytes

50 52 83FA01 7534
E8A1020000
52 A17CDC4C00 8B00 50 E84A5BFFFF
83F808 7C05
83F80A 7E04
5A 58 EB13
83C003 89C1 58 5A E8485BFFFF
5A 58 E9E9D80100
5A 58 807C102B00 E9D7D80100
E861020000
A17CDC4C00 8B00 E80C5BFFFF
83F808 7C15
83F80A 7F10
31D2 31C9 A138DD4C00 8B00 E85A3F0000
59 5A 5D 5F 5E 5B C3

90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90 90 90 90 90 90
90 90 90 90 90 90

57 33FF A174DB4C00 8B00 8BD7 E825070100
8BD0 A138DD4C00 8B00 E8534B0000
47 4E 75E0
5F C3

A164DE4C00 8B00 8B4008 8B4008 8BF0 4E 85F6 7C25
46 57 33FF A164DE4C00 8B00 8BD7 E8378F0200
8BD0 A138DD4C00 8B00 E8194B0000
47 4E 75E0
5F C3 90 90 90

Segment 2/5

Offsets

RPG2003
1.0.8.0
1.0.8.0
00495ADFh
00094EDFh

Sourcecode

			JMP __00495AE7h
PROC__00495AE1h:
			MOV EDX, 3350
			RET
__00495AE7h:
			CALL PROC__00495AE1h
			MOV DWORD PTR [ESP], EDX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			PUSH EAX
			MOV EAX, [004CDD60h]
			MOV EAX, [EAX]
			CMP DWORD PTR [EAX+08h], 0
			JLE __00495B4Eh
			POP EAX
			PUSH EAX
			CMP BYTE PTR [EAX+20h], 0
			JNE __00495B4Eh
			MOV EAX, [004CDAECh]
			MOV EAX, [EAX]
			TEST BYTE PTR [EAX+344h], 32
			JE __00495B4Eh
			XOR EDX, EDX
			MOV EAX, EDI
			CALL PROC__004C6F9Ch
			POP EAX
			PUSH EAX
			CMP BYTE PTR [EAX+64h], 0
			JL __00495B4Ah
			MOV DWORD PTR [EAX+64h], -1
			MOV EAX, [004CDC7Ch]
			MOV EAX, [EAX]
			MOV EDX, [ESP+04h]
			XOR ECX, ECX
			MOV CL, 10
			CALL PROC__0048B3B0h
			JMP __00495B4Eh
__00495B4Ah:
			MOV BYTE PTR [EDI+78h], 1
__00495B4Eh:
			POP EAX
			CMP BYTE PTR [EAX+20h], 0
			JE __00495B5Fh
			CMP BYTE PTR [EDI+78h], 0
			JNE __00495F73h
__00495B5Fh:
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			PUSH EAX
			MOV ESI, [EAX+04h]
			DEC ESI
			TEST ESI, ESI
			JL __00495B86h
			INC ESI
			XOR EBX, EBX
__00495B72h:
			POP EAX
			PUSH EAX
			MOV EDX, EBX
			CALL PROC__004A6014h
			MOV DWORD PTR [EAX+44h], 0
			INC EBX
			DEC ESI
			JNE __00495B72h
__00495B86h:
			POP EAX
			MOV EAX, [004CDE64h]
			MOV EAX, [EAX]
			PUSH EAX
			MOV EAX, [EAX+08h]
			MOV ESI, [EAX+08h]
			DEC ESI
			TEST ESI, ESI
			JL __00495BB1h
			INC ESI
			XOR EBX, EBX
__00495B9Dh
			POP EAX
			PUSH EAX
			MOV EDX, EBX
			CALL PROC__004BE860h
			MOV DWORD PTR [EAX+44h], 0
			INC EBX
			DEC ESI
			JE __00495B9Dh
__00495BB1h:
			POP EAX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			CMP BYTE PTR [EAX+64h], 0
			JL __00495BD7h
			MOV EDX, [EAX+64h]
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			CALL PROC__004A6014h
			MOV EDX, [004CD988h]
			MOV [EAX+44h], EDX
__00495BD7h:
			CALL PROC__00495CDFh
			TEST AL, AL
			JNE __00495F73h
			MOV EAX, [004CDC7Ch]
			MOV EAX, [EAX]
			MOV EDX, [ESP]
			CALL PROC__0048B398h
			CMP EAX, 4
			JG __00495C46h
			CMP EAX, -8
			JL __00495C46h
			CMP EAX, 0
			JE __00495C46h
			JL __00495C8Ah
			MOV EDX, [004CDB74h]
			MOV EDX, [EDX]
			PUSH EAX
			MOV EDX, [EDX+04h]
			CMP EAX, EDX
			JG __00495C48h
			DEC EAX
			MOV EDX, EAX
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			CALL PROC__004A6014h
			CMP BYTE PTR [EAX+14h], 0
			JE __00495C48h
			CALL PROC_004C069Ch
			TEST AL, AL
			JE __00495C4Fh
			POP EDX
			DEC EDX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			MOV [EAX+64h], EDX
			XOR ECX, ECX
			JMP __00495C79h
__00495C46h:
			JMP __00495C88h
__00495C48h:
			POP EAX
			XOR ECX, ECX
			MOV CL, 8
			JMP __00495C79h
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			INC DWORD PTR [EAX+48h]
			POP EDX
__00495C4Fh:
			MOV EAX, [004CDB74h]
			MOV EAX, [EAX]
			MOV ESI, [EAX+04h]
			DEC ESI
			TEST ESI, ESI
			JL __00495C6Fh
			INC ESI
			CALL PROC__004958DEh
__00495C6Fh:
			NOP
			CALL PROC__00495903h
			XOR ECX, ECX
			MOV CL, 9
__00495C79h:
			MOV EAX, [004CDC7Ch]
			MOV EAX, [EAX]
			MOV EDX, [ESP]
			CALL PROC__0048B3B0h
__00495C88h:
			JMP __00495CDDh
__00495C8Ah:
			NEG EAX
			MOV EDX, [004CDE64h]
			MOV EDX, [EDX]
			MOV EDX, [EDX+08h]
			MOV EDX, [EDX+08h]
			PUSH EAX
			CMP EAX, EDX
			JG __00495C48h
			DEC EAX
			MOV EDX, EAX
			MOV EAX, [004CDE64h]
			MOV EAX, [EAX]
			CALL PROC__004BE860h
			CMP BYTE PTR [EAX+0Ch], 0
			JE __00495C48h
			CMP BYTE PTR [EAX+14h], 0
			JE __00495C48h
			CALL PROC__004C069Ch
			POP EDX
			DEC EDX
			PUSH EAX
			MOV EAX, [004CDD38h]
			MOV EAX, [EAX]
			CALL PROC__0049889Ch
			POP EAX
			TEST AL, AL
			JE __00495CD7h
			XOR ECX, ECX
			JMP __00495C79h
			XOR ECX, ECX
__00495CD7h:
			MOV CL, 12
			JMP __00495C79h
__00495CDDh:
			JMP __00495D0Dh
PROC__00495CDFh:
			MOV EAX, [004CDDC8h]
			MOV EAX, [EAX]
			CMP BYTE PTR [EAX+10h], 0
			JNE __00495CFCh
			MOV EAX, [004CDE64h]
			MOV EAX, [EAX]
			CMP BYTE PTR [EAX+10h], 0
			JNE __00495CFCh
			XOR EAX, EAX
			RET
__00495CFCh:
			MOV AL, 1
			RET
			EMPTYNESS 14

Bytes

EB06
BA160D0000 C3
E8F5FFFFFF
891424 A138DD4C00 8B00 50 A160DD4C00 8B00 83780800 7E4A
58 50 80782001 7542
A1ECDA4C00 8B00 F6804403000020 7432
33D2 8BC7 E877140300
58 50 80786400 7C1D
C74064FFFFFFFF A17CDC4C00 8B00 8B542404 31C9 B10A E86858FFFF
EB04
C6477801 58 80782000 740A
807F7800 0F8514040000
A174DB4C00 8B00 50 8B7004 4E 85F6 7C17
46 33DB 58 50 8BD3 E899040100
C7404400000000 43 4E 75EC
58 A164DE4C00 8B00 50 8B4008 8B7008 4E 85F6 7C17
46 33DB 58 50 8BD3 E8BA8C0200
C7404400000000 43 4E 74EC
58 A138DD4C00 8B00 80786400 7C18
8B5064 A174DB4C00 8B00 E846040100
8B1588D94C00 895044 E803010000
84C0 0F858F030000
A17CDC4C00 8B00 8B1424 E8A557FFFF
83F804 7F4E 83F8F8 7C49
83F800 7444
0F8C82000000
8B1574DB4C00 8B12 50 8B5204 39D0 7F30
48 89C2 A174DB4C00 8B00 E8ED030100
80781400 741B
E86AAA0200
84C0 7419
5A 4A A138DD4C00 8B00 895064 31C9 EB33
EB40
58 31C9 B108 EB2A
A174DB4C00 8B00 FF4048 5A A174DB4C00 8B00 8B7004 4E 85F6 7C06
46 E86FFCFFFF
90 E88EFCFFFF
31C9 B109 A17CDC4C00 8B00 8B1424 E82857FFFF
EB53
F7D8 8B1564DE4C00 8B12 8B5208 8B5208 50 39D0 7FA9
48 89C2 A164DE4C00 8B00 E8B28B0200
80780C00 7494
80781400 748E
E8DDA90200
5A 4A 50 A138DD4C00 8B00 E8CE2B0000
58 84C0 7404
31C9 EBA2
31C9 B10C EB9C
EB2E
A1C8DD4C00 8B00 80781000 7510
A164DE4C00 8B00 80781000 7503
33C0 C3

B001 C3

00 00 00 00 00 00 00 00 00 00 00 00 00 00

Segment 3/5

Offsets

RPG2003
1.0.8.0
1.0.8.0
00495E68h
00095268h

Sourcecode

			NOP
			NOP

Bytes

90 90

Segment 4/5

Offsets

RPG2003
1.0.8.0
1.0.8.0
00495F73h
00095373h

Sourcecode

__00495F73h:
			NOP
			NOP
			JMP __0049587Bh

Bytes

90 90 E901F9FFFF

Segment 5/5

Offsets

RPG2003
1.0.8.0
1.0.8.0
004B314Dh
000B254Dh

Sourcecode

			JMP __00495834h

Bytes

E9E226FEFF