Initial upload
Initial upload. PRC8 has been added. Module compiles, PRC's default AI & treasure scripts have been integrated. Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
29
_module/nss/stx_cr_cancs.nss
Normal file
29
_module/nss/stx_cr_cancs.nss
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "stx_inc_craft"
|
||||
|
||||
int StartingConditional() {
|
||||
object oPC = GetPCSpeaker();
|
||||
if (!GetHasSkill(SKILL_CRAFT_WEAPON, oPC))
|
||||
return FALSE;
|
||||
|
||||
object oShield = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oPC);
|
||||
if (!GetIsObjectValid(oShield) || GetPlotFlag(oShield) ||
|
||||
!(GetBaseItemType(oShield)==BASE_ITEM_SMALLSHIELD ||
|
||||
GetBaseItemType(oShield)==BASE_ITEM_LARGESHIELD ||
|
||||
GetBaseItemType(oShield)==BASE_ITEM_TOWERSHIELD ))
|
||||
return FALSE;
|
||||
|
||||
if (GetIsDM(oPC)) return TRUE;
|
||||
|
||||
object oNPC = GetLocalObject(oPC, "STX_CR_NPC");
|
||||
if (GetIsObjectValid(oNPC)) {
|
||||
if (GetTag(oNPC) != STX_CR_SMITH_NPC)
|
||||
return FALSE;
|
||||
|
||||
} else if (STX_CR_REQUIRE_PLACEABLE) {
|
||||
object oRequiredPlaceable = GetNearestObjectByTag(STX_CR_METAL_PLACEABLE, oPC);
|
||||
if (GetArea(oPC) != GetArea(oRequiredPlaceable) || GetDistanceBetween(oPC, oRequiredPlaceable) > STX_CR_REQUIRED_DISTANCE)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
Reference in New Issue
Block a user