-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
<title> | ||
Infinite Health Fix | ||
</title> | ||
<author> | ||
Miotto | ||
</author> | ||
<summary> | ||
Fixes the Infinite Health/BAGUVIX cheat so it resets player's health back to max whenever they lose health. This isn't an elegant solution at all. | ||
For some reason, the player's current health is an integer and their max health is a float. | ||
</summary> | ||
<changelog> | ||
23/04/22: 1.0 released. | ||
</changelog> | ||
*/ | ||
|
||
|
||
SCRIPT_START | ||
{ | ||
LVAR_INT bIsCheatOn scplayer iPlayerCurrentHealth iPlayerMaxHealth | ||
LVAR_FLOAT fPlayerMaxHealth | ||
|
||
GET_PLAYER_CHAR 0 scplayer | ||
|
||
WHILE TRUE | ||
WAIT 0 | ||
GET_CHAR_MAX_HEALTH scplayer fPlayerMaxHealth // Gets player's max health. | ||
GET_CHAR_HEALTH scplayer iPlayerCurrentHealth // Gets player's current health. | ||
iPlayerMaxHealth =# fPlayerMaxHealth // Converts the player's max health to an integer. | ||
|
||
READ_MEMORY 0x96916D 1 FALSE bIsCheatOn // Checks if the Infinite Health cheat is on. | ||
IF bIsCheatOn = 1 // If the cheat is on... | ||
IF (iPlayerCurrentHealth < iPlayerMaxHealth) // And if the player's current health is less than their max health... | ||
SET_CHAR_HEALTH scplayer iPlayerMaxHealth // Resets the player's health back to its max value. | ||
ENDIF | ||
ENDIF | ||
ENDWHILE | ||
|
||
} | ||
SCRIPT_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
<title> | ||
Infinite Health Fix | ||
</title> | ||
<author> | ||
Miotto | ||
</author> | ||
<summary> | ||
Corrige o cheat de vida infinita/BAGUVIX para que ele restaure a vida do player ao máximo sempre que ele toma dano. Não é uma solução elegante. | ||
Por algum motivo, a vida máxima é um float e a vida atual é um integer. | ||
</summary> | ||
<changelog> | ||
23/04/22: 1.0 lançado. | ||
</changelog> | ||
*/ | ||
|
||
|
||
SCRIPT_START | ||
{ | ||
LVAR_INT bIsCheatOn scplayer iPlayerCurrentHealth iPlayerMaxHealth | ||
LVAR_FLOAT fPlayerMaxHealth | ||
|
||
GET_PLAYER_CHAR 0 scplayer | ||
|
||
WHILE TRUE | ||
WAIT 0 | ||
GET_CHAR_MAX_HEALTH scplayer fPlayerMaxHealth // Pega a vida máxima do player. | ||
GET_CHAR_HEALTH scplayer iPlayerCurrentHealth // Pega a vida atual do player. | ||
iPlayerMaxHealth =# fPlayerMaxHealth // Converte a vida máxima a um integer. | ||
|
||
READ_MEMORY 0x96916D 1 FALSE bIsCheatOn // Checa se o cheat de Vida Infinita tá on. | ||
IF bIsCheatOn = 1 // Caso estiver... | ||
IF (iPlayerCurrentHealth < iPlayerMaxHealth) // E a vida atual do player for menor que a vida máxima dele... | ||
SET_CHAR_HEALTH scplayer iPlayerMaxHealth // Restaura a vida atual do player à vida máxima do mesmo. | ||
ENDIF | ||
ENDIF | ||
ENDWHILE | ||
|
||
} | ||
SCRIPT_END |