Initial Commit
Initial Commit [v1.01]
This commit is contained in:
36
_module/nss/tr_make_dough.nss
Normal file
36
_module/nss/tr_make_dough.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
#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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user