Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • Emulous: Come check out Emulous: [link]
      Today at 03:37:19 PM
    • Emulous:[link]
      Today at 03:37:00 PM
    • Travas: ur mom
      July 21, 2018, 06:04:50 PM
    • YNRDAB: Watcha big ballers up too?
      July 20, 2018, 11:01:06 AM
    • dark250: i need help for coding client
      July 19, 2018, 08:27:37 AM
    • Travas: yes
      July 14, 2018, 02:19:44 PM
    • drubrkletern: lmao racist and sexist much?
      July 14, 2018, 01:11:52 PM
    • Cole1497: yeah i got you lil boat give me a second
      July 13, 2018, 03:19:35 AM
    • B0ATY.: yo can anyone unban my ip, i got banned for saying i hope someone gets aids :p
      July 12, 2018, 09:16:00 PM
    • jme: ziplock this domain belongs to the kremlin now
      July 12, 2018, 06:54:31 PM
    • Pure_: lol
      July 12, 2018, 01:37:47 PM
    • ziplock: wtf is this forum? Haven't checked in in 4 years lmao
      July 11, 2018, 10:26:03 AM
    • ziplock: Idk
      July 11, 2018, 10:25:41 AM
    • _^_: guys is anyone still even here
      July 11, 2018, 01:54:43 AM
    • Travas: gay
      July 08, 2018, 02:00:14 PM
    • CheapOnlineHost: Hosting starting at $0.75 hostcheap.io
      July 08, 2018, 09:35:20 AM
    • q1w1e1r1t1y: is the server actually updating or is it down?? trying to log on for the first time in a few months and it says "server updating try again in 1 minute" for the last 10 minutes now
      July 07, 2018, 11:11:51 PM
    • Cole1497: gamers unite
      July 07, 2018, 04:26:07 PM
    • IamLation: LMFAO @cole
      July 06, 2018, 10:36:52 AM
    • drubrkletern: olfihsouhdiu
      July 04, 2018, 04:25:32 PM

    Author Topic: [317] [PI] Pouch/Scroll Creation Interface  (Read 351 times)

    0 Members and 1 Guest are viewing this topic.

    OfflineDerpaDerpy

    • Member
    • ***
    • Posts: 159
    • Thanks: +0/-0
      • View Profile
    [317] [PI] Pouch/Scroll Creation Interface
    « on: May 13, 2015, 07:42:17 PM »
    I am having trouble with the pouch/scroll creation interface. Everything is there except for the pouch pictures.

    Code: [Select]
    public static void pouches(TextDrawingArea TDA[])
        {
            int totalScrolls = pouchItems.length;
            int xPadding = 53;
            int yPadding = 57;
            int xPos = 13;
            int yPos = 20;
            RSInterface rsinterface = addTabInterface(23471);
            setChildren(7, rsinterface);
            addSprite(23472, 1, "interfaces/summoning/creation/summoning");
            addButton(23475, 0, "interfaces/summoning/creation/tab", "Transform Scolls");
            addSprite(23474, 1, "interfaces/summoning/creation/pouch");
            addSprite(23473, 1, "interfaces/summoning/creation/tab");
            addSprite(23476, 0, "interfaces/summoning/creation/scroll");
            addInAreaHover(23477, "interfaces/summoning/creation/close", 0, 1, 16, 16, "Close", 250, 3);
            RSInterface scroll = addTabInterface(23478);
            setChildren(3 * totalScrolls, scroll);
            for(int i = 0; i < totalScrolls; i++)
            {
                addInAreaHover(23479 + i * 8, "interfaces/summoning/creation/box", 0, 1, 48, 52, "nothing", -1, 0);
                int req[] = {
                    1, 2, 3
                };
                addPouch(23480 + i * 8, req, 1, pouchItems[i], summoningLevelRequirements[i], pouchNames[i], TDA, i, 5);
                addSprite(23485 + i * 8, pouchItems[i], null, 50, 50);
                setBounds(23479 + i * 8, 36 + (i % 8) * xPadding, 0 + (i / 8) * yPadding, 0 + i * 2, scroll);
                setBounds(23480 + i * 8, 43 + (i % 8) * xPadding, 2 + (i / 8) * yPadding, 1 + i * 2, scroll);
            }

            for(int i = 0; i < totalScrolls; i++)
            {
                int drawX = 5 + (i % 8) * xPadding;
                if(drawX > 292)
                    drawX -= 90;
                int drawY = 55 + (i / 8) * yPadding;
                if(drawY > 160)
                    drawY -= 80;
                setBounds(23481 + i * 8, drawX, drawY, 2 + (totalScrolls - 1) * 2 + i, scroll);
            }

            scroll.parentID = 23478;
            scroll.id = 23478;
            scroll.atActionType = 0;
            scroll.contentType = 0;
            scroll.width = 474;
            scroll.height = 257;
            scroll.scrollMax = 570;
            setBounds(23472, xPos, yPos, 0, rsinterface);
            setBounds(23473, xPos + 9, yPos + 9, 1, rsinterface);
            setBounds(23474, xPos + 29, yPos + 10, 2, rsinterface);
            setBounds(23475, xPos + 79, yPos + 9, 3, rsinterface);
            setBounds(23476, xPos + 106, yPos + 10, 4, rsinterface);
            setBounds(23477, xPos + 461, yPos + 10, 5, rsinterface);
            setBounds(23478, 0, yPos + 39, 6, rsinterface);
        }

        public static void scrolls(TextDrawingArea TDA[])
        {
            int totalScrolls = pouchItems.length;
            int xPadding = 53;
            int yPadding = 57;
            int xPos = 13;
            int yPos = 20;
            RSInterface rsinterface = addTabInterface(22760);
            setChildren(7, rsinterface);
            addSprite(22761, 0, "interfaces/summoning/creation/summoning");
            addButton(22762, 0, "interfaces/summoning/creation/tab", "Infuse Pouches");
            addSprite(22763, 0, "interfaces/summoning/creation/pouch");
            addSprite(22764, 1, "interfaces/summoning/creation/tab");
            addSprite(22765, 1, "interfaces/summoning/creation/scroll");
            addInAreaHover(22766, "interfaces/summoning/creation/close", 0, 1, 16, 16, "Close", 250, 3);
            RSInterface scroll = addTabInterface(22767);
            setChildren(4 * totalScrolls, scroll);
            for(int i = 0; i < totalScrolls; i++)
            {
                addInAreaHover(22768 + i * 9, "interfaces/summoning/creation/box", 0, 1, 48, 52, "nothing", -1, 0);
                addScroll(22769 + i * 9, pouchItems[i], 1, scrollItems[i], summoningLevelRequirements[i], scrollNames[i], TDA, i, 5);
                addSprite(22776 + i * 9, pouchItems[i], null, 50, 50);
                setBounds(22768 + i * 9, 36 + (i % 8) * xPadding, 0 + (i / 8) * yPadding, 0 + i * 3, scroll);
                setBounds(22769 + i * 9, 43 + (i % 8) * xPadding, 2 + (i / 8) * yPadding, 1 + i * 3, scroll);
                setBounds(22776 + i * 9, 28 + (i % 8) * xPadding, 28 + (i / 8) * yPadding, 2 + i * 3, scroll);
            }

            for(int i = 0; i < totalScrolls; i++)
            {
                int drawX = 5 + (i % 8) * xPadding;
                if(drawX > 292)
                    drawX -= 90;
                int drawY = 55 + (i / 8) * yPadding;
                if(drawY > 160)
                    drawY -= 80;
                setBounds(22770 + i * 9, drawX, drawY, 3 + (totalScrolls - 1) * 3 + i, scroll);
            }

            scroll.parentID = 22767;
            scroll.id = 22767;
            scroll.atActionType = 0;
            scroll.contentType = 0;
            scroll.width = 474;
            scroll.height = 257;
            scroll.scrollMax = 570;
            setBounds(22761, xPos, yPos, 0, rsinterface);
            setBounds(22762, xPos + 9, yPos + 9, 1, rsinterface);
            setBounds(22763, xPos + 29, yPos + 10, 2, rsinterface);
            setBounds(22764, xPos + 79, yPos + 9, 3, rsinterface);
            setBounds(22765, xPos + 106, yPos + 10, 4, rsinterface);
            setBounds(22766, xPos + 461, yPos + 10, 5, rsinterface);
            setBounds(22767, 0, yPos + 39, 6, rsinterface);
        }

    public static void addScroll(int ID, int r1, int ra1, int r2, int lvl, String name, TextDrawingArea TDA[], int imageID,
                int type)
        {
            RSInterface rsInterface = addTabInterface(ID);
            rsInterface.id = ID;
            rsInterface.parentID = 1151;
            rsInterface.type = 5;
            rsInterface.atActionType = type;
            rsInterface.contentType = 0;
            rsInterface.mOverInterToTrigger = ID + 1;
            rsInterface.width = 32;
            rsInterface.height = 32;
            rsInterface.tooltip = (new StringBuilder()).append("Transform @[email protected]").append(name).toString();
            rsInterface.spellName = name;
            rsInterface.valueCompareType = new int[2];
            rsInterface.requiredValues = new int[2];
            rsInterface.valueCompareType[0] = 3;
            rsInterface.requiredValues[0] = ra1;
            rsInterface.valueCompareType[1] = 3;
            rsInterface.requiredValues[1] = lvl - 1;
            rsInterface.valueIndexArray = new int[3][];
            rsInterface.valueIndexArray[0] = new int[4];
            rsInterface.valueIndexArray[0][0] = 4;
            rsInterface.valueIndexArray[0][1] = 3214;
            rsInterface.valueIndexArray[0][2] = r1;
            rsInterface.valueIndexArray[0][3] = 0;
            rsInterface.valueIndexArray[1] = new int[3];
            rsInterface.valueIndexArray[1][0] = 1;
            rsInterface.valueIndexArray[1][1] = 6;
            rsInterface.valueIndexArray[1][2] = 0;
            rsInterface.itemSpriteId1 = r2;
            rsInterface.itemSpriteId2 = r2;
            rsInterface.itemSpriteIndex = imageID;
            rsInterface.greyScale = true;
            RSInterface hover = addTabInterface(ID + 1);
            hover.mOverInterToTrigger = -1;
            hover.isMouseoverTriggered = true;
            setChildren(5, hover);
            addSprite(ID + 2, 0, "Lunar/BOX");
            addText(ID + 3, (new StringBuilder()).append("Level ").append(lvl).append(": ").append(name).toString(), 0xff981f, true, true, 52, 1);
            addText(ID + 4, "This item requires", 0xaf6a1a, true, true, 52, 0);
            addRuneText(ID + 5, ra1, r1, TDA);
           // addSprite(ID + 6, r1, null);
            setBounds(ID + 2, 0, 0, 0, hover);
            setBounds(ID + 3, 90, 4, 1, hover);
            setBounds(ID + 4, 90, 19, 2, hover);
            setBounds(ID + 5, 87, 66, 3, hover);
            setBounds(ID + 6, 72, 33, 4, hover);
        }

        public static void addPouch(int ID, int r1[], int ra1, int r2, int lvl, String name, TextDrawingArea TDA[], int imageID,
                int type)
        {
            RSInterface rsInterface = addTabInterface(ID);
            rsInterface.id = ID;
            rsInterface.parentID = 1151;
            rsInterface.type = 5;
            rsInterface.atActionType = type;
            rsInterface.contentType = 0;
            rsInterface.mOverInterToTrigger = ID + 1;
            rsInterface.width = 32;
            rsInterface.height = 32;
            rsInterface.tooltip = (new StringBuilder()).append("Infuse @[email protected]").append(name).toString();
            rsInterface.spellName = name;
            rsInterface.valueCompareType = new int[2];
            rsInterface.requiredValues = new int[2];
            rsInterface.valueCompareType[0] = 3;
            rsInterface.requiredValues[0] = ra1;
            rsInterface.valueCompareType[1] = 3;
            rsInterface.requiredValues[1] = lvl - 1;
            rsInterface.valueIndexArray = new int[2 + r1.length][];
            for(int i = 0; i < r1.length; i++)
            {
                rsInterface.valueIndexArray[i] = new int[4];
                rsInterface.valueIndexArray[i][0] = 4;
                rsInterface.valueIndexArray[i][1] = 3214;
                rsInterface.valueIndexArray[i][2] = r1[i];
                rsInterface.valueIndexArray[i][3] = 0;
            }

            rsInterface.valueIndexArray[1] = new int[3];
            rsInterface.valueIndexArray[1][0] = 1;
            rsInterface.valueIndexArray[1][1] = 6;
            rsInterface.valueIndexArray[1][2] = 0;
            rsInterface.itemSpriteId1 = r2;
            rsInterface.itemSpriteId2 = r2;
            rsInterface.itemSpriteIndex = imageID;
            rsInterface.greyScale = true;
            RSInterface hover = addTabInterface(ID + 1);
            hover.mOverInterToTrigger = -1;
            hover.isMouseoverTriggered = true;
            setChildren(5, hover);
            addSprite(ID + 2, 0, "Lunar/BOX");
            addText(ID + 3, (new StringBuilder()).append("Level ").append(lvl).append(": ").append(name).toString(), 0xff981f, true, true, 52, 1);
            addText(ID + 4, "This item requires", 0xaf6a1a, true, true, 52, 0);
            addRuneText(ID + 5, ra1, r1[0], TDA);
    /*        addSprite(ID + 6, r1[0], null);
            addSprite(ID + 7, r1[1], null);
            addSprite(ID + 8, r1[2], null);*/
            setBounds(ID + 2, 0, 0, 0, hover);
            setBounds(ID + 3, 90, 4, 1, hover);
            setBounds(ID + 4, 90, 19, 2, hover);
            setBounds(ID + 5, 87, 66, 3, hover);
            setBounds(ID + 6, 14, 33, 4, hover);
        }

    This is the code for what I have so far and this is a picture of it.
    Runescape Gambling

     

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