Jump to content

Search the Community

Showing results for tags 'getstate() help'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OSBot
    • News & Announcements
    • Community Discussion
    • Bot Manager
    • Support Section
    • Mirror Client VIP
    • Script Factory
  • Scripts
    • Official OSBot Scripts
    • Script Factory
    • Unofficial Scripts & Applications
    • Script Requests
  • Market
    • OSBot Official Voucher Shop
    • Currency
    • Accounts
    • Services
    • Other & Membership Codes
    • Disputes
  • Graphics
    • Graphics
  • Archive

Product Groups

  • Premium Scripts
    • Combat & Slayer
    • Money Making
    • Minigames
    • Others
    • Plugins
    • Agility
    • Mining & Smithing
    • Woodcutting & Firemaking
    • Fishing & Cooking
    • Fletching & Crafting
    • Farming & Herblore
    • Magic & Prayer
    • Hunter
    • Thieving
    • Construction
    • Runecrafting
  • Donations
  • OSBot Membership
  • Backup

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location:


Interests

Found 1 result

  1. So the first time I ran my script, in the if statement that returns State.MINE didn't have "miningArea.contains(myPosition())" included in it. The script ran fine and returned State.MINE when the criteria was met, but once I added "miningArea.contains(myPosition())" if went to the default return case State.WAIT every time. This seems to be the case anytime I use AREA.contains(myPosition()) in an if/else statement. I also double checked to make sure my player was in the area "mineArea". I'm new to scripting so I might be missing something completely obvious so please point anything out. private State getState() { Area miningArea = new Area(3221, 3150, 3226, 3143); Area bankArea = new Area(3205, 3223, 3212, 3214); bankArea.setPlane(2); /* * if (I'm at the mine) * if (My inventories empty and I'm not animating) * Mine Rocks */ if (!getInventory().isFull() && !myPlayer().isAnimating() && miningArea.contains(myPosition())) { log("mining. . ."); return State.MINE; /* * if (I'm at the mine and my inventory is full) * Run to the bank */ } else if (getInventory().isFull() && !bankArea.contains(myPosition())) { log("running to bank. . ."); return State.RUN_BANK; /* * if (I'm at the bank and my inventory is empty) Run to the mine */ } else if (bankArea.contains(myPosition()) && getInventory().isEmpty()) { log("running to mine. . ."); return State.RUN_MINE; /* * if (I'm at the bank and my inventory is full) * Bank Items */ } else if (bankArea.contains(myPosition()) && getInventory().isFull()) { log("banking. . ."); return State.BANK; /* * none of the other conditions are satisfied * Wait */ } else { log("waiting. . ."); return State.WAIT; } }
×
×
  • Create New...