Initial Commit
Initial Commit [v1.01]
This commit is contained in:
43
_module/nss/tr_ammo_a.nss
Normal file
43
_module/nss/tr_ammo_a.nss
Normal file
@@ -0,0 +1,43 @@
|
||||
#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, "Log"))
|
||||
nItemsBits++;
|
||||
if(HasItem(oPC, "Feather"))
|
||||
nItemsBits++;
|
||||
if(HasItem(oPC, "String"))
|
||||
nItemsBits++;
|
||||
if(HasItem(oPC, "CopperArrowHead"))
|
||||
nItemsBits++;
|
||||
//////////////////////////////////////////////////////////
|
||||
if(nItemsBits == 4){
|
||||
DestroyObject(GetItemPossessedBy(oPC, "Log"));
|
||||
DestroyObject(GetItemPossessedBy(oPC, "Feather"));
|
||||
DestroyObject(GetItemPossessedBy(oPC, "String"));
|
||||
DestroyObject(GetItemPossessedBy(oPC, "CopperArrowHead"));
|
||||
nWoodSkillNumber = GetCampaignInt(GZ_AMON_CRAFT, "GZ_BD_WOODCRAFT!", oPC);
|
||||
AssignCommand(oPC, ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, 3.0, 3.0));
|
||||
|
||||
if(nSkillTest = (nWoodSkillNumber+nRoll100) >= NORMAL_ARROW){
|
||||
FloatingTextStringOnCreature("*You create some arrows*", oPC);
|
||||
CreateItemOnObject("NW_WAMAR001", oPC, 99);
|
||||
|
||||
}
|
||||
else{
|
||||
AmonCraftWood(oPC, nWoodSkillNumber=nWoodSkillNumber+nRoll2);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
FloatingTextStringOnCreature("*You may not have a log, string, copper arrow head or a feather*", oPC);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user