Jump to content

Bliss Winnings

Overview
Creator: Kivitoe Added: 18 Jan 2016 Tags: Item
Rating[?]: Rating: 2.75/5 (3 ratings)
View Script
Information

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:
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.
 

Naru  

Posted 19 January 2016 - 07:20 PM
What is a level 4 cheat?
 

Avaro  

Posted 18 January 2016 - 06:55 PM
Love this!
  • Kivitoe likes this
 

coolgamer012345  

Posted 18 January 2016 - 06:31 PM
Correction:

NOTE: If you don't want a message to be displayed, set D0 to be '0' in the item editor.

(If you removed the "int m" from void run() you'd get a compile error)