Jump to content

Botre

Members
  • Posts

    5883
  • Joined

  • Last visited

  • Days Won

    18
  • Feedback

    100%

Everything posted by Botre

  1. Much promo. Such coincidence. You're the king of crabs tho. Wait wat.
  2. Has anyone here ever responded to scam mails like this? Next time I get one (if ever) I'm totally going to play along just for the sakes of it.
  3. One tip: plan your game before you actually write an engine for it (if you're writing one for scratch that is). Or else you'll just get lost / waste time on features you won't ever use :p Been there done that... a couple of times now Gl sexy
  4. Botre

    RIP

    lel
  5. Everything comes from nature one way or another.
  6. The point is not to create a different taste but to trick people into thinking that a healthy version of Coca-Cola is actually a possibility.
  7. 90 possible different scores. 3,156,631 scored items. It's like finding a needle in a stack of needles. Noob
  8. LAST UPDATE: MARCH 6, 2015 Some of these might be found in other library classes such as Arrays (if you find a more efficient implementation feel free to share it) Feel free to leave constructive feedback (on the code/comments) / suggest methods. package org.bjornkrols.utilities.array; import java.util.Comparator; import java.util.Random; import org.bjornkrols.algorithms.sequence_search.BinarySearch; /** * A set of utility methods for arrays. * * @author Bjorn Krols (Botre) * @version 0.0 * @since March 6, 2015 */ public final class ArrayUtilities { private ArrayUtilities() { // This class should never be instantiated. // Do not delete or make accessible. } private static final Random RANDOM = new Random(); /** * @return A string representation of the array with the following format: [0, 1, 2, ..., length - 1]. */ public static String toString(Object[] array) { if (array == null) { return "null"; } int max = array.length - 1; if (max == -1) { return "[]"; } StringBuilder sb = new StringBuilder(); sb.append('['); for (int i = 0; ; i++) { sb.append(array[i]); if (i == max) { return sb.append(']').toString(); } sb.append(", "); } } /** * Calls java.io.PrintStream.println on every entry of the array. */ public static void printlnContents(Object[] array) { if (array == null) { System.out.println("null"); return; } for (int i = 0; i < array.length; i++) { System.out.println(array[i]); } } /** * Prints a String representation of the array and terminates the line. */ public static void printlnString(Object[] array) { System.out.println(toString(array)); } /** * @return A new array resulting from the concatenation of a set of arrays. */ public static int[] concatenate (int[]... arrays) { int size = 0; for (int[] array : arrays) size += array.length; int[] result = new int[size]; int index = 0; for (int[] array : arrays) for (int element : array) result[index++] = element; return result; } /** * @see ArrayUtilities#concatenate(int[]...) */ public static Object[] concatenate (Object[]... arrays) { int size = 0; for (Object[] array : arrays) size += array.length; Object[] result = new Object[size]; int index = 0; for (Object[] array : arrays) for (Object element : array) result[index++] = element; return result; } /** * Swaps the entries at indexes a & b. */ public static void swapEntriesByIndex(boolean[] array, int a, int b) { boolean temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(byte[] array, int a, int b) { byte temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(short[] array, int a, int b) { short temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(char[] array, int a, int b) { char temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(int[] array, int a, int b) { int temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(long[] array, int a, int b) { long temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(float[] array, int a, int b) { float temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(double[] array, int a, int b) { double temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @see ArrayUtilities#swapEntriesByIndex(boolean[], int, int) */ public static void swapEntriesByIndex(Object[] array, int a, int b) { Object temp = array[a]; array[a] = array[b]; array[b] = temp; } /** * @return Whether the array is sorted. */ @SuppressWarnings("rawtypes") public static boolean isSorted(Comparable[] array) { return isSorted(array, 0, array.length - 1); } /** * @return Whether the array is sorted between indexes low and high. */ @SuppressWarnings({ "rawtypes", "unchecked" }) public static boolean isSorted(Comparable[] array, int low, int high) { for (int i = low + 1; i <= high; i++) if (array[i].compareTo(array[i - 1]) < 0) return false; return true; } /** * @see ArrayUtilities#isSorted(Comparable[]) */ @SuppressWarnings("rawtypes") public static boolean isSorted(Object[] array, Comparator comparator) { return isSorted(array, comparator, 0, array.length - 1); } /** * @see ArrayUtilities#isSorted(Comparable[], int, int) */ @SuppressWarnings({ "rawtypes", "unchecked" }) public static boolean isSorted(Object[] array, Comparator comparator, int low, int high) { for (int i = low + 1; i <= high; i++) if (comparator.compare(array[i], array[i - 1]) < 0) return false; return true; } /** * @return Whether the sorted array contains a specific key value. */ public static boolean sortedContains(int[] array, int key) { return BinarySearch.getIndex(array, key) != -1; } /** * Reverses the array. */ public static void reverse(int[] array) { int length = array.length; for (int i = 0; i < length / 2; i++) { array[i] = array[i] ^ array[length - i - 1]; array[length - i - 1] = array[i] ^ array[length - i - 1]; array[i] = array[i] ^ array[length - i - 1]; } } /** * @return A random entry from the array. */ public static int getRandomEntry(int[] array) { return array[RANDOM.nextInt(array.length)]; } }
  9. #PythonSwag All work and no play...
  10. <p><embed src="https://dl.dropboxusercontent.com/u/51310177/fuckedpc.swf" play="true" loop="true" quality="best" type="application/x-shockwave-flash" wmode="transparent" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"/></p> <br/> <p class='edit'> <strong>Edited by Calle, Today, 07:23 PM.</strong> Random sound messages pop up. Seems to come from sources similar to the one above. Author seems to be a "Calle"
  11. Botre

    for cinnamon

    I really love your "neon on dark" stuff.
  12. Check animations, check your inventory / interfaces / messages. The method you're asking for doesn't exist in OSB and I'm not even sure if it's implementable / exists in the OSRS engine. Would be cool though.
  13. Botre

    Yoo

    Welcome
  14. oh Frank
  15. http://osbot.org/forum/topic/50019-understanding-the-forum-ranks/
  16. And world's most useless proggy goes to... Gl tho!
  17. It really depends on what they brought to or kept away from the community. Doesn't seem like the best idea imo. Ex-staff are still the faces of OSB somehow and in some cases they shouldn't be because of conflicting interests, lack of care for the community or just because they are plain out of touch with OSB / the botting scene in general. Some of them deserve it more than others. Some of them just don't deserve it at all. I wouldn't mind a clean up based on merit / contribution.
  18. Any reason why you use a generic instead of an object parameter? Is it a casting thing?
  19. It's 2 tabs indeed. I'm not sure if you are allowed to open 2 tabs, each on a separate client though. If you are trying to open >2 tabs on any number of clients than that's a no no for sure. Also trying to use multiple OSBot accounts to bypass the limitations will not work so don't bother.
×
×
  • Create New...