lisabe96 Posted February 14, 2016 Posted February 14, 2016 I noticed in the API that there seems to be base support available for solving randoms. Is this still functional? If so how would I go about using it or extending on it?
Token Posted February 14, 2016 Posted February 14, 2016 You cannot implement a behaviour for each individual random event using the OSBot random solving api (as in actual runescape random events, not the login screen and other stuff in there). RandomEvent is an enum having no fields for each random event, only the DISMISS_RANDOM field which is used for every event. Each event has a RandomBehaviourHook that describes how the bot will behave if it should activate. So you may be able to use the OSBot random event api to write your own behaviour that applies to all random events but not to an individual one. If you insist to create your own behaviour for every random event in runescape then you can proceed to unregistering the hook for DISMISS_RANDOM so the bot will no longer react to randoms. Now you can define a custom behaviour when a given random is present (context detected using objects/npcs) and you may write your solvers just like any other script functionalities. Finally, create a new RandomBehaviourHook with the solving code and register it using RandomExecutor for the DISMISS_RANDOM field of RandomEvent. 2
lisabe96 Posted February 14, 2016 Author Posted February 14, 2016 You cannot implement a behaviour for each individual random event using the OSBot random solving api (as in actual runescape random events, not the login screen and other stuff in there). RandomEvent is an enum having no fields for each random event, only the DISMISS_RANDOM field which is used for every event. Each event has a RandomBehaviourHook that describes how the bot will behave if it should activate. So you may be able to use the OSBot random event api to write your own behaviour that applies to all random events but not to an individual one. If you insist to create your own behaviour for every random event in runescape then you can proceed to unregistering the hook for DISMISS_RANDOM so the bot will no longer react to randoms. Now you can define a custom behaviour when a given random is present (context detected using objects/npcs) and you may write your solvers just like any other script functionalities. Finally, create a new RandomBehaviourHook with the solving code and register it using RandomExecutor for the DISMISS_RANDOM field of RandomEvent. Thanks, all I needed to know