botting123 Posted September 21, 2017 Share Posted September 21, 2017 On 1/31/2017 at 3:28 PM, Satire said: I accidentally edited out the post. This is just a quick one I wrote as I fked the other one over real bad Here's the problem. if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { SafeSpot.interact(bot,"Walk here"); } Should be if (RangeSpot.contains(myPlayer())) { if (Skeleton != null && !myPlayer().isInteracting(Skeleton)) { if(Safespot.contains(myPlayer()){ if (Skeleton.getAnimation() != 5491) Skeleton.interact("Attack"); } } else if (Skeleton == null && FarSkeleton != null) { log("Attacking far Skeletons...."); FarSkeleton.interact("Attack"); localWalker.walk(RangeSpot, true); sleep(random(1000,2000)); FarSkeleton.interact("Attack"); } } else if(!RangeSpot.contains(myPlayer())) { if(!SafeSpot.contains(myPlayer()) SafeSpot.interact(bot,"Walk here"); } If this doesn't work then you'd need to tell just say if the players position != safespot position. Then walk there. Any idea why the script is stopping after killing 1 skeleton? [INFO][Bot #1][09/21 04:11:31 PM]: Loaded 5 built-in random solvers! [INFO][Bot #1][09/21 04:11:31 PM]: Thanks for choosing SkeletonZ! [INFO][Bot #1][09/21 04:11:31 PM]: Started script : Varrock Skeleton Ranger [INFO][Bot #1][09/21 04:11:31 PM]: case KILL: [INFO][Bot #1][09/21 04:11:32 PM]: case IDLE: [INFO][Bot #1][09/21 04:11:32 PM]: 100 [INFO][Bot #1][09/21 04:11:32 PM]: 6 [ERROR][Bot #1][09/21 04:11:32 PM]: Error in bot executor! java.lang.NoSuchMethodError: org.osbot.rs07.api.Mouse.moveRandomly()V at Skeletons.Skeleton_Ranger.onLoop(Skeleton_Ranger.java:118) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(xe:49) at java.lang.Thread.run(Unknown Source) It just stands there after the very first kill. I know it's not your script but perhaps you have a clue? Quote Link to comment Share on other sites More sharing options...
Satire Posted September 22, 2017 Share Posted September 22, 2017 3 hours ago, botting123 said: Any idea why the script is stopping after killing 1 skeleton? [INFO][Bot #1][09/21 04:11:31 PM]: Loaded 5 built-in random solvers! [INFO][Bot #1][09/21 04:11:31 PM]: Thanks for choosing SkeletonZ! [INFO][Bot #1][09/21 04:11:31 PM]: Started script : Varrock Skeleton Ranger [INFO][Bot #1][09/21 04:11:31 PM]: case KILL: [INFO][Bot #1][09/21 04:11:32 PM]: case IDLE: [INFO][Bot #1][09/21 04:11:32 PM]: 100 [INFO][Bot #1][09/21 04:11:32 PM]: 6 [ERROR][Bot #1][09/21 04:11:32 PM]: Error in bot executor! java.lang.NoSuchMethodError: org.osbot.rs07.api.Mouse.moveRandomly()V at Skeletons.Skeleton_Ranger.onLoop(Skeleton_Ranger.java:118) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(xe:49) at java.lang.Thread.run(Unknown Source) It just stands there after the very first kill. I know it's not your script but perhaps you have a clue? Remove getMouse().moveRandomly(). This has been removed since a very long time ago. The logger even tells you the exact line it's on (118). Just delete the whole line. Quote Link to comment Share on other sites More sharing options...
botting123 Posted September 22, 2017 Share Posted September 22, 2017 17 hours ago, Satire said: Remove getMouse().moveRandomly(). This has been removed since a very long time ago. The logger even tells you the exact line it's on (118). Just delete the whole line. Any chance you can clue me in to what the easiest way to delete the line would be? I tried editing it in the Java decompiler but I can't edit anything. Then I tried monkeying around with Eclipse to make a java a file to make into a jar file so I could edit it in the process but couldn't figure it out. Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted September 22, 2017 Share Posted September 22, 2017 1 hour ago, botting123 said: Any chance you can clue me in to what the easiest way to delete the line would be? I tried editing it in the Java decompiler but I can't edit anything. Then I tried monkeying around with Eclipse to make a java a file to make into a jar file so I could edit it in the process but couldn't figure it out. Look up some basic tutorials on Java or some beginner scripting tutorials here on how to setup Eclipse. Then just edit the code accordingly Probably best you learn a little java first though. Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 22, 2017 Share Posted September 22, 2017 1 hour ago, botting123 said: Any chance you can clue me in to what the easiest way to delete the line would be? I tried editing it in the Java decompiler but I can't edit anything. Then I tried monkeying around with Eclipse to make a java a file to make into a jar file so I could edit it in the process but couldn't figure it out. just delete the line and it will work. You could also create your own method using random Quote Link to comment Share on other sites More sharing options...
botting123 Posted September 23, 2017 Share Posted September 23, 2017 1 hour ago, Juggles said: just delete the line and it will work. You could also create your own method using random Delete the line how? It's not like I can open up the jar file in notepad it will just be a bunch of gibberish and broken symbols and when I open it in the decompiler I can't make any changes to it. Is there an easy solution I'm overlooking? Quote Link to comment Share on other sites More sharing options...
Juggles Posted September 23, 2017 Share Posted September 23, 2017 13 minutes ago, botting123 said: Delete the line how? It's not like I can open up the jar file in notepad it will just be a bunch of gibberish and broken symbols and when I open it in the decompiler I can't make any changes to it. Is there an easy solution I'm overlooking? Decompile, edit in IDE and recompile. Quote Link to comment Share on other sites More sharing options...
TheWind Posted September 24, 2017 Share Posted September 24, 2017 On 9/22/2017 at 8:28 PM, Juggles said: Decompile, edit in IDE and recompile. No need to decompile anything. The script's code is provided at the bottom of the post. Copy and paste that into eclipse then just add Satire's fix and delete that single line. Look up a youtube video on how to compile a jar in eclipse and your good to go On 9/22/2017 at 8:13 PM, botting123 said: Is there an easy solution I'm overlooking? Quote Link to comment Share on other sites More sharing options...
botting123 Posted September 27, 2017 Share Posted September 27, 2017 On 9/24/2017 at 1:13 AM, TheWind said: No need to decompile anything. The script's code is provided at the bottom of the post. Copy and paste that into eclipse then just add Satire's fix and delete that single line. Look up a youtube video on how to compile a jar in eclipse and your good to go Tried to open it in Eclipse but coming up with "The Class File Viewer cannot handle the given input ('org.eclipse.ui.ide.FileStoreEditorInput')." error: Spoiler org.eclipse.core.runtime.CoreException: The Class File Viewer cannot handle the given input ('org.eclipse.ui.ide.FileStoreEditorInput'). at org.eclipse.jdt.internal.ui.javaeditor.ClassFileEditor.doSetInput(ClassFileEditor.java:682) at org.eclipse.ui.texteditor.AbstractTextEditor$5.run(AbstractTextEditor.java:3154) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:437) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:353) at org.eclipse.ui.internal.WorkbenchWindow$14.run(WorkbenchWindow.java:2184) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2180) at org.eclipse.ui.texteditor.AbstractTextEditor.internalInit(AbstractTextEditor.java:3172) at org.eclipse.ui.texteditor.AbstractTextEditor.init(AbstractTextEditor.java:3197) at org.eclipse.ui.internal.EditorReference.initialize(EditorReference.java:362) at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:318) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:966) at org.eclipse.e4.core.internal.di.InjectorImpl.processAnnotated(InjectorImpl.java:931) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:151) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:375) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:294) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:105) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74) at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56) at org.eclipse.e4.ui.workbench.renderers.swt.ContributedPartRenderer.createWidget(ContributedPartRenderer.java:129) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createWidget(PartRenderingEngine.java:975) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:651) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.safeCreateGui(PartRenderingEngine.java:757) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.access$0(PartRenderingEngine.java:728) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$2.run(PartRenderingEngine.java:722) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.createGui(PartRenderingEngine.java:706) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl$1.handleEvent(PartServiceImpl.java:104) at org.eclipse.e4.ui.services.internal.events.UIEventHandler$1.run(UIEventHandler.java:40) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:233) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:145) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4821) at org.eclipse.e4.ui.internal.workbench.swt.E4Application$1.syncExec(E4Application.java:211) at org.eclipse.e4.ui.services.internal.events.UIEventHandler.handleEvent(UIEventHandler.java:36) at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:201) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197) at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135) at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78) at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39) at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:94) at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:60) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374) at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl.setSelectedElement(ElementContainerImpl.java:173) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.showElementInWindow(ModelServiceImpl.java:617) at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.bringToTop(ModelServiceImpl.java:581) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.delegateBringToTop(PartServiceImpl.java:770) at org.eclipse.e4.ui.internal.workbench.PartServiceImpl.showPart(PartServiceImpl.java:1211) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:3261) at org.eclipse.ui.internal.WorkbenchPage.access$25(WorkbenchPage.java:3176) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:3158) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3153) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3117) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:3098) at zipeditor.operations.OpenFileOperation.openEditor(OpenFileOperation.java:47) at zipeditor.operations.OpenFileOperation.access$0(OpenFileOperation.java:44) at zipeditor.operations.OpenFileOperation$1.run(OpenFileOperation.java:35) at org.eclipse.ui.internal.UILockListener.doPendingWork(UILockListener.java:162) at org.eclipse.ui.internal.UISynchronizer$3.run(UISynchronizer.java:154) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) at org.eclipse.equinox.launcher.Main.run(Main.java:1519) Any clues? Quote Link to comment Share on other sites More sharing options...