33 lines
887 B
Plaintext
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);
|
|
|
|
|
|
}
|
|
|