bencebence Posted July 7, 2011 Share Posted July 7, 2011 Hey everyone!Alright, I start to get angry on this mining script.I 'tought' that making each ore to have own vein would be easier. The scripting was that. It looked pretty simple.But when I tested in-game... :wallbash: Don't ask it...First there were no problems. But when I entered the mine... One of the scripts started runing without I'm activating anything. I didn't even wear the pick! The mining sound was going and going, and it didn't stop, and also showed the message, that it didn't found anything. Then I activated a daedrite vein. And all the gates of Oblivion opened... My bag fulled with daedrite ores in about 1 minute, and also there were two mining sounds.Anyways here are all the scripts:Scriptname RaivenAyliiteOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 50) player.additem AyliiteOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 50) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 50) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 50) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndAyliite OreScriptname RaivenCoalOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 18) player.additem Coal 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 18) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 18) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 18) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif Coal OreScriptname RaivenCopperOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 1) player.additem CopperOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 1) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 1) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 1) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndCopper OreScriptname RaivenCrystaliteOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 60) player.additem CrystaliteOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 60) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 60) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 60) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndCrystalite OreScriptname RaivenDaedriteOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 80) player.additem DaedriteOre 1 elseif (chance <= 30 && chance >= 14 && bluntskill <= 80) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 80) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 80) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndDaedrite OreScriptname RaivenDwarfiteOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 25) player.additem DwarfiteOre 1 elseif (chance <= 30 && chance >= 14 && bluntskill <= 25) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 25) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 25) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndDwarfite OreScriptname RaivenEbonyOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 70) player.additem EbonOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 70) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 70) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 70) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndEbony OreScriptname RaivenIronOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 74 && chance <= 89 && bluntskill <= 10) player.additem PureIronOre 1 elseif (chance > 49 && chance <= 74 && bluntskill <= 10) player.additem IroneOre 1 elseif (chance > 14 && chance <= 49 && bluntskill <= 10) player.additem ImpureIronOre 1 elseif (chance > 89 && bluntskill <= 10) player.additem JunkOre 1 elseif (chance <= 14 && bluntskill <= 10) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 10) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndIron OreScriptname RaivenMithrilOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 35) player.additem MithrilOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 35) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 35) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 35) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndMithril OreScriptname RaivenTinOre short bluntskill short ready short chance short playhitsound Begin GameMode if (GetCrossHairRef == GetSelf) && (OnControlDown 4) if (Player.GetEquipped MiningPick) set ready to 1 else Message "You must equip a Mining Pick to mine the rock." endif endif if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent elseif (chance > 30 && bluntskill <= 5) player.additem TinOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 5) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 5) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 5) message "You don't have high enough blunt skill to mine this vein." endif if (playhitsound == 1) playsound wpnhitblunt set playhitsound to 0 else playsound wpnblockblunt endif EndTin Ore Thanks in advance, (if anyone knows anything to solve this case) bencebence Link to comment Share on other sites More sharing options...
AlexxEG Posted July 7, 2011 Share Posted July 7, 2011 (edited) Change the first "elseif (chance > 30 && bluntskill <= 5)" to "if (chance > 30 && bluntskill <= 5)" in each script. Then add another "endif" for "if (Ready)".Try that ;) Example: if (ready) set ready to 0 set bluntskill to player.getactorvalue blunt set chance to getrandompercent if (chance > 30 && bluntskill <= 50) player.additem AyliiteOre 1 elseif (chance >= 14 && chance <= 30 && bluntskill <= 50) player.additem JunkOre 1 elseif (chance < 14 && bluntskill <= 50) message "You found nothing." set playhitsound to 1 elseif (bluntskill > 50) message "You don't have high enough blunt skill to mine this vein." endif endif Edited July 7, 2011 by Alexx378 Link to comment Share on other sites More sharing options...
Recommended Posts