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_OAKWOOD_TREE8"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "blueprint061", 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_oakw", oPC); AssignCommand(oPC, ActionSpeakString("*You harvest some oakwood 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 }