Jump to content

[Help] Math in Java


Recommended Posts

Posted

My account needs to keep 4.3m gold in the inventory. The amount of gold before muling is a number above 4.3m. 

So I used the equation

 

amount in inventory - 4.3m = amount to trade


So in my code I put 

long x = getInventory().getAmount(995);

long amountToTrade = x - 4300000;

 

Now in my mule code, I put

trade.offer(995, amountToTrade);

 

Sadly this does not work even though all the math makes sense. 
I know the string requires an int but I cannot use int when i am getting the amount in the inventory. 

Any help or suggestions would be greatly appreciated :)

Posted
13 minutes ago, Magarac said:

Yeah I was gonna say, an int should be fine so long as its under 2,147,483,647 gp which I would assume you don't make before trading to the mule; otherwise that'd be hella impressive :D

That is the max cash stack on rs so he cant really trade more than it

  • Like 1

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