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

33 lines
887 B
Plaintext

#include "tr_items_inc"
#include "nw_i0_tool"
#include "craft_inc"
void main()
{
int nSkillTest;
int nWoodSkillNumber;
object oPC = GetLastUsedBy();
//////////////////////////////////////////////////////////
if((HasItem(GetPCSpeaker(), "Log"))){
DestroyObject(GetItemPossessedBy(GetPCSpeaker(), "Log"));
nWoodSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_WOODCRAFT!", oPC);
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
if(nSkillTest = (nWoodSkillNumber+nRoll100) >= EMPTY_BOTTLE){
FloatingTextStringOnCreature("*You carve a wooden bottle*", oPC);
CreateItemOnObject("emptywaterbottle", oPC);
}
else{
AmonCraftWood(oPC, nWoodSkillNumber=nWoodSkillNumber+nRoll2);
}
}
else
FloatingTextStringOnCreature("*You do not have a log*", oPC);
}