So no one knows how to do this... Wow
|
Hey i recently added donpoints however i want to make a command to exchange the points for gold using exchangedpoints command
im not quit sure how to do this heres basically what im looking for
if command = exchangedpoints
if c.donpoints = 10
c.points -=10
c.getitem 995, 20000000
Else
if c.donpoints = 20
c.points -=20
c.getitem 995, 40000000
Thats basically all im looking for need as quick as possible please.
So no one knows how to do this... Wow
Here, if its for donorPoints, here you go
[SPOIL]
if (playerCommand.startsWith("exchangepoints")) {
if (c.donPoints == 10) {
c.donPoints -= 10;
c.getItems().addItem(995, 20000000);
} else {
if (c.donPoints == 20) {
c.donPoints -= 10;
c.getItems().addItem(995, 4000000);
}
}
}[/SPOIL]
Me or him?
Why don't you just make a Exchange Store.
for one because you cant add gp into a store i have yet to find out how you make gold into a tab i mean i can make an interface but i rather just have it like this.
why do you say it would mess up shit?
Code:if(playerCommand.equals("exchange")) { if(c.donatorPoints < 10) { c.sendMessage("This requires 10 points."); return; } if(c.getItems().freeSlots() == 0 && !c.getItems().playerHasItem(995)) { c.sendMessage("You need one free slot."); return; } long total = (long) c.getItems().getItemAmount(995) + 20000000; if(total > Integer.MAX_VALUE) { c.sendMessage("You don't have enough free space to accept this much cash."); return; } c.donatorPoints -= 10; c.getItems().addItem(995, 20000000); c.sendMessage("You exchange your donator points for ingame currency,"); }
make an cash ticket in the donator shops thats worth x coins.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |