Free Teleport

    Share

    avoegio

    Posts : 75
    Join date : 2014-04-18

    Free Teleport

    Post  avoegio on 17th May 2014, 23:14

    hello all

    i have a question . how make all teleportations under level 40 free ? all players under level 40 can teleport for free .

    DnR
    Admin
    Admin

    Posts : 985
    Join date : 2012-12-03

    Re: Free Teleport

    Post  DnR on 25th May 2014, 12:41

    The patch i pmed you is buggy. Try this one in L2TeleporterInstance.

    Code:

    -           else if (!list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.reduceAdena("Teleport", list.getPrice(), this, true)))
    +           else if (!list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.reduceAdena("Teleport", list.getPrice(), this, true) && player.getLevel() > 39))
                {
                    if (Config.DEBUG)
                        _log.fine("Teleporting player " + player.getName() + " to new location: "
                            + list.getLocX() + ":" + list.getLocY() + ":" + list.getLocZ());
                    player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
                }
    +           else if (!list.getIsForNoble() && player.getLevel() < 40)
    +           {
    +              if (Config.DEBUG)
    +                   _log.fine("Teleporting player " + player.getName() + " to new location: "
    +                       + list.getLocX() + ":" + list.getLocY() + ":" + list.getLocZ());
    +               player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
    +           }

    avoegio

    Posts : 75
    Join date : 2014-04-18

    compiling error

    Post  avoegio on 25th May 2014, 16:31

    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:195: error: illegal start of type
    [javac] else
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:195: error: ';' expected
    [javac] else
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: <identifier> expected
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: illegal start of type
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: ')' expected
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: ';' expected
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: illegal start of type
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: <identifier> expected
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:197: error: ';' expected
    [javac] _log.warning("No teleport destination with id:" + val);
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:199: error: <identifier> expected
    [javac] player.sendPacket(new ActionFailed());
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:199: error: illegal start of type
    [javac] player.sendPacket(new ActionFailed());
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:199: error: ')' expected
    [javac] player.sendPacket(new ActionFailed());
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:199: error: ';' expected
    [javac] player.sendPacket(new ActionFailed());
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:199: error: illegal start of type
    [javac] player.sendPacket(new ActionFailed());
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:199: error: <identifier> expected
    [javac] player.sendPacket(new ActionFailed());
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:202: error: class, interface, or enum expected
    [javac] private int validateCondition(L2PcInstance player)
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:206: error: class, interface, or enum expected
    [javac] else if (getCastle() != null && getCastle().getSiege().getIsInProgress()) // Teleporter is on castle ground and siege is in progress
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:208: error: class, interface, or enum expected
    [javac] else if (player.getClan() != null) // Teleporter is on castle ground and player is in a clan
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:212: error: class, interface, or enum expected
    [javac] }
    [javac] ^
    [javac] C:\Users\Gia\Desktop\GoGLiKK\source\L2jlisvus\Lisvus_GameServer\java\net\sf\l2j\gameserver\model\actor\instance\L2TeleporterInstance.java:215: error: class, interface, or enum expected
    [javac] }
    [javac] ^
    [javac] 20 errors
    [javac] 5 warnings

    BUILD FAILED

    avoegio

    Posts : 75
    Join date : 2014-04-18

    free teleport

    Post  avoegio on 26th May 2014, 17:23

    i have fixed this problem thanks DnR Smile))

    avoegio

    Posts : 75
    Join date : 2014-04-18

    Free Teleport

    Post  avoegio on 13th July 2014, 05:02

    about this code , its buggy . if teleport costs 18 000 and you dont have it its going to teleport you for free but if you have it will not teleport for free and when you are clicking on teleport it says that you dont have money and then teleports you but then you must click ok tu close the window

    DnR
    Admin
    Admin

    Posts : 985
    Join date : 2012-12-03

    Re: Free Teleport

    Post  DnR on 13th July 2014, 13:32

    Try this. Do no level check to reduceAdena method, and put the new part above it.

    Code:

    +           else if (!list.getIsForNoble() && player.getLevel() < 40)
    +           {
    +              if (Config.DEBUG)
    +                   _log.fine("Teleporting player " + player.getName() + " to new location: "
    +                       + list.getLocX() + ":" + list.getLocY() + ":" + list.getLocZ());
    +               player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
    +           }
                else if (!list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.reduceAdena("Teleport", list.getPrice(), this, true)))
                {
                    if (Config.DEBUG)
                        _log.fine("Teleporting player " + player.getName() + " to new location: "
                            + list.getLocX() + ":" + list.getLocY() + ":" + list.getLocZ());
                    player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
                }

    avoegio

    Posts : 75
    Join date : 2014-04-18

    Re: Free Teleport

    Post  avoegio on 14th July 2014, 22:12

    DnR wrote:Try this. Do no level check to reduceAdena method, and put the new part above it.

    Code:

    +           else if (!list.getIsForNoble() && player.getLevel() < 40)
    +           {
    +              if (Config.DEBUG)
    +                   _log.fine("Teleporting player " + player.getName() + " to new location: "
    +                       + list.getLocX() + ":" + list.getLocY() + ":" + list.getLocZ());
    +               player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
    +           }
                else if (!list.getIsForNoble() && (Config.ALT_GAME_FREE_TELEPORT || player.reduceAdena("Teleport", list.getPrice(), this, true)))
                {
                    if (Config.DEBUG)
                        _log.fine("Teleporting player " + player.getName() + " to new location: "
                            + list.getLocX() + ":" + list.getLocY() + ":" + list.getLocZ());
                    player.teleToLocation(list.getLocX(), list.getLocY(), list.getLocZ(), true);
                }
    thanks dnr ! working great .

    Sponsored content

    Re: Free Teleport

    Post  Sponsored content


      Current date/time is 24th July 2017, 09:31