Thread: adding a shop that needs a item to buy like tookkkul

Results 1 to 4 of 4
  1. #1 adding a shop that needs a item to buy like tookkkul 
    Donator

    Join Date
    Jun 2010
    Posts
    670
    Thanks given
    89
    Thanks received
    26
    Rep Power
    54
    Hey,

    I want to add a shop that needs a different item to buy it but it doesnt work for me... Can anyone help me? I will rep++ =D
    Reply With Quote  
     

  2. #2  
    Donator
    Tanker's Avatar
    Join Date
    Mar 2008
    Posts
    177
    Thanks given
    26
    Thanks received
    7
    Rep Power
    40
    Just simply change the item ID
    Code:
    			for (int i = amount; i > 0; i--) {
    				TotPrice2 = (int)Math.floor(getItemShopValue(itemID, 1, fromSlot));
    				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);
    so just change this
    Code:
    c.getItems().playerHasItem(995))
    to Item you wish to use as currency

    EDIT: this is in the ShopAssistant.java
    Reply With Quote  
     

  3. #3  
    Extreme Donator

    Jilic-Matt's Avatar
    Join Date
    May 2011
    Age
    29
    Posts
    1,612
    Thanks given
    799
    Thanks received
    494
    Rep Power
    540
    http://www.rune-server.org/runescape...m-dice-pi.html cud use tht just switch up the item ids and name of method

    e.g from "buyingDice" to "buyingTokkul" in the public void and c.getPa()
    Reply With Quote  
     

  4. #4  
    Donator

    Join Date
    Jun 2010
    Posts
    670
    Thanks given
    89
    Thanks received
    26
    Rep Power
    54
    I did this:

    else if(c.myShopId == 61) {
    if (c.playerItemsN[Slot4] >= TotPrice2) {
    if (c.getItems().freeSlots() > 0) {
    buyDelay = System.currentTimeMillis();
    c.getItems().deleteItem(7774, c.getItems().getItemSlot(7774), 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.sendMessage("You don't have enough space in your inventory.");
    break;
    }
    } else {
    c.sendMessage("You don't have enough donator Token");
    break;
    }
    }
    for slot4 i did:

    Slot4 = c.getItems().getItemSlot(7774);

    and I did this:

    if(Slot4 == -1 && c.myShopId == 61) {
    c.sendMessage("You don't have enough Donator Tokens.");
    break;
    }
    but it doesn't work anyway when I want to buy something it doesnt work...
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Shop Item Value DC[508]
    By kurt777 in forum Help
    Replies: 3
    Last Post: 07-08-2009, 04:18 PM
  2. Replies: 10
    Last Post: 11-13-2008, 08:56 AM
  3. Replies: 7
    Last Post: 08-21-2008, 03:46 PM
  4. adding shop and item into the shop
    By junkiedk in forum Help
    Replies: 8
    Last Post: 08-12-2008, 11:57 AM
  5. Replies: 7
    Last Post: 06-16-2008, 12:35 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •