Everything posted by Joseph
-
Herb Snippet
I know I just preferr my way because it's just me :P, but just because I posted my way doesn't mean it wrong. He didn't even know what I was up to
-
What's an Enum [Part-One]
Since the bot is down im going to update this.
-
Herb Snippet
Why do people always tell me I'm using enum wrong I know exactly what I'm doing -.- the only reason why I have it that way is so, let's say your using a combo box or a list, and they chose a herb from the list. You use getSelectedIndex() (from with or, combo box or list) which returns an int, you use the int that they chose, within the get(int index) which will return the herb the chose. Now you could simply use the other methods that use a herb argument. To return what ever you need, for example name, or ids. You could make an AIO with simply two or three lines of code. Rather Then using a for loop, switch statement, or even a nested if and else statement Which takes up a bunch of lines. Sorry for the rant, and you didn't fix anything for me you just dumbed it down for everyone else
-
Retrieving all interactable objects
What you could do is, use client#getCurrentRegion#getObjects. Which should give you an array list of objects around your area. Use a for loop for with the array list. Then use any other for loop with the objectDefinition#getActions. And if you could reach it, and it has like a certain action that can be interacted with. You could create an empty list an add those objects into the list. And make your method return the list of rs2objects.
-
Magic Rune Management
Int getSupplyAmount(RuneSupply[]) Return the amount runes for a Spell cast are left in your inventory. im still thinking of how im could do this.
-
Colorize tiles inside area.
We'll I'm tell you straight up that you should really use an array of tiles for that. Because it would be easier to implement.
-
Colorize tiles inside area.
so what exactly are you looking for. To color a whole area? Tiles in an area? or what?
-
Magic Rune Management
please use the newest version. i currently updated. i left a log change on the first top so everybody knows
-
Colorize tiles inside area.
if you get could get the an array of tiles in an area. You could use a enhance for loop, and literally do the same process above to color all the tiles in an area.
-
Magic Rune Management
O shit I didn't know I left the packages I thought I took them off. I'm remove it in a little. Also I'll fix the name too edit: i change the package name to "magic.management", hopefully its fine now. Change the following Spells to spell, Elements to element, Runes to rune, and Spells to MagicSpell.
-
Magic Rune Management
oh i forgot to mention it support staffs . So if your using an air staff, and it's checking to see if you have the required runes, and amount of rune. It will neglect the air runes.
-
Magic Rune Management
I have to give some credit to , he had the idea at first, the link to his thread. Supports: Support the usage of staffs. For example: So if your using an air staff, and it's checking to see if you have the required runes, and amount of rune. It will neglect the air runes. This Snippet contain almost all spells. The spells that aren't supported are: The one that require a different staff that arent in the enum "Staffs". Example: Magic Dart The ones that require an item in your inventory. Example: Charge orb, Teleport to ape Atoll The Lumbridge home teleport. And any other spell outside of the normal spell book. if i get much love, ill add in more methods such as: interact with spell, interact wtih spell on invetory item, or interact with spell on entity. Or even support the spells that are supported atm. Change Log: Snippet: How to initialize it: First create a new RuneManager variable. The on the onStart() you make the new variable equal the RuneManager Constructor. private RuneManager manager; @Override public void onStart() { manager = new RuneManager(this); } How to use it: if (manager.containsSuppliesFor(MagicSpell.WIND_BOLT, Staff.AIR)) { /stuff }
-
Colorize tiles inside area.
did you get your answers?
- Banking issue
- Blocking events
- Magic combat methods
- Blocking events
-
Magic combat methods
are you going to do it? if not ill be able to do it
-
Herb Snippet
So i had this laying around, and i'm not working with herbs anymore so here you go. Some credits to @Kenneh public enum Herb { GUAM(3, 249, 250, 199, 200), MARRENTILL(5, 251, 252, 201, 202), TARROMIN(11, 253, 254, 203, 204), HARRALANDER(20, 255, 256, 205, 206), RANARR(25, 257, 258, 207, 208), TOADFLAX(30, 2998, 2999, 3049, 3050), IRIT(40, 259, 260, 209, 210), AVANTOE(48, 261, 262, 211, 212), KWUARM(54, 263, 264, 213, 214), SNAPDRAGON(59, 3000, 3001, 3051, 3052), CADANTINE(65, 265, 266, 215, 216), LANTADYME(67, 2481, 2482, 2485, 2486), DWARFWEED(70, 267, 268, 217, 218), TORSTOL(75, 269, 270, 219, 220); private int idLevel, unnotedCleanId, notedCleanId, unnotedGrimyId, notedGrimyId; Herb(int idLevel, int unnotedCleanId, int notedCleanId, int unnotedGrimyId, int notedGrimyId) { this.idLevel = idLevel; this.unnotedCleanId = unnotedCleanId; this.notedCleanId = notedCleanId; this.unnotedGrimyId = unnotedGrimyId; this.notedGrimyId = notedGrimyId; } public static Herb get(int index) { for (Herb h: values()) if (index == h.ordinal()) return h; return null; } public int getUnnotedGrimyId() { return unnotedGrimyId; } public int getIdLevel() { return idLevel; } public int getUnnotedCleanId() { return unnotedCleanId; } public int getNotedCleanId() { return notedCleanId; } public int getNotedGrimyId() { return notedGrimyId; } public String getName() { return name().charAt(0) + name().substring(1).toLowerCase(); } public boolean canIdHerb(int currentLevel) { return currentLevel >= idLevel; } }
-
Blocking events
Lol, this was a bit funny. Naw what you need to do is use if than and else statement so you you block out, and do what you want to do. Example: If my player isn't at bank at bank area then walk to bank. Else if my player is there and bank is not opened then open it. Blah blah blah
-
Array List question
i don't know about threads too much. That's will be the next thing ill learn. But i'm as modify the arraylist. ill try that out later. Ill elt you know how it goes
-
Array List question
I'm trying to remove a string from an array list but I'm getting an exception. I forgot with one it was. I looked it up and they said I need to iterate it from the array list. But it doesn't seem like its what I want to do with it. Any suggestions?
-
What's an Enum [Part-One]
will do, ill let you know when im done, ill let you point out my grammar problem. and ill fix thanks
-
What's an Enum [Part-One]
my first language is Spanish. and once im done with my topic i re read and fix my grammar. I appreciate criticism
-
What's an Enum [Part-One]
i know the topic is unfinished