42 lines
1.2 KiB
Plaintext
42 lines
1.2 KiB
Plaintext
#include "tr_items_inc"
|
|
#include "nw_i0_tool"
|
|
#include "craft_inc"
|
|
|
|
void main()
|
|
{
|
|
int nSkillTest, nItemsBits = 0;
|
|
int nWoodSkillNumber;
|
|
object oPC = GetLastUsedBy();
|
|
|
|
if(HasItem(oPC, "Log"))
|
|
nItemsBits++;
|
|
if(HasItem(oPC, "CopperNails"))
|
|
nItemsBits++;
|
|
if(HasItem(oPC, "Leatherstraps"))
|
|
nItemsBits++;
|
|
|
|
//////////////////////////////////////////////////////////
|
|
if(nItemsBits == 3){
|
|
DestroyObject(GetItemPossessedBy(oPC, "Log"));
|
|
DestroyObject(GetItemPossessedBy(oPC, "CopperNails"));
|
|
DestroyObject(GetItemPossessedBy(oPC, "Leatherstraps"));
|
|
nWoodSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_WOODCRAFT!", oPC);
|
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
|
|
|
if(nSkillTest = (nWoodSkillNumber+nRoll100) >= WOOD_BOX){
|
|
FloatingTextStringOnCreature("*You create a sturdy box*", oPC);
|
|
CreateItemOnObject("WoodwnBox", oPC);
|
|
|
|
}
|
|
else{
|
|
AmonCraftWood(oPC, nWoodSkillNumber=nWoodSkillNumber+nRoll2);
|
|
|
|
}
|
|
}
|
|
else
|
|
FloatingTextStringOnCreature("*You may not have a log, copper nails or leather straps *", oPC);
|
|
|
|
|
|
}
|
|
|