Thread: [RuneFusion]: Adding Commands

Results 1 to 6 of 6
  1. #1 [RuneFusion]: Adding Commands 
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    Well...as to seeing how some people might think that Stormrider's RuneFusion is a bit complicated, i have decided on posting a few tuts on how to some stuff. These wont be really significant in anyway, just some simple how-to tuts.
    --------------------------------------------------------------------------------------------------------------------------
    Purpose: To teach the way of adding commands in RuneFusion.
    Difficulty: 2/10
    Classes Modified: CommandsHandlers.java
    Classes Added: Varies, depending on name of the command.
    Tested Server: RuneFusion FINAL
    Note: Im sorry if this was already posted, i didnt see it on here if it was.

    Procedure:
    Step 1: Open the file called CommandHandlers.java and look for this:

    Code:
    commands.put("char", new Char());
    and under that add this:

    Code:
    commands.put("COMMAND_NAME", new COMMAND_FILE_NAME());
    to add more commands just add more of the above with the appropriate fields inputted (that a word?) I recommend putting the file name the same as the command so it doesnt get confusing.

    Step 2: Next create a new Java file and put this in it:

    (code corrected by Stormrider)
    Code:
    package net.runefusion.player.commands;
    
    import net.runefusion.player.Player;
    
    public class COMMAND_FILE_NAME implements CommandHandler {
    
        public void parse(Player player, String command) {
            // command code should be in here
        }
    
    }
    Now, just replace the COMMAND_FILE_NAME with what you had in step 1.
    Thats all. If you need help, just PM me or ask here. I prefer you ask here.
    If i forgot something, then please lemme know...rawr.

    Credits:
    90% RuneFusion Team
    10% Me for posting how to add

    [Only registered and activated users can see links. ]
     

  2. #2  
    Registered Member stormcutter's Avatar
    Join Date
    May 2008
    Posts
    85
    Thanks given
    0
    Thanks received
    2
    Rep Power
    25
    Good job rep++.
     

  3. #3  
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    thanks. mts

    [Only registered and activated users can see links. ]
     

  4. #4  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,074
    Thanks given
    2,625
    Thanks received
    3,578
    Discord
    View profile
    Rep Power
    5000
    Quote Originally Posted by Fox2007 View Post
    Credits:
    90% Stormrider for the Commands
    I wrote the new command handler you know (me and Samuraiblood2 helped him make it, you know ).

    Also, you've missed a vital bit out.

    The parse method:

    Code:
    public void parse(Player player, String command) {
        // command code should be in here
    }
    That should be inside your command class.
    .
     

  5. #5  
    brb ridin da storm

    blakeman8192's Avatar
    Join Date
    Dec 2012
    Age
    28
    Posts
    2,010
    Thanks given
    802
    Thanks received
    1,357
    Rep Power
    286
    Yeah you should give credits to "The RuneFusion Team" instead of just me; we all did about 1/3rd of the work so we all deserve equal credit.
    (edited your post to fix the code, added the parse method)
    rest in peace Qemist, Izzy, TeChNo PuNk, Impulser, & bootnecklad
     

  6. #6  
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    Oh okay, thanks guys.

    [Only registered and activated users can see links. ]
     


Thread Information
Users Browsing this Thread

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


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •