http://thelaststand659.ucoz.com/
Would You Like To Log In To The Last Stand 659 Forum's Please Remember To Vote And Invite Your Friends


http://thelaststand659.ucoz.com/
 
HomeHome  Download Client  WebClient  FAQFAQ  SearchSearch  UsergroupsUsergroups  RegisterRegister  Log inLog in  MemberlistMemberlist  CalendarCalendar  

Share | 
 

 Fixing "Buy 500"

Go down 
AuthorMessage
Quit
New Member
New Member


Posts : 18
Reputation : 1
Join date : 2011-08-26

PostSubject: Fixing "Buy 500"   Fri Aug 26, 2011 9:03 pm

This will make skilling much easier. With the current source, if you click "buy 500" from any shop and the item isn't stackable you will get an error message. This fix will make it so that if you click "buy 500" it will add the item you want to buy to your inventory * by however many spaces you have in your inventory.

In com.rs2hd.model.Inventory, search for:

Code:
boolean b = inventory.add(new Item(item, amount));
      if (!b) {
         player.getActionSender().sendMessage(
               "Not enough space in your inventory.");
         return false;
      }

Replace it with:

Code:
boolean b = inventory.add(new Item(item, amount));
      if (!b) {
         player.getInventory().addItem(item,  player.getInventory().getFreeSlots())
         return false;
      }


Last edited by Hax on Fri Aug 26, 2011 9:12 pm; edited 1 time in total
Back to top Go down
View user profile
omfgpku
New Member
New Member


Posts : 38
Reputation : 4
Join date : 2011-08-26

PostSubject: Re: Fixing "Buy 500"   Fri Aug 26, 2011 9:09 pm

good suggestion that would have helped Smile
Back to top Go down
View user profile
pk ancients
New Member
New Member


Posts : 23
Reputation : 10
Join date : 2011-08-27
Age : 22
Location : Netherland

PostSubject: buy 500   Sun Aug 28, 2011 3:11 am

I hope it won't take the price x500 then? :O
Back to top Go down
View user profile
omfgpku
New Member
New Member


Posts : 38
Reputation : 4
Join date : 2011-08-26

PostSubject: Re: Fixing "Buy 500"   Sun Aug 28, 2011 9:42 am

I got the cash so I have no need to worry lol!
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Fixing "Buy 500"   

Back to top Go down
 
Fixing "Buy 500"
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
http://thelaststand659.ucoz.com/ :: Suggestions And Ideas-
Jump to: