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

37 lines
1.0 KiB
Plaintext

#include "nw_i0_tool"
void main()
{
int nItemsBits = 0;
int nRoll100 = d100(1);
int nRoll2 = d2(1);
object oPC = GetLastUsedBy();
if(HasItem(oPC, "Flour"))
nItemsBits++;
if(HasItem(oPC, "FullWaterBottle"))
nItemsBits++;
if(HasItem(oPC, "Yeast"))
nItemsBits++;
//////////////////////////////////////////////////////////
if(nItemsBits == 3){
DestroyObject(GetItemPossessedBy(oPC, "Flour"));
DestroyObject(GetItemPossessedBy(oPC, "FullWaterBottle"));
DestroyObject(GetItemPossessedBy(oPC, "Yeast"));
AssignCommand( oPC, ActionPlayAnimation (ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
if (nRoll100 <= 50){
FloatingTextStringOnCreature("*You knead some light and fluffy dough*", oPC);
CreateItemOnObject("sourdough", oPC);
CreateItemOnObject("emptywaterbottle", oPC);
}
else{
CreateItemOnObject("emptywaterbottle", oPC);
}
}
else
FloatingTextStringOnCreature("You do not have water, flour or yeast", oPC);
}