PDA

View Full Version : antifail for paths?



sipfer3
09-18-2014, 03:03 AM
hey here i am again.
im struggling with a failsafe for paths.
i am not sure whats the best way to check any path, cuz its kinda the only problem im struggling with to make my scripts flawless :/ sometimes they just stuck at points where they shouldnt be at any time.

maybe its becouse i am using openGl? if yes, what do i need to remake for using it at directX? i gues the color finding and the map i am using need a remake then right?

sipfer

Lucidity
09-18-2014, 04:30 AM
Hi,

If you're using SPS walking it's highly recommended to use DirectX due to the map not having problems in that mode.

Declare
smartPlugins := ['d3d9.dll']; in the beginning of your script and download Brandons Direct X plugin. You can find his plugin thread Here (https://villavu.com/forum/showthread.php?t=107256)

Make sure you put the DirectX plugin in your Plugins\ folder.

I hope this helped you!

Best of luck,

Blytez

sipfer3
09-18-2014, 03:15 PM
hey thanks for the quick answer. i got the plugin allready just wondering what i need to remake so it will work with directx. will defenetly try to add this tonight :) thank you

Camel
09-18-2014, 03:32 PM
hey thanks for the quick answer. i got the plugin allready just wondering what i need to remake so it will work with directx. will defenetly try to add this tonight :) thank you

OpenGL and DirectX don't differ much color wise. You probably won't have to change much of your code if any at all.

As for path fail safes however, switching to DirectX won't solve all of your problems, things still go wrong when walking regardless of the graphics mode. To add failsafes try to find something that you can look for on the minimap that means you're at your destination. Like a runecrafting minimap icon would mean you're at the altar. You could do this with a DTM or bitmap. If walkpath finishes and the icon is not found you could have it try walking the path again, blindwalking, or if all else fails using a lodestone to return to a known location.

Hopefully this helps some amount.

yourule97
09-20-2014, 10:12 PM
You could always just try to add in a walking timer that begins as soon as the walk method is called and if you haven't reached your destination within the given time, you can implement your own recovery method (like teleporting to a lodestone and trying from there again).

Comodo
09-22-2014, 04:46 PM
I have my script look for a nearby mini-map symbol and if it doesn't find the symbol, it does the SPS walking again and if it still can't find it, it restarts from the lodestone, you could also add yourule97's suggestion in case you get stuck or something.
P.S. you might have to update the DTM of the minimap symbol, since they appear to be partially outdated.

sipfer3
10-08-2014, 07:39 PM
so if someone is interested in a "solution" (not 100% sure its working all the time but yet its running more smooth)24180 (its not the actual map of the path) but i gues its working bether now :)