Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

getCurrentTime/getCurrentRegion snippet?

Featured Replies

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.

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.

  • Author
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

2 hours ago, Dab in a Lab said:

Oh :/ Thought this used the OSBot API. Thanks

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

  • Author
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 

  • Author
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

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

  • Author
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

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.