Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • hardcore22: are there any kind of silabsoft servers like back in the days i miss that
      May 25, 2020, 05:44:08 AM
    • Amcora: @ dr house contact me; greetings celien :)
      May 24, 2020, 03:16:21 PM
    • Amcora: Stop shouting around please
      May 24, 2020, 03:13:26 PM
    • iddsyou: PkOwnage OSRSPS [link]  Join us on Discord! [link]  Download: [link]
      May 17, 2020, 11:44:17 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:19 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:48:12 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:56 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:49 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ PLAYERS BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:42 AM
    • Decimate Returns: PROJECT DECIMATE RETURNS !! 300+ BACK IN 2012 - NOW WITH ALOT OF UPDATES ! JOIN NOW! [link]
      May 17, 2020, 02:47:29 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:18:03 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:53 AM
    • ragnoroker: BRAND NEW SERVER - PRE EOC - UNIQUE - JOIN TODAY :) - [link]
      May 15, 2020, 11:17:50 AM
    • Decimate Returns: Project Decimate 474 OSRS ; [link]
      May 13, 2020, 07:27:00 PM
    • hardcore22: are there any silabsoft servers left? of the good old days like hackscape
      May 12, 2020, 07:53:18 AM
    • iddsyou: yo guys check out this instagram post #pkownage  [link]
      May 06, 2020, 02:35:58 PM
    • fishingsheep: any servers like project catasrophe or frugoo scape been remade ?
      May 04, 2020, 05:01:00 PM
    • asshole_rule: relmitos the legend
      May 04, 2020, 04:28:54 PM
    • iddsyou: PkOwnage 317 OSRS, Vote4donor, [link] Download now: [link] Discord: [link]
      May 04, 2020, 11:15:11 AM
    • relmitos: is anyone familiar with 317 packet opcodes? Im confused about opcode 3 (wich appears to send wether or not the client window is currently focused). is it safe to ignore?
      May 03, 2020, 08:47:40 AM

    Author Topic: [718] Alter Dialogue  (Read 931 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