Thread: [TUT]Adding dialogues to objects, or adding items to objects etc.

Results 1 to 8 of 8
  1. #1 [TUT]Adding dialogues to objects, or adding items to objects etc. 
    Registered Member
    Join Date
    Jul 2008
    Posts
    81
    Thanks given
    0
    Thanks received
    0
    Rep Power
    25
    In this tut im going to tell you how to put dialogues with any object. Don't say this was posted 100 times or so becuz i didnt see it here on rune-server.

    Purpose: To add basically a "command" to an object.

    Difficulty: 1...

    Tested On: Bulby

    Anyways, heres the tut.

    Go into your server and click any object that dosent do anything [ill be using a door as an example for now], click it alot of times.

    Then in your runserver cmd box, it should say something like:

    [Username] Unhandled Packet: #

    Where i put "#" it will show a number in that spot.

    Now, remember that number and go into objectoption1.java and add a case that looks something like this:

    Code:
    case #: //Note here
    p.frames.showChatboxInterface(p, 242);
    p.frames.animateInterfaceId(p, 9815, 242, 2);
    p.frames.setNPCId(p, 4288, 242, 2);
    p.frames.setString(p, "Ajjat", 242, 3);
    p.frames.setString(p, "Text Here [Line 1]", 242, 4);
    p.frames.setString(p, "Text Here [Line 2]", 242, 5);
    break;
    Where i put:

    Code:
    p.frames.showChatboxInterface(p, 242);
    p.frames.animateInterfaceId(p, 9815, 242, 2);
    p.frames.setNPCId(p, 4288, 242, 2);
    p.frames.setString(p, "Ajjat", 242, 3);
    p.frames.setString(p, "Text Here [Line 1]", 242, 4);
    p.frames.setString(p, "Text Here [Line 2]", 242, 5);
    Put anything you want there, its basically like adding a command between the case # and the break.

    The code that i should you above is a dialogue code, if i click on the object that dosent work [that i used for the case] it will randomly come up with a dialogue Ajjat is saying.

    Save, compile, run, and click the object that didnt work before and it should do what you put in.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Apr 2008
    Age
    26
    Posts
    732
    Thanks given
    5
    Thanks received
    76
    Rep Power
    0
    What so if you click on a object, it'l make a npc dialogue open. E.g for banking.. When you click the booth it'l make the banker speak..
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2008
    Posts
    81
    Thanks given
    0
    Thanks received
    0
    Rep Power
    25
    Yeah, then you could request to open the bank after the dialogue is finshed, that would be pretty good banking.
    Reply With Quote  
     

  4. #4  
    Member
    Join Date
    Jul 2009
    Posts
    117
    Thanks given
    1
    Thanks received
    0
    Rep Power
    0
    i cant find ojectoption1.java.. but i can find Objectinteract.java so i added it there and got these errors..
    Code:
    Compiling Quest-Isle 525
    1/13 Complete
    2/13 Complete
    3/13 Complete
    4/13 Complete
    5/13 Complete
    6/13 Complete
    7/13 Complete
    8/13 Complete
    9/13 Complete
    src\com\rs2hd\packethandler\ObjectInteract.java:59: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.showChatboxInterface(p, 242);
                                  ^
    src\com\rs2hd\packethandler\ObjectInteract.java:59: package p does not exist
    p.frames.showChatboxInterface(p, 242);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:60: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.animateInterfaceId(p, 9815, 242, 2);
                                ^
    src\com\rs2hd\packethandler\ObjectInteract.java:60: package p does not exist
    p.frames.animateInterfaceId(p, 9815, 242, 2);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:61: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setNPCId(p, 4288, 242, 2);
                      ^
    src\com\rs2hd\packethandler\ObjectInteract.java:61: package p does not exist
    p.frames.setNPCId(p, 4288, 242, 2);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:62: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setString(p, "Ajjat", 242, 3);
                       ^
    src\com\rs2hd\packethandler\ObjectInteract.java:62: package p does not exist
    p.frames.setString(p, "Ajjat", 242, 3);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:63: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setString(p, "hi mom [Line 1]", 242, 4);
                       ^
    src\com\rs2hd\packethandler\ObjectInteract.java:63: package p does not exist
    p.frames.setString(p, "hi mom [Line 1]", 242, 4);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:64: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setString(p, "sup [Line 2]", 242, 5);
                       ^
    src\com\rs2hd\packethandler\ObjectInteract.java:64: package p does not exist
    p.frames.setString(p, "sup [Line 2]", 242, 5);
     ^
    12 errors
    10/13 Complete
    11/13 Complete
    12/13 Complete
    OwnX complete
    Press any key to continue . . .
    Reply With Quote  
     

  5. #5  
    Registered Member
    josue992222's Avatar
    Join Date
    Mar 2009
    Posts
    922
    Thanks given
    11
    Thanks received
    5
    Rep Power
    460
    Quote Originally Posted by u piguy u View Post
    i cant find ojectoption1.java.. but i can find Objectinteract.java so i added it there and got these errors..
    Code:
    Compiling Quest-Isle 525
    1/13 Complete
    2/13 Complete
    3/13 Complete
    4/13 Complete
    5/13 Complete
    6/13 Complete
    7/13 Complete
    8/13 Complete
    9/13 Complete
    src\com\rs2hd\packethandler\ObjectInteract.java:59: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.showChatboxInterface(p, 242);
                                  ^
    src\com\rs2hd\packethandler\ObjectInteract.java:59: package p does not exist
    p.frames.showChatboxInterface(p, 242);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:60: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.animateInterfaceId(p, 9815, 242, 2);
                                ^
    src\com\rs2hd\packethandler\ObjectInteract.java:60: package p does not exist
    p.frames.animateInterfaceId(p, 9815, 242, 2);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:61: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setNPCId(p, 4288, 242, 2);
                      ^
    src\com\rs2hd\packethandler\ObjectInteract.java:61: package p does not exist
    p.frames.setNPCId(p, 4288, 242, 2);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:62: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setString(p, "Ajjat", 242, 3);
                       ^
    src\com\rs2hd\packethandler\ObjectInteract.java:62: package p does not exist
    p.frames.setString(p, "Ajjat", 242, 3);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:63: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setString(p, "hi mom [Line 1]", 242, 4);
                       ^
    src\com\rs2hd\packethandler\ObjectInteract.java:63: package p does not exist
    p.frames.setString(p, "hi mom [Line 1]", 242, 4);
     ^
    src\com\rs2hd\packethandler\ObjectInteract.java:64: cannot find symbol
    symbol  : variable p
    location: class com.rs2hd.packethandler.ObjectInteract
    p.frames.setString(p, "sup [Line 2]", 242, 5);
                       ^
    src\com\rs2hd\packethandler\ObjectInteract.java:64: package p does not exist
    p.frames.setString(p, "sup [Line 2]", 242, 5);
     ^
    12 errors
    10/13 Complete
    11/13 Complete
    12/13 Complete
    OwnX complete
    Press any key to continue . . .
    this is 508 not 525.



    Reply With Quote  
     

  6. #6  
    Registered Member
    X Mercy X's Avatar
    Join Date
    May 2009
    Age
    28
    Posts
    1,336
    Thanks given
    3
    Thanks received
    41
    Rep Power
    301
    thanks i will be using this alot when i start npc stuff for my pali base
    Reply With Quote  
     

  7. #7  
    Hi.

    'Mystic Flow's Avatar
    Join Date
    Nov 2007
    Posts
    7,141
    Thanks given
    256
    Thanks received
    1,247
    Rep Power
    3636
    Everyone had this.....Ages ago -_-

    Ontopic: only like 2 ppl released so you actually gave us something usefull

    [Only registered and activated users can see links. ]

    Reply With Quote  
     

  8. #8  
    Rawr.


    Join Date
    Oct 2008
    Age
    25
    Posts
    2,166
    Thanks given
    10
    Thanks received
    51
    Rep Power
    1326
    lol wow i knew this i just use shoubox interface and remove the rest and then have 1 text so it like this





    Was good while it lasted

    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
  •