37 lines
1.0 KiB
Plaintext
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);
|
|
}
|
|
|