I wrote a code that can round to quick-typable numbers.

Discussion in 'Neopets Chit-Chat' started by Ryan, Jan 25, 2007.

Thread Status:
Not open for further replies.
  1. Ryan

    Ryan Level II

    Joined:
    Jan 23, 2007
    Messages:
    251
    Likes Received:
    1
    I think this may make abers harder to spot for TnT.
    Here is an example of how it works:
    Code (Text):
    1. The number 8202 has been rounded to 8222 which is 100% of the target.
    2. The number 4464 has been rounded to 4444 which is 100% of the target.
    3. The number 3923 has been rounded to 3922 which is 100% of the target.
    4. The number 3369 has been rounded to 3333 which is 99% of the target.
    5. The number 7567 has been rounded to 7555 which is 100% of the target.
    6. The number 10507 has been rounded to 11111 which is 106% of the target.
    7. The number 548 has been rounded to 555 which is 101% of the target.
    8. The number 3692 has been rounded to 3699 which is 100% of the target.
    9. The number 8939 has been rounded to 8888 which is 99% of the target.
    10. The number 8576 has been rounded to 8555 which is 100% of the target.
    And you can test it on your own numbers here:
    http://img413.imageshack.us/my.php?imag ... er28ew.swf


    The commented code is here:
    Code (Text):
    1. function roundNumber(nTemp:Number):Number {
    2.     //The code is in function form
    3.     sUnRounded = String(nTemp);
    4.     //Convert the number to a string
    5.     for (i=0; i<sUnRounded.length; i++) {
    6.         //Run a for loop for the length of the number
    7.         nPrimary = Number(sUnRounded.substr(i, 1));
    8.         nSecondary = Number(sUnRounded.substr(i+1, 1));
    9.         //Assign the first and second digit of the number (later digits are used as the for loop progresses)
    10.         if ((Math.abs(nPrimary-nSecondary)<=i+1) || (i>sUnRounded.length-3)) {
    11.             //If the first and second digits are similar or if it is the last digit
    12.             sTemp = sUnRounded.substr(0, i+1);
    13.             while (sTemp.length<sUnRounded.length) {
    14.                 sTemp = sTemp+nPrimary;
    15.             }
    16.             //Remove all following digits and replace them with the same number
    17.             return sTemp;
    18.             //End the loop
    19.         }
    20.     }
    21. }
    22.  
     
  2. lazypando

    lazypando Level IV

    Joined:
    Nov 16, 2006
    Messages:
    3,326
    Likes Received:
    94
    this is in Java right?...is it even possible to make neopets programs in Java?
     
  3. NHStephen

    NHStephen Level IV

    Joined:
    Jan 2, 2007
    Messages:
    1,114
    Likes Received:
    9
    yeah but what are u going to do if u dont have the program or do u
     
  4. Ryan

    Ryan Level II

    Joined:
    Jan 23, 2007
    Messages:
    251
    Likes Received:
    1
    It would have to be translated over, but with the comments it should be easy.
    I don't know how to create an Aber, I just think that any little ideas to make abing safer should be added.
     
  5. test123

    test123 Level IV

    Joined:
    Nov 3, 2006
    Messages:
    935
    Likes Received:
    0
    Location:
    Australia
    hey

    wow nice but im not sure if tnt really care how people haggle..
     
  6. Ryan

    Ryan Level II

    Joined:
    Jan 23, 2007
    Messages:
    251
    Likes Received:
    1
    Anything in the name of not getting caught!
    If I could program it, I would set it up to record which seconds the restocks happen then depending on their distribution, change the refresh rate from 5-15 seconds.

    As well as that, after a restock, take a random break from 1-3 minutes during which it checks the inventory and wizzards a random last bought item.

    After two hours, it automatically shuts down.

    Lets see them find that!
    _________

    As a matter of fact, while I AB, I change the refresh rate from 5-7 every once in a while and stop it to check my inventory and wizzard a few prices every 20 minutes or so.
     
  7. test123

    test123 Level IV

    Joined:
    Nov 3, 2006
    Messages:
    935
    Likes Received:
    0
    Location:
    Australia
    hey

    lmao that would be awesome...gl makin it though
     
  8. CliffordHanger

    CliffordHanger Level II

    Joined:
    Dec 31, 2006
    Messages:
    158
    Likes Received:
    0
    Location:
    Terror Mountain
    This is AWESOME! Thanks alot!

    Dont ask me why, but I was looking for something like this for a while now.
     
  9. SoC

    SoC Moderator
    Staff Member

    Joined:
    Jan 24, 2007
    Messages:
    4,551
    Likes Received:
    105
    Location:
    Maaaaaaanchester!
    +rep

    nice work :) ill find a use for it sooner or later :D
     
  10. CliffordHanger

    CliffordHanger Level II

    Joined:
    Dec 31, 2006
    Messages:
    158
    Likes Received:
    0
    Location:
    Terror Mountain
    I started to do something like this yesterday, but got frustrated, and bored with it. I see where I was going wrong too. Thanks a lot!

    +REP
     
  11. mckrazy

    mckrazy Level III

    Joined:
    Jan 24, 2007
    Messages:
    541
    Likes Received:
    0
    Location:
    United Kingdom

    sounds like a wicked idea, that would cost wau over 100points in the shop, but well worth it.
     
  12. Anonymous

    Anonymous Guest

    hi.. i dont understand any of this
     
  13. dudesareus

    dudesareus Level II

    Joined:
    Jan 29, 2007
    Messages:
    306
    Likes Received:
    0
    Location:
    Ontario, Canada
    He made a snippet of a code that would make ABing safer, not much to not understand there!
     
  14. Underground_Secrets

    Joined:
    Dec 22, 2006
    Messages:
    626
    Likes Received:
    1
    Gender:
    Female
    Location:
    West Coast in USA
    wow thats cool! im totally interested if someone actually makes this! 8)
     
Thread Status:
Not open for further replies.