Jump to content

Search the Community

Showing results for tags 'shops'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 137 results

  1. hi everyone im using matix 718 spawn rsps. Im going to convert it into a eco. But I'm having problems with something. I need to know how to edit the shops price of items. I have no problem with putting items in the shops, but i just dont know how to edit the items price. Could someone please tell me what to look for? so i can edit the shop? Thank you.
  2. hey, i am started to programming 614 since i know how 317 works and i am really want to put a 614 online in the far future so i am taking a old one that is released by "jet kai" spawnscape. (ye i know that one is messy but that's the best learing.) now i fixed out a lot but i can't add new shops on this somehow... i think i need to add something in the shophandeler.java but since there is nothing special on it becuse there is only 1 shop and that opens whit a code "::shop(s)" here is my shophandeler.java [CODE]package dragonkk.rs2rsps.model.player; public class ShopHandler { private Player player; private int shopid = 0; public ShopHandler(Player player) { this.player = player; } public void setShopId(int id) { this.shopid = id; } public int getShopId() { return shopid; } } [/CODE] [CODE] public class Shops { public ArrayList<Shop> shops = new ArrayList<Shop>(10); public Shops() { setShops(); } public void setShops() { if(ShopManager.Voteshop == false) { shops.add(new Shop(0, Shop0Items(), Shop0Items().size())); } else { shops.add(new Shop(1, Shop1Items(), Shop1Items().size())); } } public Shop getShop(int shopid) { if(ShopManager.Voteshop) { return shops.get(1); } else { return shops.get(0); } } public static List<int[]> Shop1Items() { List<int[]> items = new ArrayList<int[]>(40); return items; } public static List<int[]> Shop0Items() { List<int[]> items = new ArrayList<int[]>(40); //items.add(new int[]{2422, 2147483647, 0}); //Fake Blue Partyhat items.add(new int[]{1205, 1, 99999999}); //Bronze dagger items.add(new int[]{13908, 99999, 1000}); //corrupt statius platebody items.add(new int[]{13914, 99999, 1000}); //corrupt statius platelegs [/CODE] that's the shop that is already added. (not the full shop ) but i really have no clue on how to added a shop on this like, clicking on npc, leftclick or "trade" and than open up a shop i am try'd a few ways i found but the just won't work. Ps, sorry for my bad english i hope someone can help me out. greetings, Madmonkey
  3. [U]First, we will learn how to edit a shop. [/U] Open up [I]"Data\Items\UnPackedShops.txt" [/I] You will most likely see quite a few lines of text looking similar to this: [CODE]1 995 false - Rare Shop - 24474 10 [/CODE] This is what you need to edit in the file to edit your shops [COLOR=#ff0000]1[/COLOR] [COLOR=#008000]995[/COLOR] [COLOR=#a9a9a9]false -[/COLOR] [COLOR=#800080]Rare Shop[/COLOR] [COLOR=#a9a9a9]-[/COLOR] [COLOR=#ffd700]24474[/COLOR] [COLOR=#0000cd]10[/COLOR] [QUOTE][COLOR=#0000cd] [/COLOR][COLOR=#ff0000]Shop Number - Add +1 if you are making a new shop [/COLOR][COLOR=#008000]Shop Currency - The ID of the currency that the shop uses.(Normally 995, which is Gold) [/COLOR][COLOR=#800080]Shop Name - The Name of the shop [/COLOR][COLOR=#ffd700]Item - The ID of one of the items for sale [/COLOR][COLOR=#0000cd]Quantity - The amount of the item in stock [/COLOR][COLOR=#a9a9a9]No need to edit this [/COLOR][/QUOTE] To add more items to the shop, you would do so like this: [CODE]1 995 false - Rare Shop - 24474 10 20744 10 20746 10[/CODE] Now, to add another shop, just copy one of the shops(One line of text) and Paste it at the end of your shops. You then need to find the Shop Number of the shop above your new shop, and change the new shop number to the next number up. For example, if the shop above your new shop is 18, you would make your new shop number 19. You just edit it the same you would any other shop. Comment or Thank if this helped you :D
  4. Runecessor

    Shops

    Hey Ladies and Gentlemen! Alright so here's my problem: I went to add new shops on my RSPS and the only files I used where: Shops.Cfg and ActionHandler.Java I've been able to successfully add a few shops but sometimes the "shop = #" does not allow me to buy the items out of the shop. The items are there, and you can see them and when you click them it tells you how much the item is, and if you hit examine it also tells you the items description. I've done extensive research on this fix but have not been able to figure it out, it seems the higher the number the shop, the problem begins, I've already used shops 1-27 everything after that does not work. I've also checked in my ShopHandler.Java to see if maybe there was a requirement for the shop # but that is not the case either, I have literally done everything that comes to mind. So if anyone is able to help me out that would be great! If you do not mind also adding me on Skype if you are willing to help, my Skype name is: fidelity.hazy, Thank you very much!
  5. Nick

    163 Shops ~

    [CENTER]Most of the shops located in all of RuneScape. I have [I][B]not[/B][/I] added any items to the shops, beside cannonballs as a filler for whatever you want to make it supply. There is [I][B]also no NPCHandler code[/B][/I] for the shops as well. This is [I][B]just plain for now[/B][/I] really. I'll add all the correct shop items and NPC spawns (haven't checked if all are there), as well as the NPCHandler code for you guys. Also,[I][B] some shops aren't there as they are only dialogues[/B][/I] so I'll probably add those after everything else, and remember which ones were dialogues, which was only a few. This can really be used for anything, this also [I][B]does not include[/B][/I] custom shops, such as, voting, skilling points, loyalty points, pk, etc. [U]You do get a error:[/U] [CODE]java.lang.RuntimeException: Invalid list for shop line: at com.rs.utils.ShopsHandler.loadUnpackedShops(ShopsHandler.java:43) at com.rs.utils.ShopsHandler.init(ShopsHandler.java:26) at com.rs.Launcher.main(Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)[/CODE] But, don't worry, just re-run the server and it'll be fine. Not too sure why, it gives that, only happened after I added more, but no worries. If someone could tell my why, that'd be nice. So, here's all the shops: [CODE]1 995 true - Al Kharid General Store - 2 5 2 995 true - Ifaba's General Store - 2 5 3 995 true - Aemad's Adventuring Supplies - 2 5 4 995 true - West Ardougne General Store - 2 5 5 995 true - Bandit Bargains - 2 5 6 995 true - Bandit Duty Free - 2 5 7 995 true - Aurel's Supplies - 2 5 8 995 true - General Store - 2 5 9 995 true - Arhein's Store - 2 5 10 995 true - Dorgesh-Kaan General Store - 2 5 11 995 true - Dwarven Shopping Store - 2 5 12 995 true - Edgeville General Store - 2 5 13 995 true - Falador Genreal Store - 2 5 14 995 true - Dal's General Ogre Supplies - 2 5 15 995 true - Karamja General Store - 2 5 16 995 true - Gunslik's Assorted Items - 2 5 17 995 true - The Lighthouse Store - 2 5 18 995 true - Lletya Genral Store - 2 5 19 995 true - Moon Clan General Store - 2 5 20 995 true - Lumbridge General Store - 2 5 21 995 true - Trader Sven's Black Market Goods - 2 5 22 995 true - Miscellanian General Store - 2 5 23 995 true - Razmire General Store - 2 5 24 995 true - Nardah General Store - 2 5 25 995 true - Arnold's Eclectic Supplies - 2 5 26 995 true - Pollnivneach General Store - 2 5 27 995 true - Khazard General Store - 2 5 28 995 true - Port Phasmatys General Store - 2 5 29 995 true - Sigmund the Merchant - 2 5 30 995 true - Rimmington General Store - 2 5 31 995 true - Shantay Pass Shop - 2 5 32 995 true - Obli's General Store - 2 5 33 995 true - Jiminua's Jungle Store - 2 5 34 995 true - Bolkoy's Village Shop - 2 5 35 995 true - Quartermaster's Store - 2 5 36 995 true - Varrock General Store - 2 5 37 995 true - Trader Stan's Trading Post - 2 5 38 995 true - Void Knight General Store - 2 5 39 995 true - Zanaris General Store - 2 5 40 995 true - Davon's Amulet Store - 2 5 41 995 true - Lletya Archery Shop - 2 5 42 995 true - Void Knight Archery Store - 2 5 43 995 true - Brian's Archery Store - 2 5 44 995 true - Lowe's Archery Emporium - 2 5 45 995 true - Hickton's Archery Emporium - 2 5 46 995 true - Dargaud's Bows and Arrows - 2 5 47 995 true - Aaron's Archery Appendages - 2 5 48 995 true - Hura's Crossbow Shop - 2 5 49 995 true - Keldagrim Crossbow Shop - 2 5 50 995 true - White Wolf Mountain Crossbow Shop - 2 5 51 995 true - Bob's Brilliant Axes - 2 5 52 995 true - Brian's Battleaxe Bazaar - 2 5 53 995 true - Candle Shop - 2 5 54 995 true - Wayne's Chains - 2 5 55 995 true - Thessalia's Fine Clothes - 2 5 56 995 true - Fancy Clothes Store - 2 5 57 995 true - Fine Fashions - 2 5 58 995 true - Yrsa's Accoutrements - 2 5 59 995 true - Barker's Haberdashery - 2 5 60 995 true - Lletya Seamstress - 2 5 61 995 true - Dodgy Mike's Second-hand Clothing - 2 5 62 995 true - Miscellanian Clothes Shop - 2 5 63 995 true - Agmundia Quality Clothes - 2 5 64 995 true - Vermundi's Clothes Stall - 2 5 65 995 true - Pie Shop - 2 5 66 995 true - Grand Tree Groceries - 2 5 67 995 true - Funch's Fine Groceries - 2 5 68 995 true - Frenita's Cookery Shop - 2 5 69 995 true - Dommik's Crafting Store - 2 5 70 995 true - Rommik's Crafty Supplies - 2 5 71 995 true - Urist's Crafting Supplies - 2 5 72 995 true - Jamila's Craft Stall - 2 5 73 995 true - Hamab's Crafing Emporium - 2 5 74 995 true - Neitiznot Supplies - 2 5 75 995 true - Vanessa's Farming Shop - 2 5 76 995 true - Alice's Farming Shop - 2 5 77 995 true - Sarah's Farming Shop - 2 5 78 995 true - Richard's Farming Shop - 2 5 79 995 true - Head Farmer Jones's Farming Shop - 2 5 80 995 true - Gerrant's Fishy Business - 2 5 81 995 true - Hank's Fishing Shop - 2 5 82 995 true - Nicholas Angle's Fishing Shop - 2 5 83 995 true - Harry's Fishing Shop - 2 5 84 995 true - Fishing Guild Shop - 2 5 85 995 true - Fernahei's Fishing Hut - 2 5 86 995 true - Lovecraft's Tackle - 2 5 87 995 true - Fremennik Fishmonger - 2 5 88 995 true - Island Fishmonger - 2 5 89 995 true - Etceteria Fish - 2 5 90 995 true - Wydin's Food Store - 2 5 91 995 true - Rufus's Meat Emporium - 2 5 92 995 true - Solihib's Food Stall - 2 5 93 995 true - Fresh Meat - 2 5 94 995 true - Ardougne Baker's Stall - 2 5 95 995 true - Keepa Kettilon's Store - 2 5 96 995 true - Gianne's Restaurant - 2 5 97 995 true - Warriors' Guild Food Shop - 2 5 98 995 true - Miscellanian Food Shop - 2 5 99 995 true - Ardougne Fur Stall - 2 5 100 995 true - Fremennik Fur Trader - 2 5 101 995 true - Herquin's Gems - 2 5 102 995 true - Ardougne Gem Stall - 2 5 103 995 true - Gem Trader - 2 5 104 995 true - Green Gemstone Gems - 2 5 105 995 true - Gem Store - 2 5 106 995 true - Peksa's Helmet Shop - 2 5 107 995 true - Skulgrimen's Battle Gear - 2 5 108 995 true - Frincos's Fabulous Herb Store - 2 5 109 995 true - Grud's Herblore Stall - 2 5 110 995 true - Jatix's Herblore Shop - 2 5 111 995 true - Poletax's Herblore Shop - 2 5 112 995 true - Aleck's Hunter Emporium - 2 5 113 995 true - Nardah Hunter Shop - 2 5 114 995 true - Ayleth Beaststalker's Hunting Supplies Shop - 2 5 115 995 true - Grum's Gold Exchange - 2 5 116 995 true - Kjut's Kebabs - 2 5 117 995 true - Flynn's Mace Market - 2 5 118 995 true - Ali's Discount Wares - 2 5 119 995 true - Betty's Magic Emporium - 2 5 120 995 true - Aubury's Rune Shop - 2 5 121 995 true - Wizards' Guild - 2 5 122 995 true - Baba Yaga's Magic Shop - 2 5 123 995 true - Mage Training Arena - 2 5 124 995 true - Lunadail's Arena-side Rune Shop - 2 5 125 995 true - Mage of Zamorak - 2 5 126 995 true - Tutab's Magical Market - 2 5 127 995 true - Void Knight Magic Store - 2 5 128 995 true - TzHaar-Mej-Roh's Rune Store - 2 5 129 995 true - Nurmof's Pickaxe Shop - 2 5 130 995 true - Drogo's Mining Emporium - 2 5 131 995 true - Pickaxe-Is-Mine - 2 5 132 995 true - Pet Shop - 2 5 133 995 true - Zenesha's Platebody Shop - 2 5 134 995 true - Horvik's Armour Shop - 2 5 135 995 true - Armour Shop - 2 5 136 995 true - Louie's Armoured Legs Bazaar - 2 5 137 995 true - Seddu's Adventurers' Store - 2 5 138 995 true - Ranael's Super Skirt Store - 2 5 139 995 true - Zeke's Superior Scimitars - 2 5 140 995 true - Daga's Scimitar Smithy - 2 5 141 995 true - Dealga's Scimitar Emporium - 2 5 142 995 true - Cassie's Shield Shop - 2 5 143 995 true - Ardougne Silver Stall - 2 5 144 995 true - Silver Cog Silver Stall - 2 5 145 995 true - The Spice is Right - 2 5 146 995 true - Zaff's Superior Staves - 2 5 147 995 true - Pikkupstix's Summoning Shop - 2 5 148 995 true - Summong Supplies - 2 5 149 995 true - Blades by Urbi - 2 5 150 995 true - Gaius's Two-Handed Shop - 2 5 151 995 true - Varrock Sword Shop - 2 5 152 995 true - Authentic Throwing Weapons - 2 5 153 995 true - Happy Heroes' H'Emporium - 2 5 154 995 true - Jukat's Dragon Sword Shop - 2 5 155 995 true - Nardok's Bone Weapons - 2 5 156 995 true - Quality Weapons Shop - 25 157 995 true - Smithing Smith's Shop - 2 5 158 995 true - Tamayu's Spear Stall - 2 5 159 995 true - TzHaar-Hur-Tel's Equipment Store - 2 5 160 995 true - Vigr's Warhammers - 2 5 161 995 true - Weapon's Galor - 2 5 162 995 true - Faruq's Tools for Games - 2 5 163 995 true - Greengrocer of Miscellania - 2 5 [/CODE] And now just same basic images of some of the shops: [SPOILER=Shops] [IMG]http://puu.sh/82Jjs.jpg[/IMG] [IMG]http://puu.sh/82JlZ.jpg[/IMG] [IMG]http://puu.sh/82Jnb.jpg[/IMG] [IMG]http://puu.sh/82Jo1.jpg[/IMG] [IMG]http://puu.sh/82Jpc.jpg[/IMG] [IMG]http://puu.sh/82JpO.jpg[/IMG] [IMG]http://puu.sh/82Jqn.jpg[/IMG] [IMG]http://puu.sh/82Jt0.jpg[/IMG] [/SPOILER][/CENTER]
  6. I added a Farming store in my RSPS and i cant buy anithing in it but why? I added few more shops and they are working....
  7. I am not a java developer by any means. Web developing is all me, however, my developer is on break so I am adding new items into shop/new shops. I followed this tutorial: [url]https://www.moparscape.org/smf/index.php?topic=549994.0[/url] Entered this into shops.cfg: [CODE]shop = 1 Armor_Shop 1 1 1158 250 1120 250 1106 250 1070 250 1084 205[/CODE] This inside ActionHandler under any case: [CODE]case 2538: c.getShops().openShop(1); break;[/CODE] [CODE]And, this is the error I am getting.. I do not know why. Loaded 5113 npc drops for 331 npcs in 111ms. Exception in thread "main" java.lang.ExceptionInInitializerError Caused by: java.lang.ArrayIndexOutOfBoundsException: 2 at server.world.ShopHandler.loadShops(ShopHandler.java:145) at server.world.ShopHandler.<init>(ShopHandler.java:45) at server.Server.<clinit>(Server.java:76)[/CODE] 1st error shows this once I click it: [CODE]ShopSModifier[ShopID] = Integer.parseInt(token3[2]);[/CODE] (Never added this) [IMG]http://i.gyazo.com/8a9cc24a586692a196afd3dfe7fc5adb.png[/IMG] Second: [CODE]loadShops("shops.cfg");[/CODE] [IMG]http://i.gyazo.com/be5c82fb2a8afc7c043ba1478187c4d0.png[/IMG] Third: [CODE]public static ShopHandler shopHandler = new ShopHandler();[/CODE] [IMG]http://i.gyazo.com/b4e36fbbdc3126dfdba6a7029f1aa538.png[/IMG] I have not touched ANY of these files, and, before this, the server was online with no errors. What the fuck did I do wrong... :(
  8. deathlypvpz

    Adding shops

    Hey guys, please don't start to hate at this exact moment. I just got a little problem. How can I add another shop ID? In shops.java I remade it From [CODE]public Shop getShop(int shopid) { if(ShopManager.Voteshop) { return shops.get(1); } else { return shops.get(2); } }[/CODE] TO [CODE]public Shop getShop(int shopid) { if(ShopManager.Voteshop) { return shops.get(1); } else { shops.get(2); shops.get(3); } return shop; }[/CODE] No errors, works but I can't open the shops, The shop that opens is the Vote shop that starts with the RETURN. Tried this to [CODE]public Shop getShop(int shopid) { if(ShopManager.Voteshop) { shops.get(1); return shop; } else { shops.get(2); shops.get(3); return shop; } }[/CODE] This code dosn't open any shop. If you guys are going to be D*ck, don't even bother to comment.
  9. epuxzrewr

    Autobuy shops?

    Right, so what I'm wondering is how you guys have set up online shops for people to buy stuff on. What I'm kind of looking for is something like [url]http://www.buycraft.net/[/url] but not minecraft related, something that is kind of an all round thing not just shops focused on one thing. Any ideas? I've tried googling but when I type in 'auto-buy shops' and shit like that I just get car selling website which is understandable but pretty fucking annoying. So here I am with yet another topic on this forum. Any suggestions are welcome, thanks.
  10. Hello, i have been looking around and havent found anything that helped me. If i want to make 2 different prices in the shopassistant at public int getSpecialItemValue(int id), for exampel. I want my chaotic rapier that costs 1000 pk points, only to cost 100 donator points. How do i make a seperate list from public int getSpecialItemValue(int id)? Thank you!
  11. hey guys, im using the project-exile source and i have 2 problems that i cannot solve personally. firstly, after i rake a farming allotment, there is no way to select a cleaned patch, when you right click the patch there is only a 'cancel' option available so you cannot use seeds on it :/ secondly, in some of my shops, you can buy some items like seeds for coins when your inventory doesnt have any coins, even though it shows that the value of the seeds is 100k or w/e.. if anyone knows in which file i can find the fixes for the above or guide me, your help will be much appreciated. here's my shops.cfg, i tried changing the 1's to 2's but no change [CODE] shop = 1 General_Supplies 1 1 590 100 1755 100 2347 100 952 100 946 100 228 10000 1540 30 1523 100 7947 100 314 100 313 100 1437 100 527 100 2435 100 2429 100 114 100 2433 100 3041 100 2445 100 6686 100 303 10 311 10 301 10 307 10 309 10 305 10 shop = 3 Pk_Points_Shop 1 1 6914 10 6889 10 10551 10 10548 10 20072 10 15018 10 15019 10 15020 10 15220 10 13896 1 13884 100 13890 100 13902 100 13887 100 13893 100 13905 100 13899 100 13876 100 13870 100 13873 100 13864 100 13858 100 13861 100 13867 100 shop = 5 Magic_Gear_Shop 1 1 1381 100 1383 100 1385 100 1387 100 4675 100 3840 100 3842 100 3844 100 6109 100 6107 100 6108 100 6110 100 6106 100 4089 100 4091 100 4093 100 4095 100 4097 100 3755 100 9075 1000 565 1000 554 1000 555 1000 556 1000 557 1000 558 1000 559 1000 560 1000 561 1000 562 1000 563 1000 564 1000 566 1000 shop = 6 Weapons_Shop 1 1 7460 100 7461 100 4587 100 1305 100 1377 100 1434 100 3204 100 1215 100 5698 100 1323 100 1325 100 1329 100 1331 100 1333 100 1725 100 3105 100 4131 100 6568 100 10828 100 3751 100 shop = 9 Bob's_Axes_and_Pickaxes 2 1 1351 100 1349 100 1353 100 1355 100 1357 100 1359 100 1265 100 1267 100 1269 100 1271 100 1273 100 1275 100 shop = 10 Armour_Shop 1 1 1153 100 1157 100 1159 100 1161 4000 1163 100 1115 100 1119 100 1121 100 1123 100 1127 100 1067 100 1069 100 1071 100 1073 100 1079 100 shop = 13 Voting_Rewards_Shop 1 1 13661 100 shop = 15 Farming_Supplies 1 1 5318 100 5099 100 5319 100 5280 100 5283 100 5284 100 5285 100 5286 100 5287 100 5288 100 5289 100 5290 100 5291 100 5292 100 5293 100 5294 100 5295 100 5296 100 5297 100 5298 100 5299 100 5300 100 5301 100 5302 100 5303 100 5304 100 5341 100 5343 100 5340 100 952 100 1925 100 shop = 19 Range_Gear_Shop 1 1 1129 100 1131 100 1133 100 1065 100 1099 100 1135 100 2491 100 2497 100 2503 100 3749 100 6328 100 868 1000 841 100 861 100 882 1000 884 1000 886 1000 888 100 890 100 892 100 9185 100 9144 1000 9243 1000 9242 1000 9244 1000 [/CODE] thanks :D
  12. kendalhunter

    Making shops

    I need to make shops that will accept fist of guthix tokens and its a 317 pi. I cant figure it the hell out lol. Can anybody explain how you do this? I believe its in shophandler or shopassistant.java but really idk. i can change prices of them and add items and have the store. Just want it to use fog tokens and not gp thx
  13. kendalhunter

    Special shops

    making a shop that ccepts an item instead of gp as currency. Im making fist of guthix tokens into currency how can I make certain shop that will accept fog tokens as payment? -thank you
  14. Ruler

    Need help with shops

    Hello Runelocus community, I know this is a really nooby question but im brushing up on my development skills a bit and was curious on making an item sell for a certain amount of points (Pk points) So say I wanted item 663 to sell to a player for 10 pkp , But I also want it to sell back to the shop for 10 pkp How would i work that out?? I know the steps for the items to sell to a player for a certain amount but i'm not sure how to make it exchange back for the same amount.
  15. iVinnyS

    667: Shops Manager

    Hi, Is there a Shops Manager available to put into Zenith 667 source somehow?
  16. Hey! I just added a ton of shops to my server and they were all working fine, but now all of a sudden whenever I click on any shop.. I get Connection Lost! What happened?! I don't wanna have to go back and remove and re-add all my shops again. How can I fix this? Error I get in: java.lang.ArrayIndexOutOfBoundsException: -86 at client.parseLincomingPakcets<clients.java:17914> at client.packetProcess<client.java:17914> at client.packetSending<client.java:17867> at PlayerHandler.process<PlayerHandler.java:153> at server.main<server.java:49> pimpscape Server [fatal] - exception *The -86 number changes depending on the shop I click on.. Other shops I get -93, -95.. etc*.. Whats wrong!!? PLEASE HELP!
  17. hops.java [code] package com.rs.game.player.content; import java.util.concurrent.CopyOnWriteArrayList; import com.rs.cache.loaders.ItemDefinitions; import com.rs.game.item.Item; import com.rs.game.player.Player; import com.rs.utils.ItemExamines; import com.rs.utils.ItemSetsKeyGenerator; public class Shop { private static final int MAIN_STOCK_ITEMS_KEY = ItemSetsKeyGenerator.generateKey(); private static final int MAX_SHOP_ITEMS = 40; public static final int COINS = 995; private String name; private Item[] mainStock; private int[] defaultQuantity; private Item[] generalStock; private int money; private int amount; private CopyOnWriteArrayList<Player> viewingPlayers; public Shop(String name, int money, Item[] mainStock, boolean isGeneralStore) { viewingPlayers = new CopyOnWriteArrayList<Player>(); this.name = name; this.money = money; this.mainStock = mainStock; defaultQuantity = new int[mainStock.length]; for (int i = 0; i < defaultQuantity.length; i++) defaultQuantity[i] = mainStock[i].getAmount(); if (isGeneralStore && mainStock.length < MAX_SHOP_ITEMS) generalStock = new Item[MAX_SHOP_ITEMS - mainStock.length]; } public boolean isGeneralStore() { return generalStock != null; } public void addPlayer(final Player player) { viewingPlayers.add(player); player.getTemporaryAttributtes().put("Shop", this); player.setCloseInterfacesEvent(new Runnable() { @Override public void run() { viewingPlayers.remove(player); player.getTemporaryAttributtes().remove("Shop"); player.getTemporaryAttributtes().remove("shop_buying"); player.getTemporaryAttributtes().remove("amount_shop"); } }); player.getPackets().sendConfig(118, MAIN_STOCK_ITEMS_KEY); player.getPackets().sendConfig(1496, -1); player.getPackets().sendConfig(532, money); player.getPackets().sendConfig(2565, 0); sendStore(player); player.getPackets().sendGlobalConfig(199, -1); player.getInterfaceManager().sendInterface(1265); for (int i = 0; i < MAX_SHOP_ITEMS; i++) player.getPackets().sendGlobalConfig(946 + i, i < defaultQuantity.length ? defaultQuantity[i]: generalStock != null ? 0 : -1);// prices player.getPackets().sendGlobalConfig(1241, 16750848); player.getPackets().sendGlobalConfig(1242, 15439903); player.getPackets().sendGlobalConfig(741, -1); player.getPackets().sendGlobalConfig(743, -1); player.getPackets().sendGlobalConfig(744, 0); if (generalStock != null) player.getPackets().sendHideIComponent(1265, 19, false); player.getPackets().sendIComponentSettings(1265, 20, 0, getStoreSize() * 6, 1150); player.getPackets().sendIComponentSettings(1265, 26, 0, getStoreSize() * 6, 82903066); sendInventory(player); player.getPackets().sendIComponentText(1265, 85, name); player.getTemporaryAttributtes().put("shop_buying", true); player.getTemporaryAttributtes().put("amount_shop", 1); } public void sendInventory(Player player) { player.getInterfaceManager().sendInventoryInterface(1266); player.getPackets().sendItems(93, player.getInventory().getItems()); player.getPackets().sendUnlockIComponentOptionSlots(1266, 0, 0, 27, 0, 1, 2, 3, 4, 5); player.getPackets().sendInterSetItemsOptionsScript(1266, 0, 93, 4, 7, "Value", "Sell 1", "Sell 5", "Sell 10", "Sell 50", "Examine"); } //cid 67 public void buy(Player player, int slotId, int quantity) { if (slotId >= getStoreSize()) return; Item item = slotId >= mainStock.length ? generalStock[slotId - mainStock.length] : mainStock[slotId]; if (item == null) return; if (item.getAmount() == 0) { player.getPackets().sendGameMessage("There is no stock of that item at the moment."); return; } //int dq = slotId >= mainStock.length ? 0 : defaultQuantity[slotId]; not sure what is this int price = getBuyPrice(item); int amountCoins = player.getInventory().getItems().getNumberOf(money); int maxQuantity = amountCoins / price; int buyQ = item.getAmount() > quantity ? quantity : item.getAmount(); boolean enoughCoins = maxQuantity >= buyQ; if (!enoughCoins) { player.getPackets().sendGameMessage("You don't have enough coins."); buyQ = maxQuantity; } else if (quantity > buyQ) player.getPackets().sendGameMessage( "The shop has run out of stock."); if (item.getDefinitions().isStackable()) { if (player.getInventory().getFreeSlots() < 1) { player.getPackets().sendGameMessage( "Not enough space in your inventory."); return; } } else { int freeSlots = player.getInventory().getFreeSlots(); if (buyQ > freeSlots) { buyQ = freeSlots; player.getPackets().sendGameMessage( "Not enough space in your inventory."); } } if (buyQ != 0) { int totalPrice = price * buyQ; player.getInventory().deleteItem(money, totalPrice); player.getInventory().addItem(item.getId(), buyQ); item.setAmount(item.getAmount() - buyQ); if (item.getAmount() <= 0 && slotId >= mainStock.length) generalStock[slotId - mainStock.length] = null; refreshShop(); sendInventory(player); } } public void restoreItems() { boolean needRefresh = false; for (int i = 0; i < mainStock.length; i++) { if (mainStock[i].getAmount() < defaultQuantity[i]) { mainStock[i].setAmount(mainStock[i].getAmount() + 1); needRefresh = true; } else if (mainStock[i].getAmount() > defaultQuantity[i]) { mainStock[i].setAmount(mainStock[i].getAmount() + -1); needRefresh = true; } } if (generalStock != null) { for (int i = 0; i < generalStock.length; i++) { Item item = generalStock[i]; if (item == null) continue; item.setAmount(item.getAmount() - 1); if (item.getAmount() <= 0) generalStock[i] = null; needRefresh = true; } } if (needRefresh) refreshShop(); } private boolean addItem(int itemId, int quantity) { for (Item item : mainStock) { if (item.getId() == itemId) { item.setAmount(item.getAmount() + quantity); refreshShop(); return true; } } if (generalStock != null) { for (Item item : generalStock) { if (item == null) continue; if (item.getId() == itemId) { item.setAmount(item.getAmount() + quantity); refreshShop(); return true; } } for (int i = 0; i < generalStock.length; i++) { if (generalStock[i] == null) { generalStock[i] = new Item(itemId, quantity); refreshShop(); return true; } } } return false; } public void sell(Player player, int slotId, int quantity) { if (player.getInventory().getItemsContainerSize() < slotId) return; Item item = player.getInventory().getItem(slotId); if (item == null) return; int originalId = item.getId(); if (item.getDefinitions().isNoted()) item = new Item(item.getDefinitions().getCertId(), item.getAmount()); if (item.getDefinitions().isDestroyItem() || ItemConstants.getItemDefaultCharges(item.getId()) != -1 || !ItemConstants.isTradeable(item) || item.getId() == money) { player.getPackets().sendGameMessage("You can't sell this item."); return; } int dq = getDefaultQuantity(item.getId()); if (dq == -1 && generalStock == null) { player.getPackets().sendGameMessage( "You can't sell this item to this shop."); return; } int price = getSellPrice(item, dq); int numberOff = player.getInventory().getItems() .getNumberOf(originalId); if (quantity > numberOff) quantity = numberOff; if (!addItem(item.getId(), quantity)) { player.getPackets().sendGameMessage("Shop is currently full."); return; } player.getInventory().deleteItem(originalId, quantity); player.getInventory().addItem(money, price * quantity); } public void sendValue(Player player, int slotId) { if (player.getInventory().getItemsContainerSize() < slotId) return; Item item = player.getInventory().getItem(slotId); if (item == null) return; if (item.getDefinitions().isNoted()) item = new Item(item.getDefinitions().getCertId(), item.getAmount()); if (item.getDefinitions().isNoted() || !ItemConstants.isTradeable(item) || item.getId() == money) { player.getPackets().sendGameMessage("You can't sell this item."); return; } int dq = getDefaultQuantity(item.getId()); if (dq == -1 && generalStock == null) { player.getPackets().sendGameMessage( "You can't sell this item to this shop."); return; } int price = getSellPrice(item, dq); player.getPackets().sendGameMessage( item.getDefinitions().getName() + ": shop will buy for: " + price + " " + ItemDefinitions.getItemDefinitions(money).getName() .toLowerCase() + ". Right-click the item to sell."); } public int getDefaultQuantity(int itemId) { for (int i = 0; i < mainStock.length; i++) if (mainStock[i].getId() == itemId) return defaultQuantity[i]; return -1; } public void sendInfo(Player player, int slotId, boolean isBuying) { if (slotId >= getStoreSize()) return; Item[] stock = isBuying ? mainStock : player.getInventory().getItems().getItems(); Item item = slotId >= stock.length ? generalStock[slotId - stock.length] : stock[slotId]; if (item == null) return; int price = getBuyPrice(item); player.getPackets().sendGameMessage(item.getDefinitions().getName() + ": shop will " + (isBuying ? "sell" : "buy") +" for " + price + " " + ItemDefinitions.getItemDefinitions(money).getName().toLowerCase() + "."); } public int getBuyPrice(Item item) { int price = item.getDefinitions().getValue(); if (price == 0) price = 1; return price; } public int getSellPrice(Item item, int dq) { return item.getDefinitions().getValue() / 2; } public void sendExamine(Player player, int slotId) { if (slotId >= getStoreSize()) return; Item item = slotId >= mainStock.length ? generalStock[slotId - mainStock.length] : mainStock[slotId]; if (item == null) return; player.getPackets().sendGameMessage(ItemExamines.getExamine(item)); } public void refreshShop() { for (Player player : viewingPlayers) { sendStore(player); player.getPackets().sendIComponentSettings(620, 25, 0, getStoreSize() * 6, 1150); } } public int getStoreSize() { return mainStock.length + (generalStock != null ? generalStock.length : 0); } public void sendStore(Player player) { Item[] stock = new Item[mainStock.length + (generalStock != null ? generalStock.length : 0)]; System.arraycopy(mainStock, 0, stock, 0, mainStock.length); if (generalStock != null) System.arraycopy(generalStock, 0, stock, mainStock.length, generalStock.length); player.getPackets().sendItems(MAIN_STOCK_ITEMS_KEY, stock); } public void sendSellStore(Player player, Item[] inventory) { Item[] stock = new Item[inventory.length + (generalStock != null ? generalStock.length : 0)]; System.arraycopy(inventory, 0, stock, 0, inventory.length); if (generalStock != null) System.arraycopy(generalStock, 0, stock, inventory.length, generalStock.length); player.getPackets().sendItems(MAIN_STOCK_ITEMS_KEY, stock); } /** * Checks if the player is buying an item or selling it. * @param player The player * @param slotId The slot id * @param amount The amount */ public void handleShop(Player player, int slotId, int amount) { boolean isBuying = player.getTemporaryAttributtes().get("shop_buying") != null; if (isBuying) buy(player, slotId, amount); else sell(player, slotId, amount); } public Item[] getMainStock() { return this.mainStock; } public int getAmount() { return this.amount; } public void setAmount(Player player, int amount) { this.amount = amount; player.getPackets().sendIComponentText(1265, 67, String.valueOf(amount)); //just update it here } } [/code] ButtonHandler.java [code] else if (interfaceId == 1265) { Shop shop = (Shop) player.getTemporaryAttributtes().get("Shop"); if (shop == null) return; Integer slot = (Integer) player.getTemporaryAttributtes().get("ShopSelectedSlot"); boolean isBuying = player.getTemporaryAttributtes().get("shop_buying") != null; if (componentId == 20) { player.getTemporaryAttributtes().put("ShopSelectedSlot", slotId); if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET) shop.sendInfo(player, slotId, isBuying); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET) shop.handleShop(player, slotId, 1); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON3_PACKET) shop.handleShop(player, slotId, 5); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON4_PACKET) shop.handleShop(player, slotId, 10); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON5_PACKET) shop.handleShop(player, slotId, 50); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON9_PACKET) shop.handleShop(player, slotId, 500); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON8_PACKET) shop.sendExamine(player, slotId); } else if (componentId == 201) { if (slot == null) return; if (isBuying) shop.buy(player, slot, shop.getAmount()); else { shop.sell(player, slot, shop.getAmount()); player.getPackets().sendConfig(2563, 0); player.getPackets().sendConfig(2565, 1); // this is to update the tab. } } else if (componentId == 208) { shop.setAmount(player, shop.getAmount() + 5); } else if (componentId == 15) { shop.setAmount(player, shop.getAmount() + 1); } else if (componentId == 214) { if (shop.getAmount() > 1) shop.setAmount(player, shop.getAmount() - 1); } else if (componentId == 217) { if (shop.getAmount() > 1) shop.setAmount(player, shop.getAmount() - 5); } else if (componentId == 220) { shop.setAmount(player, 1); } else if (componentId == 211) { if (slot == null) return; shop.setAmount(player, isBuying ? shop.getMainStock()[slot].getAmount() : player.getInventory().getItems().getItems()[slot].getAmount()); } else if (componentId == 29) { player.getPackets().sendConfig(2561, 93); player.getTemporaryAttributtes().remove("shop_buying"); shop.setAmount(player, 1); } else if (componentId == 28) { player.getTemporaryAttributtes().put("shop_buying", true); shop.setAmount(player, 1); } } else if (interfaceId == 1266) { if (componentId == 0) { if (packetId == WorldPacketsDecoder.ACTION_BUTTON9_PACKET) player.getInventory().sendExamine(slotId); else { Shop shop = (Shop) player.getTemporaryAttributtes().get("Shop"); if (shop == null) return; player.getPackets().sendConfig(2563, slotId); if (packetId == WorldPacketsDecoder.ACTION_BUTTON1_PACKET) shop.sendValue(player, slotId); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON2_PACKET) shop.sell(player, slotId, 1); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON3_PACKET) shop.sell(player, slotId, 5); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON4_PACKET) shop.sell(player, slotId, 10); else if (packetId == WorldPacketsDecoder.ACTION_BUTTON5_PACKET) shop.sell(player, slotId, 50); } } } [/code] WorldsPacketDecoder.java Switch item packet [code] if (fromInterfaceId == 1265 && toInterfaceId == 1266 && player.getTemporaryAttributtes().get("shop_buying") != null) { if ((boolean) player.getTemporaryAttributtes().get("shop_buying") == true) { Shop shop = (Shop) player.getTemporaryAttributtes().get("Shop"); if (shop == null) return; shop.buy(player, fromSlot, 1); } } [/code] Rep or Thanks if you're using this.
  18. This is my problem, I buy a korasi for 200m or whichever item from the donator shop with coins. I can then run to pvp shop and sell for pvp tokens 200m of them. I need to make it so you can only sell items which you can buy. Does anyone know how? Thanks <3
  19. Yo, I'm recoding a Matrix 718 server to a Economy PK server but the shop options won't work. I've really tried everything, followed a few tutorials editing the ButtonHandler.java/Shop.java/WorldPacketsDecoder.java but I still can't sell/buy items to/from the shop, I can't even check the price. Anyone got a solution?
  20. I can buy from some Shopkeepers and Shop Assistans and a few other shops but the rest of the shops doesn't work when you want to buy an item.
  21. shop do i change the price in shops?
  22. Nick

    Packing Shops

    I'm trying to add a custom shop, I already have the NPCHandler set up, but when I delete "packedshops", and run the server to get the shops packed, I always get this error and I'm not too sure why. [CODE][Launcher] Loading Progress, please wait... [ShopsHandler] Packing shops... Exception in thread "main" java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(Unknown Source) at java.lang.Integer.parseInt(Unknown Source) at java.lang.Integer.valueOf(Unknown Source) at com.rs.utils.ShopsHandler.loadUnpackedShops(ShopsHandler.java:54) at com.rs.utils.ShopsHandler.init(ShopsHandler.java:26) at com.rs.Initializer.loadFiles(Initializer.java:57) at com.rs.Launcher.main(Launcher.java:42) Press any key to continue . . .[/CODE]
  23. Management: [SPOILER="Management"] [IMG]http://i.imgur.com/k23aQnn.png[/IMG] [IMG]http://i.imgur.com/Dir2trH.png[/IMG] [IMG]http://i.imgur.com/T51mLUP.png[/IMG] [img]http://i.imgur.com/vSp6j9a.png[/img] [IMG]http://i.imgur.com/HIVRAhr.png[/IMG] [/SPOILER] Searching: [SPOILER="Searching"] [IMG]http://i.imgur.com/bFkmHnL.png[/IMG] [IMG]http://i.imgur.com/VO6naca.png[/IMG] [img]http://i.imgur.com/ddBCesh.png[/img] [img]http://i.imgur.com/el18q5w.png[/IMG] [img]http://i.imgur.com/gD01cpB.png[/img] [img]http://i.imgur.com/KFgeGlf.png[/img] [/spoiler]
  24. need help how to spawn npc and spawn shops that iv made
  25. Runewhip

    Adding shops

    I am very new to 719+ coding, I'm working on a 742 server, and the shops are horrible. I went into unpackedshops.java and changed the shop items, compiled, and restarted server & client. It will not update the new items I have put into the unpackedshops.java into the shops. Can anyone help me??
×