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.

SpiritOfTheLau

Members
  • Joined

  • Last visited

Everything posted by SpiritOfTheLau

  1. Awesome stuff! Thanks for sharing.
  2. interested to take a look at this
  3. Simple solution but well crafted. Nice work
  4. Pretty sweet snippet. I always found explicit comments on every field a bit obnoxious myself
  5. Good work! Your contributions are aweseome.
  6. Nice work. If you ever feel like revisiting this, it Would be cool for this to include guards in the case of stalls
  7. The else statement isn't necessary here. If your clan is null, the message is sent to the player and we return out of the function so the rest of the code can never occur anyway. Good work otherwise
  8. Cascading if statements really would be better of suited as a switch statement but nice work
  9. This is pretty slick. Good job! For those asking about the backup frequency, if you'd like it to be something like every 2 hours, make the following changes. Replace the following variable: private static final int TIME = 28800000; //8 hours With this: private static final int TIME =7200000//2 hours Next, replace the getDate function: public static String getDate() { DateFormat dateFormat = new SimpleDateFormat("MM dd yyyy"); Date date = new Date(); String currentDate = dateFormat.format(date); date = null; dateFormat = null; return currentDate; } With this: public static String getDate() { DateFormat dateFormat = new SimpleDateFormat("MM dd yyyy HH mm"); Date date = new Date(); String currentDate = dateFormat.format(date); date = null; dateFormat = null; return currentDate; } What does this do? Changing the numeric value decreases the number of miliseconds between backing up from 28800000 (8 hours) to 7200000 (2 hours) which is calculated in the sequence function. By changing the arguments for the SimpleDateformat to include "HH mm" we specify an hour in our backup. This is important because more than one back up a day would overwrite or fail to write entirely based on permissions.
  10. This is a good attempt. I have a couple of ideas for improvement 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)); ItemDegrading.handleItemDegrading(t2, DegradingItem.DHAROKS_AXE_25); } This is all reused code. You might consider turning this into a method and calling it for each case statement so that if you ever make changes to this code, you only need to do it in one place. For this to be possible, you'd need to dynamically map the broken barrows pieces together. You could do this in an enum which can dynamically handle changing the item ID in another method so that you don't have to explicitly hardcode it in these case statements.
  11. Good stuff. A long switch statement of IDs is quite difficult to maintain so it might be worth using the NPC cache definitions to use names of NPCs instead. I.e if the NPC name contains "wyrm" or "dragon" but it really isn't a super huge deal at this level. Well done

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.