Jump to content

getCurrentTime/getCurrentRegion snippet?


Recommended Posts

Posted
1 minute ago, HeyImJamie said:

You could've literally googled an answer and found the solution within the time it would've taken you to create this thread. For that reason, I don't see the need to spoon feed you the snippet. I will give you a hint though, Java has a Date class.

Oh :/ Thought this used the OSBot API. Thanks

Posted
2 hours ago, WhoKnew said:

OSBot uses java API. Correct me if i'm wrong, but OSBot API is just a bunch of custom java methods ect . 

Ya I believe so. I thought I had to use XClient though, so I went through quite a few threads related to XClient, getCurrentTime, and getCurrentRegion, but didn’t find anything too useful in my search. I didn’t think to look through Java’s API to setup a method with that though 

Posted
7 minutes ago, FrostBug said:

Difficult question when we don't know what you want to do..
It would work if whatever you want to do can be done with the use of the currently loaded game tiles and client tick counter

Lol oh... would that just be used for game tiles and tick counts? 

I was thinking it got the current time of a region (time zone)...

I’ll look into the date class Jamie said. I was wanting the bot to log in at a specific time, and logout at one

Posted
17 minutes ago, Dab in a Lab said:

Lol oh... would that just be used for game tiles and tick counts? 

I was thinking it got the current time of a region (time zone)...

I’ll look into the date class Jamie said. I was wanting the bot to log in at a specific time, and logout at one

 

Just Google it !!!!!!!!!!!!!!!!!!!

https://stackoverflow.com/questions/9156156/how-to-get-local-time-of-different-time-zones

  • Boge 1
  • Heart 1
Posted
5 minutes ago, Explv said:

Thanks. I was gonna google is when I sat down to work on my script again, and I haven’t worked on it today.

I was just making sure I understood what getCurrentTime and getCurrentRegion actually got for future reference 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...