33 lines
965 B
Plaintext
33 lines
965 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, "Mithral"))
|
|
nItemsBits++;
|
|
//////////////////////////////////////////////////////////
|
|
if(nItemsBits == 1){
|
|
DestroyObject(GetItemPossessedBy(oPC, "Mithral"));
|
|
nSmeltingSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_DB_SMELTING!", oPC);
|
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
|
|
|
if(nSkillTest = (nSmeltingSkillNumber+nRoll100) >= MITHRAL_CHAIN){
|
|
FloatingTextStringOnCreature("*You create some mithral chain*", oPC);
|
|
CreateItemOnObject("Mithralchain", oPC);
|
|
|
|
}
|
|
else{
|
|
AmonCraftSmelting(oPC, nSmeltingSkillNumber=nSmeltingSkillNumber+nRoll2);
|
|
FloatingTextStringOnCreature("*You do not have any mithral*", oPC);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|