Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/06/13 in all areas

  1. It kills me to say this but... Liam is addicted to alcohol 1 like = 1 prayer for him xp xd xo xd xppp
    3 points
  2. Hello, This snippet is for people that want to interact easily with shops (like a general shop, runes shop, etc...). The commands are very similar to bank and to start of you import the source/jar and make a new shop: Shop s = new Shop(this); // This must be a script object so your main file does fine! if (s.isOpen()){ // And close the shop immediately s.close(); } As you can see the isOpen method is there just like the one in the bank class. Next you can get a ShopItem by using this methods: ShopItem[] allItems = s.getAllShopItems(); ShopItem itemSlot4 = s.getShopItem(4); //4 is the slotID you can debug that by using the store debugger ShopItem hammer = s.getShopItemByName("Hammer"); // Wont break on patches ShopItem byId = s.getShopItemByID(123); // You can use it if you want but you should prefer ByName And for the final part you can interact with the shop items. itemSlot4.value(); // Wont return a value you must catch it in your onMessage(String s) itemSlot4.buy1(); hammer.buy5(); byId.buy10() int amountOfHammers = hammer.getAmount(); String hammerName = hammer.getName(); int hammerId = hammer.getID(); int hammerSlotID = hammer.getSlotID(); // You can also get the slot rectangle if you need it for painting: Rectangle rect = hammer.slot; Now you can buy stuff from the store! Remember: the ShopItem won't update you need to refresh it everytime by using hammer = s.getShopItemByName("Hammer"); (for example) There are also a few commands you can use for the shop like getting the shopname: // First check if the shop is open s.updateShopName(); s.updateInstructions(); String shopName = s.getShopName(); String instructions = s.getInstructions(); Screens (using the ShopDebugger): Download (jar): http://uppit.com/v6mr2nxmamsm/Shop.jar Source (pastebin): Shop.java: http://pastebin.com/1ud3N67r ShopItem.java: http://pastebin.com/5aNZZXkJ If you use the source then make a new package called com.merccy.Shop and place the Shop.java and ShopItem.java there! Download ShopDebugger (jar): http://uppit.com/68erm8t8a9bh/ShopDebugger.jar Credits: Jelknab - Gave me his debugger which contained the search for item loop (which I modified) XavierM - Told me that you would just have to use the x/y for clicking the items. Goodluck
    2 points
  3. Divine's GUI Paint System What is this paint system, and how can it benefit me?: This is an open source class which you can implement into any script for extremely quick + clean paint. It is not paint, but can be used instead or along with paint. It is a seperate window which displays whatever information you wish to display!How easy is it?: Notice how few lines create and draw the entire window: Media: Does it consume a lot of memory?: Very low memory usage, much smaller than drawing paint on the client screen.Instructions for use: Add the new .java file into your project (GUIPaint.java). Code with few easy methods. Make sure to include the compiled .class inside the script jar, or along with the other script classes. Code Syntax: This code goes in onPaint(Graphics g) inside YOUR script. Always start with this line: GUIPaint.buildFrame("GUI WINDOW TITLE"); Then, you MUST define a category. When you want to set a new category, after the last cell in the previous category, use the same code again. GUIPaint.setCategory("Category Name"); Next, add as many cells as you wish! If you go too high, specify in GUIPaint.buildFrame(name, MAX_CELLS) to increase the maximum amount of cells. The default is 20. Also, addCell supports value types of String, doubles, booleans, longs, and integers. GUIPaint.addCell("NAME OF ITEM (WITHOUT COLON)", "VALUE"); Always End with RefreshPaint(): GUIPaint.RefreshPaint(); To have the Window CLOSE on script exit, add GUIHandler.CloseGUI() inside your onExit(): public void onExit() { GUIPaint.CloseGUI(); } A good example of a full implementation, displaying static text: public void onPaint(Graphics g) { GUIPaint.buildFrame("Clay Miner"); GUIPaint.setCategory("Time"); GUIPaint.addCell("Time Running", "00:00:00"); GUIPaint.setCategory("Clay"); GUIPaint.addCell("Clay", 0); GUIPaint.addCell("Clay / Hour", 0); GUIPaint.setCategory("Experience"); GUIPaint.addCell("Experience", 0); GUIPaint.addCell("Experience / Hour", 0); GUIPaint.RefreshPaint(); } public void onExit() { GUIPaint.CloseGUI(); } Download the GUIPaint class HERE: http://uppit.com/vrkhkxohfryb/GUIPaint.java
    1 point
  4. This code will show all the item IDs in your inventory and equipment when you view that tab. Imports & Overriding... >>> Add imports: import org.osbot.script.*; import org.osbot.script.rs2.model.Item; import org.osbot.script.rs2.ui.EquipmentSlot; import org.osbot.script.rs2.ui.EquipmentTab; import org.osbot.script.rs2.ui.Tab; import java.awt.*; >>> The override: @Override public void onPaint(Graphics g) { } Step 1 In the onPaint method cast the current Graphics to 2D Graphics and call the method showItemIDs. @Override public void onPaint(Graphics g) { Graphics2D g2 = (Graphics2D)g; showItemIDs(g2); } Step 2 Add the following methods... public void showItemIDs(Graphics2D g2) { Composite old = g2.getComposite(); if(currentTab() == Tab.INVENTORY) { Item[] items = client.getInventory().getItems(); for(int i = 0; i < items.length; i++) { if(currentTab() != Tab.INVENTORY) return; if(items[i] != null) { Rectangle r = client.getInventory().getDestinationForSlot(i); if(r != null) drawItemData(g2, r, items[i].getId()); } } } else if(currentTab() == Tab.EQUIPMENT) { for(Item item : equipmentTab.getItems()) { if(currentTab() != Tab.EQUIPMENT) return; if(item != null) { Rectangle r = client.getInterface(387).getChild(equipmentTab.getSlotForId(item.getId()).childId).getRectangle(); if(r != null) drawItemData(g2, r, item.getId()); } } } g2.setComposite(old); } private void drawItemData(Graphics2D g2, Rectangle r, int id) { int nx = (int) r.getX(), ny = (int) r.getY(), h = g2.getFontMetrics().getHeight(); String s = "" + id; g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.60f)); g2.setColor(Color.WHITE); g2.fillRect(nx + (int) ((r.getWidth() - g2.getFontMetrics().stringWidth(s)) / 2) - 2, ny + h / 4, g2.getFontMetrics().stringWidth(s) + 4, h); g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1.00f)); g2.setColor(Color.BLACK); g2.drawString(s, nx + (int) ((r.getWidth() - g2.getFontMetrics().stringWidth(s)) / 2), ny + h); } The Result...
    1 point
  5. Dear community, Over the past month we have seen a reign of cyber crime across the Runescape botting scene. vInsert was the victim of several Runescape account hacking disputes before its database got compromised in the merger with Aurora. Now Advertising other bots isn&#39;t allowed. was defaced as well and its database was compromised as well. This thread is to shed some light on our perspective towards those recent happenings. We have always tried to be in time with warnings to protect you as people, Runescape players and us as a community and succeeded in doing this. But as this wave is continuing we have to give it more attention. In general everything we do is with security in mind, that means our security (both personal and OSBot's) and your security. With the recent happenings we have decided that we will take an entire day to go through each and every security measurement we have and see if there is anything that can be improved without harming any user experience. We feel sad for the victims of those attacks even though they might be competitors in some sort of way, we do not and will never condone DDoS'ing, hacking and any other sort of black hat activity. OSBot itself also has been victim of attacks, may it only be DDoS attacks though. We are increasing measurements taken to automatically mitigate such attacks. If such attacks will continue we will alarm authorities and file a report. We will be collecting network connection logs in case. I'm repeating myself, but we will never condone any cyber crime and black hat activity by ourselves, our community members and others. OSBot is a place where people should feel safe and comfortable. Sincerely, OSBot.org
    1 point
  6. My entry to the promotional video contest. I know it don't have much in it but main things are covered i believe. EDIT: If i win the contest and get the chance to look over osbot youtube page, i'll be perfecting the intro and promotional video, possibly make a new one because i'll have no time limit unlike in the contest. Watch in 720p http://youtu.be/L0IVjoS5574
    1 point
  7. good video, but not my style.
    1 point
  8. 1 point
  9. When i opened forum i got 403 error, i went to homepage and went from there to forum and this worked fine. I founded out when i open forum osbot.org/forum i get 403 error but when i open it osbot.org/forum/ it works fine.
    1 point
  10. All rise before the supreme client. All hail OSBot.
    1 point
×
×
  • Create New...