slushpuppy
03-18-2013, 02:17 PM
I am compiling a list of scripting gotchas to aid developers in making better and more stable scripts for Old School Runescape.
ALWAYS LEAVE BUG/suggestion REPORTS. As SRL-OSR library is still in development, we need your feedback to improve the API for your own use!
https://github.com/SRL/SRL-OSR/issues
Minimap changes color drastically, especially in the desert region. Always set a higher tolerances or use different colors with different levels of tolerances to narrow the choice of colors down
Runescape OSR, as of 18/03/13, has this nasty glitch where your character would be unresponsive to any command. Use appropriate wait/failsafes to minimize any sort of unexpected behaviors-especially when spam clicking
Objects in the minimap changes distances from each other quite dramatically during times when the map needs to reload
With regards to above pointer: When selecting objects to hook DTMs to, always try to select a color that is in a relatively large region of similar color, this prevents your DTM from failing to match
Unlike in EOC scape, you will need to call FindNormalRandoms very very often. Avoid creating a loop within a loop that waits too long.
With regards to above pointer: Use states to determine which procedure/function you need to execute.
if isState1 then
state1func;
if isState2 then
state2func;
FindNormalRandoms;
Try your very best to avoid
state1func;
state2func;
These are the pointers I have for now. Once I create more OSR scripts, I will have more tips for you. Other than that, please enjoy the read and if you have questions or have more pointers to contribute, just drop a reply
ALWAYS LEAVE BUG/suggestion REPORTS. As SRL-OSR library is still in development, we need your feedback to improve the API for your own use!
https://github.com/SRL/SRL-OSR/issues
Minimap changes color drastically, especially in the desert region. Always set a higher tolerances or use different colors with different levels of tolerances to narrow the choice of colors down
Runescape OSR, as of 18/03/13, has this nasty glitch where your character would be unresponsive to any command. Use appropriate wait/failsafes to minimize any sort of unexpected behaviors-especially when spam clicking
Objects in the minimap changes distances from each other quite dramatically during times when the map needs to reload
With regards to above pointer: When selecting objects to hook DTMs to, always try to select a color that is in a relatively large region of similar color, this prevents your DTM from failing to match
Unlike in EOC scape, you will need to call FindNormalRandoms very very often. Avoid creating a loop within a loop that waits too long.
With regards to above pointer: Use states to determine which procedure/function you need to execute.
if isState1 then
state1func;
if isState2 then
state2func;
FindNormalRandoms;
Try your very best to avoid
state1func;
state2func;
These are the pointers I have for now. Once I create more OSR scripts, I will have more tips for you. Other than that, please enjoy the read and if you have questions or have more pointers to contribute, just drop a reply