November 16, 201510 yr private final int[] DEADMAN_WORLDS = {317, 319, 321, 345, 352, 357, 360, 374}; private boolean isDeadman(){ for(int i : DEADMAN_WORLDS){ if(getBot().getWorld() == i){ return true; } } return false; } Pretty simple, probs forgetting a world or new worlds will be added. Change the modifiers if necessary. Edited November 16, 201510 yr by Tom
November 16, 201510 yr To determine DMM worlds dynamically you could use for(XWorld w : client.accessor.getWorldArray()) { if( (w.getType() & 0x20000000) != 0) // this is a DMM world, parse world ID from w.getDomain() }
November 23, 201510 yr private final int[] DEADMAN_WORLDS = {317, 319, 321, 345, 352, 357, 360, 374}; private boolean isDeadman(){ for(int i : DEADMAN_WORLDS){ if(getBot().getWorld() == i){ return true; } } return false; } Pretty simple, probs forgetting a world or new worlds will be added. Change the modifiers if necessary. Nice convention naming private final int[] deadmanWorlds
November 24, 201510 yr Author Nice convention naming private final int[] deadmanWorlds Yeah just following convention, i personally prefer camelCase Edited November 24, 201510 yr by Tom
Create an account or sign in to comment