Jump to content

Mysteryy

Scripter II
  • Posts

    2568
  • Joined

  • Last visited

  • Days Won

    3
  • Feedback

    100%

Everything posted by Mysteryy

  1. You will need to track this yourself. Just keep track of the times when you move, and keep it updated. Then you can check how long it has been since you moved.
  2. I have been in scripting for a long time now, I am just going to tell you that 1) Using a while loop in this manner is a bad idea. 2) Do not ever depend on one of the methods to return a correct boolean. 3) You dont have a single null check on the ladder What if the interaction was successful, but the interaction still returned false? Then that while loop would likely get stuck trying to interact with an object that doesnt exist, and your script would do nothing. Dont use the return values in this manner, and dont use a while loop in this manner. This type of logic is shakey and be easily broken. Make your script stable by having a strong baseline of logic that can handle any situation.
  3. 1) Yes, the loop will take care of this. The way I had it before, I was allocating the int inside of that if statement, so it actually would save the allocation of the int if the length was 0. After I decided to give a proper snippet I just decided to make it a method and forgot to change it after I moved things around. 2) You are correct, but I always feel it is good to do my own null checks. I have learned that you can never be too careful. Where I work, we are constantly writing safety critical applications, and you cant assume anything, and can never be too safe. The null check could be considered redundant, but it is good practice to use defensive programming, especially when scripting. Defensive programming is in my blood. Edit: Also, in your example, I dont think you will ever need a long to store the number of buckets on the ground. :p
  4. Oh damn and I didnt even notice!
  5. My first warning points. *Wipes tear from eye*
  6. Going with the second method, here is a simplistic easy to follow way (completely untested and just for demonstration, but it should work): public int getAmountOf(String groundItemName){ int numberOfItems = 0; java.util.List<GroundItem> allGroundItems = script.getGroundItems().getAll(); if(allGroundItems != null && allGroundItems.size() > 0){ for(GroundItem groundItem : allGroundItems){ if(groundItem != null && groundItem.getName() != null && groundItem.getName().equals(groundItemName)){ numberOfItems++; } } } return numberOfItems; }
  7. If the player dropped 10 buckets, or if there are 10 buckets on the ground and you dont care where they came from?
  8. Loooool. Idk why but I just find that pic funny. Rs on the projector. Cool though.
  9. Did you try on normal client?
  10. I have seen this on the normal client as well.
  11. If you were first, then you would have a message saying: "BlueMagic entered the room". You dont have that message. OP is a liar. OP is full of shit. OP sux. PHONEY.
  12. Idk, you are looking for modified colors, and that says getModifiedColors() What do you think? You could always add a print statement and see if they match up with the debug values. Then you will know if that is what you want. :p
  13. Have you looked at a rock using the debugger on the client? You can view all the info about it, and then figure out a unique identifier that will distinguish rocks without needing any id. You are on the right track you just need to figure out how to use it. Try finding it in your IDE. I believe in you tom tom.
  14. Will you accept paypal? I have 2 accounts I would like to have you attempt to unban. ^_^
  15. Please repost it in a readable format. Its hurting my eyes. :p
  16. Botting is never safe. Its implied, you dont have to say it.
  17. Where did he share the method? I have a old main that is 10 years old, and has been banned for 6 years now.
×
×
  • Create New...