Thread: Using Dementhium (2) [639]

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 Using Dementhium (2) [639] 
    Registered Member wildking72's Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    506
    Thanks given
    62
    Thanks received
    36
    Rep Power
    11
    You can check the first one I made here

    I cannot explain these things well so don't PM me about thing you don't understand. Sorry.


    (Somewhat)Advanced commands
    Making a command with 2+ parts is easy. You just have to use these below.
    Examples:
    Code:
    String name = command[1];
    int id = Integer.parseInt(command[1]);
    double id = Double.parseDouble(command[1])
    boolean bool = Boolean.parseBoolean(command[1]);
    These will make up your 2nd or other part of the command.
    This is letting you type an integer for your command
    Code:
    Integer.parseInt(command[1])
    Since this is an array, you need to change "[1]" or keep it depending on which part you want this in the command.
    [0] is set as the first in an array instead of [1] so the "[1]" would be set to the second part of the command.[/I]

    This command
    Code:
    if (command[0].equals("guess")) {
    int amount = Integer.parseInt(command[1]);
    	player.setGuess(amount);
    }
    Would look like this if I typed it
    Code:
    ::guess 55
    55 = any integer (negative/positive)

    This is the same for the other except you need to add "true/false" or "text" depending on what your using.

    Examples:
    This command
    Code:
    if (command[0].equalsIgnoreCase("setdoubleexp")) {
    boolean bool = Boolean.isDoubleExp = bool;
    }
    Would look like this if I typed it
    Code:
    ::setdoubleexp true
    And this command
    Code:
    if (command[0].equalsIgnoreCase("shout")) {
    String aString = command[1];
    player.forceText(aString);
    }
    Would look like this if I typed it
    Code:
    ::shout "YOUR MESSAGE"
    You don't need to add the quotations as those will give you command prompt errors.

    Clicking Item Actions
    Go into src/org/dementhium/event/impl/interfaces/
    Open InventoryListener.java

    [First Option]
    Search for
    Code:
    if (opcode == 6) {
    Under there you will see
    Code:
    switch (itemId) {
    Under that will you have to add the item id as the case number or you can do this just right under if (opcode == 6) {

    Code:
    if (itemId == ITEMID) {
    
    }
    ITEMID = the item id you want there.
    If you notice on your command prompt it also says opcode 6 usually when your taking off something.
    It can still be used as a first click option.

    [Second Option]
    Search for
    Code:
    if(opcode == 82){
    Do the same thing as I said for the first option

    The is another option but I'm sure you can find it.


    Interface Writing

    I will show you how to make this


    Into this


    Putting things onto the interface just requires the interface id and child id
    The child id is somewhat easy to figure out if you have the button id (doesn't always work)
    It is something you are replacing if your going to put and item on there or a String

    Now for the transformation...
    Code:
    			for(int i = 0; i < 18; i++) {
    			ActionSender.sendString(player, "", 277, i);
    			}
    			ActionSender.sendString(player, "Congratulations!", 277, 3);
    			ActionSender.sendString(player, "You have completed Korasi's Sword!", 277, 4);
    			ActionSender.sendString(player, "<col=0000ff>You are awarded", 277, 9);
    			ActionSender.sendString(player, "Korasi's Sword", 277, 10);
    			ActionSender.sendString(player, "100K in 1 of 4 skills (EXP Lamp)", 277, 11);
    			ActionSender.sendString(player, "Elite Void top and bottom", 277, 12);
    			ActionSender.sendString(player, "2 Quest points", 277, 13);
    			ActionSender.sendItemOnInterface(player, 277, 5, 1, 19784);
    			ActionSender.sendString(player, "Quest Points:", 277, (6));
    			ActionSender.sendString(player, "" + player.getDefinition().getQuestPoints(), 277, (7));
    			ActionSender.sendInterface(player, 277);
    The for loop here is removing all of the things that say like "Line 3" or "qj123"
    Code:
    for(int i = 0; i < 18; i++) {
    			ActionSender.sendString(player, "", 277, i);
    			}
    If you didn't use that than you would have an unwanted mess unless you went through all the child id's putting quotation marks.

    This is sending a String onto the interface
    Code:
    ActionSender.sendString(player, "MESSAGE", 277, 6);
    277 = the interface Id you want there
    6 = the child id on the interface you are changing
    (You will understand it once you mess around a little bit)

    This is sender an item onto the interface
    Code:
    ActionSender.sendItemOnInterface(player, 277, 5, 1, 19784);
    277 = interface id
    5 = child id
    1 = amount of items diplayed
    19784 = item id

    I think I've explained enough...
    Thats as advanced as I'm going to get...

    Reply With Quote  
     

  2. Thankful users:


  3. #2  
    Donator

    Join Date
    Nov 2011
    Age
    30
    Posts
    85
    Thanks given
    24
    Thanks received
    10
    Rep Power
    9
    Thanks for both of your posts. I appreciate them.
    Reply With Quote  
     

  4. #3  
    Banned

    Join Date
    Mar 2010
    Posts
    1,092
    Thanks given
    214
    Thanks received
    117
    Rep Power
    0
    Very use ful, but, I already know this stuff. Will help other's though.
    Reply With Quote  
     

  5. #4  
    Registered Member
    'Shinobi's Avatar
    Join Date
    Jan 2011
    Posts
    254
    Thanks given
    50
    Thanks received
    16
    Rep Power
    121
    Good job putting this out there.
    Reply With Quote  
     

  6. #5  
    Donator
    Unlucky4ever's Avatar
    Join Date
    Nov 2007
    Age
    30
    Posts
    524
    Thanks given
    46
    Thanks received
    72
    Rep Power
    37
    Great tutorial for noobs
    Reply With Quote  
     

  7. #6  
    Banned
    Join Date
    Dec 2010
    Posts
    312
    Thanks given
    30
    Thanks received
    89
    Rep Power
    0
    yay more noob tutorials
    Reply With Quote  
     

  8. #7  
    Donator

    Join Date
    Sep 2011
    Posts
    172
    Thanks given
    86
    Thanks received
    8
    Rep Power
    0
    Thanks, This is becoming very helpful in my 639 development
    Reply With Quote  
     

  9. #8  
    The One & Only

    Norcotic's Avatar
    Join Date
    Jul 2011
    Age
    31
    Posts
    2,320
    Thanks given
    415
    Thanks received
    285
    Rep Power
    1270
    Fix pictures please
    Reply With Quote  
     

  10. #9  
    Founder of MBScape & Xora

    Ryan.'s Avatar
    Join Date
    Oct 2008
    Posts
    1,509
    Thanks given
    53
    Thanks received
    49
    Rep Power
    312
    Keep making these. They're cool
    Attached image
    Reply With Quote  
     

  11. #10  
    Registered Member wildking72's Avatar
    Join Date
    Sep 2011
    Age
    27
    Posts
    506
    Thanks given
    62
    Thanks received
    36
    Rep Power
    11
    Quote Originally Posted by McDeshen View Post
    Keep making these. They're cool
    I want to explain this stuff well enough for people to accually understand it fully, but I am terrible with my grammer and I just hate explaining...
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. [639] Dementhium Help
    By L3git in forum Help
    Replies: 5
    Last Post: 02-24-2013, 06:20 PM
  2. [639] Dementhium Help
    By L3git in forum Help
    Replies: 2
    Last Post: 01-06-2012, 04:14 AM
  3. [639] Dementhium 639 Combat re done
    By Boxxy in forum Buying
    Replies: 1
    Last Post: 11-17-2011, 09:54 AM
  4. Dementhium 639
    By Azurite in forum Buying
    Replies: 1
    Last Post: 10-05-2011, 03:01 AM
  5. Dementhium 639 Help
    By shadder in forum Help
    Replies: 6
    Last Post: 10-01-2011, 04:44 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
  •