Thread: Help??

Results 1 to 7 of 7
  1. #1 Help?? 
    Registered Member
    Remi's Avatar
    Join Date
    Jan 2015
    Posts
    628
    Thanks given
    572
    Thanks received
    212
    Rep Power
    574
    Hello Rune-Server, back with another question , im trying to code in a difficulty system for my server, but when I have created my npc , QUESTGUIDE NPC ID 949, the last menu will not close as shown here :
    Reply With Quote  
     

  2. #2  
    i am a misanthrope
    Kavinsky's Avatar
    Join Date
    Aug 2014
    Posts
    260
    Thanks given
    14
    Thanks received
    17
    Rep Power
    29
    im pretty sure it has to do with button handler not sure never made a guide be for

    good luck
    Reply With Quote  
     

  3. #3  
    Registered Member
    Remi's Avatar
    Join Date
    Jan 2015
    Posts
    628
    Thanks given
    572
    Thanks received
    212
    Rep Power
    574
    Ill check it out, thanks
    Reply With Quote  
     

  4. #4  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Post the full dialogue.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Remi's Avatar
    Join Date
    Jan 2015
    Posts
    628
    Thanks given
    572
    Thanks received
    212
    Rep Power
    574
    here you go


    package com.rs.game.player.dialogues;

    import com.rs.game.player.dialogues.Dialogue;

    public class QuestGuide extends Dialogue {

    int starter;
    int difficulty;
    private static final int QUEST_GUIDE_NPC = 949;

    @Override
    public void start() {
    stage = 1;
    sendEntityDialogue(IS_NPC, "Starter Manager", 949, 9827,
    "Welcome to Raaze, "+player.getDisplayName()+"!",
    "As You Start Your Journey, you Have to",
    "choose your starter set and your difficulty.",
    "You may change your difficulty at a later time.");
    }

    @Override
    public void run(int interfaceId, int componentId) {

    if (player.getInterfaceManager().containsScreenInter( )) {
    player.getInterfaceManager().closeScreenInterface( );
    }

    if (stage == 1) {
    sendOptionsDialogue("Pick a Starter Type",
    "I would like a Fighter's Starter",
    "I would like an Archer's Starter",
    "I would like a Magician's Starter");
    stage = 2;
    } else if (stage == 2) {
    if (componentId == OPTION_1) {
    sendNext_1();
    } else if (componentId == OPTION_2) {
    sendNext_1();
    }else if (componentId == OPTION_3) {
    sendNext_1();
    }
    } else if (stage == 3) {
    sendOptionsDialogue("Select an Option",
    "Very Easy",
    "Easy",
    "Normal",
    "Hard",
    "Extreme");
    stage = 4;
    } else if (stage == 4) {
    if (componentId == OPTION_1) {
    this.difficulty = 1;
    sendNext_2();
    } else if (componentId == OPTION_2) {
    this.difficulty = 2;
    sendNext_2();
    } else if (componentId == OPTION_3) {
    this.difficulty = 3;
    sendNext_2();
    } else if (componentId == OPTION_4) {
    this.difficulty = 4;
    sendNext_2();
    } else if (componentId == OPTION_5) {
    this.difficulty = 5;
    sendNext_2();
    }
    } else if (stage == 5) {
    player.setDifficulty(difficulty);
    }
    }

    public void sendNext_1() {
    sendEntityDialogue(IS_NPC, "Starter Manager", 949, 9827,
    "Very good! Now all you need to do is select",
    "your difficulty. Please keep in mind that harder",
    "difficulties have low exp, but have better drops",
    "while lower difficulties are the opposite!");
    stage = 3;
    }

    public void sendNext_2() {
    sendEntityDialogue(IS_NPC, "Starter Manager", 949, 9827,
    "Very good! You've chosen to play on "+diffs[difficulty - 1]+",",
    "Now what are you waiting for? Go out and have some fun!",
    "Just click the button below and everything will",
    "be given to you! We hope you enjoy your stay!");
    stage = 5;
    }

    public static String[] diffs = { "Super Easy", "Easy", "Normal", "Hard", "Extreme" };

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

    }

    }
    Reply With Quote  
     

  6. #6  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Quote Originally Posted by ItsKexm8 View Post
    here you go
    Code:
    } else if (stage == 5) {
    player.setDifficulty(difficulty);
    end();
    }
    Reply With Quote  
     

  7. #7  
    Registered Member
    Remi's Avatar
    Join Date
    Jan 2015
    Posts
    628
    Thanks given
    572
    Thanks received
    212
    Rep Power
    574
    +1 thanks
    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

Similar Threads

  1. Need gfx help?
    By Beh3moth2 in forum General
    Replies: 1
    Last Post: 04-03-2007, 11:50 AM
  2. GIMP brush help
    By man777 in forum Tutorials
    Replies: 0
    Last Post: 04-03-2007, 03:11 AM
  3. Need help again
    By Zane in forum Showcase
    Replies: 4
    Last Post: 04-02-2007, 09:11 PM
  4. Need help choosing sig
    By Zane in forum Showcase
    Replies: 7
    Last Post: 04-02-2007, 03:14 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
  •