Bliss Winnings
Overview
Creator:
Kivitoe
Added: 18 Jan 2016
Tags:
Item
|
View Script |
Information
This script refills Link's HP and MP, unlocks level 4 cheats, displays a message, and plays a bomb sound when the item is used.
Description Setup Reviews Comments
Timelord
Posted 06 February 2016 - 07:33 AM
Well, this is...different. I'm not sure of the intended application--or what the name is supposed to mean--but I suggest this as an improvement:
Fixes some issues, allows user-defined SFX, and user-defined cheat level. I also moved the args used off D0, in the event that someone wants to use a pick-up message with it. The if statements prevent unintended things from happening if a message, or sound effect is not set.
import "std.zh"
item script BlissWinnings
{ //Preserving D0 for item pickup script.
void run(int pickup, int msg, int cheat, int sfx)
{
Game->Cheat = cheat;
Link->HP = Link->MaxHP;
Link->MP = Link->MaxMP;
if ( sfx ) Game->PlaySound(sfx);
if ( msg ) Screen->Message(msg);
}
}
Fixes some issues, allows user-defined SFX, and user-defined cheat level. I also moved the args used off D0, in the event that someone wants to use a pick-up message with it. The if statements prevent unintended things from happening if a message, or sound effect is not set.




