Jump to content
×
×
  • Create New...

Dan

Moderators
  • Posts

    464
  • Joined

  • Last visited

  • Days Won

    43

Dan last won the day on December 26 2021

Dan had the most liked content!

Reputation

76 Excellent

7 Followers

About Dan

Designer
Script Writer III
  • Rank
    Moderator

Personal Information

  • Location
    Somewhere
  • Interests
    Stuff
  • Occupation
    Something

Recent Profile Visitors

2011 profile views
  1. @klumel8can you test it on the new client and make sure it’s all good before I move to archive?
  2. Ty for the video, had no idea what herbiboar was till now. Although seems like a dumb minigame as it's a lot of effort for a single herb???? Anyway, we all know full well you've been there done that with the SW ranks and client developer in the past so I don't see a reason why you won't be a great addition to the team! The below may well be my lack of understanding but just some things I saw that stood out to me. https://gitlab.com/powbot-bpl/herbiboar/-/blob/main/src/com/runemax/herbiboar/threads/RunEnergyUsageTrackingThread.java Rather than creating your own thread, you're running approx every tick anyway so it would probably be easier to utilise the tick events that are already running. https://docs.powbot.org/#/Basic_Fundamentals/Events https://gitlab.com/powbot-bpl/herbiboar/-/blob/main/src/com/runemax/herbiboar/tasks/HarvestTask.java#L21 I don't know if there's any benefit for doing .count() over .isNotEmpty() but .isNotEmpty() is nicer 🙄 https://gitlab.com/powbot-bpl/herbiboar/-/blob/main/src/com/runemax/herbiboar/tasks/HarvestTask.java#L28 Is this not 2 unnecessary checks? Surely a herbiboarNpc.valid() would also mean it's not null? However I obviously have no issues at all welcoming you to the team. Unless of course anyone else has any feedback, @const_
  3. You seem to have misunderstood me here. You had a conditional wait inside an if() which was correct, you only want to pickpocket again, if that first wait returns true. However what you had was Conditional.wait(Conditions) if(Conitional.wait(Same conditions as above)) Meaning the first wait isn't needed because you're then doing it exactly the same way again inside the if(). You've seemingly removed the OpenPouch.java altogether here?? It again seems you're just trying to resolve the issues that I'm pointing out but not understanding them at all. Don't get me wrong, you've come a hell of a long way from where you started but I still don't think you quite understand how it all works enough yet. I've put this on hold till mid-end of Feb. In the mean time, write some different scripts, get a better understanding of how it all works and come back to this and apply your newly learned knowledge to this.
  4. Hiya, I got 99 smithing using this script with a coal bag, can you provide some more details?
  5. Dan

    ugge application

    Hi mate, thanks for the application however this is too simple to consider for your application however some feedback for you anyway. Seems thrown together without much thought, the main script class is called testerscript… You have a task framework but your tasks have no validations other than your states. If the condition to set your states fail you end up getting stuck in a loop. Instead, try to work actually use the validations to tell the script when to activate something, your herb combine script has absolutely no validations whatsoever before interacting and using the vial. Also you should have 1 task per responsibility, within reason at least. Your bank task also opens a door, walks to the bank, then does the banking. Too much for 1 task. Something else I noticed in your bank task is you query the door, then check if the door has the action “Open” rather than using .actions(“Open”) as part of your door query. On top of that, open and closed doors usually have different ID’s. As you’re passing the ID, it likely is the closed state door so wouldn’t need to check for actions anyway. Magic numbers is a big no no, use variables and pass those variables around to your classes, A) you can give it a memorable name, so next time you come to do maintenance on it, you know exactly what the number represents. B) if it’s used multiple times, then you only need to maintain the one variable if it were changed. Rather than have to go through and change all instances of that number for example. Hopefully you can see the benefits in the points I’ve made, it not feel free to reach out to us or I, on discord or here 🙂
  6. As per your message on discord, here's some more feedback 🙂 User interface is much better allowing the user to select from drop downs rather than have to type names or id's 👍 Also nice job on splitting up the tasks to 1 responsibility i.e. splitting eat and opening pouches. Just some general feedback here, nothing too major. https://github.com/MaddoxOSRS/BlackJack/blob/855038192a6494686aebf48908c1a78e36bf491b/src/io/maddox/behaviour/KnockandPick/leaves/Eat.java#L27 This is over complex for what it is. HOWEVER I see the logic and the ingenuity behind what you've done here. Rather than have to have different methods or eat or drink, you pull the actions and use the first one which is pretty clever. The part here that's over complex is checking that actions > 0, every single item in the game has an action, usually bare minimum "Use" and "Cancel" so this check is completely unnecessary as you're already checking that it's valid in the step above. Further to that, you also specify i.valid() in your filter query which again isn't necessary as you're checking if food.valid() later on. You're doubling up the workload for no reason here. https://github.com/MaddoxOSRS/BlackJack/blob/855038192a6494686aebf48908c1a78e36bf491b/src/io/maddox/behaviour/KnockandPick/leaves/OpenPouch.java#L22 Not sure I understand the wait logic here; opening coin poches has no animation, right? So why check if you're idle and not moving as an alternative to having no coin pouches? https://github.com/MaddoxOSRS/BlackJack/blob/855038192a6494686aebf48908c1a78e36bf491b/src/io/maddox/behaviour/KnockandPick/leaves/MovetoBandit.java#L15 Brackets are your friends here, you'll want to use brackets to group together your conditions. So rather than: condition1 && condition2 || condition3 && condition4 it becomes (condition1 && condition2) || (condition3 && condition4) What this does is it evaluates the contents of the brackets as a whole boolean, so it becomes Condition1 || Condition2 HOWEVER, you don't need condition4 in this statement as it's the same as condition 2; so you'd be better off rewriting this to @Override public boolean isValid() { return !Configs.house.contains(Players.local()) && (Inventory.stream().name(Configs.food).action("Eat").isNotEmpty() || Inventory.stream().name(Configs.food).action("Drink").isNotEmpty()) } Otherwise you're re-evaluating the same condition multiple times which again is more workload for the script/client to do when it doesn't need to. Judging by the amount of times you're quering for both Eat and Drink actions, you'd be better off creating a variable in your main class, like you did with the noted id, store the designated action. Default "Eat" unless they chose wines, then change to "Drink". This way you don't have to query both all the time. https://github.com/MaddoxOSRS/BlackJack/blob/855038192a6494686aebf48908c1a78e36bf491b/src/io/maddox/behaviour/KnockandPick/leaves/KnockandPick.java#L44 As you are using on line 45, conditional waits return a boolean as to whether they early returned true, or they timed out false. So why do you repeat the wait on line 44? 44 can be removed completely. https://github.com/MaddoxOSRS/BlackJack/blob/master/src/io/maddox/behaviour/Luring/leaves/Lure.java Much much better than before, using variables rather than magic numbers all over the place. The next step would be to house all of your constants in 1 place so they're accessible by all of your leaves should they need it. For example a Constants.java to store all of these in, just like you do with Configs. 🙂 https://github.com/MaddoxOSRS/BlackJack/blob/855038192a6494686aebf48908c1a78e36bf491b/src/io/maddox/behaviour/Restocking/Leaves/SellEmptyjugs.java#L26 Not sure if you knew, but we have a Store section in the api so you can do your trade, and then a conditional wait for Store.opened() rather than have to check and get all the widgets. I've not finished going through it yet but if I see anything else I'll add some more 🙂 Otherwise some great improvements but for now I'm off to sleep 😄
  7. tile visible not behind widget [] Point(x=453, y=281) // centerPoint() [] [487, 427, 419, 481] // matrix().bounds().getXpoints() tile now behind widget [] Point(x=-1, y=-1) // centerPoint() [] [805, 748, 751, 809] // matrix().bounds().getXpoints() Point p = tile.matrix().centerPoint(); System.out.println(p.toString()); System.out.println(Arrays.toString(tile.matrix().bounds().getXpoints())); Obviously then the methods to interact at these points then fails because it passes a null point. The testing for behind widget was simply behind the inventory, tested on both inventory open and inventory closed. If this is somehow intended, it leaves an extremely limited viewpoint for interactions.
  8. should be resolved now; you can also tag me on discord or create a thread on discord or dm me on discord basically anything on discord where I'll get a notification if you're not sure where to post it but should be all good now.
  9. I see! Either way looks good, sorry it took so long, I didn't realise it had all been updated lol; welcome to the team 🙂 @const_
  10. Looks great! Just some final bits of feedback and/or advice; https://github.com/klumel8/LavaRunes/blob/f5881b2cec5fcaa7650223ca09d8fdc7f465c800/klumel8/Lavas/Branches/GoToRuins/Leaves/AlwaysRun.java#L15 To turn run on, you need to pass a bool, for example Movement.running(true) to enable, otherwise it just returns the bool of whether it's on or off. https://github.com/klumel8/LavaRunes/blob/f5881b2cec5fcaa7650223ca09d8fdc7f465c800/klumel8/Lavas/Branches/AtAltar/AtAltar.java#L23 Something I noticed when writing my nature script is streaming the altar seemingly took anywhere from 200-850ms, which isn't a huge problem, however I then realised an Area.contains(Players.local()) is like a 0-3ms check. No need to change it, but just some advice in the future 🙂 https://github.com/klumel8/LavaRunes/blob/f5881b2cec5fcaa7650223ca09d8fdc7f465c800/klumel8/Lavas/Branches/PrepInvDarkMage/Leaves/FetchRunes.java#L19 You can do isEmpty() and isNotEmpty() checks on bank streams to, it's also less intensive to check if the stream is empty vs return the actual item, then access the items info to see if the stacksize is !=0. Again no need to change, but a useful thing to know. However, you should be proud. From our discussions on discord in dm's and your messages previously about the corp script and the intro to tasks etc. You've come a long way in a short time with little to no help. 👍 Welcome to the team 😄 @const_ pls do your thing.
  11. Correct widget of nubbin to drag Widget 116, component 101. The bar to drag up and down on Widget 116, component 100. Please and thank you 🙂
  12. Can you explain what's going on in the ItemHandler.java, seems to be no change or explanation or response to my first feedback? for example; public boolean hasEnoughLaws() { return laws.valid() && laws.stackSize() >= 2; } Here you're not passing laws as a param to the method, but are referring to an old and most likely outdated cached reference?
  13. You still don't need to upload the jar files fyi. I know you've been sending a lot of stuff through on discord; good job on the updates; it's nice to see you making some progress. I'll run through briefly all your tasks and comment any feedback. https://github.com/MaddoxOSRS/BlackJack/blob/8c4e5482f1f8950c5d600a61bc2636b0c80a7817/src/io/maddox/behaviour/KnockandPick/leaves/Eat.java#L29 Why is this in your eat leaf? Opening coin pouches has absolutely nothing to do with eating. Remember, 1 leaf 1 responsibility. This one here is responsible for both eating and opening coin pouches? https://github.com/MaddoxOSRS/BlackJack/blob/dd68ec7ac5d83b4bdee6fc893d2f49eb5837fca8/src/io/maddox/behaviour/KnockandPick/leaves/KnockandPick.java#L49 This whole section doesn't make any sense; the last statement pickcount<=2 can never be false, it gets reset to 0 above and then you pick twice inside so it's literally never going to be false. I also thought we had this conversation like 60 times about how structure your sleeps to get pickpocketing right? Pickpocket wait 570ms pickpocket creates an awfully obvious pattern.. Figure out how to use conditional waits here. Alternatively, look at a for loop for the pickpocketing. https://github.com/MaddoxOSRS/BlackJack/blob/master/src/io/maddox/behaviour/Luring/leaves/Lure.java I already spoke about magic numbers in my previous review; this task is a bit of a cluster fuck of numbers everywhere. have a look at this page here and it explains a bit about what I'm refering to. https://code-basics.com/languages/java/lessons/magic-numbers https://github.com/MaddoxOSRS/BlackJack/blob/master/src/io/maddox/behaviour/Luring/leaves/MoveintoHouse.java This is an example of a nice concise simple leaf, 1 leaf, 1 responsibility. 👍 https://github.com/MaddoxOSRS/BlackJack/blob/master/src/io/maddox/behaviour/Restocking/Leaves/Restock.java The opposite to what I just said, this one needs splitting, too many responsibilities in this leaf. Opens the curtain, walks to the npc, interacts with the npc, also magic numbers floating everywhere too. 😞 You're making progress and it's nice to see. Just got to try and apply the feedback across the whole script rather than just the isolated parts I've pointed out. For example the magic numbers, I'm not going to link you to every magic number, that's on you to go and find and fix, and then realise why it's bad and then you learn from that. This is why I said take some time to really learn from the feedback I've given you, rather than just fix the issues that I've pointed out. If you learn from the feedback you'll be able to use it going forwards. 👌