I'm writing a friggin script!!!! Yep, so anyone wan't to help me?


Here's what I got:

Code:
import "std.zh"

item script Enmity 

{
  void run()
  {              
   if (Link->MaxHP <= 16);
    {
     Quit();
    }
         else if (Link->HP += 360);   
         PlaySound(25); 
         Link->HP -= 16;
         Link->MaxHP -= 16;
    }
}

So what i'm trying to do is make a VERY simple item script that:

1) plays sfx
2) Refills your life
3) Removes a heart container

*Note that I am trying to put the sacrifice heart container last to get rid of those damned else if's*;)

---------Got this one---------------------------

-Okay round 2: (I think i'm getting better....)- still need help with this though....

Code:
item script Wand_of_Wonder

{
void run()
  {
     if(Game->Counter[CR_RUPEES] == 0   // Link has no rupees?...
       playsound(2);
       playsound(2);
       playsound(2);
       playsound(2);
       playsound(2);
       Game->Counter[CR_RUPEES] = 5;  // give him some!
       waitframes(6);
       CreateNPC(105) * NPC_PATRA3 // and create a Patra 3...  fuck yeah
       {
          else if(Game->Counter[CR_PUPEES] >= 1;  // But don't get greedy or...
          waitframe();
          playsound(15);
          Game->Counter[CR_LIFE] = 0;  // Link dies...oopsie!
       }
   }
}
Heh, the second one is just for learning purposes...well they're all for learning purposes, but any feedback of what i'm doing wrong would help out ALOT.

EDIT: I'm learning
----------------Got this one as well. thanks pknklfk....hmm-----------------

Code:
item script Rod_of_Ouchy

{
void run()
  {
    if (int HP <= 16)
    {
    Quit()
    }
    else if (ScrnNPC == 0)
    {
    Quit()
    }
      else if (int HP ->16)
        {
        ScrnNPC == 1 (ScrnNPC HP -= 6)
        }
      Link max HP -= 16
    }
  }
}
Keep in mind that these are my first scripts ever.