Jump to content

jarrodboydtehe

Member
  • Content count

    216
  • Joined

  • Last visited

About jarrodboydtehe

  • Rank
    Mithril Member
  1. how do I make people staff? and what are the ranks??
  2. [quote name='kendal']go to client.java press (ctrl+f) then type in client.java then press (ctrl+f) and type in "server =" with the space. keep goind down you will see different IP's change them all to the IP of your choosing. goodluck -kendal :)[/QUOTE] How do I change the clients background? :O
  3. Does this even work? Because it says model id 6700, and spawn item id is 15442? Won't they need to be the same number?
  4. In order for Auto-Vote Auto-Donating Highscores and what not, You need paid web-hosting that allows sql.
  5. Umm, I'm not going to spoon feed you anymore then I have with the thread, use basic knowledge & look for a normal ::item code. But Because I'm Nice, This code should work. It works for me. [code]if (playerCommand.startsWith("item")) { if (c.inWild()) { c.sendMessage("you can't spawn items in the wilderness!"); return; } try { String[] args = playerCommand.split(" "); if (args.length == 3) { int newItemID = Integer.parseInt(args[1]); int newItemAmount = Integer.parseInt(args[2]); // add restricted items here. int restrictedItems[] = {}; for (int i : restrictedItems) { if (i == newItemID) { if (c.playerRights >3) { c.sendMessage("You cannot spawn this item"); return; } } } if ((newItemID <= 30000) && (newItemID >= 0)) { c.getItems().addItem(newItemID, newItemAmount); } else { c.sendMessage("You can't spawn this item!"); } } else { c.sendMessage("Wrong usage: (Ex:(::item_ID_Amount)(::item 995 1))"); } } catch(Exception e) { } }[/code]
  6. ---please close thread fixed---
  7. Bilderberg is what? never heard of it before.
  8. [url]http://www.youtube.com/watch?v=EIDeXWrfN-0[/url] [url]http://www.youtube.com/watch?v=ShgNn24J6GI[/url] & there's alot more. Theres one importicular that I can't find online, but I seen it yesterday on tv.
  9. jarrodboydtehe

    Illuminati?

    Do you guys beleive in Illuminati?? Honestly I will be completely honest here, my grandfather was a 3mason, So I do beleive in Illuminai, I never knew my grandfather & he never spoke about anything apparently. But if you do beleive in Illuminati please say something, Because this might sound weird but there's so many (illuminati) like ads on the MTV channel, like mtv ema the ad has aliens and it says we're coming soon. & another ad I forget what it's for but it has the illuminati pyramid with the eye in it, on the corner of the screen. Pretty big to.
  10. Alright so in-game my pk-points shop the items in it don't cost anything... How would I fix this?? Here's my shop handler code, I know it's alot but please help. [code]package server.model.shops; import server.Config; import server.Server; import server.model.items.Item; import server.model.players.Client; public class ShopAssistant { private Client c; public ShopAssistant(Client client) { this.c = client; } /** *Shops **/ public void openShop(int ShopID){ c.getItems().resetItems(3823); resetShop(ShopID); c.isShopping = true; c.myShopId = ShopID; c.getPA().sendFrame248(3824, 3822); c.getPA().sendFrame126(Server.shopHandler.ShopName[ShopID], 3901); } public boolean shopSellsItem(int itemID) { for (int i = 0; i < Server.shopHandler.ShopItems.length; i++) { if(itemID == (Server.shopHandler.ShopItems[c.myShopId][i] - 1)) { return true; } } return false; } public void updatePlayerShop() { for (int i = 1; i < Config.MAX_PLAYERS; i++) { if (Server.playerHandler.players[i] != null) { if (Server.playerHandler.players[i].isShopping == true && Server.playerHandler.players[i].myShopId == c.myShopId && i != c.playerId) { Server.playerHandler.players[i].updateShop = true; } } } } public void updateshop(int i){ resetShop(i); } 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); 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(); } } public double getItemShopValue(int ItemID, int Type, int fromSlot) { /*if(c.myShopId == 7390){ return c.myShopClient.playerShopP[fromSlot]; }*/ double ShopValue = 1; double Overstock = 0; double TotPrice = 0; for (int i = 0; i < Config.ITEM_LIMIT; i++) { if (Server.itemHandler.ItemList[i] != null) { if (Server.itemHandler.ItemList[i].itemId == ItemID) { ShopValue = Server.itemHandler.ItemList[i].ShopValue; } } } TotPrice = ShopValue; if (Server.shopHandler.ShopBModifier[c.myShopId] == 1) { TotPrice *= 1; TotPrice *= 1; if (Type == 1) { TotPrice *= 1; } } else if (Type == 1) { TotPrice *= 1; } return TotPrice; } /*public void openPlayerShop(Client o){ if(o == null || o.properLogout) return; c.getItems().resetItems(3823); resetShop(o); c.myShopClient = o; c.myShopId = 7390; c.isShopping = true; c.getPA().sendFrame248(3824, 3822); c.getPA().sendFrame126(o.playerName+"'s Shop!", 3901); } public int[] fixArray(int[] array){ int arrayPos = 0; int[] newArray = new int[array.length]; for(int x = 0; x < array.length; x++){ if(array[x] != 0){ newArray[arrayPos] = array[x]; arrayPos++; } } return newArray; } public void fixShop(Client o){ o.playerShop = fixArray(o.playerShop); o.playerShopN = fixArray(o.playerShopN); o.playerShopP = fixArray(o.playerShopP); } public void resetShop(Client o) { synchronized(c) { fixShop(o); for (int x = 0; x < 10; x++) { if (o.playerShopN[x] <= 0) { o.playerShop[x] = 0; } } int TotalItems = 0; for (int i = 0; i < 10; i++) { if (o.playerShop[i] > 0) { TotalItems++; } } if (TotalItems > 10) { TotalItems = 10; } c.getOutStream().createFrameVarSizeWord(53); c.getOutStream().writeWord(3900); c.getOutStream().writeWord(TotalItems); int TotalCount = 0; for (int i = 0; i < o.playerShop.length; i++) { if (o.playerShop[i] > 0) { if (o.playerShopN[i] > 254) { c.getOutStream().writeByte(255); c.getOutStream().writeDWord_v2(o.playerShopN[i]); } else { c.getOutStream().writeByte(o.playerShopN[i]); } c.getOutStream().writeWordBigEndianA((o.playerShop[i]+1)); TotalCount++; } if (TotalCount > TotalItems) { break; } } c.getOutStream().endFrameVarSizeWord(); c.flushOutStream(); } }*/ public int getItemShopValue(int itemId) { for (int i = 0; i < Config.ITEM_LIMIT; i++) { if (Server.itemHandler.ItemList[i] != null) { if (Server.itemHandler.ItemList[i].itemId == itemId) { return (int)Server.itemHandler.ItemList[i].ShopValue; } } } return 0; } /** *buy item from shop (Shop Price) **/ public void buyFromShopPrice(int removeId, int removeSlot) { int ShopValue = (int)Math.floor(getItemShopValue(removeId, 0, removeSlot)); ShopValue *= 1; String ShopAdd = ""; if (c.myShopId == 18) { c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getMageItemValue(removeId) + "</col> PC Points."); return; } if (c.myShopId == 73) { c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSpecialItemValue(removeId) + "</col> KronikX Points."); return; } if (c.myShopId == 74) { c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSpecialItemValue(removeId) + "</col> KronikX Points."); return; } if (c.myShopId == 15) { c.sM("This item current costs " + c.getItems().getUntradePrice(removeId) + "</col> coins."); return; } if (c.myShopId == 48) { c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSlayerItemValue(removeId) + "</col> SlayerPoints."); return; } if (c.myShopId == 84) { c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSpecialItemValue(removeId) + "</col> Dungeoneering Points."); return; } if (c.myShopId == 85) { c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> " + getSpecialItemValue(removeId) + "</col> Dungeoneering Points."); return; } if (c.myShopId == 26) { c.sM(c.getItems().getItemName(removeId)+": currently costs: <col=255> " + getDonatorItemValue(removeId) + "</col> Donator Points"); return; } if (c.myShopId == 27) { c.sM(c.getItems().getItemName(removeId)+": currently costs: <col=255> " + getVoteItemValue(removeId) + "</col> Vote Points"); return; } if (c.myShopId == 28 || c.myShopId == 29) { c.sM(c.getItems().getItemName(removeId)+": currently costs: <col=255> " + getPkItemValue(removeId) + "</col> Pking Points"); return; } if (c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) { c.sM(c.getItems().getItemName(removeId)+": currently costs <col=255>" + getTokkulItemValue(removeId) + "</col> Tokkuls."); return; } if (ShopValue >= 1000 && ShopValue < 1000000) { ShopAdd = " (" + (ShopValue / 1000) + "k)"; } else if (ShopValue >= 1000000 && ShopValue < 1000000000) { ShopAdd = " (" + (ShopValue / 1000000) + " million)"; } else if (ShopValue >= 1000000000) { ShopAdd = " (" + (ShopValue / 1000000000) + " billion)"; } c.sM(c.getItems().getItemName(removeId)+" currently costs: <col=255> "+ShopValue+"</col> coins"+ShopAdd); } /* *Donator points handler by Remco: *------------------------------------- *case = itemId, return = donatorPoints. */ public int getDonatorItemValue(int id) { switch (id) { //Please keep this clean as possible example: case 15273: return 1; case 8844: return 20; case 8845: return 30; case 8846: return 40; case 8847: return 50; case 8848: return 60; case 8849: return 70; case 8850: return 80; case 15441: case 15442: case 15443: case 15444: case 20072: case 6199: return 100; } return 0; } /* *Pk points handler -Remco */ public int getPkItemValue(int id) { switch (id) { case 6199: return 15; case 4151: return 1500000; } return 0; } /* *Mage points handler -Remco */ public int getMageItemValue(int id) { switch (id) { case 6920: case 6922: case 6924: return 50; case 6889: return 150; case 6914: return 180; } return 0; } /* *Pk points handler -Remco */ public int getTokkulItemValue(int id) { switch (id) { //Start Weapon Shop case 6568: return 90000; case 6524: return 67500; case 6528: return 75000; case 6527: return 45000; case 6523: return 60000; case 6525: return 37500; case 6526: return 52500; case 6522: return 180; //Start Gem Shop case 1623: return 1000; case 1621: return 2000; case 1619: return 3000; case 1617: return 4000; case 1631: return 10000; case 6571: return 2000000; case 9194: return 800; } return 0; } /* *Vote points handler -Remco */ public int getVoteItemValue(int id) { switch (id) { case 6199: return 15; } return 0; } /* *Slayer points handler -Remco */ public int getSlayerItemValue(int id) { switch (id) { case 15243: return 1; case 11694: case 15241: case 15242: return 350; case 13263: return 400; case 15497: return 450; } return 0; } public int getSpecialItemValue(int id) { switch (id) { case 13883: case 13879: case 8845: return 5; case 2570: case 8846: case 15272: return 10; case 8847: case 6585: return 15; case 10499: case 8848: return 20; case 8849: case 8850: case 15328: return 25; case 11663: case 11664: case 11665: case 15332: case 8842: return 30; case 6570: case 7453: case 7454: case 7455: case 7456: case 7457: case 7458: case 7459: case 7460: case 7461: case 7462: return 35; case 8839: case 8840: return 40; case 10551: case 10531: case 10533: case 10534: case 12435: case 12434: case 14499: case 6916: case 6918: return 50; case 2581: case 10696: return 60; case 15610: case 15612: case 15616: case 15618: return 100; case 11728: return 120; case 13263: return 125; case 19785: case 19786: case 4151: return 150; case 11235: return 175; case 14641: case 14642: case 11696: return 200; case 11700: case 12675: case 12681: case 12679: case 14637: case 12677: case 12667: case 15608: case 15614: case 15620: case 19272: case 19275: case 19278: case 19281: case 19284: case 19287: case 19290: case 19293: case 19296: case 19299: case 19302: case 19305: case 13107: case 13109: case 13111: case 13113: case 13115: case 13860: case 13863: case 13866: case 13872: case 13875: case 13878: case 13877: case 13898: case 13897: case 13886: case 13892: case 13889: case 13895: case 13907: case 13869: case 13902: case 13905: case 13899: return 250; case 15441: case 15442: case 15443: case 15444: return 275; case 15051: return 300; case 11694: case 13904: case 13901: return 350; case 13870: case 13876: case 13858: case 13861: case 13864: case 13884: case 13890: case 13896: case 13887: case 13893: return 375; case 11730: return 450; case 11698: return 500; case 15602: return 600; case 15600: case 15604: return 700; case 15241: return 750; case 16951: return 1800; case 16955: return 2850; case 16953: return 2450; case 16403: return 2650; case 16401: return 2450; case 16399: return 2100; case 16909: return 2900; case 16907: return 2650; case 18335: return 1550; case 16711: case 17259: case 16667: return 3000; case 16709: case 17257: case 16665: return 2650; case 16707: case 17255: case 16663: return 2300; case 17361: return 2550; case 17359: return 2300; case 16905: case 17357: return 2450; case 16755: case 16865: case 17237: return 2550; case 17061: case 17193: case 17339: return 2400; case 15039: case 18349: case 18351: case 18353: case 18355: case 18357: return 2500; } return 0; } /* *Sell item to shop (Shop Price) */ public void sellToShopPrice(int removeId, int removeSlot) { for (int i : Config.ITEM_SELLABLE) { if (i == removeId) { c.sM("You can't sell "+c.getItems().getItemName(removeId).toLowerCase()+"."); return; } } boolean IsIn = false; if (Server.shopHandler.ShopSModifier[c.myShopId] > 1) { for (int j = 0; j <= Server.shopHandler.ShopItemsStandard[c.myShopId]; j++) { if (removeId == (Server.shopHandler.ShopItems[c.myShopId][j] - 1)) { IsIn = true; break; } } } else { IsIn = true; } if (IsIn == false) { c.sM("You can't sell "+c.getItems().getItemName(removeId).toLowerCase()+" to this store."); } else { int ShopValue = (int)Math.floor(getItemShopValue(removeId, 1, removeSlot)); String ShopAdd = ""; if (ShopValue >= 1000 && ShopValue < 1000000) { ShopAdd = " (" + (ShopValue*.75 / 1000) + "k)"; } else if (ShopValue >= 1000000) { ShopAdd = " (" + (ShopValue*.75 / 1000000) + " million)"; } else if (ShopValue >= 1000000000) { ShopAdd = " (" + (ShopValue*.75 / 1000000000) + " billion)"; } c.sM(c.getItems().getItemName(removeId)+": shop will buy for <col=255>"+ShopValue+"</col> coins"+ShopAdd); } } public boolean sellItem(int itemID, int fromSlot, int amount) { if (c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) { c.sM("You can't sell "+c.getItems().getItemName(itemID).toLowerCase()+" to this store."); return false; } if(c.inTrade) { c.sM("You cant sell items to the shop while your in trade!"); return false; } if (c.myShopId == 14) return false; for (int i : Config.ITEM_SELLABLE) { if (i == itemID) { c.sM("You can't sell "+c.getItems().getItemName(itemID).toLowerCase()+"."); return false; } } if (amount > 0 && itemID == (c.playerItems[fromSlot] - 1)) { if (Server.shopHandler.ShopSModifier[c.myShopId] > 1) { boolean IsIn = false; for (int i = 0; i <= Server.shopHandler.ShopItemsStandard[c.myShopId]; i++) { if (itemID == (Server.shopHandler.ShopItems[c.myShopId][i] - 1)) { IsIn = true; break; } } if (IsIn == false) { c.sM("You can't sell "+c.getItems().getItemName(itemID).toLowerCase()+" to this store."); return false; } } if (amount > c.playerItemsN[fromSlot] && (Item.itemIsNote[(c.playerItems[fromSlot] - 1)] == true || Item.itemStackable[(c.playerItems[fromSlot] - 1)] == true)) { amount = c.playerItemsN[fromSlot]; } else if (amount > c.getItems().getItemAmount(itemID) && Item.itemIsNote[(c.playerItems[fromSlot] - 1)] == false && Item.itemStackable[(c.playerItems[fromSlot] - 1)] == false) { amount = c.getItems().getItemAmount(itemID); } //double ShopValue; //double TotPrice; //int Overstock; int TotPrice2 = 0; for (int i = amount; i > 0; i--) { TotPrice2 = (int)(Math.floor(getItemShopValue(itemID, 1, fromSlot))*.75); if (c.getItems().freeSlots() > 0 || c.getItems().playerHasItem(995)) { if (Item.itemIsNote[itemID] == false) { c.getItems().deleteItem(itemID, c.getItems().getItemSlot(itemID), 1); } else { c.getItems().deleteItem(itemID, fromSlot, 1); } c.getItems().addItem(995, TotPrice2); addShopItem(itemID, 1); } else { c.sM("You don't have enough space in your inventory."); break; } } c.getItems().resetItems(3823); resetShop(c.myShopId); updatePlayerShop(); return true; } return true; } public boolean addShopItem(int itemID, int amount) { boolean Added = false; if (amount <= 0) { return false; } if (Item.itemIsNote[itemID] == true) { itemID = c.getItems().getUnnotedItem(itemID); } for (int i = 0; i < Server.shopHandler.ShopItems.length; i++) { if ((Server.shopHandler.ShopItems[c.myShopId][i] - 1) == itemID) { Server.shopHandler.ShopItemsN[c.myShopId][i] += amount; Added = true; } } if (Added == false) { for (int i = 0; i < Server.shopHandler.ShopItems.length; i++) { if (Server.shopHandler.ShopItems[c.myShopId][i] == 0) { Server.shopHandler.ShopItems[c.myShopId][i] = (itemID + 1); Server.shopHandler.ShopItemsN[c.myShopId][i] = amount; Server.shopHandler.ShopItemsDelay[c.myShopId][i] = 0; break; } } } return true; } public long buyDelay; public boolean buyItem(int itemID, int fromSlot, int amount) { if(System.currentTimeMillis() - buyDelay < 900) {//Change the buy Delay here - Standard is: 1500 return false; } if (c.myShopId == 14) { skillBuy(itemID); return false; } else if (c.myShopId == 15) { buyVoid(itemID); return false; } else if (c.myShopId == 1) { buyVoid(itemID); return false; } if(itemID != itemID) { c.sM("Don't dupe or you will be IP Banned"); return false; } if(!shopSellsItem(itemID)) return false; if (amount > 0) { if (amount > Server.shopHandler.ShopItemsN[c.myShopId][fromSlot]) { amount = Server.shopHandler.ShopItemsN[c.myShopId][fromSlot]; } //double ShopValue; //double TotPrice; //int Overstock; int TotPrice2 = 0; int Slot = 0; int Slot1 = 0;//Tokkul int Slot2 = 0;//Pking Points int Slot3 = 0;//Donator Gold if (c.myShopId == 18) { handleOtherShop(itemID); return false; } if (c.myShopId == 73) { handleOtherShop(itemID); return false; } if (c.myShopId == 74) { handleOtherShop(itemID); return false; } if (c.myShopId == 48) { handleOtherShop(itemID); return false; } if (c.myShopId == 84) { handleOtherShop(itemID); return false; } if (c.myShopId == 85) { handleOtherShop(itemID); return false; } if (c.myShopId == 26) { handleOtherShop(itemID); return false; } if (c.myShopId == 27) { handleOtherShop(itemID); return false; } if (c.myShopId == 28 || c.myShopId == 29) { handleOtherShop(itemID); return false; } if (c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32){ handleOtherShop(itemID); return false; } for (int i = amount; i > 0; i--) { TotPrice2 = (int)Math.floor(getItemShopValue(itemID, 0, fromSlot)); Slot = c.getItems().getItemSlot(995); Slot1 = c.getItems().getItemSlot(6529); Slot3 = c.getItems().getItemSlot(5555); if (Slot == -1 && c.myShopId != 11 && c.myShopId != 29 && c.myShopId != 30 && c.myShopId != 31 && c.myShopId != 47) { c.sM("You don't have enough coins."); break; } if(Slot1 == -1 && c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) { c.sM("You don't have enough tokkul."); break; } if(Slot3 == -1 && c.myShopId == 11) { c.sM("You don't have enough donator gold."); break; } if(TotPrice2 <= 1) { TotPrice2 = (int)Math.floor(getItemShopValue(itemID, 0, fromSlot)); TotPrice2 *= 1.66; } if(c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) { if (c.playerItemsN[Slot1] >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.getItems().deleteItem(6529, c.getItems().getItemSlot(6529), TotPrice2); c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough tokkul."); break; } } else if(c.myShopId == 47) { if (c.pkPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.pkPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough KronikX Points."); break; } } else if(c.myShopId == 48) { if (c.SPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.SPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Slayer Points."); break; } } else if(c.myShopId == 84) { if (c.dungPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.dungPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Dungeoneering Points."); break; } } else if(c.myShopId == 85) { if (c.dungPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.dungPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Dungeoneering Points."); break; } } else if(c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) { if (c.getItems().playerHasItem(6529, TotPrice2)) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.getItems().deleteItem(6529, TotPrice2); c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Tokkuls."); break; } } else if(c.myShopId == 26) { if (c.donatorPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.donatorPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Donator Points."); break; } } else if(c.myShopId == 27) { if (c.votePoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.votePoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Voting Points."); break; } } else if(c.myShopId == 28 || c.myShopId == 29) { if (c.pkPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.pkPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Voting Points."); break; } } else if(c.myShopId == 18) { if (c.pcPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.pcPoints -= TotPrice2; c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough Pest Points."); break; } } else if(c.myShopId == 11) { if (c.playerItemsN[Slot3] >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.getItems().deleteItem(5555, c.getItems().getItemSlot(5555), TotPrice2); c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough donator gold."); break; } } else if(c.myShopId != 11 && c.myShopId != 29 || c.myShopId != 30 || c.myShopId != 31 || c.myShopId != 47) { if (c.playerItemsN[Slot] >= TotPrice2) { if (c.getItems().freeSlots() > 0) { buyDelay = System.currentTimeMillis(); c.getItems().deleteItem(995, c.getItems().getItemSlot(995), TotPrice2); c.getItems().addItem(itemID, 1); Server.shopHandler.ShopItemsN[c.myShopId][fromSlot] -= 1; Server.shopHandler.ShopItemsDelay[c.myShopId][fromSlot] = 0; if ((fromSlot + 1) > Server.shopHandler.ShopItemsStandard[c.myShopId]) { Server.shopHandler.ShopItems[c.myShopId][fromSlot] = 0; } } else { c.sM("You don't have enough space in your inventory."); break; } } else { c.sM("You don't have enough coins."); break; } } } c.getItems().resetItems(3823); resetShop(c.myShopId); updatePlayerShop(); return true; } return false; } public void handleOtherShop(int itemID) { if (c.myShopId == 17) { if (c.magePoints >= getSpecialItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.magePoints -= getSpecialItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sM("You do not have enough points to buy this item."); } } else if (c.myShopId == 18) { if (c.pcPoints >= getMageItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.pcPoints -= getMageItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sM("You do not have enough points to buy this item."); } } if (c.myShopId == 73 || c.myShopId == 74 || c.myShopId == 28 || c.myShopId == 29) { if (c.pkPoints >= getSpecialItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.pkPoints -= getPkItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sM("You do not have enough KronikX points to buy this item."); } } if (c.myShopId == 48) { if (c.SPoints >= getSlayerItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.SPoints -= getSlayerItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sM("You do not have enough Slayer Points to buy this item."); } } if (c.myShopId == 84 || c.myShopId == 85) { if (c.dungPoints >= getSpecialItemValue(itemID)) { if (c.getItems().freeSlots() > 0){ c.dungPoints -= getSpecialItemValue(itemID); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sM("You do not have enough Dungeoneering Points to buy this item."); } } if (c.myShopId == 30 || c.myShopId == 31 || c.myShopId == 32) { if (c.getItems().playerHasItem(6529, getTokkulItemValue(itemID))) { if (c.getItems().freeSlots() > 0){ c.getItems().deleteItem(6529, getTokkulItemValue(itemID)); c.getItems().addItem(itemID,1); c.getItems().resetItems(3823); } } else { c.sM("You do not have enough Tokkuls to buy this item."); } } } public void openSkillCape() { int capes = get99Count(); if (capes > 1) capes = 1; else capes = 0; c.myShopId = 14; setupSkillCapes(capes, get99Count()); } /*public int[][] skillCapes = {{0,9747,4319,2679},{1,2683,4329,2685},{2,2680,4359,2682},{3,2701,4341,2703},{4,2686,4351,2688},{5,2689,4347,2691},{6,2692,4343,2691}, {7,2737,4325,2733},{8,2734,4353,2736},{9,2716,4337,2718},{10,2728,4335,2730},{11,2695,4321,2697},{12,2713,4327,2715},{13,2725,4357,2727}, {14,2722,4345,2724},{15,2707,4339,2709},{16,2704,4317,2706},{17,2710,4361,2712},{18,2719,4355,2721},{19,2737,4331,2739},{20,2698,4333,2700}};*/ public int[] skillCapes = {9747,9753,9750,9768,9756,9759,9762,9801,9807,9783,9798,9804,9780,9795,9792,9774,9771,9777,9786,9810,9765,9948,12169,18509}; public int get99Count() { int count = 0; for (int j = 0; j < c.playerLevel.length; j++) { if (c.getLevelForXP(c.playerXP[j]) >= 99) { count++; } } return count; } public void setupSkillCapes(int capes, int capes2) { synchronized(c) { c.getItems().resetItems(3823); c.isShopping = true; c.myShopId = 14; c.getPA().sendFrame248(3824, 3822); c.getPA().sendFrame126("Skillcape Shop", 3901); int TotalItems = 0; TotalItems = capes2; 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 < 22; i++) { if (c.getLevelForXP(c.playerXP[i]) < 99) continue; c.getOutStream().writeByte(1); c.getOutStream().writeWordBigEndianA(skillCapes[i] + 2); TotalCount++; } c.getOutStream().endFrameVarSizeWord(); c.flushOutStream(); } } public void skillBuy(int item) { int nn = get99Count(); if (nn > 1) nn = 1; else nn = 0; for (int j = 0; j < skillCapes.length; j++) { if (skillCapes[j] == item || skillCapes[j]+1 == item) { if (c.getItems().freeSlots() > 1) { if (c.getItems().playerHasItem(995,99000)) { if (c.getLevelForXP(c.playerXP[j]) >= 99) { c.getItems().deleteItem(995, c.getItems().getItemSlot(995), 99000); c.getItems().addItem(skillCapes[j] + nn,1); c.getItems().addItem(skillCapes[j] + 2,1); } else { c.sM("You must have 99 in the skill of the cape you're trying to buy."); } } else { c.sM("You need 99k to buy this item."); } } else { c.sM("You must have at least 1 inventory spaces to buy this item."); } } /*if (skillCapes[j][1 + nn] == item) { if (c.getItems().freeSlots() >= 1) { if (c.getItems().playerHasItem(995,99000)) { if (c.getLevelForXP(c.playerXP[j]) >= 99) { c.getItems().deleteItem(995, c.getItems().getItemSlot(995), 99000); c.getItems().addItem(skillCapes[j] + nn,1); c.getItems().addItem(skillCapes[j] + 2,1); } else { c.sM("You must have 99 in the skill of the cape you're trying to buy."); } } else { c.sM("You need 99k to buy this item."); } } else { c.sM("You must have at least 1 inventory spaces to buy this item."); } break; }*/ } c.getItems().resetItems(3823); } public void openVoid() { /*synchronized(c) { c.getItems().resetItems(3823); c.isShopping = true; c.myShopId = 15; c.getPA().sendFrame248(3824, 3822); c.getPA().sendFrame126("Void Recovery", 3901); int TotalItems = 5; c.getOutStream().createFrameVarSizeWord(53); c.getOutStream().writeWord(3900); c.getOutStream().writeWord(TotalItems); for (int i = 0; i < c.voidStatus.length; i++) { c.getOutStream().writeByte(c.voidStatus[i]); c.getOutStream().writeWordBigEndianA(2519 + i * 2); } c.getOutStream().endFrameVarSizeWord(); c.flushOutStream(); }*/ } public void buyVoid(int item) { /*if (item > 2527 || item < 2518) return; //c.sM("" + item); if (c.voidStatus[(item-2518)/2] > 0) { if (c.getItems().freeSlots() >= 1) { if (c.getItems().playerHasItem(995,c.getItems().getUntradePrice(item))) { c.voidStatus[(item-2518)/2]--; c.getItems().deleteItem(995,c.getItems().getItemSlot(995), c.getItems().getUntradePrice(item)); c.getItems().addItem(item,1); openVoid(); } else { c.sM("This item costs " + c.getItems().getUntradePrice(item) + " coins to rebuy."); } } else { c.sM("I should have a free inventory space."); } } else { c.sM("I don't need to recover this item from the void knights."); }*/ } } [/code]
  11. what spawn files do i need to post?
×