Portal Block Info

Results 1 to 9 of 9
  1. #1
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Portal Block Info

    I've seen lots of people ask how to block portal. And that when they close the portal you are still able to enter the portal. That's because it is not fully coded. I have in example this in my ChangeMapHandler:
    Code:
                if (!portal.getPortalStatus()) {
                c.getPlayer().message("Portal is only available when the event starts.");
                c.getSession().write(MaplePacketCreator.enableActions());
                return;
                }
    Oh and to close event portals :)
    Code:
    getPortal("join00").setPortalStatus(false);
    Have fun with this :3
    Last edited by kevintjuh93; 31-03-10 at 02:23 PM.


  2. #2
    Proficient Member LoVeAbLeSToRy is offline
    MemberRank
    Dec 2009 Join Date
    I'm a fagLocation
    191Posts

    Re: Portal Block Info

    i guessed this helped alot

  3. #3
    Proficient Member StraMS is offline
    MemberRank
    Sep 2009 Join Date
    191Posts

    Re: Portal Block Info

    Or just go into the XML and remove the portal?

  4. #4
    Proficient Member hahamen is offline
    MemberRank
    Dec 2009 Join Date
    190Posts

    Re: Portal Block Info

    Quote Originally Posted by StraMS View Post
    Or just go into the XML and remove the portal?
    wow,this is the stupid way.

  5. #5
    Apprentice xKillsAlotx is offline
    MemberRank
    Mar 2010 Join Date
    LouisianaLocation
    13Posts

    Re: Portal Block Info

    Thanks , Nice release!

  6. #6
    Account Upgraded | Title Enabled! xMike1x is offline
    MemberRank
    Dec 2009 Join Date
    TorontoLocation
    566Posts

    Re: Portal Block Info

    Nice release =P

    Say i want to block a portal in certain maps, so people are forced to use the npc to warp, will this code work?

    Code:
    if (c.getPlayer().getMapId() == 0) { //Lets say 0 was the map it
              c.getPlayer().dropMessage(1, "Portal has been disabled");
              return;
    }
    -------
    I would test this myself but i gotta go school soon.
    Last edited by xMike1x; 31-03-10 at 07:16 PM.

  7. #7
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: Portal Block Info

    Quote Originally Posted by ><Mike>< View Post
    Nice release =P

    Say i want to block a portal in certain maps, so people are forced to use the npc to warp, will this code work?

    Code:
    if (c.getPlayer().getMapId() == 0) { //Lets say 0 was the map it
              c.getPlayer().dropMessage(1, "Portal has been disabled");
              return;
    }
    -------
    I would test this myself but i gotta go school soon.
    It should work...
    But why would you do that lol
    But you can add a check, with map check.
    Like :
    if (c.getPlayer().getMapId() == 0 && map.notOpenedYet()) {

    Or w/e

  8. #8
    Proficient Member xReflex is offline
    MemberRank
    Feb 2009 Join Date
    193Posts

    Re: Portal Block Info

    Kevin, give us an example (e.g) Of like, try blocking a certain portal... say FM22 portal. thanks!

    And you used the variable 'portal' what does it stand for?
    Last edited by xReflex; 01-04-10 at 01:45 PM.

  9. #9
    while(true) spam(); kevintjuh93 is offline
    MemberRank
    Jun 2008 Join Date
    The NetherlandsLocation
    4,119Posts

    Re: Portal Block Info

    MaplePortal portal = player.getMap().getPortal(startwp);

    startwp is slea.readMapleAsciiString(); << Dont use this if you don't know what it does.

    If you wanna block FM22 portal, just look up the name of the portal and set the status to false.



Advertisement