39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
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, "Goldbar"))
|
||
|
nItemsBits++;
|
||
|
//////////////////////////////////////////////////////////
|
||
|
if(nItemsBits == 1){
|
||
|
DestroyObject(GetItemPossessedBy(oPC, "Goldbar"));
|
||
|
nSmeltingSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_DB_SMELTING!", oPC);
|
||
|
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||
|
//debug msg
|
||
|
//FloatingTextStringOnCreature(IntToString(nSkillTest = (nWoodSkillNumber+nRoll100x2)), oPC);
|
||
|
|
||
|
if(nSkillTest = (nSmeltingSkillNumber+nRoll100) >= GOLD_ARROW_HEAD){
|
||
|
FloatingTextStringOnCreature("*You create a gold arrowhead*", oPC);
|
||
|
//AmonCraftSmithing(oPC, nSmithingSkillNumber = (nSmithingSkillNumber+nRoll6));
|
||
|
CreateItemOnObject("Goldarrowhead", oPC);
|
||
|
|
||
|
}
|
||
|
else{
|
||
|
AmonCraftSmelting(oPC, nSmeltingSkillNumber=nSmeltingSkillNumber+nRoll2);
|
||
|
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
FloatingTextStringOnCreature("*You do not have any gold*", oPC);
|
||
|
|
||
|
//debug msg
|
||
|
//FloatingTextStringOnCreature("Your Baking skill is " + IntToString(nWoodSkillNumber),oPC);
|
||
|
}
|
||
|
|