Amon_PRC8/_module/nss/tr_t_sr_p2.nss

38 lines
1.3 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(HasItem(oPC, "tr_t_sr_p1"))
nItemsBits++;
//////////////////////////////////////////////////////////
if(nItemsBits == 3){
DestroyObject(GetItemPossessedBy(oPC, "tr_forrestboarskin"));
DestroyObject(GetItemPossessedBy(oPC, "tr_Leather"));
DestroyObject(GetItemPossessedBy(oPC, "tr_t_sr_p1"));
nTailoringSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_TAILOR!", oPC);
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
if(nSkillTest = (nTailoringSkillNumber+nRoll100) >= SAL_RP2){
FloatingTextStringOnCreature("*You create an enhanced suit of armour*", oPC);
CreateItemOnObject("tr_t_sr_p2", oPC);
}
else{
AmonCraftTailor(oPC, nTailoringSkillNumber=nTailoringSkillNumber+nRoll2);
}
}
else
FloatingTextStringOnCreature("*You do not have leather, leather straps or the proceeding +*", oPC);
}