Jump to content

Issue with pickaxe repair


SavageNerdz

Recommended Posts

Can anyone help me out? Paths are set accordingly in the actual script ,as it entity/ints etc. However, it doesn't do anything at all

EDIT: FFS put this in wrong section, could a mod PLEASE move it.. so tired i can't think. :(
 

public int onLoop() throws InterruptedException {

        Player player = client.getMyPlayer();
        Bank bank = client.getBank();
        Inventory inv = client.getInventory();
        Entity stairs = closestObject(Stairs);
        Entity stairs2 = closestObject(Stairs2);
        Entity stairstop = closestObject(StairsTop);
        Entity LBanker = closestObject(18491);


        if (equipmentTab.isWieldingWeaponThatContains("Broken pickaxe")) {
            WalkToBank();
            Entity Banker = closestObject(2481);
            if (inv.contains(478)) {
            WalkToBank();


            if (Banker != null && Banker.isVisible()) {
                Banker.interact("Bank");
                if (bank.isOpen()) {
                    bank.getSlotForId(Cash);
                    bank.withdrawX(1100, Cash);
                    if (inv.contains(Cash)) {
                        walkToBob();
                           Entity Bob = closestNPCForName("Bob");
                        if (Bob != null && Bob.isVisible() ) {
                            equipmentTab.unequip(478);
                            if (client.getInventory().contains(478)) {
                            selectOption(null,Bob.getMouseDestination(),"Use", client.getInventory().getItemForId(478).getName()+" -> Bob");
                            selectInterfaceOption(242, 4);
                            selectInterfaceOption(228, 1);

                        }
                        }
                    }
                }

            }
        }
        }

        return 1;


    }
Edited by SavageNerdz
Link to comment
Share on other sites

Well I can't work out your problem just by looking at the script but instead of doing Entity Banker and Entity LBanker try using

RS2Object Bank = closestObjectForName("Bank booth");

That will negate the need to update your script when the ID's change which they inevitably will. Sorry I cannot help you with your problem but another thing you should try doing is adding log(*number*); throughout your script to see what path your script is taking through your code.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...