Jump to content

chris2244

Member
  • Content count

    87
  • Joined

  • Last visited

  1. Question, are you using 317?
  2. Fixed thanks for trying to help. =p
  3. I will be doing this soon sorry I was asleep add me on skype =p if you want rs2skiller is my skype name.
  4. here is my ShopHandler.java It was not in there. [CODE]package server.world; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import server.Config; import server.Server; import server.util.Misc; /** * Shops **/ public class ShopHandler { public static int MaxShops = 101; public static int MaxShopItems = 101; public static int MaxInShopItems = 20; public static int MaxShowDelay = 10; public static int MaxSpecShowDelay = 60; public static int TotalShops = 0; public static int[][] ShopItems = new int[MaxShops][MaxShopItems]; public static int[][] ShopItemsN = new int[MaxShops][MaxShopItems]; public static int[][] ShopItemsDelay = new int[MaxShops][MaxShopItems]; public static int[][] ShopItemsSN = new int[MaxShops][MaxShopItems]; public static int[] ShopItemsStandard = new int[MaxShops]; public static String[] ShopName = new String[MaxShops]; public static int[] ShopSModifier = new int[MaxShops]; public static int[] ShopBModifier = new int[MaxShops]; public ShopHandler() { for(int i = 0; i < MaxShops; i++) { for(int j = 0; j < MaxShopItems; j++) { ResetItem(i, j); ShopItemsSN[i][j] = 0; } ShopItemsStandard[i] = 0; ShopSModifier[i] = 0; ShopBModifier[i] = 0; ShopName[i] = ""; } TotalShops = 0; loadShops("shops.cfg"); } public static void shophandler() { Misc.println("Shop Handler class successfully loaded"); } public void process() { boolean DidUpdate = false; for(int i = 1; i <= TotalShops; i++) { for(int j = 0; j < MaxShopItems; j++) { if (ShopItems[i][j] > 0) { if (ShopItemsDelay[i][j] >= MaxShowDelay) { if (j <= ShopItemsStandard[i] && ShopItemsN[i][j] <= ShopItemsSN[i][j]) { if (ShopItemsN[i][j] < ShopItemsSN[i][j]) { ShopItemsN[i][j] += 1; DidUpdate = true; ShopItemsDelay[i][j] = 1; ShopItemsDelay[i][j] = 0; DidUpdate = true; } } else if (ShopItemsDelay[i][j] >= MaxSpecShowDelay) { DiscountItem(i, j); ShopItemsDelay[i][j] = 0; DidUpdate = true; } } ShopItemsDelay[i][j]++; } } if (DidUpdate == true) { for (int k = 1; k < Config.MAX_PLAYERS; k++) { if (Server.playerHandler.players[k] != null) { if (Server.playerHandler.players[k].isShopping == true && Server.playerHandler.players[k].myShopId == i) { Server.playerHandler.players[k].updateShop = true; DidUpdate =false; Server.playerHandler.players[k].updateshop(i); } } } DidUpdate = false; } } } public void DiscountItem(int ShopID, int ArrayID) { ShopItemsN[ShopID][ArrayID] -= 1; if (ShopItemsN[ShopID][ArrayID] <= 0) { ShopItemsN[ShopID][ArrayID] = 0; ResetItem(ShopID, ArrayID); } } public void ResetItem(int ShopID, int ArrayID) { ShopItems[ShopID][ArrayID] = 0; ShopItemsN[ShopID][ArrayID] = 0; ShopItemsDelay[ShopID][ArrayID] = 0; } public boolean loadShops(String FileName) { String line = ""; String token = ""; String token2 = ""; String token2_2 = ""; String[] token3 = new String[(MaxShopItems * 2)]; boolean EndOfFile = false; int ReadMode = 0; BufferedReader characterfile = null; try { characterfile = new BufferedReader(new FileReader("./Data/CFG/"+FileName)); } catch(FileNotFoundException fileex) { Misc.println(FileName+": file not found."); return false; } try { line = characterfile.readLine(); } catch(IOException ioexception) { Misc.println(FileName+": error loading file."); return false; } while(EndOfFile == false && line != null) { line = line.trim(); int spot = line.indexOf("="); if (spot > -1) { token = line.substring(0, spot); token = token.trim(); token2 = line.substring(spot + 1); token2 = token2.trim(); token2_2 = token2.replaceAll("\t\t", "\t"); token2_2 = token2_2.replaceAll("\t\t", "\t"); token2_2 = token2_2.replaceAll("\t\t", "\t"); token2_2 = token2_2.replaceAll("\t\t", "\t"); token2_2 = token2_2.replaceAll("\t\t", "\t"); token3 = token2_2.split("\t"); if (token.equals("shop")) { int ShopID = Integer.parseInt(token3[0]); ShopName[ShopID] = token3[1].replaceAll("_", " "); ShopSModifier[ShopID] = Integer.parseInt(token3[2]); ShopBModifier[ShopID] = Integer.parseInt(token3[3]); for (int i = 0; i < ((token3.length - 4) / 2); i++) { if (token3[(4 + (i * 2))] != null) { ShopItems[ShopID][i] = (Integer.parseInt(token3[(4 + (i * 2))]) + 1); ShopItemsN[ShopID][i] = Integer.parseInt(token3[(5 + (i * 2))]); ShopItemsSN[ShopID][i] = Integer.parseInt(token3[(5 + (i * 2))]); ShopItemsStandard[ShopID]++; } else { break; } } TotalShops++; } } else { if (line.equals("[ENDOFSHOPLIST]")) { try { characterfile.close(); } catch(IOException ioexception) { } return true; } } try { line = characterfile.readLine(); } catch(IOException ioexception1) { EndOfFile = true; } } try { characterfile.close(); } catch(IOException ioexception) { } return false; } } [/CODE]
  5. Buying 5, 10, or 100 it only gives me 1 item when I try all how do I fix this or where do I look. I tried almost everything.
  6. I looked in bank5 and bank10 but nothing seems to fix it. (Bump)
  7. I am coming here cause I can't for the life of me find where I can change the buy 1 buy 5 buy 10 buy 100 when I click and buy they always buy one where do I look into changing this? Also I need to know where to look to make wild areas safe like varrock lumby falador and other places like that thanks for helping.
  8. I have tried this both.
  9. I tried this and it did not work I got the one fixed now i am having another problem I will try to fix it to. any ideas?
  10. I have tried this and it did not work for some reason.
  11. I have gotten two errors adding a control panel, if you could tell me what I did wrong it would help me thanks. Thanks for help in advance... [URL=http://imageshack.us/photo/my-images/827/14592635.png/][IMG]http://img827.imageshack.us/img827/1885/14592635.png[/IMG][/URL]
  12. thanks guys sorry i was gone so long i might make money and try to make them better (=
  13. Photoshop cs5 and thanks for the concern
  14. Nice, Keep it up everyone.
×