Welcome, guest! Please login or register.

    * Shoutbox

    RefreshHistory
    • SOUPSOUP: just get a vpn
      August 13, 2018, 06:44:28 PM
    • jme: _^_ will answer all of your javascript questions
      August 12, 2018, 07:11:00 PM
    • doomsale: and where is boxman?
      August 10, 2018, 03:16:59 AM
    • doomsale: Where can i play the Moparscape MMORPG with the Metallica instrumentals?
      August 10, 2018, 03:16:47 AM
    • doomsale: no longer clicking on doors and dummies at east bank
      August 10, 2018, 03:16:07 AM
    • doomsale: were all grown up now huh?
      August 10, 2018, 03:15:58 AM
    • _^_: hey everyone look at my graphs [link]
      August 06, 2018, 01:52:16 PM
    • braedyn: Someone pl0x help me out with PI Lottery!!
      August 03, 2018, 02:12:25 AM
    • Travas: p3n1s
      July 26, 2018, 09:46:33 PM
    • Krackkid: You up :eggplant:
      July 23, 2018, 06:18:17 PM
    • DeathsChaos9: no
      July 23, 2018, 03:53:31 PM
    • Emulous: Come check out Emulous: [link]
      July 22, 2018, 03:37:19 PM
    • Emulous:[link]
      July 22, 2018, 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

    Author Topic: Pi 317 Help  (Read 536 times)

    0 Members and 1 Guest are viewing this topic.

    Offlinetank nation

    • Member
    • ****
    • Posts: 483
    • Thanks: +0/-0
      • View Profile
    Pi 317 Help
    « on: November 06, 2015, 01:09:48 AM »
    How can i turn this into a basic timer so that both arrows hit at different times for my dark bow

    Code: [Select]
    public static void fireProjectileNpc(final Client c)
            {
                    if (c.oldNpcIndex > 0)
                    {
                            if (NPCHandler.npcs[c.oldNpcIndex] != null)
                            {
                                    c.projectileStage = 2;
                                    final int pX = c.getX();
                                    final int pY = c.getY();
                                    final int nX = NPCHandler.npcs[c.oldNpcIndex].getX();
                                    final int nY = NPCHandler.npcs[c.oldNpcIndex].getY();
                                    final int offX = (pY - nY) * -1;
                                    final int offY = (pX - nX) * -1;
    if (c.getCombat().usingDbow())
                                    c.getPA().createPlayersProjectile(pX, pY, offX, offY, 50,
                                                    c.getCombat().getProjectileSpeed(),
                                                    c.getCombat().getRangeProjectileGFX(), 43, 31,
                                                    c.oldNpcIndex + 1,
                                                    c.getCombat().getProjectileShowDelay());
                                    if (c.getCombat().usingDbow())
                                    {
                                            c.getPA().createPlayersProjectile2(pX, pY, offX, offY, 50,
                                                            c.getCombat().getProjectileSpeed(),
                                                            c.getCombat().getRangeProjectileGFX(), 60, 31,
                                                            c.oldNpcIndex + 1, c.getCombat().getStartDelay(),
                                                            35);
                                    }
                            }
                    }
            }
     
            public static void fireProjectilePlayer(final Client c)
            {
                    if (c.oldPlayerIndex > 0)
                    {
                            if (PlayerHandler.players[c.oldPlayerIndex] != null)
                            {
                                    c.projectileStage = 2;
                                    final int pX = c.getX();
                                    final int pY = c.getY();
                                    final int oX = PlayerHandler.players[c.oldPlayerIndex].getX();
                                    final int oY = PlayerHandler.players[c.oldPlayerIndex].getY();
                                    final int offX = (pY - oY) * -1;
                                    final int offY = (pX - oX) * -1;
                                    if (c.playerEquipment[c.playerWeapon] == 15241)
                                    {
                                            c.gfx0(2138);
                                            c.getPA().createPlayersProjectile2(pX, pY, offX, offY, 50,
                                                            55, RangeData.getRangeProjectileGFX(c), 22, 22,
                                                            c.oldPlayerIndex - 1,
                                                            c.getCombat().getStartDelay(), -1);
                                    }
                                    else if (!c.msbSpec)
                                    {
                                            c.getPA().createPlayersProjectile(pX, pY, offX, offY, 50,
                                                            c.getCombat().getProjectileSpeed(),
                                                            c.getCombat().getRangeProjectileGFX(), 43, 31,
                                                            -c.oldPlayerIndex - 1,
                                                            c.getCombat().getStartDelay());
                                    }
                                    else if (c.msbSpec)
                                    {
                                            c.getPA().createPlayersProjectile2(pX, pY, offX, offY, 50,
                                                            c.getCombat().getProjectileSpeed(),
                                                            c.getCombat().getRangeProjectileGFX(), 43, 31,
                                                            -c.oldPlayerIndex - 1,
                                                            c.getCombat().getStartDelay(), 10);
                                            c.msbSpec = false;
                                    }
                                    if (c.getCombat().usingDbow())
                                    {
                                            // c.getPA().createProjectile3(pY, pX, offY, offX, 50,
                                            // c.getCombat().getProjectileSpeed(),
                                            // c.getCombat().getRangeProjectileGFX(), 60, 31, -
                                            // c.oldPlayerIndex - 1, c.getCombat().getStartDelay(), 35);
                                            c.getPA().createProjectile3(pY, pX, offY, offX,
                                                            c.getCombat().getRangeProjectileGFX(), 53, 31, 100,
                                                            -c.oldPlayerIndex - 1);
                                    }
     
                            }
                    }
            }
    Runescape Gambling

    Offlinesk8rdude461

    • MOPARSCAPE WAS HACKED
    • Member
    • ****
    • *
    • Posts: 12,471
    • Thanks: +0/-0
      • View Profile
    Re: Pi 317 Help
    « Reply #1 on: November 06, 2015, 05:52:55 AM »
    Oh look, yet again here you are asking about how to use a timer.

    So tell me, what part of this thread didn't make sense?
    https://forum.moparscape.org/index.php?topic=671132.0

    Because this is literally the same question. I'm tired of seeing you ask the same thing, over, and over. But yet, when we attempt to help, you only want us to provide you with the end-code. That's why I've been on your topics telling you to stop posting new ones. You never pursue the question yourself. You come here and post it, and expect us to do all your work. Sorry, but that's not how it is.
    Runescape Gambling

    OfflineTabbyKiller

    • Moderator
    • *****
    • Posts: 6,752
    • Thanks: +0/-0
      • View Profile
    Re: Pi 317 Help
    « Reply #2 on: November 06, 2015, 08:33:30 AM »
    The other topic is old so I'll bump it for you. Just for future reference, if you cant bump your topic just send me or anyone else a PM and I'm sure we'll do it for you.
    Also take ska8rdude461's advice. The server helpers here aren't here to do your homework, work with them and help them help you.

    PM me if you have any queries
    Runescape Gambling

     

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