status:
DD 06 // 01 : use targetMapID, 06 : use game's find
targetMapID: //targetMapID
DD #102030400
NextMapID:
DD 0
RetryClock:
DD 0
0132F408:
DD BuildInTaxi
BuildInTaxi:
pushad
mov eax, [status]
cmp eax, 0
je normal
cmp eax, 6
je check
cmp eax, 1
je findpath
cmp eax, 2
je set_teleport
cmp eax, 3
je wait_teleport
cmp eax, 4
je press_up_key
cmp eax, 5
je wait_through
jmp normal
check:
mov eax, [01841FFC]
test eax, eax
je normal
cmp [eax+D8], 3B9AC9FF
je noset
push dword ptr [eax+D8]
pop dword ptr [targetMapID]
mov [status], 2
jmp normal
findpath:
mov eax, [0184F9A0]
test eax, eax
je normal
mov eax, [eax+17C0]
cmp [targetMapID], eax
je arrive
mov [status], 2
push 01
push dword ptr [targetMapID]
mov edi, [01841FFC]
mov ecx, edi
call 0108670A
cmp [edi+E0], 0
je nofound
jmp normal
set_teleport:
mov esi, [01842008]
test esi, esi
je normal
cmp [esi+B038], F423F
je normal
mov [status], 3
mov [esi+B4B0], 1
push [esi+B038]
pop [esi+B4B8]
push [esi+B03C]
sub [esp],8
pop [esi+B4BC]
jmp normal
wait_teleport:
mov eax, [0184F9A0]
test eax, eax
je normal
mov eax, [eax+17C0]
cmp [targetMapID], eax
je arrive
mov esi, [01842008]
test esi, esi
je normal
cmp [esi+B4B0], 1
je normal
cmp [esi+B038], F423F
je normal
mov esi, [esi+604]
and esi, #-2 // FFFFFFFE
cmp esi, 6
je normal
mov [status], 4
jmp normal
press_up_key:
mov eax, [01841FFC]
test eax, eax
je normal
mov ecx, [eax+DC]
cmp ecx, 3B9AC9FF
je normal
mov [eax+627D], 1
mov [status], 5
mov [NextMapID], ecx
push 01480000
push 26
push 100
mov ecx, [0184667C]
call 00FFF6D7
jmp normal
wait_through:
mov eax, [0184F9A0]
test eax, eax
je normal
mov eax, [eax+17C0]
cmp [targetMapID], eax
je arrive
inc [RetryClock]
cmp [RetryClock], 10
jge retry_press
cmp [NextMapID], eax
jne normal
mov [status], 2
jmp normal
retry_press:
mov [RetryClock], 0
mov [status], 4
jmp normal