Amon_PRC8/_module/nss/tr_staff_aw.nss

38 lines
1.0 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 nWoodSkillNumber;
object oPC = GetLastUsedBy();
if(HasItem(oPC, "AshLog"))
nItemsBits++;
if(HasItem(oPC, "String"))
nItemsBits++;
//////////////////////////////////////////////////////////
if(nItemsBits == 2){
DestroyObject(GetItemPossessedBy(oPC, "AshLog"));
DestroyObject(GetItemPossessedBy(oPC, "String"));
nWoodSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_WOODCRAFT!", oPC);
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
if(nSkillTest = (nWoodSkillNumber+nRoll100) >= ASH_STAFF){
FloatingTextStringOnCreature("*You carve a ash wood Staff*", oPC);
CreateItemOnObject("ashwoodstaff", oPC);
}
else{
AmonCraftWood(oPC, nWoodSkillNumber=nWoodSkillNumber+nRoll2);
}
}
else
FloatingTextStringOnCreature("*You do not have a Ashlog or string*", oPC);
}