Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package server.model.content;
- import server.model.players.Client;
- public class SummonXP {
- public static enum summonXp {
- GREEN(12159, 5, 250, 1, "Green Charm"),
- GOLD(12158, 1, 200, 1, "Gold Charm"),
- BLUE(12163, 10, 300, 1, "Blue Charm"),
- CRIMSON(12160, 20, 400, 1, "Crimson Charm");
- int itemId;
- int charmUsed;
- int xpGiven;
- int levelTillUse;
- String name;
- private summonXp(int itemId, int charmUsed, int xpGiven, int levelTillUse, String name){
- this.itemId = itemId;
- this.charmUsed = charmUsed;
- this.xpGiven = xpGiven;
- this.levelTillUse = levelTillUse;
- this.name = name;
- }
- public int getLevelTillUse() {
- return levelTillUse;
- }
- public void setLevelTillUse(int levelTillUse) {
- this.levelTillUse = levelTillUse;
- }
- public int getCharmUsed() {
- return charmUsed;
- }
- public void setCharmUsed(int charmUsed) {
- this.charmUsed = charmUsed;
- }
- public int getXpGiven() {
- return xpGiven;
- }
- public void setXpGiven(int xpGiven) {
- this.xpGiven = xpGiven;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
- public int getItemId() {
- return itemId;
- }
- public void setItemId(int itemId) {
- this.itemId = itemId;
- }
- };
- public static void process(final Client player){
- for(summonXp charm : summonXp.values()){
- if(charm.getName() != null){
- player.sendMessage("You've clearly not brought any charms.");
- return;
- }
- if(player.getItems().playerHasItem(charm.getItemId(), charm.getCharmUsed())){
- player.getPA().addSkillXP(charm.xpGiven, 21);
- player.sendMessage("You've been granted "+charm.getXpGiven()+" for this using your " +charm.getName()+" on this altar.");
- player.getItems().deleteItem(charm.getItemId(), charm.getCharmUsed());
- player.startAnimation(8502);
- player.gfx0(1303);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement