Thread: [Asteria 3.0] Adding the Firemaking skill.

Results 1 to 6 of 6
  1. #1 [Asteria 3.0] Adding the Firemaking skill. 
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,422
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    ------------------------------------------

    Was being lazy writing this, will re-release later.
     

  2. #2  
    Registered Member
    Andys1814's Avatar
    Join Date
    Feb 2013
    Posts
    974
    Thanks given
    688
    Thanks received
    455
    Rep Power
    727
    you and asteria

    ot: goodjob going to be checking this out.
     

  3. #3  
    Registered Member

    Join Date
    Dec 2012
    Posts
    2,999
    Thanks given
    894
    Thanks received
    921
    Rep Power
    2555
    • Why does Fire.groovy use getters but Firemaking.groovy doesn't?
    • Code:
              if (player.session.getState() == IOState.LOGGED_OUT) {
                  this.cancel();
                  return;
              }
      Why not just have that check before execute() is called, then you don't need to call it everytime
    • Code:
       static Fire validate(int id) {
              for(Fire f : Fire.values()) {
                  if (f.logID == id)
                      return f
              }
              null
          }
      Could be done way better, and look at returning Optional
    • In any game event involving a players inventory and an item, you should always check for
      Code:
      if(!player.inventory.contains(logId)) return
      beforehand
    • Classes such as ObjectNodeManager and ItemNodeManager are all static, surely you can just make them oo
    • Shouldn't
      Code:
      player.movementQueue.reset();
              player.animation(new Animation(733));
              player.encoder.sendMessage "You light the logs on fire..."
      be in the
      Code:
      onSubmit
      method instead and not the constructor
    • Not a huge thing, but imagine how clustered the handler classes will be when they're full of content (in this scenario it's ItemOnItem.groovy)


    Overall good job though, groovy looks cool
    Attached image
     

  4. Thankful user:


  5. #4  


    Major's Avatar
    Join Date
    Jan 2011
    Posts
    2,997
    Thanks given
    1,293
    Thanks received
    3,556
    Rep Power
    5000
    Aside from a few missing semi-colons (which you have in some places but not others - be consistent!!), pretty much every line of this code is valid Java. If you're going to use another language, you should read up about it and take advantage of the additional features it offers.
     

  6. Thankful user:


  7. #5  
    Donator

    Join Date
    Sep 2012
    Posts
    63
    Thanks given
    3
    Thanks received
    3
    Rep Power
    36
    Gj, going to maybe use this when i start developing again.
     

  8. #6  
    Banned [Asteria 3.0] Adding the Firemaking skill. Market Banned


    Join Date
    Jan 2011
    Age
    26
    Posts
    3,112
    Thanks given
    1,198
    Thanks received
    1,479
    Rep Power
    0
    This could've been done in like two very short Groovy classes if you had used the DestructionSkillAction. You also need to have a collection of positions that hold the positions of all active fires, to prevent players from lighting fires on top of an existing fire.

    Quote Originally Posted by Major View Post
    Aside from a few missing semi-colons (which you have in some places but not others - be consistent!!), pretty much every line of this code is valid Java. If you're going to use another language, you should read up about it and take advantage of the additional features it offers.
    ^ and you can start learning more here.
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 9
    Last Post: 03-28-2015, 07:07 AM
  2. Replies: 39
    Last Post: 02-10-2012, 04:48 AM
  3. adding the skilling command-delta maybe others
    By skulled in forum Snippets
    Replies: 2
    Last Post: 01-29-2010, 05:50 PM
  4. Adding the best Welcome screen possible
    By Sam Server in forum Tutorials
    Replies: 83
    Last Post: 07-10-2008, 05:28 AM
  5. Adding the best welcome possible!
    By Jodan Belfort in forum Tutorials
    Replies: 10
    Last Post: 09-29-2007, 07:18 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •