Aschbourne_PRC8/_module/nss/_open_brewvat.nss
GetOffMyYarn 69879d6957 Areas and Fixes
Added CCOH and missing areas
Changed some areas to be craftable,
Fixed some on death issues,
Fixed the Gaurd
2024-08-30 11:38:44 -04:00

114 lines
5.2 KiB
Plaintext

#include "aps_include"
void main()
{
object oPC = GetLastOpenedBy();
//int iBrewSkill = GetTokenPair(oPC,13,9); // Brewing (Credit Tony Edwards for catching a mis-typed token value here.. was originally using weaponcraft skill to determine Brew patterns. Thx Tony ;)
int iBrewSkill = GetPersistentInt(oPC,"iBrewSkill","UOACraft"
);
int iBrewChance = iBrewSkill;
if (GetItemPossessedBy(oPC,"NoDrop_SkillLogBook")==OBJECT_INVALID)
{
CreateItemOnObject("skilllogbook",oPC,1);
}
if (iBrewChance < 350)
{
iBrewChance = GetAbilityScore(oPC,ABILITY_DEXTERITY)*5;
iBrewChance = iBrewChance+(GetAbilityScore(oPC,ABILITY_WISDOM)*3);
iBrewChance = iBrewChance+(GetAbilityScore(oPC,ABILITY_INTELLIGENCE)*2);
iBrewChance = iBrewChance*3;
if (iBrewChance>350)iBrewChance=350;
if (iBrewSkill > iBrewChance) iBrewChance=iBrewSkill;
}
int iBrewType = GetLocalInt(oPC,"iUseBrewType");
if (iBrewType != 0)CreateItemOnObject("flagswitch062",OBJECT_SELF,1); //Cider
if (iBrewType != 1)CreateItemOnObject("flagswitch063",OBJECT_SELF,1); //Wine
if (iBrewType != 2)CreateItemOnObject("flagswitch064",OBJECT_SELF,1); //Lager
if (iBrewType != 3)CreateItemOnObject("flagswitch065",OBJECT_SELF,1); //Ale
if (iBrewType != 4)CreateItemOnObject("flagswitch066",OBJECT_SELF,1); //Mead
if (iBrewType != 5)CreateItemOnObject("flagswitch067",OBJECT_SELF,1); //Whiskey
if (iBrewType != 6)CreateItemOnObject("flagswitch068",OBJECT_SELF,1); //Rum
if (iBrewType==0) //Ciders
{
CreateItemOnObject("recipe031",OBJECT_SELF,1); // Apple Cider
if (iBrewChance>=250)CreateItemOnObject("recipe032",OBJECT_SELF,1); // House Cider
if (iBrewChance>=300)CreateItemOnObject("recipe033",OBJECT_SELF,1); // Scrumpy
if (iBrewChance>=300)CreateItemOnObject("recipe034",OBJECT_SELF,1); // Cyser
if (iBrewChance>=300)CreateItemOnObject("recipe035",OBJECT_SELF,1); // Blueberry Cider
if (iBrewChance>=300)CreateItemOnObject("recipe036",OBJECT_SELF,1); // Blackberry Cider
if (iBrewChance>=300)CreateItemOnObject("recipe037",OBJECT_SELF,1); // Grape Cider
if (iBrewChance>=350)CreateItemOnObject("recipe038",OBJECT_SELF,1); // Somerset Cider
}
if (iBrewType==1) //Wines
{
CreateItemOnObject("recipe039",OBJECT_SELF,1); // Red Wine
CreateItemOnObject("recipe040",OBJECT_SELF,1); // White Wine
CreateItemOnObject("recipe073",OBJECT_SELF,1); // White Wine
if (iBrewChance>=400)CreateItemOnObject("recipe041",OBJECT_SELF,1); // Sherry
}
if (iBrewType==2) //Lagers
{
CreateItemOnObject("recipe042",OBJECT_SELF,1); // Standard Lager
CreateItemOnObject("recipe043",OBJECT_SELF,1); // Dry Lager
if (iBrewChance>=300)CreateItemOnObject("recipe044",OBJECT_SELF,1); // Light Lager
if (iBrewChance>=300)CreateItemOnObject("recipe045",OBJECT_SELF,1); // Draught Lager
if (iBrewChance>=350)CreateItemOnObject("recipe046",OBJECT_SELF,1); // Red Malt Lager
if (iBrewChance>=350)CreateItemOnObject("recipe047",OBJECT_SELF,1); // Gold Malt Lager
if (iBrewChance>=400)CreateItemOnObject("recipe048",OBJECT_SELF,1); // Ice Lager
if (iBrewChance>=500)CreateItemOnObject("recipe049",OBJECT_SELF,1); // Stout Lager
}
if (iBrewType==3)
{
CreateItemOnObject("recipe050",OBJECT_SELF,1); //Standard Ale
if (iBrewChance>=300)CreateItemOnObject("recipe051",OBJECT_SELF,1); //Stout Ale
if (iBrewChance>=350)CreateItemOnObject("recipe052",OBJECT_SELF,1); //Porter Ale
if (iBrewChance>=350)CreateItemOnObject("recipe053",OBJECT_SELF,1); //Barleywine Ale
if (iBrewChance>=400)CreateItemOnObject("recipe054",OBJECT_SELF,1); //Kolsch Ale
}
if (iBrewType==4)
{
CreateItemOnObject("recipe055",OBJECT_SELF,1); //Honeymead
CreateItemOnObject("recipe056",OBJECT_SELF,1); //Sackmead
CreateItemOnObject("recipe057",OBJECT_SELF,1); //Apple Muslin Mead
if (iBrewChance>=300)CreateItemOnObject("recipe058",OBJECT_SELF,1); //Metheglin
if (iBrewChance>=300)CreateItemOnObject("recipe059",OBJECT_SELF,1); //Morat
if (iBrewChance>=350)CreateItemOnObject("recipe060",OBJECT_SELF,1); //Hippocras
if (iBrewChance>=350)CreateItemOnObject("recipe061",OBJECT_SELF,1); //Pyment
if (iBrewChance>=350)CreateItemOnObject("recipe062",OBJECT_SELF,1); //Braggot
if (iBrewChance>=400)CreateItemOnObject("recipe063",OBJECT_SELF,1); //Oxymel
if (iBrewChance>=400)CreateItemOnObject("recipe064",OBJECT_SELF,1); //Rhodomel
}
if (iBrewType==5)
{
if (iBrewChance>=200)CreateItemOnObject("recipe074",OBJECT_SELF,1); //Vodka
if (iBrewChance>=250)CreateItemOnObject("recipe075",OBJECT_SELF,1); //Gin
if (iBrewChance>=400)CreateItemOnObject("recipe065",OBJECT_SELF,1); //Corn Whiskey
if (iBrewChance>=500)CreateItemOnObject("recipe066",OBJECT_SELF,1); //Acorn Whiskey
if (iBrewChance>=650)CreateItemOnObject("recipe067",OBJECT_SELF,1); //Sake
}
if (iBrewType==6)
{
if (iBrewChance>=400)CreateItemOnObject("recipe068",OBJECT_SELF,1); //Old Rum
if (iBrewChance>=500)CreateItemOnObject("recipe069",OBJECT_SELF,1); //White Rum
if (iBrewChance>=600)CreateItemOnObject("recipe070",OBJECT_SELF,1); //Gold Rum
if (iBrewChance>=700)CreateItemOnObject("recipe071",OBJECT_SELF,1); //Amber Rum
if (iBrewChance>=800)CreateItemOnObject("recipe072",OBJECT_SELF,1); //Dark Rum
}
}