Jump to content
Existing user? Sign In

Sign In



Sign Up

SpiritOfTheLau

Members
  • Posts

    14
  • Joined

  • Last visited

Personal Information

  • Sex
    Female

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. interested to take a look at this
  2. Simple solution but well crafted. Nice work
  3. Pretty sweet snippet. I always found explicit comments on every field a bit obnoxious myself
  4. Good work! Your contributions are aweseome.
  5. Nice work. If you ever feel like revisiting this, it Would be cool for this to include guards in the case of stalls
  6. 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
  7. Cascading if statements really would be better of suited as a switch statement but nice work
  8. 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.
  9. 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.
  10. 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
  11. Hiya, I am SpiritOfTheLau, I'm 24. I'm a full time software developer based in the UK and also like to work with private servers in my spare time. I first started developing at around 14 years old by tinkering leeched bases and making minor changes for my own amusement. In time I eventually gained some skills and started creating some basic tutorials and snippets. Eventually I was inspired to become a software developer and studied Games Development at university, attaining a first class degree. With my new found skillset, I decided to return to the RSPS community and give back my wealth of experience in the same communities that inspired me to get where I am in the first place. I expect that I'll be posting several tutorials/snippets as time goes on and might even pick up my own full project now that I have plenty of down time thanks to the virus... Thanks for reading, do say hi.

Contact

[email protected]

astra.security

What is a RSPS?

A RSPS, also known as RuneScape private server, is an online game based on RuneScape, and controlled by independent individuals.

Popular RSPS Servers

Runewild Ikov RedemptionRSPS

Disclaimer

Runesuite is not affiliated with runescape, jagex in any way & exists solely for educational purposes.

×
×
  • Create New...