Jump to content
View in the app

A better way to browse. Learn more.

RuneSuite RSPS Development

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted
comment_13281

I've used Ruse a lot and never seen anything even similar to this.

OT:

				int recDamage = (int) (damage * 0.001);
				if (recDamage <= 0)
					return;
				if (recDamage > t2.getConstitution())
					recDamage = t2.getConstitution();
				attacker.dealDamage(new Hit(recDamage, Hitmask.RED, CombatIcon.DEFLECT));

From the recoil effect lol. It has nothing to do with barrows degrading. You're making your Dharok's return damage to the attacker..


You also have so much repetetive code. You could do it as simple as this:

DegradingItem:

		public static Optional forItem(int item) {
			for(DegradingItem d : DegradingItem.values()) {
				if(d.deg == item || d.nonDeg == item) {
					return Optional.of(d);
				}
			}
			return Optional.empty();
		}

CombatFactory:

				//Handle equipped items for our target..
				for(Item item : t2.getEquipment().getItems()) {
					
					//Check if the target's item should degrade..
					Optional deg = DegradingItem.forItem(item.getId());
					if(deg.isPresent()) {
						ItemDegrading.handleItemDegrading(t2, deg.get());
					}
					
					switch(item.getId()) { //Handle other items..
					case 2550: //Handle recoil effect..

						break;
					}
				}

Wrote this quickly.

  • 2 years later...
  • 2 years later...
  • 3 weeks later...
  • 3 months later...

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.