Thread: [OSRSPK/Elvarg] Platinum Token exchanging

Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11  
    Registered Member
    Join Date
    Feb 2016
    Posts
    123
    Thanks given
    32
    Thanks received
    31
    Rep Power
    68
    Quote Originally Posted by rsps Jemo View Post
    Okay i need help i tried to add it to the game but still give me error... Any of you can help me?

    Token id=12852
    Coin id=995
    Token value=1,000,000
    Code:
    if (itemId == 995 && gameObject.getDefinition().getName().contains("Bank")) {
    	final int size = player.getInventory().getAmount(995);
    	player.getInventory().delete(new Item(995, size));
    	player.getInventory().add(new Item(12852, size / 1000000));
    	player.getPacketSender().sendMessage("You exchange " + Misc.format(size) + " Coins for " + Misc.format(player.getInventory().getAmount(12852)) + " Platinum tokens.");
    }
    That should work
    Reply With Quote  
     

  2. #12  
    Registered Member
    Join Date
    Mar 2020
    Posts
    29
    Thanks given
    7
    Thanks received
    0
    Rep Power
    10
    I will try it now thank

    Okay, just to be sure, I put this in my "UseItemPacketListener.java...

    Still have 2 problem on the first line with "itemId" and "gameObject"...

    don't know what to do

    Oh i think i put it at the wrong place, look to work now thank a lot for your help Very appreciate
    Reply With Quote  
     

  3. #13  
    Registered Member
    Join Date
    Feb 2016
    Posts
    123
    Thanks given
    32
    Thanks received
    31
    Rep Power
    68
    Quote Originally Posted by rsps Jemo View Post
    I will try it now thank

    Okay, just to be sure, I put this in my "UseItemPacketListener.java...

    Still have 2 problem on the first line with "itemId" and "gameObject"...

    don't know what to do

    Oh i think i put it at the wrong place, look to work now thank a lot for your help Very appreciate
    EDIT: Wait nevermind, glad it works
    Reply With Quote  
     

  4. Thankful user:


  5. #14  
    Registered Member
    Join Date
    Mar 2020
    Posts
    29
    Thanks given
    7
    Thanks received
    0
    Rep Power
    10
    and now i want to do the invert of this one... how it should look?
    token for coin

    I just try but don't work lol, i'm totally noob
    Reply With Quote  
     

  6. #15  
    Registered Member

    Join Date
    Feb 2015
    Posts
    830
    Thanks given
    12
    Thanks received
    200
    Rep Power
    118
    Quote Originally Posted by rsps Jemo View Post
    and now i want to do the invert of this one... how it should look?
    token for coin

    I just try but don't work lol, i'm totally noob
    Well its just going to be the opposite.

    1000 coins = 1 platinum token.

    Invert that and you'll get?....
    Attached image
    Reply With Quote  
     

  7. Thankful user:


  8. #16  
    Registered Member
    Join Date
    Mar 2020
    Posts
    29
    Thanks given
    7
    Thanks received
    0
    Rep Power
    10
    Thank, i just fixed it, just understood how lol thank for your time very appreciate guys
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [REQ] Platinum Tokens
    By pityer tank in forum Models
    Replies: 6
    Last Post: 11-07-2020, 07:56 AM
  2. Platinum Tokens? [PI]
    By zayuhh in forum Help
    Replies: 1
    Last Post: 02-14-2017, 12:12 AM
  3. [REQ Platinum tokens + ints]
    By White Vans in forum Models
    Replies: 3
    Last Post: 11-08-2015, 09:17 AM
  4. skilling token exchange?
    By pk3r john in forum Help
    Replies: 4
    Last Post: 11-22-2011, 11:26 PM
  5. Minigame Token Exchanging
    By Rugrats in forum Help
    Replies: 4
    Last Post: 04-19-2009, 09:20 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •