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_IRON_ROCK8");

                lTarget = GetLocation(oTarget);

                oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "blueprint013", lTarget);



object oPC = GetLastKiller();

if (!GetIsPC(oPC)) return;

if (GetTag(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)) != "MinersPickaxe")
   {
   sDeny="You cannot harvest iron without a pickaxe.";

   SendMessageToPC(oPC, sDeny);

   return;
   }


switch (Random(7))
    {
        case 0: CreateItemOnObject("x2_it_cmat_iron", oPC);

                AssignCommand(oPC, ActionSpeakString("*You harvest some iron-ore and smelt it into a single iron ingot*"));
                break;

        case 1: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore*"));
                break;

        case 2: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore*"));
                break;

        case 3: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore*"));
                break;

        case 4: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore*"));
                break;

        case 5: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore*"));
                break;

        case 6: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore*"));
                break;
    }// end switch



}