Open shopassistant.java
search
Code:
public void buyFromShopPrice(int removeId, int removeSlot){
scroll down until you see something like
Code:
if (c.myShopId == ##) {
c.sendMessage(c.getItems().getItemName(removeId)+": currently costs " + getSpecialItemValue(removeId) + " .");
return;
}
under it add
Code:
if (c.myShopId == 91) {
c.sendMessage(c.getItems().getItemName(removeId)+": currently costs " + getSpecialItemValue(removeId) + " Donator points.");
return;
}
now search
Code:
public boolean buyItem(int itemID, int fromSlot, int amount) {
scroll down until you see something like
Code:
int Slot = 0;
int Slot1 = 0;//Tokkul
int Slot2 = 0;//Pking Points
under the last one add new 1
-----------------------
eg
mines
Code:
int Slot = 0;
int Slot1 = 0;//Tokkul
int Slot2 = 0;//Pking Points
it should be
Code:
int Slot = 0;
int Slot1 = 0;//Tokkul
int Slot2 = 0;//Pking Points
int Slot3 = 0;//+1
-----------------------
now scroll down again you will see something like
Code:
if (c.myShopId == ##) {
handleOtherShop(itemID);
return false;
}
under it add
Code:
if (c.myShopId == 91) {
handleOtherShop(itemID);
return false;
}
scroll down again until you see something like
Code:
if(Slot1 == -1 && c.myShopId == 29 || c.myShopId == 30 || c.myShopId == 31) {
c.sendMessage("You don't have enough tokkul.");
break;
}
under it add
Code:
if(Slot3 == -1 && c.myShopId == 91) {
c.sendMessage("You don't have enough donator gold.");
break;
}
scroll down again until you see something like
Code:
else if(c.myShopId == ##) {
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.sendMessage("You don't have enough space in your inventory.");
break;
}
} else {
c.sendMessage("You don't have enough Points.");
break;
}
}
under it add
Code:
else if(c.myShopId == 91) {
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.sendMessage("You don't have enough space in your inventory.");
break;
}
} else {
c.sendMessage("You don't have enough donator Points Points.");
break;
}
}
now search
Code:
public void handleOtherShop(int itemID) {
you should see something like
Code:
if (c.myShopId == ##) {
if (c.DTPoints >= getSpecialItemValue(itemID)) {
if (c.getItems().freeSlots() > 0) {
c.DTPoints -= getSpecialItemValue(itemID);
c.getItems().addItem(itemID, 1);
c.getItems().resetItems(3823);
}
} else {
c.sendMessage("You do not have enough Points to buy this item.");
}
}
under it add
Code:
if (c.myShopId == 91) {
if (c.donatorPoints >= getSpecialItemValue(itemID)) {
if (c.getItems().freeSlots() > 0){
c.bosspnt -= getSpecialItemValue(itemID);
c.getItems().addItem(itemID,1);
c.getItems().resetItems(3823);
}
} else {
c.sendMessage("You do not have enough donator points to buy this item.");
}
}
-----------------
to change item value in points
search
Code:
public int getSpecialItemValue(int id) {
under
add
Code:
case 19669://itemid
return 840;//worth in points
for shop
open shops.cfg
and add this
Code:
shop = 91 boss point shop 2 2 19669 10
--------------------
for donator points
open PlayerSave.java
search
Code:
} else if (token.equals("character-posy")) {
p.teleportToY = (Integer.parseInt(token2) <= 0 ? 3424 : Integer.parseInt(token2));
} else if (token.equals("character-rights")) {
p.playerRights = Integer.parseInt(token2);
under 1 on those add
Code:
} else if (token.equals("donatorPoints")) {
p.donatorPoints = Integer.parseInt(token2);
again search
Code:
characterfile.write("character-posx = ", 0, 17);
characterfile.write(Integer.toString(p.absX), 0, Integer.toString(p.absX).length());
characterfile.newLine();
characterfile.write("character-posy = ", 0, 17);
characterfile.write(Integer.toString(p.absY), 0, Integer.toString(p.absY).length());
characterfile.newLine();
under 1 of those add
Code:
characterfile.write("donatorPoints = ", 0, 16);
characterfile.write(Integer.toString(p.donatorPoints), 0, Integer.toString(p.donatorPoints).length());
characterfile.newLine();
now open player.java
and declare
command for it
Code:
if (playerCommand.startsWith("givedpoints")) {
try {
String[] args = playerCommand.split(" ");
for(int i = 0; i < Config.MAX_PLAYERS; i++) {
if(Server.playerHandler.players[i] != null) {
if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) {
Client c2 = (Client)Server.playerHandler.players[i];
c2.donatorPoints = Integer.parseInt(args[2]);
c.sendMessage("You gave "+ Integer.parseInt(args[2])+" points to "+args[1])+", he has now "+c2.donatorPoints+" points.");
c2.sendMessage("You recieve "+Integer.parseInt(args[2])+", you now have "+c2.donatorPoints+".");
}
}
}
} catch(Exception e) {
c.sendMessage("Player must be offline.");
}
}
--------------------
edit:
wich commands doesnt work with spaces post them here i'll try to fix