Thread: {Matrix} {667+} A Better Make Over Mage

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 {Matrix} {667+} A Better Make Over Mage 
    Banned
    Join Date
    Sep 2014
    Posts
    224
    Thanks given
    132
    Thanks received
    23
    Rep Power
    0


    I posted this at another website a while back, removed it from there and decided to post it here instead. It works way better than the original Matrix version, it runs better and when you purchase the magical amulet, it deducts the 100 coins from your Money Pouch instead of inventory. Add/edit as much as you wish, and make sure to add the required imports that are needed to save without errors.

    EDIT: I noticed this was in the tutorials section, and seems like a snippet and I think it needs to be moved to that area instead.

    Code:
    
    
    Code:
    /**
     * @author Noobscape
     * @link www.rune-server.org
     */
    
    
    public class MakeOverMage extends Dialogue {
    
    
        int npcId;
    
    
        @Override
        public void start() {
            npcId = (Integer) parameters[0];
                sendEntityDialogue(
                        SEND_3_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "Hello there! I am know as the Makeover Mage! I have",
                                "spent many years researching magicks that can change",
                                "your physical appearence." }, IS_NPC, npcId, 9827);
            }
        
    
    
        @Override
        public void run(int interfaceId, int componentId) {
            if (stage == -1) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(SEND_2_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "I call it a 'makeover'.",
                                "Would you like to perform my magicks on you?" },
                        IS_NPC, npcId, 9827);
                stage = 1;
            } else if (stage == 1) {
                sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE,
                        "Tell me more about this 'makeover'.", "Sure, do it.",
                        "No thanks.", "Cool amulet! Can I have one?");
                stage = 2;
            } else if (stage == 2) {
                if (componentId == OPTION_1)
                    stage = 3;
              else if (componentId == OPTION_2) 
                  stage = 4;
              else if (componentId == OPTION_3) 
                  stage = 17;
              else if (componentId == OPTION_4) {
                  stage = 6;
                }
            } if (stage == 3) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "Tell me more about this 'makeover'" }, IS_PLAYER,
                        player.getIndex(), 9827);
                    stage = 7;
            } if (stage == 4) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "Sure, do it." }, IS_PLAYER,
                        player.getIndex(), 9827);
                    stage = 19;
            } if (stage == 5) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "No thanks. I'm happy as Saradomin made me." }, IS_PLAYER,
                        player.getIndex(), 9827);
                stage = 20;
            } if (stage == 6) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "Cool amulet! Can I have one?" }, IS_PLAYER,
                        player.getIndex(), 9827);
                    stage = 21;
            } else if (stage == 21) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(
                        SEND_3_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "No problem, but please remember that the amulet I will",
                                "sell you is only a copy of my own. It contains no magical",
                                "powers and, as such, it will only cost you 100 coins." },
                        IS_NPC, npcId, 9827);
                stage = 22;
            } else if (stage == 7) {
                sendEntityDialogue(
                        SEND_2_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "Why, of course! Basically, and I will explain so that",
                                "you understand it correctly," }, IS_NPC, npcId,
                        9827);
                stage = 8;
            } else if (stage == 8) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(
                        SEND_2_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "I use my secret magical technique to melt your body down",
                                "into a puddle of its elements" }, IS_NPC, npcId,
                        9827);
                stage = 9;
            } else if (stage == 9) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(
                        SEND_2_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "When I have broken down all components of your body, I",
                                "then rebuilt it into the form I am thinking of." },
                        IS_NPC, npcId, 9827);
                stage = 10;
            } else if (stage == 10) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(
                        SEND_1_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "Or, you know, something vaguely close enough, anyway." },
                        IS_NPC, npcId, 9827);
                stage = 11;
            } if (stage == 11) {
                sendEntityDialogue(
                        SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "Uh... that doesn't sound particualry safe to me." },
                        IS_PLAYER, player.getIndex(), 9827);
                stage = 12;
            } else if (stage == 12) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(
                        SEND_2_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "It's as safe as houses. Why, I have only had thirty-six",
                                "major accidents this month!" }, IS_NPC, npcId,
                        9827);
                stage = 13;
            } else if (stage == 13) {
                npcId = (Integer) parameters[0];
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "So what do you say? Feel like a change?" },
                        IS_NPC, npcId, 9827);
                stage = 14;
            } else if (stage == 14) {
                sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE,
                        "Sure do it.", "No thanks.");
                stage = 15;
            } else if (stage == 15) {
                if (componentId == OPTION_1)
                    stage = 16;
              else if (componentId == OPTION_2) {
                      stage = 17;
                }
            } if (stage == 16) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "Sure, do it." }, IS_PLAYER,
                        player.getIndex(), 9827);
                    stage = 19;
            } if (stage == 19) {
                PlayerLook.openMageMakeOver(player);
                end();
            } if (stage == 17) {
                    sendEntityDialogue(SEND_1_TEXT_CHAT,
                            new String[] { player.getDisplayName(),
                                    "No thanks. I'm happy as Saradomin made me." }, IS_PLAYER,
                            player.getIndex(), 9827);
                    stage = 20;
            } else if (stage == 20) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] {
                                "Make Over Mage",
                                "Ehhh...suit yourself." }, IS_NPC, npcId, 9827);
                end();
            } else if (stage == 22) {
                sendOptionsDialogue(SEND_DEFAULT_OPTIONS_TITLE,
                        "Sure, here you go.", "No way! That's too expensive.");
                stage = 23;
            } else if (stage == 23) {
                if (componentId == OPTION_1)
                    stage = 24;
              else if (componentId == OPTION_2)  {
                    stage = 25;
                }
            if (stage == 24) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "Sure, here you go." }, IS_PLAYER,
                        player.getIndex(), 9827);
                stage = 26;
                if (!(player.money != 995))
                    end();            
                } 
            if (stage == 26) {
                        sendEntityDialogue(SEND_1_TEXT_CHAT, new String[] { "",
                                "You receive an amulet in exchange for 100 coins." },
                                IS_ITEM, 7803, SEND_NO_EMOTE);
                        player.money -= 100;
                        player.getPackets().sendRunScript(5561, 0, 100);
                        player.getInventory().addItem(7803, 1);
                        stage = 27;
            } if (stage == 25) {
                sendEntityDialogue(SEND_1_TEXT_CHAT,
                        new String[] { player.getDisplayName(),
                                "No way! That's too expensive." }, IS_PLAYER,
                        player.getIndex(), 9827);
                    stage = 27;
                }
    
    
    //fixed by cr3zzy
           if (stage == 27) { 
    end(); 
    } 
    else stage++;
        
        @Override
        public void finish() {
            // TODO Auto-generated method stub
    
    
        }
    
    
    }

    I understand that anyone could do this themselves, but lets just leave it for the beginners and what not.

    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Feb 2013
    Posts
    4,409
    Thanks given
    59
    Thanks received
    478
    Rep Power
    138
    Why not use sendNPCDialogue?
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Sep 2014
    Posts
    224
    Thanks given
    132
    Thanks received
    23
    Rep Power
    0
    Quote Originally Posted by Datbeastmayne View Post
    Why not use sendNPCDialogue?
    EDIT: I tried it and that was the problem that Matrix was having, I used sendEntityDialogue as it cured the issue of what it was having before. But I agree, sendNPCDialogue could of worked.
    Reply With Quote  
     

  4. #4  
    Banned
    Join Date
    Jul 2014
    Posts
    437
    Thanks given
    200
    Thanks received
    76
    Rep Power
    0
    Looks good.
    Reply With Quote  
     

  5. #5  
    Donator

    Join Date
    Jan 2014
    Posts
    1,617
    Thanks given
    8
    Thanks received
    196
    Rep Power
    39
    Nice.
    Reply With Quote  
     

  6. #6  
    ♢♢♢♢♢♢

    Con Artist's Avatar
    Join Date
    Jan 2012
    Posts
    1,350
    Thanks given
    665
    Thanks received
    308
    Rep Power
    386
    So what did you 'improve' in this dialogue besides deducting 100 coins in such
    Code:
    player.money -= 100; 					player.getPackets().sendRunScript(5561, 0, 100); 					player.getInventory().addItem(7803, 1);
    way ?


    widdy widdy


    /|\
    / \

    Attached image
    Reply With Quote  
     

  7. #7  
    Banned
    Join Date
    Sep 2014
    Posts
    224
    Thanks given
    132
    Thanks received
    23
    Rep Power
    0
    Quote Originally Posted by Code Artist View Post
    So what did you 'improve' in this dialogue besides deducting 100 coins in such
    Code:
    player.money -= 100;                     player.getPackets().sendRunScript(5561, 0, 100);                     player.getInventory().addItem(7803, 1);
    way ?
    Um, I rewrote it? Made it so it actually goes to the next stage since the Matrix just keeps replaying the previous stage and doesn't continue.
    Reply With Quote  
     

  8. #8  
    Registered Member
    Join Date
    Mar 2010
    Age
    33
    Posts
    703
    Thanks given
    237
    Thanks received
    70
    Rep Power
    32
    Why not use a switch statement? lol
    Why do mods give infractions? No fker cares if they get banned from an RSPS forums. At the end of the day its a Runescape private server forums full of noobs and it takes 30 secs to make an new account.
    Reply With Quote  
     

  9. #9  
    L O S E Y O U R S E L F
    Format's Avatar
    Join Date
    Aug 2013
    Posts
    2,311
    Thanks given
    1,131
    Thanks received
    1,461
    Rep Power
    5000
    Quote Originally Posted by cr3zzy View Post
    Why not use a switch statement? lol
    This.


    Reply With Quote  
     

  10. #10  
    Registered Member
    Join Date
    Mar 2010
    Age
    33
    Posts
    703
    Thanks given
    237
    Thanks received
    70
    Rep Power
    32
    Tbh you could just remove all calls of:
    stage = (what eva stage its up)
    and at the end with this call:
    Code:
    if (stage == 27) {
    			end();
    		}
    change to
    Code:
    if (stage == 27) {
    			end();
    		} else
    stage++;
    Why do mods give infractions? No fker cares if they get banned from an RSPS forums. At the end of the day its a Runescape private server forums full of noobs and it takes 30 secs to make an new account.
    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. [Delta] Make-Over Mage
    By nl pk3er in forum Tutorials
    Replies: 14
    Last Post: 05-08-2010, 03:37 AM
  2. [Code][Delta]Make Over Mage
    By Lord Military in forum Help
    Replies: 4
    Last Post: 03-21-2010, 06:22 PM
  3. make over mage
    By Zᴀᴄʜ in forum Help
    Replies: 0
    Last Post: 09-27-2009, 08:10 PM
  4. make over mage models
    By Purp in forum Requests
    Replies: 0
    Last Post: 08-20-2009, 12:42 PM
  5. Make-over mage
    By King Vexille in forum Help
    Replies: 1
    Last Post: 06-14-2009, 12:25 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
  •