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

                lTarget = GetLocation(oTarget);

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


object oPC = GetLastKiller();

if (!GetIsPC(oPC)) return;

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

   SendMessageToPC(oPC, sDeny);

   return;
   }


switch (Random(18))
    {
        case 0: CreateItemOnObject("x2_it_cmat_mith", oPC);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    }// end switch


}