Amon_PRC8/_module/nss/tr_t_hr_p1.nss

36 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2025-04-03 19:00:46 -04:00
#include "tr_items_inc"
#include "nw_i0_tool"
#include "craft_inc"
void main()
{
int nSkillTest, nItemsBits = 0;
int nTailoringSkillNumber;
object oPC = GetLastUsedBy();
if(HasItem(oPC, "tr_Leather"))
nItemsBits++;
if(HasItem(oPC, "tr_forrestboarskin"))
nItemsBits++;
//////////////////////////////////////////////////////////
if(nItemsBits == 2){
DestroyObject(GetItemPossessedBy(oPC, "tr_forrestboarskin"));
DestroyObject(GetItemPossessedBy(oPC, "tr_Leather"));
nTailoringSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_TAILOR!", oPC);
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
if(nSkillTest = (nTailoringSkillNumber+nRoll100) >= HEJ_RP1){
FloatingTextStringOnCreature("*You create an enhanced suit of armour*", oPC);
CreateItemOnObject("tr_t_hr_p1", oPC);
}
else{
AmonCraftTailor(oPC, nTailoringSkillNumber=nTailoringSkillNumber+nRoll2);
}
}
else
FloatingTextStringOnCreature("*You do not have Leather or forrest boar skin*", oPC);
}