Jump to content

getCurrentTime/getCurrentRegion snippet?


Dab in a Lab

Recommended Posts

Anyone know, or willing to provide a snippet for getting the current time and/or current region? I'm trying to learn this next to make a custom LoginHandler, and have no clue where to start. I see I need to use XClient, but I'm a bit lost with it. Any help would be greatly appreciated.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

41 minutes ago, Dab in a Lab 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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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