Thread: Help with shop prices

Results 1 to 8 of 8
  1. #1 Help with shop prices 
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    Can someone tell me how to change shop (GP prices)? or pk point shop (pk point price) etc..?

    Using OverloadX souce..
    I cant seem to find how to change them.. its confusing system of price change i think which i coded..

    help anyone?
    Reply With Quote  
     

  2. #2  
    Donator Help with shop prices Market Banned



    Join Date
    Apr 2008
    Age
    32
    Posts
    966
    Thanks given
    210
    Thanks received
    152
    Rep Power
    203
    ShopAssistant.java
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    This is a part of the shit which is in shopassistant.java
    thats why i cant understand how to work out to change prices




    public void buyFromShopPrice(int removeId, int removeSlot){
    int ShopValue = (int)Math.floor(getItemShopValue(removeId, 0, removeSlot));
    ShopValue *= 1.15;
    String ShopAdd = "";
    if (c.myShopId >= 17 && c.myShopId <= 18 || c.myShopId == 29) {
    c.sendMessage(c.getItems().getItemName(removeId)+" : currently costs " + getSpecialItemValue(removeId) + " points.");
    return;
    }
    if (c.myShopId == 15) {
    c.sendMessage("This item current costs " + c.getItems().getUntradePrice(removeId) + " coins.");
    return;
    }
    if (ShopValue >= 1000 && ShopValue < 1000000) {
    ShopAdd = " (" + (ShopValue / 1000) + "K)";
    } else if (ShopValue >= 1000000) {
    ShopAdd = " (" + (ShopValue / 1000000) + " million)";
    }
    c.sendMessage(c.getItems().getItemName(removeId)+" : currently costs "+ShopValue+" coins"+ShopAdd);
    }

    public int getSpecialItemValue(int id) {
    switch (id) {
    case 6914:
    case 6889:
    return 50;
    case 4447:
    return 15;
    case 4675:
    return 50;
    case 11664:
    return 20;
    case 11663:
    return 20;
    case 11665:
    return 20;
    case 10548:
    return 20;
    case 8842:
    return 20;
    case 10887:
    return 80;
    case 15313:
    return 500;
    case 8840:
    case 8839:
    return 40;
    case 6570:
    return 60;
    case 11694:
    return 200;
    case 14484:
    return 500;
    case 11696:
    return 170;
    case 11698:
    return 150;
    case 11700:
    return 150;
    case 11730:
    return 100;
    case 15001:
    return 160;
    case 6920:
    return 150;
    case 2412:
    case 2413:
    case 2414:
    return 50;
    case 2415:
    case 2416:
    case 2417:
    return 100;
    case 11720:
    return 80;
    case 11722:
    return 60;
    case 11718:
    return 40;
    case 11726:
    return 80;
    case 11724:
    case 13858:
    case 13861:
    case 13864:
    return 100;
    case 13899:
    return 200;
    case 13902:
    return 160;
    case 13738:
    return 240;
    case 13740:
    case 13742:
    return 220;
    case 13744:
    return 180;
    case 11283:
    return 120;
    case 15018:
    case 15019:
    case 15020:
    return 40;
    case 15220:
    return 80;
    case 13736:
    return 80;
    case 13734:
    return 60;
    case 10551:
    return 40;
    case 2528:
    return 15;
    }
    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.sendMessage("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.sendMessage("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 / 1000) + "K)";
    } else if (ShopValue >= 1000000) {
    ShopAdd = " (" + (ShopValue / 1000000) + " million)";
    }
    c.sendMessage(c.getItems().getItemName(removeId)+" : shop will buy for "+ShopValue+" coins"+ShopAdd);
    }
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    bump
    Reply With Quote  
     

  5. #5  
    Banned Help with shop prices Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    iirc it grabs the price from the item database (usually item.cfg in winterlove based servers)
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    Quote Originally Posted by lare96 View Post
    iirc it grabs the price from the item database (usually item.cfg in winterlove based servers)
    thank you that helped but i still need to know how to change pk point shop prices in pk points
    Reply With Quote  
     

  7. #7  
    Trill

    Join Date
    Dec 2013
    Posts
    107
    Thanks given
    38
    Thanks received
    30
    Rep Power
    28
    Shopassistant.java
    example: case 15020:
    return 40;

    the return # is the value of it. Aka 40 pkp points,
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    Feb 2014
    Posts
    348
    Thanks given
    18
    Thanks received
    17
    Rep Power
    0
    Quote Originally Posted by A7x- View Post
    Shopassistant.java
    example: case 15020:
    return 40;

    the return # is the value of it. Aka 40 pkp points,
    cheers mate
    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. I Need Help With Shop Prices
    By Judgement742 in forum Help
    Replies: 4
    Last Post: 04-12-2013, 12:39 PM
  2. Help With Shop Prices Please!
    By NathDzn in forum Help
    Replies: 3
    Last Post: 04-10-2013, 03:46 PM
  3. Help with shop prices
    By terrel8125 in forum Help
    Replies: 0
    Last Post: 11-16-2012, 12:41 AM
  4. [508] need help with shop frames
    By EndlessZombies in forum Help
    Replies: 1
    Last Post: 02-21-2009, 05:38 AM
  5. Help with Shops.
    By Mr NYC in forum Help
    Replies: 7
    Last Post: 02-02-2009, 12:27 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
  •