[Release]Event Warp[Updated 12-26]

Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    Account Upgraded | Title Enabled! GMLooney is offline
    MemberRank
    Mar 2008 Join Date
    New YorkLocation
    298Posts

    [Release]Event Warp[Updated 1-3]

    egh this wasn't to hard to make and is not really needed but what the hell lolz?This is for ThePack! Should work with V17/26(Can someone test?
    this is used for like events

    UPDATE 1: Made !eventon say the channel # instead of "c.getChannel"

    UPDATE 2: Made !eventon say the GameMasters name who's hosting the event

    UPDATE 3: Revamped and Added Traitors Methods. Deleted GM Name Calling out.
    eg.

    1. GM does !eventon which sends a notice to everyone saying "If you would like to join the event please do @eventon whilst in channel <Channel GM who did the command is on>"

    2. Players do @eventon and it says "You're event status has been set to on, please wait for a GM to warp you to the event"

    3. GM does !warpevent which Warps all players who is not on the same map as the GM to that map and sends a message saying "Welcome to the Event, please await a GM's instructions before doing anything!" and sends a message who had eventwarp off(it's off by default...) saying "Sorry you have just missed the Event."

    That's it

    Go to MapleCharacter and Add

    Code:
    public boolean eventwarp = false;
    Below

    Code:
    private MapleMap map;
    and add

    Code:
        public void eventwarpEnabled(boolean yn) {
            this.eventwarp = yn;
        }
    
        public boolean geteventwarpEnabled() {
            return this.eventwarp;
        }
    Below the setMap Function

    Now for the Commands :

    GM Commands

    Code:
                    } else if (splitted[0].equals("!eventon")) {
                     for (ChannelServer cservs : ChannelServer.getAllInstances()) {
                     for (MapleCharacter mch : cservs.getPlayerStorage().getAllCharacters()) {
                    if (c.getPlayer().getClient().getChannelServer().eventOn == false) {
                    int mapid = getOptionalIntArg(splitted, 1, player.getMapId());
                    c.getPlayer().getClient().getChannelServer().eventOn = true;
                    c.getPlayer().getClient().getChannelServer().eventMap = mapid;
                    String type;
                    String message1;
                    String message2;
                    String message3;
                    type = "[Event]";
                    message1 = "An Event has started in " + c.getPlayer().getMap().getMapName() + ", Channel " + c.getPlayer().getClient().getChannel();
                    message2 = "Please type @warpon while in Channel " + c.getChannel() + " to be warped to the event. If you change your mind type @warpoff";
                    MaplePacket packet1 = MaplePacketCreator.serverNotice(6, type + message1);
                    MaplePacket packet2 = MaplePacketCreator.serverNotice(6, message2);
                    c.getPlayer().getMap().broadcastMessage(packet1);
                    c.getPlayer().getMap().broadcastMessage(packet2);:laugh:
                    } else {
                      mch.dropMessage("Sorry an Event has already started in this Channel!");
                    }
                     }
                     }
                  } else if (splitted[0].equals("!eventoff")) {
                    for (ChannelServer cservs : ChannelServer.getAllInstances()) {
                    for (MapleCharacter mch : cservs.getPlayerStorage().getAllCharacters()) {
                    if (c.getPlayer().getClient().getChannelServer().eventOn == true) {
                    c.getPlayer().getClient().getChannelServer().eventOn = false;
                    mch.eventwarpEnabled(false);
                    String type;
                    String message1;
                    type = "[Event]";
                    message1 = "The Event in Channel " + c.getChannel() + " has ended. Thanks and Congratulations to all of those who participated.";
                    mch.dropMessage(type + message1);
                    } else {
                      mc.dropMessage("Sorry an Event has not been started in this Channel!");
                    }
                    }
                    }
                   } else if (splitted[0].equals("!eventwarp") || splitted[0].equals("!warpevent")) {
                    for (ChannelServer cservs : ChannelServer.getAllInstances()) {
                    for (MapleCharacter mch : cservs.getPlayerStorage().getAllCharacters()) {
                      if (c.getPlayer().getClient().getChannelServer().eventOn == true) { 
                      if (mch.getMapId() != c.getPlayer().getMapId() && mch.geteventwarpEnabled() == true) {
                      mch.changeMap(c.getPlayer().getMap(), c.getPlayer().getPosition());    
                        String type;
                        String message1;
                        type = "[Event]";
                        message1 = "Welcome to The Event, Please await a GM's instructions before attempting to do anything."; 
                        mch.dropMessage(type + message1);
                            }
                        else if (mch.getMapId() != c.getPlayer().getMapId() && mch.geteventwarpEnabled() != true) {
                        String type;
                        String message2;
                        type = "[Event]";
                        message2 = "Your Eventwarp's status was set to off and therefor you have Missed the Event. Kindly ask a GM to warp you.";
                        mch.dropMessage(type + message2);
                            }
                        else if (c.getPlayer().getClient().getChannelServer().eventOn != true) {
                        mc.dropMessage("Sorry but an Event has not yet started in this Channel!");         
                            }
                      }
                      }
                    }
    Player Commands

    Code:
             } else if (splitted[0].equals("@warpon") || splitted[0].equals("@eventon")) {
          if (c.getPlayer().geteventwarpEnabled() == false && c.getPlayer().getClient().getChannelServer().eventOn == true) {
                                    c.getPlayer().eventwarpEnabled(true);
                                    mc.dropMessage("Your Event warp status has been set to on, please wait for a GM to warp you to the Event!");
                                    mc.dropMessage("Remember to be in the same channel as the GM Event.");
                            }
     else if (c.getPlayer().geteventwarpEnabled() == false && c.getPlayer().getClient().getChannelServer().eventOn == false){
                                mc.dropMessage("There isn't an Event going on right now, try again Later.");
                 }
    else if (c.getPlayer().geteventwarpEnabled() == true && c.getPlayer().getClient().getChannelServer().eventOn == true){
                                mc.dropMessage("Your event warp Status is already on, please wait for a GM to warp you.");
                 }
    } else if (splitted[0].equals("@warpoff") || splitted[0].equals("@eventoff")) {
          if (c.getPlayer().geteventwarpEnabled() == true && c.getPlayer().getClient().getChannelServer().eventOn == true) {
                                    c.getPlayer().eventwarpEnabled(false);
                                    mc.dropMessage("Your Event warp status has been set to off, you will no longer be warped to the Event!");
                                    mc.dropMessage("Type @warpon to be warped to the Event!");
                            }
    else if (c.getPlayer().geteventwarpEnabled() == false && c.getPlayer().getClient().getChannelServer().eventOn == true){
                                mc.dropMessage("Your event warp Status is already off.");
                 }
    Add Definitions if you need to!
    Last edited by GMLooney; 03-01-09 at 05:08 PM.


  2. #2
    Account Upgraded | Title Enabled! Azora is offline
    MemberRank
    Jun 2008 Join Date
    SwedenLocation
    466Posts

    Re: event warp

    Woa :) nice.

    Offtopic:
    I've been unactive in ragezone so yea.

  3. #3
    Λκαяυz føяeνeя Roamer is offline
    MemberRank
    Jun 2008 Join Date
    215Location
    3,203Posts

    Re: event warp

    Add tags. [Release]
    Nice release :)

  4. #4
    Account Upgraded | Title Enabled! GMLooney is offline
    MemberRank
    Mar 2008 Join Date
    New YorkLocation
    298Posts

    Re: [Release]Event Warp

    Quote Originally Posted by Azora View Post
    Woa :) nice.

    Offtopic:
    I've been unactive in ragezone so yea.
    Thanks lolz
    Quote Originally Posted by Roamer View Post
    Add tags. [Release]
    Sorry, Added Tags.

  5. #5
    Burn the land, HydroBenZ is offline
    MemberRank
    Aug 2008 Join Date
    2,710Posts

    Re: [Release]Event Warp

    Nice release mate :D

  6. #6
    Account Upgraded | Title Enabled! Mgssidley is offline
    MemberRank
    Apr 2008 Join Date
    443Posts

    Re: [Release]Event Warp

    Thats awesome! Great release thanks.

  7. #7
    Alpha Member Anujan is offline
    MemberRank
    May 2008 Join Date
    Ontario, CanadaLocation
    1,633Posts

    Re: [Release]Event Warp

    ROFL I see so many mistakes.
    The funniest one being that you defined packet twice...

  8. #8
    Member dragonsin53 is offline
    MemberRank
    Sep 2008 Join Date
    82Posts

    Re: [Release]Event Warp

    I can use it for my server today xD

  9. #9
    Account Upgraded | Title Enabled! maplepuppet is offline
    MemberRank
    Nov 2008 Join Date
    New JerseyLocation
    905Posts

    Re: [Release]Event Warp

    Awsome release, but why not do "!notice Come to channel 3 fm 7 to be warped to the event, you have 5 minutes." Then in 5 mins just do "!warpmap 100000000"

  10. #10
    Account Upgraded | Title Enabled! lxCrAzYsEl is offline
    MemberRank
    May 2008 Join Date
    Her heart :)Location
    281Posts

    Re: [Release]Event Warp

    :o nice.
    We had this done long ago anw.

  11. #11
    Account Upgraded | Title Enabled! GMLooney is offline
    MemberRank
    Mar 2008 Join Date
    New YorkLocation
    298Posts

    Re: [Release]Event Warp

    haha I forgot to make a simple change, do note that if you do !eventon(the gm command to tell a event is about to take place) it actually says "If you would like to join the event please do @eventon whilst in channel c.player.getChannel" instead of "If you would like to join the event please do @eventon whilst in channel <channel player is on" I'll fix it in a second.

    Quote Originally Posted by maplepuppet View Post
    Awsome release, but why not do "!notice Come to channel 3 fm 7 to be warped to the event, you have 5 minutes." Then in 5 mins just do "!warpmap 100000000"
    This would prove useless hence if the player is on my channel i can warp them to what ever map I'm on by casting the !warpevent command. Next time try it out before actually doing it :-D

    Quote Originally Posted by lxCrAzYsEl View Post
    :o nice.
    We had this done long ago anw.
    I've also had this for a long time, probably a VERY Long time before you did, but I only released it because I felt like it I guess?

  12. #12
    Burn the land, HydroBenZ is offline
    MemberRank
    Aug 2008 Join Date
    2,710Posts

    Re: [Release]Event Warp[Updated 12-26]

    Wow that's nice!
    Great release :D

  13. #13
    Account Upgraded | Title Enabled! GMLooney is offline
    MemberRank
    Mar 2008 Join Date
    New YorkLocation
    298Posts

    Re: [Release]Event Warp[Updated 12-26]

    Quote Originally Posted by HydroBenZ View Post
    Wow that's nice!
    Great release :D
    Thanks again

  14. #14
    Account Upgraded | Title Enabled! Razzen- is offline
    MemberRank
    Oct 2007 Join Date
    MexicoLocation
    721Posts

    Re: [Release]Event Warp[Updated 12-26]

    This is indeed a nice idea.

  15. #15
    Account Upgraded | Title Enabled! AuroX is offline
    MemberRank
    Sep 2008 Join Date
    1,431Posts

    Re: [Release]Event Warp[Updated 12-26]

    i dun understand about this..wad you mean by !warpevent and the message come out??



Page 1 of 3 123 LastLast

Advertisement