44 lines
1.3 KiB
Plaintext
44 lines
1.3 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, "Hardlog"))
|
|
nItemsBits++;
|
|
if(HasItem(oPC, "String"))
|
|
nItemsBits++;
|
|
if(HasItem(oPC, "Iron"))
|
|
nItemsBits++;
|
|
if(HasItem(oPC, "HardWoodStaff"))
|
|
nItemsBits++;
|
|
//////////////////////////////////////////////////////////
|
|
if(nItemsBits == 4){
|
|
DestroyObject(GetItemPossessedBy(oPC, "HardWoodStaff"));
|
|
DestroyObject(GetItemPossessedBy(oPC, "Hardlog"));
|
|
DestroyObject(GetItemPossessedBy(oPC, "String"));
|
|
DestroyObject(GetItemPossessedBy(oPC, "Iron"));
|
|
nWoodSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_WOODCRAFT!", oPC);
|
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
|
|
|
if(nSkillTest = (nWoodSkillNumber+nRoll100) >= IRON_STAFF){
|
|
FloatingTextStringOnCreature("*You carve a Ironwood Staff*", oPC);
|
|
CreateItemOnObject("IronwoodStaff", oPC);
|
|
|
|
}
|
|
else{
|
|
AmonCraftWood(oPC, nWoodSkillNumber=nWoodSkillNumber+nRoll2);
|
|
|
|
}
|
|
}
|
|
else
|
|
FloatingTextStringOnCreature("*You do not have a hardwood log, string or iron*", oPC);
|
|
|
|
|
|
}
|
|
|