SilabGarza - RS Private Server  
Home Forum Play Register Store Market Highscores Mark Forums Read
Go Back   SilabGarza - RS Private Server > SilGar Media > Computers > Programming
Reload this Page [PI] Prayer - altar gfx included.


[PI] Prayer - altar gfx included.
Old
  (#1 (permalink))
phl0w is Offline
ARE YOU MAD?
image
 
phl0w's Avatar
 
Posts: 59
Cookies Given: 0
Cookies Received: 0
Time Online: 20 h 55 m
   
Default [PI] Prayer - altar gfx included. - 01-24-2012, 12:10 PM

Prayer.java
Code:
package server.model.players.skills;

import server.model.players.Client;

public class Prayer {

	private Client c;

	public Prayer(Client c) {
		this.c = c;
	}

	public enum Bones {
		NORMAL(526, 5, 14, "bones"),
		NORMAL2(2530, 5, 14, "bones"),
		BURNT(528, 5, 14, "burnt bones"),
		BAT(530, 5, 14, "bat bones"),
		WOLF(2859, 5, 14, "wolf bones"),
		MONKEY1(3179, 5, 14, "monkey bones"),
		MONKEY2(3180, 5, 14, "monkey bones"),
		MONKEY3(3181, 5, 14, "monkey bones"),
		MONKEY4(3182, 5, 14, "monkey bones"),
		MONKEY5(3183, 5, 14, "monkey bones"),
		MONKEY7(3185, 5, 14, "monkey bones"),
		MONKEY8(3186, 5, 14, "monkey bones"),
		MONKEY9(3187, 5, 14, "monkey bones"),
		JOGRE(3125, 15, 45, "jogre bones"),
		ZOGRE(4812, 23, 68, "zogre bones"),
		BURNTJOGRE(3127, 25, 75, "burnt jogre bones"),
		SHAIKAHAN(3123, 25, 75, "shaikahan bones"),
		BIG(532, 15, 45, "big bones"),
		BABYDRAGON(534, 30, 90, "baby dragon bones"),
		WYVERN(6812, 50, 150, "wyvern bones"),
		DRAGON(536, 72, 216, "dragon bones"),
		FAYGR(4830, 84, 236, "faygr bones"),
		RAURG(4832, 96, 288, "raurg bones"),
		OURG(4834, 140, 420, "ourg bones"),
		DAGANNOTH(6729, 125, 375, "dagannoth bones"),
		FROSTDRAGON(18830, 180, 520, "frost dragon bones"),
		ANCIENT(15410, 200, 600, "ancient bones");

		private int id, bury, altar;
		private String name;

		private Bones(int id, int bury, int altar, String name) {
			this.id = id;
			this.bury = bury;
			this.altar = altar;
			this.name = name;
		}

		public int getId() {
			return id;
		}

		public int getBuryXP() {
			return bury;
		}

		public int getAltarXP() {
			return altar;
		}

		public String getName() {
			return name;
		}
	}

	private Bones forBone(int id) {
		for (Bones b : Bones.values()) {
			if (b.getId() == id) {
				return b;
			}
		}
		return null;
	}

	public boolean isBone(int id) {
		Bones bon = forBone(id);
		if (bon == null) {
			return false;
		} else {
			return true;
		}
	}

	public void handleBones(int boneID, boolean altar) {
		Bones bon = forBone(boneID);
		if (bon != null) {
			if (System.currentTimeMillis() - c.buryDelay >= 1200) {
				c.getItems().deleteItem(bon.getId(), 1);
				c.getPA().addSkillXP(altar ? bon.getAltarXP() : bon.getBuryXP(), c.playerPrayer);
				c.buryDelay = System.currentTimeMillis();
				c.startAnimation(altar ? 896 : 827);
				c.sendMessage(altar ? "The gods are pleased with your offerings." : "You bury the bones.");
				if(altar) {
					c.getPA().createPlayersStillGfx(624, c.objectX, c.objectY, 0, 0);
				}
			}
		}
	}
}
Not so much of an improvement, just more complete and neater.




~[email protected]
  
adsense code2.3
Closed Thread

Bookmarks

[PI] Prayer - altar gfx included.

Programming




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
adsense2.6
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 12:00 AM.





Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.