ScriptUO

Scripting Resources & Utilities => Stealth Client => Topic started by: smitty on June 24, 2016, 07:11:35 AM

Title: [C#] rails
Post by: smitty on June 24, 2016, 07:11:35 AM
Hello!
So im working on rails now. Ive manually walked the rail and recorded character X, Y, and Z locations in a .txt file. Looks like this:
5924,2024,1
5924,2018,3
5917,2011,1
5917,2000,4
5917,1900,4
5917,1979,2
5914,1893,0//click something at this location
and on and on.
Now i need to figure out how to actually walk the rail and click the things when it gets to that location. What is the recommended way to do this?
Title: Re: [C#] rails
Post by: Crome969 on June 24, 2016, 07:17:28 AM
i would not make a textfile but make an xml. Make an object that stores your waypoint together with a selection in which order and serialize it to file..

https://msdn.microsoft.com/en-us/library/ms973893.aspx

Then you can make something working to save paths to xml and later read xml back to a pathlist
Title: Re: [C#] rails
Post by: smitty on June 24, 2016, 07:27:09 AM
Wow... that link was exactly what i needed. that is kinda crazy how quickly you answered the question with so few words hah. I will read this and if i have any more problems ill post here again. thanks!
Title: Re: [C#] rails
Post by: smitty on June 25, 2016, 08:57:48 PM
So heres a good question. Does moveXYZ have some type of wait built into it to stop executing the script until character is at designated location?
Title: Re: [C#] rails
Post by: Tidus on June 26, 2016, 08:13:06 AM
Yes, it is because you are going to that method in the API to move.  So until the move is done you won't be moving on in your script.  If you want to search while you move you will want to set up a different thread that it runs during it.
Title: Re: [C#] rails
Post by: smitty on June 26, 2016, 11:58:20 AM
Thank you =]. I now have a functioning rail!!!!! you guys rock.