Jump to content

Setting player name


evert123

Recommended Posts

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")

Link to comment
Share on other sites

 

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

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

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...