startup xp = client.getSkillExperience(SMITHING) status = 0 bronzbars = false ironbars = false steelbars = false cannonballs = true GameStateChanged if (event.gameState == GameState.LOGIN_SCREEN) { status = 0 } GameTick if(client.getEnergy() > 20){ def runEnabled = client.getVarpValue(173) == 1 if(!runEnabled){ ccOp(WidgetInfo.MINIMAP_TOGGLE_RUN_ORB.id) } } def bankBooth = findNearestObject(10355) def widget = client.getWidget(17694735) def obj = findNearestObject(16469) if(status == 2){ if(isInInventory(ItemID.STEEL_BAR)==true){ if (client.getSkillExperience(SMITHING) != xp){ xp = client.getSkillExperience(SMITHING) gameObjectOp2(findNearestObject(16469)) } else if(widget){ sendDialogPacket(WidgetInfo.PACK(270, 14), amountInInventory(ItemID.STEEL_BAR)) //ccOp(17694734) } else if (client.getWidget(WidgetInfo.LEVEL_UP_CONTINUE)){ gameObjectOp2(findNearestObject(16469)) } } else if(isInInventory(ItemID.STEEL_BAR)==false){ status = 0 } } if(status == 1){ if (client.localPlayer.animationIdleTicks < 2){ return } //logChat("1") if(isPlayerIdle()){ if(widget){ if(bronzbars == true){ sendDialogPacket(WidgetInfo.PACK(270, 14), amountInInventory(ItemID.COPPER_ORE)) //ccOp(17694734) return } if(ironbars == true){ ccOp(17694736) return } if(steelbars == true){ //ccOp(17694738) sendDialogPacket(WidgetInfo.PACK(270, 18), amountInInventory(ItemID.IRON_ORE)) return } if(cannonballs == true){ sendDialogPacket(WidgetInfo.PACK(270, 14), amountInInventory(ItemID.STEEL_BAR)) //ccOp(17694734) return } } if(bronzbars == true){ if(isInInventory(ItemID.COPPER_ORE)==false){ status = 0 return } } if(ironbars == true){ if(isInInventory(ItemID.IRON_ORE)==false){ status = 0 return } } if(steelbars == true){ if(isInInventory(ItemID.IRON_ORE)==false){ status = 0 return } } if(cannonballs == true){ if(isInInventory(ItemID.STEEL_BAR)==false){ status = 0 return } } } if(obj && isPlayerIdle()){ gameObjectOp2(obj) return } } if(status == 0){ //logChat("0") if(bronzbars == true){ if(findItem(ItemID.COPPER_ORE) != -1){ status = 1 return } if(isBankOpen()){ depositInventory() withdraw(ItemID.COPPER_ORE, 14) withdraw(ItemID.TIN_ORE, 14) status = 1 return } } if(ironbars == true){ if(findItem(ItemID.IRON_ORE) != -1){ status = 1 return } if(isBankOpen()){ depositInventory() withdraw(ItemID.IRON_ORE, 28) status = 1 return } } if(steelbars == true){ if(findItem(ItemID.IRON_ORE) != -1){ status = 1 return } if(isBankOpen()){ depositInventory() withdraw(ItemID.IRON_ORE, 9) withdraw(ItemID.COAL, 18) status = 1 return } } if(cannonballs == true){ if(findItem(ItemID.STEEL_BAR) != -1){ gameObjectOp2(obj) status = 2 return } if(isBankOpen()){ deposit(ItemID.CANNONBALL, 200) withdraw(ItemID.STEEL_BAR, 27) gameObjectOp2(obj) status = 2 return } } if(bankBooth && isPlayerIdle()){ gameObjectOp2(bankBooth) return } }