Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:32 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:28 AM
    • ragnoroker: Brand new unique server just released! - Awesome Community - [link]
      October 14, 2019, 11:11:23 AM
    • marquise:[link]
      October 11, 2019, 12:24:21 PM
    • marquise: hey guys try autoscape.org [link]
      October 11, 2019, 12:19:08 PM
    • Rash: is this site still ded
      October 08, 2019, 07:54:22 PM
    • The Meek: Just Uploaded New Server ~Phusion~
      October 01, 2019, 03:30:31 AM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:43 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:40 PM
    • ragnoroker: Pre-EOC New server just dropped today! Come check it out :) - [link]
      September 27, 2019, 08:43:33 PM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 09:02:13 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 26, 2019, 08:52:25 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:33 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:24 AM
    • ragnoroker: Brand new server! Join today - Good Eco/Nice Players - [link]
      September 25, 2019, 08:59:15 AM
    • PavSwag: bopalini
      September 23, 2019, 10:08:02 PM
    • PavSwag: Join autoscape,0rg fun events daily for infernal mystery boxes only server with Infernal Twisted Bow
      September 23, 2019, 03:05:33 PM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:52 AM
    • Frostydapure: Upcoming dmm/open pvp world server, 2006 style (different and fun trus me) [link] join join!
      September 23, 2019, 08:05:45 AM
    • PavSwag: try autoscape,0rg today i will personally help you get RICH and well KNOWN - pav
      September 22, 2019, 02:55:32 PM

    Author Topic: [718] Alter Dialogue  (Read 893 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineMoosee

    • Member
    • **
    • Posts: 9
    • Thanks: +10/-10
      • View Profile
    [718] Alter Dialogue
    « on: October 31, 2015, 01:16:03 PM »
    I got this basically 50%.. but when I walk up to it it doesn't want to switch it, it just sits there even though the dialogue stays there..

    Quote
    package com.rs.game.player.dialogues;

    public class Lectern extends Dialogue {


        @Override
        public void start() {
            sendOptionsDialogue("Select a Spellbook",
                        "Lunars",
                        "Ancients",
                        "Normal");
        }


        @Override
        public void run(int interfaceId, int componentId) {
            switch (stage) {
           
            case 1:
            if (componentId == OPTION_1) {
                    sendDialogue(SEND_2_TEXT_CHAT, "Your mind clears and you switch", "back to the Lunar spellbook.");
            if (player.getCombatDefinitions().getSpellBook() != 430) {
                                    player.getCombatDefinitions().setSpellBook(2);
                     }
                }
                if (componentId == OPTION_2) {
                sendDialogue(SEND_2_TEXT_CHAT, "",
                            "Your mind clears and you switch",
                            "back to the Ancients spellbook.");
                    player.getCombatDefinitions().setSpellBook(3);
                }
                if (componentId == OPTION_3) {
                    sendDialogue(SEND_2_TEXT_CHAT, "",
                            "Your mind clears and you switch",
                            "back to the Nrmal spellbook.");
                    player.getCombatDefinitions().setSpellBook(0);
                    }
                }
                break;
            }
        }


        @Override
        public void finish() {
            // TODO Auto-generated method stub
           
        }
    }

    Help will be appreciated a lot  :)
    Runescape Gambling

    OfflinexXSh0ckXx

    • Member
    • ****
    • Posts: 642
    • Thanks: +0/-0
      • View Profile
    Re: [718] Alter Dialogue
    « Reply #1 on: November 01, 2015, 10:54:10 AM »
    You forgot to add the stage.

    If you're not declaring any stage in the start method, it'd remain at -1, so in the run method you'd instead of having a case of 1 you'd go with -1 (1 -> -1) or you just assign a value to the field "stage" (1) and it'll just do fine.
    Drop me a pm.

    They got money for wars, but can't feed the poors. - Tupac Shakur
    Old, but Gold.

    OfflineMoosee

    • Member
    • **
    • Posts: 9
    • Thanks: +10/-10
      • View Profile
    Re: [718] Alter Dialogue
    « Reply #2 on: November 01, 2015, 03:29:48 PM »
    I'm horrible at dialogues..so could you guide me in the direction of what I would need to put next?  :|

    OfflinexXSh0ckXx

    • Member
    • ****
    • Posts: 642
    • Thanks: +0/-0
      • View Profile
    Re: [718] Alter Dialogue
    « Reply #3 on: November 02, 2015, 03:17:51 AM »
    I'm horrible at dialogues..so could you guide me in the direction of what I would need to put next?  :|
    Has nothing to do with dialogues, you just didn't understand what I said.

    You either change
    Code: Java(TM) 2 Platform Standard Edition 5.0
    1. case1:
    to
    Code: Java(TM) 2 Platform Standard Edition 5.0
    1. case -1:
    or you assign a value to the stage field in the start method, which in this case would be 1.
    Code: Java(TM) 2 Platform Standard Edition 5.0
    1. stage = 1;
    Drop me a pm.

    They got money for wars, but can't feed the poors. - Tupac Shakur
    Old, but Gold.

     

    Copyright © 2017 MoparScape. All rights reserved.
    Powered by SMFPacks SEO Pro Mod |
    SimplePortal 2.3.5 © 2008-2012, SimplePortal