//This Script is for the bottle potions.//D0 is the type of potion, with 0 being empty, 1 being Red, 2 being Blue, 3 being Green, and 4 being Purple.
//D1 is the Item ID of the potion.
//D2 is the Item ID corresponding empty bottle for that potion set.
//D3 is an optional string ID to display once the item is used.
//D4 is a sound effect ID to play.
//The item numbers should be listed in the table above.
//This script should be slotted as the action script for each bottle item, but not
item script potions{
void run(int PotionUsed, int PotionID, int Bottle, int String, int sfx){
Link->Item[125]=false; //These lines remove any pickup potions Link has,
Link->Item[126]=false; //see table above and change item numbers to match
Link->Item[127]=false;
Link->Item[128]=false;
Link->Item[Bottle]=true;
Game->PlaySound(sfx);
if (PotionUsed==1){ //Red Potion
Link->HP=Link->MaxHP;
Link->Item[PotionID]=false;
}
if (PotionUsed==2){ //Blue Potion
Link->HP=Link->MaxHP;
Link->MP=Link->MaxMP;
Link->Item[PotionID]=false;
}
if (PotionUsed==3){ //Green Potion
Link->MP=Link->MaxMP;
Link->Item[PotionID]=false;
}
if (PotionUsed==4){ //Purple Potion
if (Link->MaxHP<129){
Link->HP=Link->MaxHP;
Link->Item[PotionID]=false;
} else {
Link->HP=Link->HP+128;
Link->Item[PotionID]=false;
}
}
Screen->Message(String);
}
}