Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Multiply:
- /*r4 = base exp..*/
- /*r5 = foe’s level*/
- /*This multiplies the base exp. by the opponent’s level*/
- /*Then it multiplies the result by 20*/
- /*Then it divides the whole thing by 100*/
- /*This is the same as dividing it by 5*/
- /*r0 is the top number, r1 is the bottom number*/
- mul r4, r5
- mov r0, r4 /*r1 is B x L*/
- mov r1, #0xFA /*r1 = 250*/
- bl Divide /*divides by 250* because dividing by a value over 255 breaks the script. we will divide again by 2 later to simulate division by 500*/
- mov r3, r0
- LevelStuff:
- /*r6 = your level*/
- /*r5 = opponent's level*/
- /*if r6 is 10+ higher than r5 no exp is earned*/
- sub r1, r5, r6 /*(L-Lp)*/
- bl Decrypt
- ldr r0, =(-10) /*if player is 10 levels higher */
- cmp r1, r0
- ble NoExp. /*then no exp is earned*/
- mov r0, #0xA
- mul r1, r0 /* 10*(L - Lp) */
- mov r2, #0x64
- add r1, r1, r2 /* (100 + 10*(L - Lp)) */
- mul r1, r3 /* (B * L)/250 * (100 + 10*(L - Lp)) */
- mov r0, r1
- mov r1, #0x2
- bl Divide /*divides by 2 to simulate division by 500*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement