Code:
int PlayerMovementManager(PLAYERSTRUCT * lpPlayer){ if ( lpPlayer->isSafeZone ) { lpPlayer->unk0x372[2] = 0; } if(!lpPlayer->isSafeZone) { if ( lpPlayer->unk0x372[2] < 0x28u ) { int Class = lpPlayer->PlayerClass & 7; if ( Class == 3 || Class == 4 ) { lpPlayer->unk0x372[2] = lpPlayer->unk0x372[2] + 1; } else if (pMapNumber == 7 ) { if ( lpPlayer->SlotGloves != (WORD)-1 && lpPlayer->SlotGlovesLevel >= (WORD)5u ) { lpPlayer->unk0x372[2] = lpPlayer->unk0x372[2] + 1; } } else if ( (pMapNumber < 24 || pMapNumber > 29) && lpPlayer->SlotBoots != -1 && lpPlayer->SlotBootsLevel >= 5u ) { lpPlayer->unk0x372[2] = lpPlayer->unk0x372[2] + 1; } else if ( pMapNumber >= 24 && pMapNumber <= 29 ) { if ( lpPlayer->SlotGloves != (WORD)-1 && lpPlayer->SlotGlovesLevel >= (WORD)5u ) { lpPlayer->unk0x372[2] = lpPlayer->unk0x372[2] + 1; } } } } if ( lpPlayer->TypeObject != 433 ) { pSetNextAnimation(lpPlayer, 2); } else { for(int i = 13;i<=20;i++) { cBMD.sBMD[433].dSMD->sAnimation[i].SpeedAnimation_1 = 0.33f; if ( (lpPlayer->ViewSkillState & 2) == 2 ) cBMD.sBMD[433].dSMD->sAnimation[i].SpeedAnimation_1 = cBMD.sBMD[433].dSMD->sAnimation[i].SpeedAnimation_1 * 0.5; } for(int i = 22;i<=33;i++) { cBMD.sBMD[433].dSMD->sAnimation[i].SpeedAnimation_1 = 0.34f; if ( (lpPlayer->ViewSkillState & 2) == 2 ) cBMD.sBMD[433].dSMD->sAnimation[i].SpeedAnimation_1 = cBMD.sBMD[433].dSMD->sAnimation[i].SpeedAnimation_1 * 0.5; } cBMD.sBMD[433].dSMD->sAnimation[75].SpeedAnimation_1 = 0.33f; cBMD.sBMD[433].dSMD->sAnimation[73].SpeedAnimation_1 = 0.33f; if ( (lpPlayer->ViewSkillState & 2) == 2 ) { cBMD.sBMD[433].dSMD->sAnimation[75].SpeedAnimation_1 = cBMD.sBMD[433].dSMD->sAnimation[75].SpeedAnimation_1 * 0.5; cBMD.sBMD[433].dSMD->sAnimation[73].SpeedAnimation_1 = cBMD.sBMD[433].dSMD->sAnimation[73].SpeedAnimation_1 * 0.5; } if ( lpPlayer->SlotHelper == LOADITEM(13,4) && !lpPlayer->isSafeZone ) { pSetNextAnimation(lpPlayer, 75); } else if ( lpPlayer->isSafeZone && lpPlayer->SlotWeaponLeft == LOADITEM(13,5) ) { pSetNextAnimation(lpPlayer, 73); } else if ( lpPlayer->SlotHelper == LOADITEM(13,2) && !lpPlayer->isSafeZone ) { if ( lpPlayer->SlotWeaponRight == (WORD)-1 && lpPlayer->SlotWeaponLeft == (WORD)-1 ) { pSetNextAnimation(lpPlayer, 32); } } else if(lpPlayer->SlotHelper == LOADITEM(13,3) && lpPlayer->isSafeZone) { if ( pMapNumber != 8 && pMapNumber != 10 ) { if ( lpPlayer->SlotWeaponRight == (WORD)-1 && lpPlayer->SlotWeaponLeft == (WORD)-1 ) { pSetNextAnimation(lpPlayer, 32); } else { pSetNextAnimation(lpPlayer, 33); } } } else { int PosY = int(lpPlayer->PositionY * 0.0099999998); int PosX = int(lpPlayer->PositionX * 0.0099999998); sub_58FF50(PosX, PosY); if ( !lpPlayer->isSafeZone && lpPlayer->SlotWings != (WORD)-1 ) { if ( ((signed __int16)lpPlayer->SlotWeaponRight >= LOADITEM(4,8) && (signed __int16)lpPlayer->SlotWeaponRight < LOADITEM(4,15)) || ((signed __int16)lpPlayer->SlotWeaponRight >= LOADITEM(4,16) && (signed __int16)lpPlayer->SlotWeaponRight < LOADITEM(4,17)) || ((signed __int16)lpPlayer->SlotWeaponRight >= LOADITEM(4,18) && (signed __int16)lpPlayer->SlotWeaponRight < LOADITEM(5,0)) ) { pSetNextAnimation(lpPlayer, 31); } else { pSetNextAnimation(lpPlayer, 30); } } else if ( !lpPlayer->isSafeZone && (pMapNumber == 7 || pMapNumber >= 24 && pMapNumber <= 29) ) { if ( lpPlayer->unk0x372[2] < 0x28u ) pSetNextAnimation(lpPlayer, 21); else pSetNextAnimation(lpPlayer, 29); } else if ( lpPlayer->SlotWeaponRight == (WORD)-1 && lpPlayer->SlotWeaponLeft == (WORD)-1 || lpPlayer->isSafeZone && (pMapNumber < 11 || pMapNumber > 23) ) { if ( lpPlayer->unk0x372[2] >= 0x28u ) { pSetNextAnimation(lpPlayer, 22); } else if ( (lpPlayer->PlayerClass & 7) != 2 ) { pSetNextAnimation(lpPlayer, 13); } else { pSetNextAnimation(lpPlayer, 14); } } else if ( lpPlayer->unk0x372[2] >= 0x28u ) { if ( (signed __int16)lpPlayer->SlotWeaponRight >= LOADITEM(0,0) && (signed __int16)lpPlayer->SlotWeaponRight < LOADITEM(3,0) ) { if ( *(BYTE *)(dword_7C09B40 + 76 * (signed __int16)lpPlayer->SlotWeaponRight - 33486) ) { if ( lpPlayer->SlotWeaponRight == LOADITEM(0,21) || lpPlayer->SlotWeaponRight == LOADITEM(0,31) ) pSetNextAnimation(lpPlayer, 85); else pSetNextAnimation(lpPlayer, 16); } else { pSetNextAnimation(lpPlayer, 24); } } else if ( (signed __int16) lpPlayer->SlotWeaponRight >= LOADITEM(5,0) && (signed __int16) lpPlayer->SlotWeaponRight < LOADITEM(6,0) ) { if ( *(BYTE *)(dword_7C09B40 + 76 * (signed __int16)lpPlayer->SlotWeaponRight - 33486) ) { pSetNextAnimation(lpPlayer, 18); } else { pSetNextAnimation(lpPlayer, 15); } } else if(lpPlayer->SlotWeaponRight == LOADITEM(3,1) || lpPlayer->SlotWeaponRight == LOADITEM(4,2) ) { pSetNextAnimation(lpPlayer, 17); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(3,0) && lpPlayer->SlotWeaponRight < LOADITEM(4,0)) { pSetNextAnimation(lpPlayer, 18); } else if (lpPlayer->SlotWeaponLeft >= LOADITEM(4,0)) { if (lpPlayer->SlotWeaponLeft < LOADITEM(4,7) || lpPlayer->SlotWeaponLeft == LOADITEM(4,17) || lpPlayer->SlotWeaponLeft == LOADITEM(4,20) ) { pSetNextAnimation(lpPlayer, 27); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(4,8) && lpPlayer->SlotWeaponRight < LOADITEM(4,15)) { pSetNextAnimation(lpPlayer, 28); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(4,16) && lpPlayer->SlotWeaponRight < LOADITEM(4,17)) { pSetNextAnimation(lpPlayer, 28); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(4,18) && lpPlayer->SlotWeaponRight < LOADITEM(5,0)) { pSetNextAnimation(lpPlayer, 28); } } else if ( (lpPlayer->PlayerClass & 7) != 2 ) { pSetNextAnimation(lpPlayer, 13); } else { pSetNextAnimation(lpPlayer, 14); } } else if(lpPlayer->SlotWeaponRight >= LOADITEM(0,0) && lpPlayer->SlotWeaponRight < LOADITEM(3,0)) { if(lpPlayer->SlotWeaponLeft >= LOADITEM(0,0) && lpPlayer->SlotWeaponLeft < LOADITEM(3,0)) { pSetNextAnimation(lpPlayer, 15); } else { if ( *(BYTE *)(dword_7C09B40 + 76 * (signed __int16)lpPlayer->SlotWeaponRight - 33486) ) { pSetNextAnimation(lpPlayer, 23); } else { if ( lpPlayer->SlotWeaponRight == LOADITEM(0,21) || lpPlayer->SlotWeaponRight == LOADITEM(0,31) ) { pSetNextAnimation(lpPlayer, 86); } else { pSetNextAnimation(lpPlayer, 25); } } } } else if(lpPlayer->SlotWeaponRight >= LOADITEM(5,0) && lpPlayer->SlotWeaponRight < LOADITEM(6,0)) { if ( *(BYTE *)(dword_7C09B40 + 76 * (signed __int16)lpPlayer->SlotWeaponRight - 33486) ) { pSetNextAnimation(lpPlayer, 23); } else { pSetNextAnimation(lpPlayer, 26); } } else if(lpPlayer->SlotWeaponRight >= LOADITEM(3,0) && lpPlayer->SlotWeaponRight < LOADITEM(4,0)) { pSetNextAnimation(lpPlayer, 26); } else if (lpPlayer->SlotWeaponLeft >= LOADITEM(4,0)) { if (lpPlayer->SlotWeaponLeft < LOADITEM(4,7) || lpPlayer->SlotWeaponLeft == LOADITEM(4,17) || lpPlayer->SlotWeaponLeft == LOADITEM(4,20) ) { pSetNextAnimation(lpPlayer, 19); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(4,8) && lpPlayer->SlotWeaponRight < LOADITEM(4,15)) { pSetNextAnimation(lpPlayer, 20); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(4,16) && lpPlayer->SlotWeaponRight < LOADITEM(4,17)) { pSetNextAnimation(lpPlayer, 20); } else if(lpPlayer->SlotWeaponRight >= LOADITEM(4,18) && lpPlayer->SlotWeaponRight < LOADITEM(5,0)) { pSetNextAnimation(lpPlayer, 20); } } else { pSetNextAnimation(lpPlayer, 22); } } } if ( lpPlayer->TypeObject == 323 ) { sub_414480(124, (int)lpPlayer, 0); return 0; } int Class = lpPlayer->PlayerClass & 7; if (Class == 4 && lpPlayer->SlotHelper == LOADITEM(13,4) && !lpPlayer->isSafeZone ) { sub_414480(rand() % 3 + 451, (int)lpPlayer, 0); return 0; } if ( (DWORD)lpPlayer != pPlayerStruct ) goto LABEL_153; if ( (rand() % 64) ) { if ( (DWORD)lpPlayer == pPlayerStruct ) return 0;LABEL_153: if ( (rand() % 16) ) return 0; } if ( lpPlayer->TypeObject != 433 || ((signed int)lpPlayer->Unk4 >= 209) && (signed int)lpPlayer->Unk4 <= 211 ) { if ( lpPlayer->Unk4 >= 209 && lpPlayer->Unk4 <= 211 ) sub_414480(123, (int)lpPlayer, 0); if ( cBMD.sBMD[lpPlayer->TypeObject].Unk0xAA != (WORD)-1 ) { int v21 = 0; if ( lpPlayer->Unk4 == 9 ) v21 = 5; sub_414480(*(&cBMD.sBMD->Unk0xAA + (rand()%2) + 102 * lpPlayer->TypeObject) + v21 + 210, (int)lpPlayer, 0); } } return 0;}