shopassistant.java
http://www.rune-server.org/runescape...oint-shop.html
It's pk points but it's the same concept. Learn pls.
|
I have my slayer points system all set up but when I buy an item with Slayer points it doesn't subtract the points. Any ideas on how to make it subtract the points?
shopassistant.java
http://www.rune-server.org/runescape...oint-shop.html
It's pk points but it's the same concept. Learn pls.
Didn't work. Care to explain more?
Lol just look in your shopassistant.java see how pkpoints work and just copy the method and change id's around really not that hard and also you have to make sure that you added the tokens and character writes correctly as well
if (c.myShopId == 37) {
c.sendMessage(c.getItems().getItemName(removeId)+" : currently costs " + getSpecialItemValue(removeId) + " Slayer points.");
return;
}
then
} else if(c.myShopId == 37) {
if (c.slayerpoints >= getSpecialItemValue(itemID)) {
if (c.getItems().freeSlots() > 0) {
c.dungtokens -= getSpecialItemValue(itemID);
c.getItems().addItem(itemID, 1);
c.getItems().resetItems(3823);
}
} else {
c.sendMessage("You don't have enough slayer Points.");
}
And
case 1:
return 25;
Heres my codes.
Code:if (c.myShopId == 99) { c.sendMessage(c.getItems().getItemName(removeId)+": currently costs " + getSpecialItemValue(removeId) + " Slayer Points."); return; }
Code:else if(c.myShopId == 99) { if (c.slayPoints >= TotPrice2) { if (c.getItems().freeSlots() > 0) { //buyDelay = System.currentTimeMillis(); c.slayPoints -= 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 Slayer Points."); break; } }
show us Toprice2 in shopassistant.java
also, post your slayerpoint giving
replace that with this under handleOtherShop method
} else if(c.myShopId == 99) {
if (c.slayerpoints >= getSpecialItemValue(itemID)) {
if (c.getItems().freeSlots() > 0) {
c.dungtokens -= getSpecialItemValue(itemID);
c.getItems().addItem(itemID, 1);
c.getItems().resetItems(3823);
}
} else {
c.sendMessage("You don't have enough space in your inventory.");
}
You have to explain this in "noob" language. I'm brand new to Java.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |