-
Posts
1688 -
Joined
-
Last visited
-
Days Won
2 -
Feedback
100%
Everything posted by Nezz
-
Making a difference between premium and free SDN scripts is pointless. There is no "moving up the ladder" the first SDN script I released was premium. The only SDN scripts I've released were premium. There is literally no difference between putting up a free SDN and a premium SDN script. (other than you get paid) I like adding scholar. I still say SDN Scripters should get a colored name. Other than adding scholar and giving colored name for SDN Scripter, I disagree with this post.
-
In one corner weighing at an undisclosed amount we have...MALDESTOOOO And in the other corner we have, weighing in at "Fat", we have VEERRIIIFIIIED Maldesto goes in for a right hook! It lands! Verified tries "Rebuttal" it misses! Maldesto comes in with a swift kick to the groin and VERIFIED IS DOOOOWNNNNN GG, will be collecting donations for this lovely story as written by Nezz of OSBot.
-
I realize == isn't as accurate as .compareTo or .equals. but it's similar to the idea of "is" and "==" they both mean the same thing, just one works better than the other in different situations. Like I said, I use .compareTo in pretty much all the rest of my code. Moreso since the first time == failed on me. It's been 2 years since I've used Java, man. Give me a break. But again. If all you're going to do is say "why are you doing it like this, it's so stupid.", don't comment. Constructive criticism is always welcome. If you disagree with how I'm doing it, please explain why and give an example of how you might do it. Otherwise all that's going to happen is you'll look like a cock, and my code will stay the same. Thanks.
-
I use .compareTo in most cases. This was an earlier method I used and it worked so I didn't see the need to replace the ==.
-
If you guys aren't going to be constructive, don't comment. =/
-
I mean, a majority of the message is your wc level. If RS is going to ban based off people saying that, then gg every wcer in existence. The second half of it could be modified relatively easily. Just put a super generic message like "You?" or "u" or juts say your wc level and don't respond anymore. lol Having something complicated like actually responding to the question, yeah. That wouldn't work. But to say your wc level should be fine. And that's what I meant by adding custom messages. Maybe record when the last time you said your wc level, so you'll say it at most once every 5 mins. Keep track of who said it to you last so one person can't just spam you.
-
All the people saying "Don't do this it'll do this or that" don't listen to them. lol I don't think any of them realized this isn't finished code. If you made it more randomized, went through all the workaround, etc. I think it would work. Especially if you had a section in your GUI that had a "Custom Reply" text area. Then people could write their own messages, making it even better. Personally, I like this idea. But if you have > 20 people running your script, you'll either need the custom messages, or you'll need a *lot* of default ones to choose between. :P But yeah. I support this idea, m8.
-
My goal isn't to make my own inventory class. It's just a custom method to interacting with an item in your inventory. It uses osbot api, but it uses osbot api that works consistently. I don't see an issue with that.
-
http://osbot.org/forum/topic/28798-pandemics-scripting-series-part-i-setup-and-basic-logic/ http://osbot.org/forum/topic/29924-pandemics-scripting-series-part-ii-path-walking-and-simple-banking/ Go through both of those, multiple times if you have to. Those are where I started for scripting. If you want help with Java in general, I suggest going through thenewboston's tutorials: http://thenewboston.org/tutorials.php If you have any questions feel free to PM me. lol'd
-
:x they don't? Every time someone tells me an ID doesn't change, I use it and find out that it changes. lol Though I have been using ID for noted pure ess on my rcer.
-
I never really knew the functionality difference between if else and switch cases were :x I think more of the focus in my snippet should be on the getPotName and getPotBonus, as that's what gave me the most trouble. with getPotName, you don't need to update ID's ;) and some people say if you wait until your pot runs all the way out, you lose out on xp, so I created the getPotBonus to figure out how much it gives you, and at what point to repot. I like your code though, so much neater than mine.
-
I wrote three methods to help use potions more dynamically. First is getPotName, which given something like "Super strength" or "Strength potion" will return the full name (includes the dosage on the end, essentially) Second is getPotBonus, which given something like "Super strength" or "Strength potion" will return the bonus you get from drinking the potion - based on your current stats. (Could easily add prayer or other skills to this, even make it dynamic with a Skill argument) public String getPotName(String pot_type){ Item temp = client.getInventory().getItemForNameThatContains(pot_type); if(temp != null){ return temp.getName(); } else{ return null; } } public int getPotBonus(String pot_type){ int str = client.getSkills().getLevel(Skill.STRENGTH); int att = client.getSkills().getLevel(Skill.ATTACK); int rang = client.getSkills().getLevel(Skill.RANGED); if(pot_type == "Super strength") return (5+(int)(str * .15)); else if(pot_type == "Strength potion") return (int)(str * .12); else if(pot_type == "Super attack") return (5 + (int)(att*.15)); else if(pot_type == "Attack potion") return ((int)(att*.12)); else if(pot_type == "Ranging potion") return ((int)(rang*.12)); else return 0; } Finally we have usePotion, which again, given something like "Super strength" or "Strength potion" will use the above two methods to determine *if* you need to use the potion, and if you do, it will. Potion use is based on 2/3 the amount of stat bonus you get from the potion. This last method can probably be refined a lot, but it worked for what I needed it to so this is as far as it got. public boolean usePotion(String potion_type) throws InterruptedException{ String potion_name = getPotName(potion_type); if(potion_name != null){ Item pot = client.getInventory().getItemForName(potion_name); int pot_bonus = getPotBonus(potion_type); if(pot != null){ //get current skill level if(potion_name.contains("ength")){ int skill_level = client.getSkills().getLevel(Skill.STRENGTH); int curr_skill_level = client.getSkills().getCurrentLevel(Skill.STRENGTH); int pot_at = (int)(pot_bonus*2/3); //once bonus str is at 2/3 if((curr_skill_level - skill_level) <= pot_at){ log("Using Strength Potion!"); client.getInventory().interactWithName(potion_name, "Drink"); return true; } } else if(potion_name.contains("ttack")){ int skill_level = client.getSkills().getLevel(Skill.ATTACK); int curr_skill_level = client.getSkills().getCurrentLevel(Skill.ATTACK); int pot_at = (int)(pot_bonus*2/3); //once bonus str is at 2/3 if((curr_skill_level - skill_level) <= pot_at){ log("Using Attack Potion!"); client.getInventory().interactWithName(potion_name, "Drink"); return true; } } else if(potion_name.contains("ang")){ int skill_level = client.getSkills().getLevel(Skill.RANGED); int curr_skill_level = client.getSkills().getCurrentLevel(Skill.RANGED); int pot_at = (int)(pot_bonus*2/3); //once bonus str is at 2/3 if((curr_skill_level - skill_level) <= pot_at){ log("Using Ranging Potion!"); client.getInventory().interactWithName(potion_name, "Drink"); return true; } } else{ log("Unknown potion type!"); } } else{ log("Couldn't find " + potion_type + " in your inventory!"); } } return false; }
-
/* * public boolean interactInv will return true/false whether it was capable of interacting with an inventory item given the specified interaction. */ public boolean interactInv(String itemName, String interact) throws InterruptedException{ //create an inventory variable for less typing. Inventory in = client.getInventory(); //check if inventory contains item if(in.contains(itemName)){ //create a mouse destination based off of a rectangle created around the slot of the item MouseDestination md = new RectangleDestination(in.getDestinationForSlot(in.getSlotForName(itemName))); //move the mouse over the slot if(!client.moveMouseTo(md, false, false, false)) return false; //create a list of the options available in the menu, cycle through them to find specified interaction List<Option> menu_option = client.getMenu(); int use = 999; for(Option opt : menu_option){ if(opt != null){ if(opt.action.compareToIgnoreCase(interact) == 0){ use = menu_option.indexOf(opt); break; } } } //if the option was the first in the list, left click it and return true. if(use == 0){ return client.moveMouseTo(md, false, true, false); } //if use != 999, it was found in the options list. if(use != 999){ //move mouse over the slot, right click it. (could be replaced with client.moveMouse(md,true)) if(!client.moveMouseTo(md, false, true, true)) return false; //create a new mouse destination based a new rectangle created over interact option of the menu md = new RectangleDestination(new Rectangle(client.getMenuX(), client.getMenuY() + 19 + use * 15, client.getMenuWidth(), 14)); //click the mouse return client.moveMouseTo(md, false, true, false); } else{ //the interact option wasn't found in the list, return false sleep(25); return false; } } else return false; } This can be adapted for NPC's, RS2Object's, items in a bank, etc. Any improvements/suggestions are appreciated.
-
FREE SCRIPTS TO ALL WHO SPAM PM LEVI IN THE CHAT BOX
Nezz replied to Swizzbeat's topic in Spam/Off Topic
http://prntscr.com/2ylbjz #rekt -
...so is ten dollars. OSbot has made more than 10 dollars from my scripts.
-
Or make exceptions on how many days are required before applying.
-
Unless there's something I'm missing, I don't see the difference between removing just the pip and removing both pip and name color. Do they keep the SDN Scripter rank even after their scripts are removed? The only thing you're preventing is an easy way of recognizing scripters. I don't like that for someone to know I'm a scripter, they have to find a post of mine on the forums. (Or find a script of mine) If they request to have it removed, then take away the colored name and pip. Don't punish all of us just because there are a few bad people. That's the thing. I can't apply, I haven't been here long enough. Does that mean I shouldn't get recognized for having scripts on the SDN?
-
It's motivation for me, but I have to wait another like 15 days before I can apply for OSD. I just think it'd be nice to get a name color for being an SDN scripter. If they don't update their scripts when they break, take them off the SDN, take away their rank.
-
I mean, they already have the rank. They just don't have the name color. I don't see the difference. All it does is make you recognizable in chat that you've made a script (which could be beneficial to new scripters).
-
I think SDN Scripter's should have a color for their names.