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_STEEL_ROCK3"); lTarget = GetLocation(oTarget); oSpawn = CreateObject(OBJECT_TYPE_PLACEABLE, "blueprint009", lTarget); object oPC = GetLastKiller(); if (!GetIsPC(oPC)) return; if (GetTag(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oPC)) != "MinersPickaxe") { sDeny="You cannot harvest iron-ore or alloys without a pickaxe."; SendMessageToPC(oPC, sDeny); return; } switch (Random(9)) { case 0: CreateItemOnObject("x2_it_cmat_steel", oPC); AssignCommand(oPC, ActionSpeakString("*You harvest some iron-ore and alloys and smelt them into a single steel ingot*")); break; case 1: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 2: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 3: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 4: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 5: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 6: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 7: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; case 8: AssignCommand(oPC, ActionSpeakString("*You have failed to harvest any iron-ore or alloys*")); break; }// end switch }