Amon_PRC8/_module/nss/tr_bread_bration.nss

44 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

2025-04-03 19:00:46 -04:00
#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, "BlackSeeds"))
nItemsBits++;
if(HasItem(oPC, "Pastry"))
nItemsBits++;
if(HasItem(oPC, "Sourdough"))
nItemsBits++;
if(HasItem(oPC, "Honey"))
nItemsBits++;
//////////////////////////////////////////////////////////
if(nItemsBits == 4){
DestroyObject(GetItemPossessedBy(oPC, "BlackSeeds"));
DestroyObject(GetItemPossessedBy(oPC, "Pastry"));
DestroyObject(GetItemPossessedBy(oPC, "Honey"));
DestroyObject(GetItemPossessedBy(oPC, "Sourdough"));
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) >= BATTLE_RATIONS){
FloatingTextStringOnCreature("*You create a battle ration*", oPC);
//AmonCraftWood(oPC, nWoodSkillNumber = (nWoodSkillNumber+nRoll6));
CreateItemOnObject("tr_BattleRations", oPC);
}
else{
AmonCraftBaking(oPC, nBakingSkillNumber=nBakingSkillNumber+nRoll2);
}}
else
FloatingTextStringOnCreature("*You may not have any black seeds,apples, pastry or honey*", oPC);
}