[Add-On]Balrog PQ [V83+]

Page 1 of 7 1234567 LastLast
Results 1 to 15 of 102
  1. #1
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    [Add-On]Balrog PQ [V83+]

    Since I'm done with hosting servers, here :

    server.Events.BalrogPQ: (Yes, with a capital E on Events)
    PHP Code:
    /*
     * To change this template, choose Tools | Templates
     * and open the template in the editor.
     */

    package server.Events;
    import client.MapleCharacter;
    import java.util.*;
    import server.life.MapleLifeFactory;
    import java.awt.Point;
    import server.maps.MapleMap;
    import server.TimerManager;

    /**
     *
     * @author FateJiki
     * @Mapid 105100300
     */
    public class BalrogPQ {
        public static final 
    int[] EasyBalrogParts = {883000288300038830000};
        public static final 
    int[] HardBalrogParts = {883000088300018830002};
        public static List<
    MapleCharactercandidates = new ArrayList<MapleCharacter>();
        public static 
    boolean hasStarted false;
        public static 
    String partyLeader "undefined";
        public static 
    boolean balrogSpawned false;
        public static 
    long timeStamp 0;
        public static 
    byte channel 1;
        public static 
    void addCandidate(MapleCharacter chr){
            
    synchronized(candidates){
                
    candidates.add(chr);
            }
        }

        public static 
    void warpAllCandidates(){
            for(
    MapleCharacter c candidates){
                
    c.changeMap(105100300);
            }
        }

        public static 
    boolean isFull(MapleCharacter chr){
            return 
    chr.getClient().getChannelServer().getMapFactory().getMap(105100300).getCharacters().size() > 0;
        }

        public static 
    void warpIn(MapleCharacter chr){
            if(
    hasStarted){
                
    chr.changeMap(105100300);
            }
        }

        public static 
    void scheduleChecks(MapleMap map){
            final 
    MapleMap fmap map;
            
    TimerManager tMan TimerManager.getInstance();
            
    tMan.schedule(new Runnable(){
                @
    Override
            
    public void run(){
                    for(
    MapleCharacter chrs fmap.getCharacters()){
                        
    chrs.changeMap(105100100);
                        
    chrs.message("You did not defeat the balrog in time..");
                        
    close();
                    }
                }
            } , 
    60 60 1000);

                    
    tMan.schedule(new Runnable(){
                @
    Override
            
    public void run(){
                    if(
    fmap.getCharacters().size() <= 3){
                        if(
    fmap.getCharacters().size() > 0){
                        for(
    MapleCharacter chrs fmap.getCharacters()){
                            
    chrs.message("[The Order]: What? You're down to that many mercenaries? I need you get you out of there.");
                            
    chrs.changeMap(105100100);
                        }
                        }
                        
    fmap.killAllMonsters();
                        
    close();
                    }
                }
            } , 
    60 1000);
        }

        public static 
    void open(MapleCharacter chr){
            
    channel = (byte)chr.getClient().getChannel();
            
    hasStarted true;
            
    timeStamp System.currentTimeMillis();
            
    scheduleChecks(chr.getClient().getChannelServer().getMapFactory().getMap(105100300));
        }

        public static 
    int getSecondsLeft(){ // assuming the thing lasts 60 minutes
            
    int hour 60 60// 3600 seconds = 1hr
            
    long elapsed System.currentTimeMillis() - timeStamp;
            
    int secondsLeft = (int)(hour - (elapsed 1000));
            return 
    secondsLeft;
        }

        public static 
    void close(){
            
    hasStarted false;
            
    balrogSpawned false;
            
    partyLeader "undefined";
            
    candidates.clear();
            
    timeStamp 0;
        }
        public static 
    void spawnBalrog(int modeMapleCharacter chr){
            if(!
    balrogSpawned){
            for(
    int i 0HardBalrogParts.lengthi++){
                
    chr.getClient().getChannelServer().getMapFactory().getMap(105100300).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(HardBalrogParts[i]), new Point(412258));
                
    balrogSpawned true;
            }
            } else {
                
    // DO NUFFIN'
            
    }
        }

    scripts/onFirstUserEnter/balog_summon (Yes, there's a typo in the WZ files)
    PHP Code:
    importPackage(Packages.server.life);
    importPackage(Packages.tools);
    importPackage(Packages.server.Events);

    function 
    start(ms) {
        try {
            
    ms.getPlayer().resetEnteredScript();
            
    ms.getPlayer().getClient().getSession().write(MaplePacketCreator.getClock(BalrogPQ.getSecondsLeft())); // 60 mins(1hr)
            
    BalrogPQ.spawnBalrog(1ms.getPlayer());
        } catch(
    err) {
            
    ms.getPlayer().dropMessage(err);
        }


    1061014.js (NPC) :

    PHP Code:

    importPackage
    (Packages.server.Events);
    var 
    status 0;
    function 
    start(){
        
    status 0;
        
    action(100);
    }

    function 
    action(modetypeselection){
        if(
    mode <= 0){
            
    cm.dispose();
        } else if(
    status == 0){
            
    cm.sendNext("Hi there. I am #b#nMu Young#n#k, the temple Keeper.");
            
    status++;
        } else if(
    BalrogPQ.partyLeader == "undefined"){
            if(
    status == 1){
            var 
    text "This temple is currently under siege by the Balrog troops. We currently do not know who gave the orders. " +
                
    "For a few weeks now, the #e#b Order of the Altair#n#k has been sending mercenaries, but they were eliminated every time." +
                
    " So, traveler, would you like to try your luck at defeating this unspeakable horror? \r\n\r\n " +
                
    "#L0#Yes. Please register me as party leader\r\n#L1#What is the #eOrder of the Altair?";
            
    cm.sendSimple(text);
            
    status++;
            } else if(
    selection == 0){
                if(
    cm.getPlayer().getLevel() >= 70){
                    
    BalrogPQ.partyLeader cm.getPlayer().getName();
                    
    cm.sendOk("Success. Your name has been registered and you may enter the battlefield. Come speak to me when you're ready!");
                    
    cm.getPlayer().getMap().broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(0cm.getPlayer().getName() + " is currently fighting the balrog on CH" cm.getPlayer().getClient().getChannel() + ". To join, do @balrogpq."))
                    
    BalrogPQ.open(cm.getPlayer());
                    
    cm.dispose();
                } else if(
    cm.getPlayer().getLevel() < 70){
                    
    cm.sendOk("You must be at least level 70 to even consider battling the monster.");
                    
    cm.dispose();
                }
            } else if(
    selection == 1){
                
    cm.sendOk("The Order of the Altair is a group of elite mercenaries that oversee the world's economy and battle operations. It was founded 40 years ago right after Black Mage was defeated in hopes of forseeing the next possible attack.");
                
    cm.dispose();
            } else if(
    status == 3){
                
    cm.warp(105100300);
                
    cm.dispose();
            }
            } else {
                if(
    status == 1){
                
    cm.sendYesNo(BalrogPQ.partyLeader "'s party is currently battling the Balrog. Would you like to assist?");
                
    status++;
                } else if(
    status == 2){
                    if(
    cm.getPlayer().getLevel() > 60 && cm.getPlayer().getClient().getChannel() == BalrogPQ.channel){
                    
    cm.warp(105100300);
                    
    cm.dispose();
                    } else {
                        
    cm.sendOk("You may not battle the balrog when you are below Lv60! \r\n\r\n Or maybe you are not on the right channel.. Try CH" BalrogPQ.channel ".");
                        
    cm.dispose();
                    }
                }
            }

    1061018.js (NPC) :
    PHP Code:



    var status 0;
    var 
    dispose false;
    function 
    start(){
        
    status == 0;
        
    action(100);
    }

    function 
    action(modetypeselection){
        if(
    mode <= 0){
            if(!
    cm.getPlayer().getMap().getAllmonsters().size() == 2){
            
    cm.sendOk("Alrighty. We have high hopes for you so make us mercenaries proud!");
            
    cm.dispose();
            } else {
            
    cm.getPlayer().getMap().killAllMonsters();
            
    Packages.server.Events.BalrogPQ.partyLeader "undefined";
            
    Packages.server.Events.BalrogPQ.balrogSpawned false;
            
    Packages.server.Events.BalrogPQ.close();
                
    cm.warp(105100100);
                
    cm.dispose();
            }
        } else if(
    status == 0){
            if(
    cm.getPlayer().getMap().getCharacters().size() > 1){
                
    cm.sendYesNo("Are you really going to leave this battle and leave your fellow travelers to die?");
                
    dispose false;
                
    status++;
            } else if(
    cm.getPlayer().getMap().getCharacters().size() <= && cm.getPlayer().getMap().getAllmonsters().size() != 2){
                
    cm.sendYesNo("If you're a coward, you will leave.");
                
    dispose true;
                
    status++;
            } else if(
    cm.getPlayer().getMap().getAllmonsters().size() == 0){
                
    cm.sendOk("Wow! You defeated the balrog.");
                
    dispose true;
                
    cm.getPlayer().getClient().getChannelServer().broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(0Packages.server.Events.BalrogPQ.partyLeader "'s party has successfully defeated the Balrog! Praise to them, they finished with " cm.getPlayer().getMap().getCharacters().size() + " players."));
                
    status++;
            } else {
                
    cm.sendYesNo("So you are really going to leave?");
                
    status++;
            }
        } else if(
    status == 1){
            if(
    dispose){
            
    cm.getPlayer().getMap().killAllMonsters();
            
    Packages.server.Events.BalrogPQ.partyLeader "undefined";
            
    Packages.server.Events.BalrogPQ.balrogSpawned false;
            
    Packages.server.Events.BalrogPQ.close();
            }
            
    cm.warp(105100100);
            
    cm.dispose();
        }

    Screeny :




    If you want me to keep releasing shit, provide credits if you plan to use this.
    Last edited by FateJiki; 10-01-11 at 11:38 PM.


  2. #2

    Re: Balrog PQ [V83+]

    Nice again.

    _______________________________________________________________
    Can someone please help me: http://forum.ragezone.com/f566/help-...nished-716918/

    Scania vanished, so there are no worlds that I can select at the world selection screen. Please help.

  3. #3
    Account Upgraded | Title Enabled! HorrorChix89 is offline
    MemberRank
    May 2010 Join Date
    ArkansasLocation
    1,279Posts

    Re: Balrog PQ [V83+]

    This look awesome. Thanks

  4. #4
    Account Upgraded | Title Enabled! LuckySage is offline
    MemberRank
    Apr 2009 Join Date
    The NetherlandsLocation
    518Posts

    Re: Balrog PQ [V83+]

    This is really cool.

  5. #5
    Account Upgraded | Title Enabled! redeemer34 is offline
    MemberRank
    Aug 2008 Join Date
    335Posts

    Re: Balrog PQ [V83+]

    Great job, I'm planning on using this. Thanks.

  6. #6
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    Re: Balrog PQ [V83+]

    Quote Originally Posted by redeemer34 View Post
    Great job, I'm planning on using this. Thanks.
    Just provide credits, please.

  7. #7
    Account Upgraded | Title Enabled! redeemer34 is offline
    MemberRank
    Aug 2008 Join Date
    335Posts

    Re: Balrog PQ [V83+]

    Quote Originally Posted by FateJiki View Post
    Just provide credits, please.
    I'm planning on it, I saw all the features you had.

  8. #8
    bleh.... Shawn is offline
    MemberRank
    Oct 2008 Join Date
    Mississauga, CaLocation
    5,904Posts

    Re: Balrog PQ [V83+]

    Please review the section guidelines. A new tag system has been implemented as of 1/1/11. Other than that, great job!

  9. #9
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    Re: Balrog PQ [V83+]

    Quote Originally Posted by Shawn View Post
    Please review the section guidelines. A new tag system has been implemented as of 1/1/11. Other than that, great job!
    This always seems to happen whenever I release something , LOL.

  10. #10
    Account Upgraded | Title Enabled! Expedia is offline
    MemberRank
    Nov 2009 Join Date
    884Posts

    Re: [Add-On]Balrog PQ [V83+]

    I remember looking at your ad post and it said this was gms-like, but it's not full. Balrog summons certain monsters that you have to kill to prove you that you are worthy. Also he casts a buff where it disables 3rd/4th Job skills and you can only enter at certain channels. There's a few more things you've left out, but if you diddn't mean to release it full then ignore this post.

  11. #11
    Account Upgraded | Title Enabled! Sharky is offline
    MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: [Add-On]Balrog PQ [V83+]

    Thanks :) Great release.
    Quote Originally Posted by FateJiki View Post
    Since I'm done with hosting servers, here :
    What about Survival Nation?

  12. #12
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    Re: [Add-On]Balrog PQ [V83+]

    Quote Originally Posted by oOSnowCapXx View Post
    Thanks :) Great release.

    What about Survival Nation?
    Due to some private matters in my life I won't have time to manage a server. Especially when there are many people on that server that didn't appreciate anything.

    Quote Originally Posted by Expedia View Post
    I remember looking at your ad post and it said this was gms-like, but it's not full. Balrog summons certain monsters that you have to kill to prove you that you are worthy. Also he casts a buff where it disables 3rd/4th Job skills and you can only enter at certain channels. There's a few more things you've left out, but if you diddn't mean to release it full then ignore this post.
    Well, the buff really doesn't do anything. I think it's for show. The disabled 3rd/4th jobs are disabled with the FieldLimit, not the buff. It's not completely GMS-like but it's working.
    Last edited by FateJiki; 02-01-11 at 08:56 PM.

  13. #13
    Account Upgraded | Title Enabled! Sharky is offline
    MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: [Add-On]Balrog PQ [V83+]

    Quote Originally Posted by FateJiki View Post
    Due to some private matters in my life I won't have time to manage a server. Especially when there are many people on that server that didn't appreciate anything.
    Does that mean Survival Nation is closing? Or is there just going to be somebody to take your place? I never got a chance to go online xD I've been busy. But from what I can see, your server is pretty epic.

  14. #14
    Ooo, shiny! FateJiki is offline
    MemberRank
    Feb 2008 Join Date
    1,057Posts

    Re: [Add-On]Balrog PQ [V83+]

    Quote Originally Posted by oOSnowCapXx View Post
    Does that mean Survival Nation is closing? Or is there just going to be somebody to take your place? I never got a chance to go online xD I've been busy. But from what I can see, your server is pretty epic.
    If somebody wants to take my place, they can. Don't really mind.

    I think I'll just abandon the project and get on with my life. f3
    Last edited by FateJiki; 02-01-11 at 09:01 PM.

  15. #15
    may web.very maple.pls. iAkira is offline
    MemberRank
    Aug 2009 Join Date
    somewhere..Location
    2,378Posts

    Re: [Add-On]Balrog PQ [V83+]

    Quote Originally Posted by FateJiki View Post
    [...]
    Let me see if I understand this correctly
    addCandidate == Add Player to the array
    warpAllCandidates == Warps everyone in array with the for loop provided and warps to the map the balrog is in
    isFull == if theres at least 1 or more players in the map it returns true if not it returns false
    WarpIn == ?? I don't get this function isn't warpAllCandidates
    scheduleCheck == Checks the timer if 0 warps out and check is only equal or below 3 and theres more then one player in map warps out
    open == starts the event
    spawnBalrog == if balrogs isn't spawned it spawns it if it is spawned it does nothing :)

    FateJiki, can you tell me if I got this right or not, trying to see if I could understand it xD



Page 1 of 7 1234567 LastLast

Advertisement