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.
30 lines
1001 B
Plaintext
30 lines
1001 B
Plaintext
#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;
|
|
}
|