Thread: [Galkon](∞)adding the Infinity icon(∞)

Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28
  1. #21  
    Registered Member
    Join Date
    Dec 2011
    Posts
    59
    Thanks given
    2
    Thanks received
    1
    Rep Power
    19
    Quote Originally Posted by Bliiitz View Post
    Ok thankyou heaps, I obviously cant read lol. But its giving the infinite sign to anything with a 0 in the shop stock amount.
    Its not sorry, it's giving the infinite sprite to anything with shops stock > 200, anyway I can change this?
    Reply With Quote  
     

  2. #22  
    Registered Member
    Join Date
    Dec 2011
    Posts
    59
    Thanks given
    2
    Thanks received
    1
    Rep Power
    19
    ^ Anyone? ^
    Reply With Quote  
     

  3. #23  
    Registered Member
    Lennard's Avatar
    Join Date
    Mar 2010
    Posts
    924
    Thanks given
    0
    Thanks received
    234
    Rep Power
    274
    Code:
    public void resetShop(int ShopID) {
    		synchronized (c) {
    			int TotalItems = 0;
    			for (int i = 0; i < Server.shopHandler.MaxShopItems; i++) {
    				if (Server.shopHandler.ShopItems[ShopID][i] > 0) {
    					TotalItems++;
    				}
    			}
    			if (TotalItems > Server.shopHandler.MaxShopItems) {
    				TotalItems = Server.shopHandler.MaxShopItems;
    			}
    			c.getOutStream().createFrameVarSizeWord(53);
    			c.getOutStream().writeWord(3900);
    			c.getOutStream().writeWord(TotalItems);
    			int TotalCount = 0;
    			for (int i = 0; i < Server.shopHandler.ShopItems.length; i++) {
    				if (Server.shopHandler.ShopItems[ShopID][i] > 0 || i <= Server.shopHandler.ShopItemsStandard[ShopID]) {
    					if (Server.shopHandler.ShopItemsN[ShopID][i] > 254) {
    						c.getOutStream().writeByte(255);
    							if (c.myShopId == ##){
    								c.getOutStream().writeDWord_v2(0);
    							} else {
    								c.getOutStream().writeDWord_v2(Server.shopHandler.ShopItemsN[ShopID][i]);
    							}
    					} else {
    						c.getOutStream().writeByte(Server.shopHandler.ShopItemsN[ShopID][i]);
    					}
    					if (Server.shopHandler.ShopItems[ShopID][i] > Config.ITEM_LIMIT || Server.shopHandler.ShopItems[ShopID][i] < 0) {
    						Server.shopHandler.ShopItems[ShopID][i] = Config.ITEM_LIMIT;
    					}
    					c.getOutStream().writeWordBigEndianA(Server.shopHandler.ShopItems[ShopID][i]);
    					TotalCount++;
    				}
    				if (TotalCount > TotalItems) {
    					break;
    				}
    			}
    			c.getOutStream().endFrameVarSizeWord();
    			c.flushOutStream();
    		}
    	}
    Attached image
    The greatest upcoming OSRS PK server
    Reply With Quote  
     

  4. Thankful user:


  5. #24  
    Registered Member
    Join Date
    Dec 2011
    Posts
    59
    Thanks given
    2
    Thanks received
    1
    Rep Power
    19
    Thanks man, seems kinda obvious now I read over the code and see the difference, but even if you told me it was simple, still wouldnta known. Haha. +repped
    Reply With Quote  
     

  6. #25  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Where can i put the infinity.png? inside cache folder?
    Reply With Quote  
     

  7. #26  
    Registered Member

    Join Date
    Oct 2011
    Posts
    2,084
    Thanks given
    0
    Thanks received
    1,043
    Rep Power
    3608
    Quote Originally Posted by Zotic View Post
    Where can i put the infinity.png? inside cache folder?
    yes.
    Reply With Quote  
     

  8. #27  
    Officially Retired


    Join Date
    Oct 2007
    Age
    30
    Posts
    5,454
    Thanks given
    558
    Thanks received
    122
    Rep Power
    1364
    Quote Originally Posted by Omelete View Post
    yes.
    Code:
    	public void resetShop(int ShopID) {
    		// synchronized (c) {
    		int TotalItems = 0;
    		for (int i = 0; i < ShopHandler.MaxShopItems; i++) {
    			if (ShopHandler.ShopItems[ShopID][i] > 0) {
    				TotalItems++;
    			}
    		}
    		if (TotalItems > ShopHandler.MaxShopItems) {
    			TotalItems = ShopHandler.MaxShopItems;
    		}
    		if (ShopID == 80) {
    			c.getPA().sendFrame171(0, 64017);
    			c.getPA().sendFrame126("Bounties: " + Misc.insertCommas(Integer.toString(c.getBH().getBounties())), 64019);
    		} else {
    			c.getPA().sendFrame171(1, 64017);
    		}
    		c.getOutStream().createFrameVarSizeWord(53);
    		c.getOutStream().writeWord(64016);
    		c.getOutStream().writeWord(TotalItems);
    		int TotalCount = 0;
    		for (int i = 0; i < ShopHandler.ShopItems.length; i++) {
    			if (ShopHandler.ShopItems[ShopID][i] > 0 || i <= ShopHandler.ShopItemsStandard[ShopID]) {
    				if (ShopHandler.ShopItemsN[ShopID][i] > 254) {
    					c.getOutStream().writeByte(255);
    					c.getOutStream().writeDWord_v2(ShopHandler.ShopItemsN[ShopID][i]);
    				} else {
    					c.getOutStream().writeByte(ShopHandler.ShopItemsN[ShopID][i]);
    				}
    				if (ShopHandler.ShopItems[ShopID][i] > Config.ITEM_LIMIT || ShopHandler.ShopItems[ShopID][i] < 0) {
    					ShopHandler.ShopItems[ShopID][i] = Config.ITEM_LIMIT;
    				}
    				c.getOutStream().writeWordBigEndianA(ShopHandler.ShopItems[ShopID][i]);
    				TotalCount++;
    			}
    			if (TotalCount > TotalItems) {
    				break;
    			}
    		}
    		c.getOutStream().endFrameVarSizeWord();
    		c.flushOutStream();
    		// }
    	}
    i have issue with the
    Code:
    c.getOutStream().writeByte(0);
    Reply With Quote  
     

  9. #28  
    Banned
    Join Date
    Mar 2018
    Posts
    17
    Thanks given
    11
    Thanks received
    3
    Rep Power
    0
    anyone has this for ruse?
    Reply With Quote  
     

Page 3 of 3 FirstFirst 123

Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •