35 lines
957 B
Plaintext
35 lines
957 B
Plaintext
|
#include "tr_items_inc"
|
||
|
#include "nw_i0_tool"
|
||
|
#include "craft_inc"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
int nSkillTest, nItemsBits = 0;
|
||
|
int nSmeltingSkillNumber;
|
||
|
object oPC = GetLastUsedBy();
|
||
|
|
||
|
if(HasItem(oPC, "Copper"))
|
||
|
nItemsBits++;
|
||
|
//////////////////////////////////////////////////////////
|
||
|
if(nItemsBits == 1){
|
||
|
DestroyObject(GetItemPossessedBy(oPC, "Copper"));
|
||
|
nSmeltingSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_DB_SMELTING!", oPC);
|
||
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||
|
|
||
|
if(nSkillTest = (nSmeltingSkillNumber+nRoll100) >= COPPER_NAILS){
|
||
|
FloatingTextStringOnCreature("*You create some copper nails*", oPC);
|
||
|
CreateItemOnObject("CopperNails", oPC);
|
||
|
|
||
|
}
|
||
|
else{
|
||
|
AmonCraftSmelting(oPC, nSmeltingSkillNumber=nSmeltingSkillNumber+nRoll2);
|
||
|
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
FloatingTextStringOnCreature("*You do not have any copper*", oPC);
|
||
|
|
||
|
|
||
|
}
|
||
|
|