More Human Than You Forums

Hello and welcome to the MHTY Script Series Forums. Please log in or register to post and download our scripts.

We do this to discourage people from downloading the script, thus keeping the amount of people who are using the MHTY series scripts down along with the chance of us getting banned. Sorry for the inconvenience.


    hey help with my script?

    Share

    zylski

    Posts : 27
    Points : 46791
    Reputation : 1
    Join date : 2009-06-11

    hey help with my script?

    Post  zylski on Thu Jun 11, 2009 12:42 am

    hey i was wundering if any one could kinda help me script i know how to do alot of stuff just need sum guidness ive been talking with ddm he said ppl here could mabey help me so what do ya say
    ?

    Twinkies

    Posts : 33
    Points : 46792
    Reputation : 2
    Join date : 2009-06-10
    Age : 23

    Re: hey help with my script?

    Post  Twinkies on Thu Jun 11, 2009 12:50 am

    What kind of script is it?
    Might be able to offer my assistance though I am a noob scripter atm myself.

    zylski

    Posts : 27
    Points : 46791
    Reputation : 1
    Join date : 2009-06-11

    Re: hey help with my script?

    Post  zylski on Thu Jun 11, 2009 12:53 am

    Its is a miner that mines and banks at draynor here is the script so far

    Code:
    import java.util.*;
    import com.speljohan.rsbot.script.*;
    import com.speljohan.rsbot.script.wrappers.*;



    public class zylskisdraynorminer extends Script{

       public int[] AXES  = {1265,1267,1269,1271,1273,1275};
       public int coal = 453;
       public int[] rocks = {11932,11930,11931};
       public int mininganima = 824;
       public int[] banker = {495, 494};



       RSTile[] walk2bank = new RSTile[] {new RSTile(3148,3150), new RSTile(3148,3166),
             new RSTile(3142,3183), new RSTile(3183,3199), new RSTile(3127,3209),
             new RSTile(3112,3219), new RSTile(3098,3230), new RSTile(3093,3243)};

       RSTile[] walk2mines = new RSTile[] {new RSTile(3093,3243), new RSTile(3098,3230),
             new RSTile(3112,3219), new RSTile(3127,3209), new RSTile(3138,3199),
             new RSTile(3142,3183), new RSTile(3148,3166), new RSTile(3148,3150)};

       public RSTile banktile = new RSTile(3176,3385);
       public RSTile minetile = new RSTile(3148,3150);



       public String getName(){
          return "Draynor Miner";
       }

       public String getAuthor(){
          return "Zylski";
       }

       public String getScriptCategory(){
          return "Mining";
       }

       public double getVersion(){
          return 1.5;
       }

       public boolean onStart(Map<String, String> args) {

          return true;
       }



       public void onFinish(){

          return;

       }

       public boolean needtobank(){
          return isInventoryFull();
       }

       public boolean atbank(){
          RSNPC bank = getNearestNPCByID(banker);
          if(bank == null) return false;

          return distanceTo(banktile) < 10;
       }

       public boolean dpWalkPath(RSTile[] path) {
          for (int i = path.length - 1; i >= 0; i--) {
             if (dpWalkTile(path[i])) {
                return true;
             }
          }
          return false;
       }

       public boolean dpWalkTile(RSTile tile) {
          if (distanceTo(tile) <= 16) {
             walkTileMM(tile);
             return true;
          } else {
             return false;
          }
       }

       private void walkPath(RSTile[] path, boolean reverse) {
          try {
             if (!reverse) {
                if (!getMyPlayer().isMoving()
                      || distanceTo(getDestination()) <= random(4, 7)) {
                   path = randomizePath(path, 2, 2);
                   dpWalkPath(path);
                   return;
                } else
                   antiBan();
             } else {
                if (!getMyPlayer().isMoving()
                      || distanceTo(getDestination()) <= random(4, 7)) {
                   path = randomizePath(reversePath(path), 2, 2);
                   dpWalkPath(path);
                   return;
                } else
                   antiBan();
             }
          } catch (Exception e) {
          }
       }

       private int antiBan() {
          int random = random(1, 24);

          switch (random) {
          case 1:
             int x = random(0, 750);
             int y = random(0, 500);
             if (random(1, 6) == 3)
                moveMouse(0, 0, x, y);
             return random(1000, 1500);

          case 2:
             if (getCurrentTab() != TAB_INVENTORY) {
                openTab(TAB_INVENTORY);
                return random(500, 750);
             } else {
                return random(500, 750);
             }

          case 3:
             if (random(1, 40) == 30) {
                if (getMyPlayer().isMoving()) {
                   return random(750, 1000);
                }
                if (getCurrentTab() != TAB_STATS) {
                   openTab(TAB_STATS);
                }
                moveMouse(665, 230, 40, 20);
                wait(random(3000, 6000));
                return random(100, 200);
             }

          case 4:
             if (random(1, 13) == 5) {
                int angle = getCameraAngle() + random(-90, 90);
                if (angle < 0) {
                   angle = 0;
                }
                if (angle > 359) {
                   angle = 0;
                }

                setCameraRotation(angle);
                return random(500, 750);
             }
          }
          return 500;
       }

       public boolean bank(){

          RSNPC bankz = getNearestNPCByID(banker);
          {
             if(bankz == null)
                return false;
             if(bank.isOpen()){

                bank.depositAllExcept(AXES);
                bank.close();

             }else{   
                atNPC(bankz, "Bank");
             }
          }      
          return true;
       }



       public boolean atmines(){
          RSObject iron = getNearestObjectByID(rocks);
          if(iron == null) return false;

          return distanceTo(minetile) < 7;
       }



       public boolean mine(){
          RSObject coal = findObject(rocks);
          if (coal == null) return false;
          return atObject(coal, "mine");

       }



       public int loop(){
          if(getMyPlayer().getAnimation() == mininganima)
             return random(400, 800);      

          if (getMyPlayer().isMoving())
             return random(800, 1600);   

          if (!isRunning() && getEnergy() > random(25, 100)) {
             setRun(true);
          }


          if (needtobank()){


             if (atbank()){

                if (bank()){
                   return random (500, 800);
                }

             }else{

                walkPath(walk2bank, false);//false means that we are not reversing it

                return random (500,800);

             }
          }else{

             if (atmines()){

                if (mine()){
                   return random (300,600);
                }

             }else{

                walkPath(walk2mines, false);

                return random (500,800);
             }
          }
          return 800;
       }
    }

    BOOM BOOM

    Posts : 17
    Points : 46294
    Reputation : 0
    Join date : 2009-06-18
    Age : 107
    Location : World 1337

    Re: hey help with my script?

    Post  BOOM BOOM on Thu Jun 18, 2009 10:55 pm

    What problems are you getting?
    avatar
    luldespencer

    Posts : 101
    Points : 47658
    Reputation : 4
    Join date : 2009-06-19
    Age : 26
    Location : At my Computer.

    Re: hey help with my script?

    Post  luldespencer on Fri Jun 19, 2009 2:50 pm

    BOOM BOOM wrote:What problems are you getting?


    I would be glad to help, but sadly, I do not know Programming. If I am required for this website, i'll try to learn.


    ~ Lul.

    angels2rebel

    Posts : 51
    Points : 47198
    Reputation : 12
    Join date : 2009-06-13
    Age : 21
    Location : Swindon

    Re: hey help with my script?

    Post  angels2rebel on Mon Jun 22, 2009 4:11 pm

    yo mate try using these script and see if they can help you and mind telling me wat the script problem is :

    1. Pico's Global Power Miner: http://www.rsbot.org/vb/showthread.php?t=18647

    Pico is the number one script to use for powermining and getting lvls up as you can use it anywhere on runescape and it can powermine anything and everything, it been voted the best mining script is rsbot.org.

    My Rating: 8/10


    2. Mine: http://www.rsbot.org/vb/showthread.php?t=47319

    Mine is a great script to use as there are lots of thingys you can pick and it tells you the best places to mine the ore but the bad side of it is that there isn'tmaking places you can mine.

    My Rating: 7/10


    3. Dwu's PowerIron - Reloaded: http://www.rsbot.org/vb/showthread.php?t=56413

    An really nice f2p and p2p iron miner and the fastest on out there.

    My Rating: 8/10

    angels2rebel

    Posts : 51
    Points : 47198
    Reputation : 12
    Join date : 2009-06-13
    Age : 21
    Location : Swindon

    Re: hey help with my script?

    Post  angels2rebel on Mon Jun 22, 2009 4:17 pm

    luldespencer wrote:
    BOOM BOOM wrote:What problems are you getting?


    I would be glad to help, but sadly, I do not know Programming. If I am required for this website, i'll try to learn.


    ~ Lul.
    turst me learning javascripting is really hard i am half way to learning it fully and it took me a month cuz its kinda boring

    Silverleafz

    Posts : 25
    Points : 46552
    Reputation : 0
    Join date : 2009-06-19
    Age : 24
    Location : Bilzen

    Re: hey help with my script?

    Post  Silverleafz on Wed Jun 24, 2009 12:30 pm

    What do you want to have improved?

    Sponsored content

    Re: hey help with my script?

    Post  Sponsored content


      Current date/time is Thu Nov 23, 2017 7:49 pm