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.

Setting player name

Featured Replies

Hello,

I'm trying to set a player name so I can trade him later on.
But I can not figure out how to set this name, what I have now is:

 Player person2 = new Player ("Evert123");

This is not working at all :(

String player;


Player p = getplayers.closest(......some players);
if	p != null
	player = p.getname

?

1 minute ago, SetYaName said:

Account settings?

What...?

Do you have any java knowledge OP, have you looked at the API?

or

String[] accountsToTrade = {"Acc1", "Acc2",..........};

 

  • Author
17 minutes ago, SetYaName said:

Account settings?

I don't really know what you mean..

15 minutes ago, Chris said:

String player;


Player p = getplayers.closest(......some players);
if	p != null
	player = p.getname

?

Yes, I already have some code like this, only get last trade request and getPlayername.

15 minutes ago, Wet Rag said:

What...?

Do you have any java knowledge OP, have you looked at the API?

Yes very very little but i know python, I looked at the API but I think this is mostly caused by my lack of Java knowledge.

16 minutes ago, Chris said:

or


String[] accountsToTrade = {"Acc1", "Acc2",..........};

 

I can just save it as a string?

Because when i set an Position or Area I have to use the Entity? Like: Position momsKitchen = new Position (2222, 2222, 2)

So I was expecting something with Player xxx = new Player.

I will try string person2 = ("evert123")

 

Player somePlayer = getPlayers().closest("Zezima");

//Edit: Trading this player:
int someThreshold = 7000;
if (somePlayer != null && getMap().canReach(somePlayer) && somePlayer.interact("Trade with") && new ConditionalSleep(someThreshold) {
						@Override
						public boolean condition() throws InterruptedException {
							return getTrade().isCurrentlyTrading();
						}
					}.sleep()) log("Successfully in trade!");					

 

Edited by Apaec

  • Author

Thx everybody I realize now that I did some stupid stuff.

I never requested the players name, so I was working with a Player (Object??) and not a string, so it didn't make sense to me that it could be a string.

@Apaec Really useful will definitely look at it, but for now it kinda feels like a spoiler so I first try to make it myself and then get back when I get frustrated :P

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.