-
My first attempts at ASM
So uh yeah. First I tried messing with real-time world edit, but I figured that's too hard for a noob, so I tried messing with text to item. I decided to try make a "text to appearance" code. It works but not correctly. Uh here is what I got (I used an activator, but I'll just post the main code here)
It seems to work randomly if I do it then hold the activator down when I go in or out of a building. I know I probably did something stupid, but if someone would help me I'd appreciate it :)
-
I'll look at it later for ya..
-
Thanks :p I know I at least got the right address for the appearance.
-
Alright, I noted it but I really cant say much else until I knwoo which address is which... Fyi I changed some things to my liking.. it still does the same thing.
Code:
ldr r1, Addy1 @Load Addy1 into r1
mov r5,#0x0 @mov 0x0 into r5
mov r0,#0x8 @mov 0x8 into r0
mov r2,#0xF @mov 0xF into r2
loop:
ldrb r3,[r1] @load byte from r1 into r3
add r1,#0x1 @add 0x1 into r1
cmp r3,#0x3A @compare r3 to 0x3A
blt number @if less less than go to number
add r3,#0x9 @Otherwise, add 0x9
number:
and r3,r2 @and r3,r2
lsl r3,r0 @logical shift left, multiplies by two for every shift
add r5,r3 @add r3 to r5 (why bother with this...?)
sub r0,#0x4 @subtract 0x4 from r0
bpl loop @branch if plus go to loop
ldr r2, Addy2 @load Addy2 into r2
strb r5,[r2] @Store byte of r5 into r2
bx lr
Addy1:
.long 0x022AF136 @what address is this...?
Addy2:
.long 0x021D9018 @same as comment above...
-
022af136 Is the address of the chat thing (I think)
021d9018 is your appearance (I got it from animal map in 32-bit mode)
I edited it a little bit and got it to correctly change my hairstyle and eyes, but not my tan or hair color. Here is my new source and code:
Basically if I type 2 digits, it correctly changes my hair and eyes, but if I type any more than 2 it doesn't do anything else.
Edit: Actually, it still doesn't do it right, but it at least edits my hair style and eyes somewhat.
-
thats because your only running through the loop once? Just looking at a glance..
Code:
mov r0,#0x2
...
sub r0,#0x4
bpl loop
-
Uh..-asks noobish question- what do I put to run through more than once? :D
I knew I had to do more than 1 loop but I couldn't figure out how to do it
And it still probably won't work though
-
For starters shouldn't it be loading and storing a half word and not just a byte? Since I'm pretty sure it goes like.. 121D9018 0000xxxx
-
I used the text to item source though, and aren't item codes the same way? I'll try seeing what I did wrong
-
Oh yeah... forgot about that part its a bit different thatn virus's tti but w\e I'll look into it a bit more.. I'm a bit rusty in ASM atm having not used it in awhile..