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

33 lines
925 B
Plaintext

#include "nw_i0_tool"
void main()
{
object oPC = GetLastUsedBy();
int nGrindWheat = d100(1);
int nGrindWrong = d2(1);
if(!HasItem(oPC, "Wheat"))
FloatingTextStringOnCreature("*You need some wheat to make flour*", oPC);
else if (nGrindWheat <= 50){
FloatingTextStringOnCreature("*You grind the wheat into flour*", oPC);
CreateItemOnObject("flour", oPC);
DestroyObject(GetItemPossessedBy(oPC, "Wheat"));
}
else{
switch(nGrindWrong){
case 1:
FloatingTextStringOnCreature("*Your flour is too dirty to use*", oPC);
DestroyObject(GetItemPossessedBy(oPC, "Wheat"));
break;
case 2 :
FloatingTextStringOnCreature("*The grain is too poor a quality*", oPC);
DestroyObject(GetItemPossessedBy(oPC, "Wheat"));
break;
}
}
}