PWE_PRC8/_module/nss/elmwood_hrvst_b.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

63 lines
1.7 KiB
Plaintext

string sDeny;
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.3
For download info, please visit:
http://www.lilacsoul.revility.com */
//Can go OnDamaged, OnDisturbed, OnSpellCastAt, creature heartbeats, etc.
void main()
{
object oTarget;
object oSpawn;
location lTarget;
oTarget = GetWaypointByTag("NW_ELMWOOD_TREE3");
lTarget = GetLocation(oTarget);
oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "blueprint048", lTarget);
object oPC = GetLastKiller();
if (!GetIsPC(oPC)) return;
if (GetTag(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)) != "LumberjacksAxe")
{
sDeny="You cannot harvest wood without a Lumberjack's Axe.";
SendMessageToPC(oPC, sDeny);
return;
}
switch (Random(7))
{
case 0: CreateItemOnObject("x2_it_cmat_elmw", oPC);
AssignCommand(oPC, ActionSpeakString("*You harvest some elmwood and form it into a plank*"));
break;
case 1: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any wood*"));
break;
case 2: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any wood*"));
break;
case 3: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any wood*"));
break;
case 4: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any wood*"));
break;
case 5: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any wood*"));
break;
case 6: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any wood*"));
break;
}// end switch
}