Pegasus Posted June 12, 2018 Posted June 12, 2018 (edited) Do you use java reflection in your scripts? Is is worth in coding scripts? or use lots of method to convert strings from file to generate different classes? Edited June 12, 2018 by Pegasus
FrostBug Posted June 12, 2018 Posted June 12, 2018 34 minutes ago, Pegasus said: Do you use java reflection in your scripts? Is is worth in coding scripts? or use lots of method to convert strings from file to generate different classes? Reflection is blocked by default in OSBot scripts 1
liverare Posted June 12, 2018 Posted June 12, 2018 Reflection has its uses if you're wanting to do stuff that is potentially risky (that Jagex could detect), such as force-selecting inventory items (like I did for my old Usain Bolter and Darter script when reflection worked), selecting magic spells, and if you can see how prayer works, you could even perhaps bump prayers about programatically.
Alek Posted June 12, 2018 Posted June 12, 2018 "Convert strings from files to generate different classes", so essentially ClassReader/Loader? That's not really necessary when you could probably use serialization for whatever you are doing instead - or perhaps it can just be solved with simple file management? We would need more context on what you're trying to do. 1
Canidae Posted June 12, 2018 Posted June 12, 2018 4 hours ago, Alek said: "Convert strings from files to generate different classes", so essentially ClassReader/Loader? That's not really necessary when you could probably use serialization for whatever you are doing instead - or perhaps it can just be solved with simple file management? We would need more context on what you're trying to do. Would that also work for scripts on the SDN?
FrostBug Posted June 13, 2018 Posted June 13, 2018 (edited) 11 hours ago, Canidae said: Would that also work for scripts on the SDN? Serialization works for local scripts; not SDN. File management would work for both as long as you work in the OSBot data directory Edited June 13, 2018 by FrostBug