Amon_PRC8/_module/nss/tr_bread_pasty.nss
Jaysyn904 c5cffc37af Initial Commit
Initial Commit [v1.01]
2025-04-03 19:00:46 -04:00

41 lines
1.3 KiB
Plaintext

#include "tr_items_inc"
#include "nw_i0_tool"
#include "craft_inc"
void main()
{
int nSkillTest, nItemsBits = 0;
int nBakingSkillNumber;
object oPC = GetLastUsedBy();
if(HasItem(oPC, "Pastry"))
nItemsBits++;
if(HasItem(oPC, "Animalmeat"))
nItemsBits++;
//////////////////////////////////////////////////////////
if(nItemsBits == 2){
DestroyObject(GetItemPossessedBy(oPC, "Pastry"));
DestroyObject(GetItemPossessedBy(oPC, "Animalmeat"));
nBakingSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_DB_BAKING!", oPC);
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
//debug msg
//FloatingTextStringOnCreature(IntToString(nSkillTest = (nWoodSkillNumber+nRoll100x2)), oPC);
if(nSkillTest = (nBakingSkillNumber+nRoll100) >= HEIJAN_PASTY){
FloatingTextStringOnCreature("*You create a meay pasty*", oPC);
//AmonCraftWood(oPC, nWoodSkillNumber = (nWoodSkillNumber+nRoll6));
CreateItemOnObject("Meatpasty", oPC);
}
else{
AmonCraftBaking(oPC, nBakingSkillNumber=nBakingSkillNumber+nRoll2);
}
}
else
FloatingTextStringOnCreature("*You may not have pastry or meat*", oPC);
//debug msg
//FloatingTextStringOnCreature("Your Baking skill is " + IntToString(nWoodSkillNumber),oPC);
}