Invincibility during events

Oct 27, 2012 at 1:57 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
I want my character to be able to be hurt while an event is running (at my discretion, I don't want the character to always be non-invincible during events). Is there any way to achieve this?
 
Oct 27, 2012 at 2:20 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
Yes there is one sec

e: Look at 0x421990 (the event that calls tsc). Crosscheck values with 0x419910 (the event that damages you). invincibility will show up in both places and then you can figure out what to do from there.

e2: [0x49e6c8] looks to be the invincibility timer. The obvious next step would be to nop out 0x4219f2, and replace the second fac command (0x424eaf) with an invincibility toggling one. You should be able to do that (or at least attempt). If you're having problems with that I can walk you through it.
 
Oct 27, 2012 at 3:36 AM
Professional Whatever
"Life begins and ends with Nu."
Join Date: Jan 13, 2011
Location: Lasagna
Posts: 4481
Pronouns: she/her
I'm obviously doing something wrong. My game keeps crashing each time I try to use <INV0000 with this code:
Code:
CPU Disasm
Address Hex dump		 Command								 Comments
00424EAF |> \A1 D85A4A00 MOV EAX,DWORD PTR DS:[4A5AD8]
00424EB4 |. 0305 E05A4A00 ADD EAX,DWORD PTR DS:[4A5AE0]
00424EBA |. 0FBE48 01	 MOVSX ECX,BYTE PTR DS:[EAX+1]
00424EBE |. 83F9 49	 CMP ECX,49
00424EC1 |. 75 70		 JNE SHORT 00424F33
00424EC3 |. 8B15 D85A4A00 MOV EDX,DWORD PTR DS:[4A5AD8]
00424EC9 |. 0315 E05A4A00 ADD EDX,DWORD PTR DS:[4A5AE0]
00424ECF |. 0FBE42 02	 MOVSX EAX,BYTE PTR DS:[EDX+2]
00424ED3 |. 83F8 4E	 CMP EAX,4E
00424ED6 |. 75 5B		 JNE SHORT 00424F33
00424ED8 |. 8B0D D85A4A00 MOV ECX,DWORD PTR DS:[4A5AD8]
00424EDE |. 030D E05A4A00 ADD ECX,DWORD PTR DS:[4A5AE0]
00424EE4 |. 0FBE51 03	 MOVSX EDX,BYTE PTR DS:[ECX+3]
00424EE8 |. 83FA 56	 CMP EDX,56
00424EEB |. 75 46		 JNE SHORT 00424F33
00424EED |. A1 E05A4A00 MOV EAX,DWORD PTR DS:[4A5AE0]
00424EF2 |. 83C0 04	 ADD EAX,4
00424EF5 |. 50		 PUSH EAX								 ; /Arg1
00424EF6 |. E8 05CAFFFF CALL 00421900						 ; \Amamichi.00421900
00424EFB |. 83C4 04	 ADD ESP,4
00424EFE |. 83F8 01	 CMP EAX,1
00424F01	 74 0F		 JE SHORT 00424F12
00424F03 |. C705 C8E64900 MOV DWORD PTR DS:[49E6C8],0
00424F0D	 E9 95030000 JMP 004252A7
00424F12	 C705 C8E64900 MOV DWORD PTR DS:[49E6C8],30
00424F1C	 90		 NOP
00424F1D	 90		 NOP
00424F1E	 90		 NOP
00424F1F	 90		 NOP
00424F20 . 90		 NOP
00424F21 . 90		 NOP
00424F22 . 90		 NOP
00424F23 . 90		 NOP
00424F24 . 90		 NOP
00424F25 . 90		 NOP
00424F26 . 90		 NOP
00424F27 . 90		 NOP
00424F28 . 90		 NOP
00424F29 . 90		 NOP
00424F2A . 90		 NOP
00424F2B . 90		 NOP
00424F2C . 90		 NOP
00424F2D . 90		 NOP
00424F2E />^ E9 74030000 JMP 004252A7

Also I'm not sure how the invincibility timer works so I might have screwed it up somehow.

e: also I can't believe I didn't put this in quick answers I'm an idiot
 
Oct 27, 2012 at 5:19 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
MagicDoors said:
I'm obviously doing something wrong. My game keeps crashing each time I try to use <INV0000 with this code:
Code:
snip

As far as I can tell, it crashes because you never add to the current text pointer ([4a5ae0]), so you just keep running your script over and over and over until your pc gets fed up with you.

This should work:
Code:
0x424EAF MOV EAX,DWORD PTR DS:[4A5AD8]
0x424EB4 ADD EAX,DWORD PTR DS:[4A5AE0]
0x424EBA MOVSX ECX,BYTE PTR DS:[EAX+1]
0x424EBE CMP ECX,49
0x424EC1 JNE SHORT 00424F33
0x424EC3 MOV EDX,DWORD PTR DS:[4A5AD8]
0x424EC9 ADD EDX,DWORD PTR DS:[4A5AE0]
0x424ECF MOVSX EAX,BYTE PTR DS:[EDX+2]
0x424ED3 CMP EAX,4E
0x424ED6 JNE SHORT 00424F33
0x424ED8 MOV ECX,DWORD PTR DS:[4A5AD8]
0x424EDE ADD ECX,DWORD PTR DS:[4A5AE0]
0x424EE4 MOVSX EDX,BYTE PTR DS:[ECX+3]
0x424EE8 CMP EDX,56
0x424EEB JNE SHORT 00424F33
0x424EED MOV EAX,DWORD PTR DS:[4A5AE0]
0x424EF2 ADD EAX,4
0x424EF5 PUSH EAX
0x424EF6 CALL 00421900
0x424EFB ADD ESP,4
0x424EFE TEST EAX,EAX
0x424F00 JZ SHORT 00424F0E
0x424F02 MOV DWORD PTR DS:[49E6C8],80
0x424F0C JMP SHORT 00424F18
0x424F0E MOV DWORD PTR DS:[49E6C8],0
0x424F18 ADD DWORD PTR DS:[4A5AE0],8
0x424F1F JMP 004252A7
 
Oct 27, 2012 at 5:40 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
This is the same error you had with the <AIR command.
 
Oct 27, 2012 at 6:00 AM
I don't anymore.
"I'm sorry Mario, but your princess is in another castle."
Join Date: Aug 9, 2010
Location: Greener Pastures
Posts: 1188
Age: 30
Carrotlord said:
This is the same error you had with the <AIR command.
Meh, he's learning.
 
Back
Top