Leaderboard
Popular Content
Showing content with the highest reputation on 02/08/14 in all areas
-
Threads really piss me off "I'm leaving i'm tired of this" 20 days + old, online every day since then more active than before.. Claims they leave. Numerous people do this, i find it funny sometimes, but others that make 5 threads in 2 months just annoy me. I never want to wish our community smaller, but leave if you are going to make 5 threads just go. I promise you won't be missed.4 points
-
That awkward moment when OP is trying to get post count in spam.3 points
-
The first person to get a chat ban for requesting a kick from someone. Really? Not like there's 10+ people that do it everyday....3 points
-
2 points
-
2 points
-
2 points
-
2 points
-
2 points
-
I somewhat agree to an extent, his script suit's mains basically. It would be nice if it could be more pure friendly, or have a different alternative route/areas/methods of getting to places for pures. But alas, it is still a great script!2 points
-
I gave you an answer and I gave my own opinion. This had nothing at all to do with the language, it's basic understanding of file extensions which any computer user who has more knowledge than my grandmother should know about. It's not like I only posted the insult, I posted it together with an answer. Now either you can continue bitching about it or take it as a man and take a look at the answer I provided you with, it's up to you.2 points
-
I'm so glad I didn't buy sponsor and only scripts.. I don't support this site, admins have terrible communication skills, I'm 17 years old and I have school everyday I get home from work at 7:30-8 and I bet I could run this site better. I can't code but, learn how to communicate with your customers, till then I won't use your bot again2 points
-
package prayer; import java.util.ArrayList; import java.util.List; import org.osbot.script.Script; import org.osbot.script.rs2.skill.Skill; import org.osbot.script.rs2.ui.RS2InterfaceChild; public class Prayers { private Script script; public Prayers(Script script) { this.script = script; } enum Prayer { THICK_SKIN(1, 1, 1, "Thick Skin"), BURST_OF_STRENGTH(4, 2, 2, "Burst of Strength"), CLARITY_OF_THOUGHT(7, 4, 3, "Clarity of Thought"), SHARP_EYE(8, 262144, 4, "Sharp Eye"), MYSTIC_WILL( 9, 524288, 5, "Mystic Will"), ROCK_SKIN(10, 8, 6, "Rock Skin"), SUPERHUMAN_STRENGTH( 13, 16, 7, "Superhuman Strength"), IMPROVED_REFLEXES(16, 32, 8, "Improved Reflexes"), RAPID_RESTORE(19, 64, 9, "Rapid Restore"), RAPID_HEAL( 22, 128, 10, "Rapid Heal"), PROTECT_ITEM(25, 256, 11, "Protect Item"), HAWK_EYE(26, 1048576, 12, "Hawk Eye"), MYSTIC_LORE( 27, 2097152, 13, "Mystic Lore"), STEEL_SKIN(28, 512, 14, "Steel Skin"), ULTIMATE_STRENGTH(31, 1024, 15, "Ultimate Strength"), INCREDIBLE_REFLEXES(34, 2048, 16, "Incredible Reflexes"), PROTECT_FROM_MAGIC(37, 4096, 17, "Protect from Magic"), PROTECT_FROM_MISSILES(40, 8192, 18, "Protect from Missiles"), PROTECT_FROM_MELEE(43, 16384, 19, "Protect from Melee"); private int requiredPrayerLevel; private int configValue; private int slot; private String prayerName; Prayer(final int requiredPrayerLevel, final int configValue, final int slot, final String prayerName) { this.requiredPrayerLevel = requiredPrayerLevel; this.configValue = configValue; this.slot = slot; this.prayerName = prayerName; } public int getRequiredPrayerLevel() { return requiredPrayerLevel; } public int getConfigValue() { return configValue; } public int getSlot() { return slot-1; } public String getName() { return prayerName; } } public boolean hasRequiredPrayerLevel(Prayer p) { return script.client.getSkills().getLevel(Skill.PRAYER) >= p .getRequiredPrayerLevel(); } public boolean isSet(Prayer p) { return p != null && getSelectedPrayers().contains(p); } public List<Prayer> getSelectedPrayers() { List<Prayer> selectedPrayers = new ArrayList<Prayer>(); for (Prayer p : Prayer.values()) { if ((script.client.getConfig(83) & (1 << getReversedPower(2, p.getConfigValue()))) != 0) { selectedPrayers.add(p); } } return selectedPrayers; } public List<Prayer> getSelectedQuickPrayers() { List<Prayer> selectedPrayers = new ArrayList<Prayer>(); for (Prayer p : Prayer.values()) { if ((script.client.getConfig(84) & (1 << getReversedPower(2, p.getConfigValue()))) != 0) { selectedPrayers.add(p); } } return selectedPrayers; } public boolean isSetQuickPrayer(Prayer p){ return p != null && getSelectedQuickPrayers().contains(p); } public boolean isQuickPrayerMenuOpen(){ return getChild(77,4) !=null; } private RS2InterfaceChild getChild(int parent, int child) { if (script.client.getInterface(parent) != null) { RS2InterfaceChild c = script.client.getInterface(parent).getChild(child); if (c != null && c.isVisible()) { return c; } } return null; } /* * Used to figure out how many shifts are needed.. */ private int getReversedPower(int powerOfNumber, int endNumber) { for (int i = 1; i < 31; i++) { if (Math.pow(powerOfNumber, i) == endNumber) { return i; } } return 0; } } the slot class to return the slots like such.. package prayer; import java.awt.Point; import java.awt.Rectangle; import org.osbot.script.Script; import org.osbot.script.mouse.RectangleDestination; import org.osbot.script.rs2.ui.RS2InterfaceChild; import org.osbot.script.rs2.ui.Tab; import prayer.Prayers.Prayer; public class PrayerSlot { private Script script; private Prayers prayers; public PrayerSlot(Script script) { this.script = script; prayers = new Prayers(script); } private final int START_WIDTH = 553; private final int START_HEIGHT = 218; private final int WIDTH = 37; private final int HEIGHT = 37; private Point getPoint(int slot) { int column = slot / 5; int row = slot % 5; int x = (int) (START_WIDTH + (row * WIDTH)); int y = (int) START_HEIGHT + (column * HEIGHT); return new Point(x, y); } public Rectangle getRectangle(int slot) { Point p = getPoint(slot); return new Rectangle(p.x, p.y, 30, 27); } public void togglePrayerOn(Prayer p) throws InterruptedException { if (p != null && !prayers.isSet(p)) { Rectangle interactionSlot = getRectangle(p.getSlot()); if (script.currentTab() != null && interactionSlot != null) { if (!script.currentTab().equals(Tab.PRAYER)) { script.openTab(Tab.PRAYER); } if (script.currentTab().equals(Tab.PRAYER)) { interact(interactionSlot, "Activate"); } } } } public void togglePrayerOff(Prayer p) throws InterruptedException { if (p != null && prayers.isSet(p)) { Rectangle interactionSlot = getRectangle(p.getSlot()); if (script.currentTab() != null && interactionSlot != null) { if (!script.currentTab().equals(Tab.PRAYER)) { script.openTab(Tab.PRAYER); } if (script.currentTab().equals(Tab.PRAYER)) { interact(interactionSlot, "Deactivate"); } } } } public void toogleQuickPrayerOn(Prayer p) throws InterruptedException { if (p != null && !prayers.isSetQuickPrayer(p)) { Rectangle interactionSlot = getRectangle(p.getSlot()); if (script.currentTab() != null && interactionSlot != null) { if (!script.currentTab().equals(Tab.PRAYER)) { script.openTab(Tab.PRAYER); } if (script.currentTab().equals(Tab.PRAYER)) { interact(interactionSlot, "Toggle"); } } } } public void toogleQuickPrayerOff(Prayer p) throws InterruptedException { if (p != null && prayers.isSetQuickPrayer(p)) { Rectangle interactionSlot = getRectangle(p.getSlot()); if (script.currentTab() != null && interactionSlot != null) { if (!script.currentTab().equals(Tab.PRAYER)) { script.openTab(Tab.PRAYER); } if (script.currentTab().equals(Tab.PRAYER)) { interact(interactionSlot, "Toggle"); } } } } public void confirmQuickPrayers() throws InterruptedException { if (script.currentTab() != null && prayers.isQuickPrayerMenuOpen()) { if (!script.currentTab().equals(Tab.PRAYER)) { script.openTab(Tab.PRAYER); } if (script.currentTab().equals(Tab.PRAYER)) { interact(getChild(77,4).getRectangle(),"Done"); } } } public void openQuickPrayerMenu() throws InterruptedException{ //548,85 if (getChild(548,85) !=null){ interact(getChild(548,85).getRectangle(),"Setup"); } } public void activateQuickPrayers() throws InterruptedException{ if (getChild(548,85) !=null){ getChild(548,85).interact("Activate"); } } private RS2InterfaceChild getChild(int parent, int child) { if (script.client.getInterface(parent) != null) { RS2InterfaceChild c = script.client.getInterface(parent).getChild(child); if (c != null && c.isVisible()) { return c; } } return null; } private boolean interact(Rectangle rec, String action) throws InterruptedException { return script.selectOption(null, new RectangleDestination(rec), action); } } updated it again a little1 point
-
Entries are still being accepted. Signature Of The Week #13 Theme : Celebrities How it will happen : Submit your signature to me through private message with the subject (SOTW 13).You have until the day of voting to submit your signature. Please put the title of the Pm "SOTW 13" If you send via pm and I forget, let me know and I'll add you to the poll mixed in as soon as I can. Basic rules : Do not include any kind of name that will give away which signature is yours Do not ask for people to vote for you You may vote for yourself, but it's not required. If you say or hint at which one is yours, you will be disqualified for that week and the next week. If asked to provide proof that you made the image, provide it. Flaming and/or ripping will result in a disqualification. Send your entries to: Rules are here http://osbot.org/for...144-sotw-rules/ What you can get from winning: http://osbot.org/forum/topic/28646-graphic-designer-sotw-revamp/ Need entries.1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
1 point
-
Take a step back and relax, I understand that you are indeed frustrated currently but this is not the correct way to be handling such a problem Just post an appeal in the appropriate section here, and everything will be alright. Thank you.1 point
-
A full week after osbot 2 was supposed be released for the third time now, and we still don't even have a good bot to use while we wait.1 point