38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
|
#include "tr_items_inc"
|
||
|
#include "nw_i0_tool"
|
||
|
#include "craft_inc"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
int nSkillTest, nItemsBits = 0;
|
||
|
int nSmithingSkillNumber;
|
||
|
object oPC = GetLastUsedBy();
|
||
|
|
||
|
if(HasItem(oPC, "Ironsheet"))
|
||
|
nItemsBits++;
|
||
|
if(HasItem(oPC, "Leatherstraps"))
|
||
|
nItemsBits++;
|
||
|
|
||
|
//////////////////////////////////////////////////////////
|
||
|
if(nItemsBits == 2){
|
||
|
DestroyObject(GetItemPossessedBy(oPC, "Leatherstraps"));
|
||
|
DestroyObject(GetItemPossessedBy(oPC, "Ironsheet"));
|
||
|
nSmithingSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_DB_SMITHING!", oPC);
|
||
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||
|
|
||
|
|
||
|
if(nSkillTest = (nSmithingSkillNumber+nRoll100) >= HEJ_HALF1){
|
||
|
FloatingTextStringOnCreature("*You create an enhanced suit of armour*", oPC);
|
||
|
CreateItemOnObject("Armhejp1", oPC);
|
||
|
|
||
|
}
|
||
|
else{
|
||
|
AmonCraftSmithing(oPC, nSmithingSkillNumber=nSmithingSkillNumber+nRoll2);
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
FloatingTextStringOnCreature("*You do not have leather straps, iron sheet or gold bar*", oPC);
|
||
|
|
||
|
|
||
|
}
|