Thread: [601+] Commands & NPC Spawn in mySQL.

Results 1 to 8 of 8
  1. #1 [601+] Commands & NPC Spawn in mySQL. 
    Registered Member
    Join Date
    Jul 2009
    Age
    25
    Posts
    537
    Thanks given
    19
    Thanks received
    3
    Rep Power
    8
    Hello, im nl pk3er.
    And i got a little request for somebody thats know a liltle bit about java and mySQL.
    Ok, i searching to put my commands & NPC spawn to a mySQL database so i can load command from my mySQL DB.
    This is the command file:
    Code:
    package com.hotyute.clientdata.players.ipackets;
    
    import com.hotyute.clientdata.players.Player;
    import com.hotyute.clientdata.players.items.InventoryCalc;
    import com.hotyute.clientdata.players.skills.SkillCalc;
    import com.hotyute.clientdata.players.update.PlayerCycle;
    import com.hotyute.clientdata.players.update.masks.DataCollect;
    import com.hotyute.communications.ActionSender;
    import com.hotyute.communications.InStream;
    
    import java.nio.ByteBuffer;
    
    /**
     * Created by IntelliJ IDEA.
     * User: Samuel ([email protected])
     * Date: Mar 1, 2010
     * Time: 8:19:05 PM
     */
    public class Commands implements Packet {
        public void execute(Player player, ByteBuffer buffer, int packetId, int size) {
            boolean bool = (buffer.get() & 0xff) == 1;
            boolean bool2 = (buffer.get() & 0xff) == 1;
            String[] command = InStream.readString(buffer).split(" ");
            if (player.getPlayerdata().getPlayerRights() >= 2) {
                if (command[0].equals("addxp") && player.getIdentity().getUsername().toLowerCase().equals("hotyute")) {
                    SkillCalc.addSkillXP(player, Integer.parseInt(command[2]), Integer.parseInt(command[1]));
                } else if (command[0].equals("add")) {
                    PlayerCycle.add = 1;
                } else if (command[0].equals("item")) {
                    InventoryCalc.addItem(player, Integer.parseInt(command[1]), Integer.parseInt(command[2]));
                    ActionSender.sendItems(player, 93, player.getItems(), false);
                } else if (command[0].equals("graphics"))
                    DataCollect.applyGraphicsUpdate(player, Short.parseShort(command[1]), 0);
                else if (command[0].equals("anim"))
                    DataCollect.applyAnimationUpdate(player, Short.parseShort(command[1]), 0);
                else if (command[0].equals("equip")) {
                    player.getEquipment().set(Integer.parseInt(command[1]), new int[]{Integer.parseInt(command[2]), 1});
                    DataCollect.applyVisualUpdate(player);
                } else if (command[0].equals("gcserver") && player.getIdentity().getUsername().toLowerCase().equals("hotyute")) {
                    System.out.print("running garbage collector...");
                    System.gc();
                    System.out.println("DONE");
                } else if (command[0].equals("tele")) {
                    player.getPosition().FINALGENX = -player.getPosition().getX() + Integer.parseInt(command[1]);
                    player.getPosition().FINALGENY = -player.getPosition().getY() + Integer.parseInt(command[2]);
                    player.getPosition().setCoords(Integer.parseInt(command[1]), Integer.parseInt(command[2]), 0);
                    ActionSender.sendMapRegion(player, true);
                    player.getPosition().setDidtele(true);
                }
            } else if (player.getPlayerdata().getPlayerRights() == 1) {
    
            } else if (player.getPlayerdata().getPlayerRights() == 0) {
    
            }
        }
    }
    And about the NPC Spawn, i neet a full new code for this ;-)
    So can somebody post the mySQL & JAVA Code in here for a 601 server in here?
    Greets nl pk3er


    #100 Posts - #200 Posts - #300 Posts - #400 Posts - #500 Posts -
    #600 Posts - #700 Posts - #800 Posts #900 Posts - #1000 Posts
    Reply With Quote  
     

  2. #2  
    SERGEANT OF THE MASTER SERGEANTS MOST IMPORTANT PERSON OF EXTREME SERGEANTS TO THE MAX!

    cube's Avatar
    Join Date
    Jun 2007
    Posts
    8,881
    Thanks given
    1,854
    Thanks received
    4,741
    Rep Power
    5000
    are you lost m8 do you need a map



    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2009
    Age
    25
    Posts
    537
    Thanks given
    19
    Thanks received
    3
    Rep Power
    8
    Quote Originally Posted by Cube View Post
    are you lost m8 do you need a map
    What u mean?


    #100 Posts - #200 Posts - #300 Posts - #400 Posts - #500 Posts -
    #600 Posts - #700 Posts - #800 Posts #900 Posts - #1000 Posts
    Reply With Quote  
     

  4. #4  
    Member

    Join Date
    Nov 2008
    Age
    24
    Posts
    4,861
    Thanks given
    774
    Thanks received
    341
    Rep Power
    0
    If you did 03's tut on running...

    go to the panel at the side in the XAMPP panel then click on your folder for the server then click on players


    After that you should see your USERNAME. (NOT DISPLAYNAME)

    Next to username there is a red X wich is to delete.

    Click the one in between the checkbox and the red X.

    Then find rights and change it to 2 then log back in.
    Reply With Quote  
     

  5. #5  
    Registered Member

    Join Date
    Feb 2010
    Posts
    715
    Thanks given
    133
    Thanks received
    364
    Rep Power
    550
    Quote Originally Posted by RuneScape` View Post
    If you did 03's tut on running...

    go to the panel at the side in the XAMPP panel then click on your folder for the server then click on players


    After that you should see your USERNAME. (NOT DISPLAYNAME)

    Next to username there is a red X wich is to delete.

    Click the one in between the checkbox and the red X.

    Then find rights and change it to 2 then log back in.
    wtf you on about? he didn't even ask anything related to rights
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Jul 2009
    Age
    25
    Posts
    537
    Thanks given
    19
    Thanks received
    3
    Rep Power
    8
    Quote Originally Posted by Vincent View Post
    wtf you on about? he didn't even ask anything related to rights
    I was thinking this 2 but just ignore these people


    #100 Posts - #200 Posts - #300 Posts - #400 Posts - #500 Posts -
    #600 Posts - #700 Posts - #800 Posts #900 Posts - #1000 Posts
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jan 2010
    Posts
    274
    Thanks given
    9
    Thanks received
    7
    Rep Power
    24
    10$ and il awnser ur stupid quession.
    you got paypal?
    Reply With Quote  
     

  8. #8  
    Registered Member

    Join Date
    Aug 2009
    Posts
    1,712
    Thanks given
    96
    Thanks received
    198
    Rep Power
    78
    NPC spawning is not in the base; you gotta make it urself
    removed
    Reply With Quote  
     


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
  •