Thread: [718+]Full Lodestone system activation

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1 [718+]Full Lodestone system activation 
    Registered Member
    Join Date
    Mar 2012
    Posts
    142
    Thanks given
    6
    Thanks received
    5
    Rep Power
    11
    _Jordan has already released this but his way was a bit confusing and incomplete so I will be releasing it my way


    ButtonHandler.java
    Spoiler for Code:
    import: import com.rs.game.player.content.LodeStones;

    code:
    }else if (interfaceId == 1092) {
    LodeStones.handleButtons(player, componentId);



    ObjectHandler.java
    Spoiler for Code:
    import: import com.rs.game.player.content.LodeStones;

    code:
    1. add this somewhere under public void run:

    if (object.getId() == 69827 || object.getId() == 69828 || object.getId() == 69829 || object.getId() == 69830 || object.getId() == 69831 || object.getId() == 69832 || object.getId() == 69833 || object.getId() == 69834 || object.getId() == 69835 || object.getId() == 69836 || object.getId() == 69837 || object.getId() == 69838 || object.getId() == 69839 || object.getId() == 69840 || object.getId() == 69841) {
    LodeStones.activateLodestone(player, object);

    2. search for: else if (id == 57437)
    player.getBank().openBank();
    under that add the following:

    else if (id == 69827)
    player.activatedBandit = true;
    else if (id == 69828)
    player.activatedLunarIsle = true;
    else if (id == 69829)
    player.activatedAlKharid = true;
    else if (id == 69830)
    player.activatedArdougne = true;
    else if (id == 69831)
    player.activatedBurthorpe = true;
    else if (id == 69832)
    player.activatedCatherby = true;
    else if (id == 69833)
    player.activatedDraynor = true;
    else if (id == 69834)
    player.activatedEdgeville = true;
    else if (id == 69835)
    player.activatedFalador = true;
    else if (id == 69837)
    player.activatedPortSarim = true;
    else if (id == 69838)
    player.activatedSeers = true;
    else if (id == 69839)
    player.activatedTaverly = true;
    else if (id == 69840)
    player.activatedVarrock = true;
    else if (id == 69841)
    player.activatedYanille = true;


    Full LodeStones.java file
    Spoiler for Code:
    package com.rs.game.player.content;

    import com.rs.game.Graphics;
    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.game.player.Player;
    import com.rs.game.player.actions.HomeTeleport;

    /**
    * @author _Jordan / Apollo <[email protected]>
    * @edited and completed by legitkx <legitkx on rune-server>
    *
    */
    public class LodeStones {

    // Config - Object

    /**
    * Handles the interface of the lodestone network. Checks if the player is
    * able to teleport to the selected lodestone.
    *
    * @param player
    * @param componentId
    */
    public static void handleButtons(final Player player, int componentId) {
    player.stopAll();
    WorldTile stoneTile = null;
    switch (componentId) {
    case 47: // Lumbridge is auto unlocked.
    stoneTile = HomeTeleport.LUMBRIDGE_LODE_STONE;
    break;
    case 7:
    if (player.activatedBandit == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.BANDIT_CAMP_LODE_STONE;
    break;
    case 39:
    if (player.activatedLunarIsle == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.LUNAR_ISLE_LODE_STONE;
    break;
    case 40:
    if (player.activatedAlKharid == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.ALKARID_LODE_STONE;
    break;
    case 41:
    if (player.activatedArdougne == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.ARDOUGNE_LODE_STONE;
    break;
    case 42:
    if (player.activatedBurthorpe == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.BURTHORPE_LODE_STONE;
    break;
    case 43:
    if (player.activatedCatherby == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.CATHERBAY_LODE_STONE;
    break;
    case 44:
    if (player.activatedDraynor == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.DRAYNOR_VILLAGE_LODE_STONE;
    break;
    case 45:
    if (player.activatedEdgeville == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.EDGEVILLE_LODE_STONE;
    break;
    case 46:
    if (player.activatedFalador == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.FALADOR_LODE_STONE;
    break;
    case 48:
    if (player.activatedPortSarim == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.PORT_SARIM_LODE_STONE;
    break;
    case 49:
    if (player.activatedSeers == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.SEERS_VILLAGE_LODE_STONE;
    break;
    case 50:
    if (player.activatedTaverly == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.TAVERLY_LODE_STONE;
    break;
    case 51:
    if (player.activatedVarrock == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.VARROCK_LODE_STONE;
    break;
    case 52:
    if (player.activatedYanille == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.YANILLE_LODE_STONE;
    break;
    }
    if (stoneTile != null) {
    player.getActionManager().setAction(new HomeTeleport(stoneTile));
    }
    }

    /**
    * Checks the object id then sends the necessary config. Activates the
    * lodestone for the player.
    *
    * @param player
    * @param object
    */
    public static void activateLodestone(final Player player, WorldObject object) {
    if (object.getId() == 69827) {
    sendReward(player);
    player.getPackets().sendConfigByFile(358, 15);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedBandit = true;
    } else if (object.getId() == 69828) {
    sendReward(player);
    player.getPackets().sendConfigByFile(2448, 190);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedLunarIsle = true;
    } else if (object.getId() == 69829) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10900, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedAlKharid = true;
    } else if (object.getId() == 69830) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10901, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedArdougne = true;
    } else if (object.getId() == 69831) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10902, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedBurthorpe = true;
    } else if (object.getId() == 69832) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10903, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedCatherby = true;
    } else if (object.getId() == 69833) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10904, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedDraynor = true;
    } else if (object.getId() == 69834) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10905, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedEdgeville = true;
    } else if (object.getId() == 69835) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10906, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedFalador = true;
    } else if (object.getId() == 69837) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10908, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedPortSarim = true;
    } else if (object.getId() == 69838) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10909, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedSeers = true;
    } else if (object.getId() == 69839) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10910, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedTaverly = true;
    } else if (object.getId() == 69840) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10911, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedVarrock = true;
    } else if (object.getId() == 69841) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10912, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedYanille = true;
    }
    }

    /**
    * Sends the player their reward for activating the lodestone.
    *
    * @param player
    */
    public static void sendReward(final Player player) {
    player.getPouch().handleMoneyPouch(true, false, false, 0, 375);
    }

    /**
    * Checks if the player has unlocked the lodestone during login.
    *
    * @param player
    */
    public static void checkActivation(final Player player) {
    // Lumbridge is auto unlocked.
    player.getPackets().sendConfigByFile(10907, 1);
    if (player.activatedBandit == true) {
    player.getPackets().sendConfigByFile(358, 15);
    }
    if (player.activatedLunarIsle == true) {
    player.getPackets().sendConfigByFile(2448, 190);
    }
    if (player.activatedAlKharid == true) {
    player.getPackets().sendConfigByFile(10900, 1);
    }
    if (player.activatedArdougne == true) {
    player.getPackets().sendConfigByFile(10901, 1);
    }
    if (player.activatedBurthorpe == true) {
    player.getPackets().sendConfigByFile(10902, 1);
    }
    if (player.activatedCatherby == true) {
    player.getPackets().sendConfigByFile(10903, 1);
    }
    if (player.activatedDraynor == true) {
    player.getPackets().sendConfigByFile(10904, 1);
    }
    if (player.activatedEdgeville == true) {
    player.getPackets().sendConfigByFile(10905, 1);
    }
    if (player.activatedFalador == true) {
    player.getPackets().sendConfigByFile(10906, 1);
    }
    if (player.activatedPortSarim == true) {
    player.getPackets().sendConfigByFile(10908, 1);
    }
    if (player.activatedSeers == true) {
    player.getPackets().sendConfigByFile(10909, 1);
    }
    if (player.activatedTaverly == true) {
    player.getPackets().sendConfigByFile(10910, 1);
    }
    if (player.activatedVarrock == true) {
    player.getPackets().sendConfigByFile(10911, 1);
    }
    if (player.activatedYanille == true) {
    player.getPackets().sendConfigByFile(10912, 1);
    }

    }

    }


    Player.java
    Spoiler for Code:
    import: import com.rs.game.player.content.LodeStones;

    1. search for public boolean isBuying. Under that, put this under it:

    public boolean activatedDraynor = false;
    public boolean activatedBandit = false;
    public boolean activatedFalador = false;
    public boolean activatedLunarIsle = false;
    public boolean activatedAlKharid = false;
    public boolean activatedArdougne = false;
    public boolean activatedBurthorpe = false;
    public boolean activatedCatherby = false;
    public boolean activatedEdgeville = false;
    public boolean activatedPortSarim = false;
    public boolean activatedSeers = false;
    public boolean activatedTaverly = false;
    public boolean activatedVarrock = false;
    public boolean activatedYanille = false;

    2. Search for: getPoison().refresh(); Under that put:

    LodeStones.checkActivation(this);

    3. Search for: private void sendUnlockedObjectConfigs Under that bracket under that code, add the following code if you dont have it:

    @SuppressWarnings("unused")
    private void refreshLodestoneNetwork() {
    //unlocks bandit camp lodestone
    getPackets().sendConfigByFile(358, 15);
    //unlocks lunar isle lodestone
    getPackets().sendConfigByFile(2448, 190);
    //unlocks alkarid lodestone
    getPackets().sendConfigByFile(10900, 1);
    //unlocks ardougne lodestone
    getPackets().sendConfigByFile(10901, 1);
    //unlocks burthorpe lodestone
    getPackets().sendConfigByFile(10902, 1);
    //unlocks catherbay lodestone
    getPackets().sendConfigByFile(10903, 1);
    //unlocks edgeville lodestone
    getPackets().sendConfigByFile(10905, 1);
    //unlocks falador lodestone
    getPackets().sendConfigByFile(10906, 1);
    //unlocks port sarim lodestone
    getPackets().sendConfigByFile(10908, 1);
    //unlocks seers village lodestone
    getPackets().sendConfigByFile(10909, 1);
    //unlocks taverley lodestone
    getPackets().sendConfigByFile(10910, 1);
    //unlocks varrock lodestone
    getPackets().sendConfigByFile(10911, 1);
    //unlocks yanille lodestone
    getPackets().sendConfigByFile(10912, 1);
    }



    Full HomeTeleport.java file(only needed if your missing this in your server)

    Spoiler for Code:
    package com.rs.game.player.actions;

    import com.rs.game.Animation;
    import com.rs.game.ForceMovement;
    import com.rs.game.Graphics;
    import com.rs.game.WorldTile;
    import com.rs.game.player.Player;
    import com.rs.game.player.content.Magic;
    import com.rs.utils.Utils;

    public class HomeTeleport extends Action {

    private final int HOME_ANIMATION = 16385, HOME_GRAPHIC = 3017;
    public static final WorldTile LUMBRIDGE_LODE_STONE = new WorldTile(3233,
    3221, 0), BURTHORPE_LODE_STONE = new WorldTile(2899, 3544, 0),
    LUNAR_ISLE_LODE_STONE = new WorldTile(2085, 3914, 0),
    BANDIT_CAMP_LODE_STONE = new WorldTile(3214, 2954, 0),
    TAVERLY_LODE_STONE = new WorldTile(2878, 3442, 0),
    ALKARID_LODE_STONE = new WorldTile(3297, 3184, 0),
    VARROCK_LODE_STONE = new WorldTile(3214, 3376, 0),
    EDGEVILLE_LODE_STONE = new WorldTile(3067, 3505, 0),
    FALADOR_LODE_STONE = new WorldTile(2967, 3403, 0),
    PORT_SARIM_LODE_STONE = new WorldTile(3011, 3215, 0),
    DRAYNOR_VILLAGE_LODE_STONE = new WorldTile(3105, 3298, 0),
    ARDOUGNE_LODE_STONE = new WorldTile(2634, 3348, 0),
    CATHERBAY_LODE_STONE = new WorldTile(2831, 3451, 0),
    YANILLE_LODE_STONE = new WorldTile(2529, 3094, 0),
    SEERS_VILLAGE_LODE_STONE = new WorldTile(2689, 3482, 0);

    private int currentTime;
    private WorldTile tile;

    public HomeTeleport(WorldTile tile) {
    this.tile = tile;
    }

    @Override
    public boolean start(final Player player) {
    if (!player.getControlerManager().processMagicTelepor t(tile))
    return false;
    return process(player);
    }

    @Override
    public int processWithDelay(Player player) {
    if (currentTime++ == 0) {
    player.setNextAnimation(new Animation(HOME_ANIMATION));
    player.setNextGraphics(new Graphics(HOME_GRAPHIC));
    } else if (currentTime == 18) {
    player.setNextWorldTile(tile.transform(0, 1, 0));
    player.getControlerManager().magicTeleported(Magic .MAGIC_TELEPORT);
    if (player.getControlerManager().getControler() == null)
    Magic.teleControlersCheck(player, tile);
    player.setNextFaceWorldTile(new WorldTile(tile.getX(), tile.getY(),
    tile.getPlane()));
    player.setDirection(6);
    } else if (currentTime == 19) {
    player.setNextGraphics(new Graphics(HOME_GRAPHIC + 1));
    player.setNextAnimation(new Animation(HOME_ANIMATION + 1));
    } else if (currentTime == 24) {
    player.setNextAnimation(new Animation(16393));
    } else if (currentTime == 25) {
    player.setNextWorldTile(tile);
    } else if (currentTime == 26)
    return -1;
    return 0;
    }

    @Override
    public boolean process(Player player) {
    if (player.getAttackedByDelay() + 10000 > Utils.currentTimeMillis()) {
    player.getPackets()
    .sendGameMessage(
    "You can't home teleport until 10 seconds after the end of combat.");
    return false;
    }
    return true;
    }

    @Override
    public void stop(Player player) {
    player.setNextAnimation(new Animation(-1));
    player.setNextGraphics(new Graphics(-1));
    }

    }


    60% credits to _Jordan for already releasing this his way
    40% credits to me for revising it my way and finishing it

    Hit that "Thanks" button if this helped
    Reply With Quote  
     

  2. #2  
    BoomScape #1
    BoomScape's Avatar
    Join Date
    May 2013
    Posts
    2,422
    Thanks given
    289
    Thanks received
    234
    Rep Power
    48
    Quote Originally Posted by legitkx View Post
    _Jordan has already released this but his way was a bit confusing and incomplete so I will be releasing it my way


    ButtonHandler.java
    Spoiler for Code:
    import: import com.rs.game.player.content.LodeStones;

    code:
    }else if (interfaceId == 1092) {
    LodeStones.handleButtons(player, componentId);



    ObjectHandler.java
    Spoiler for Code:
    import: import com.rs.game.player.content.LodeStones;

    code:
    1. add this somewhere under public void run:

    if (object.getId() == 69827 || object.getId() == 69828 || object.getId() == 69829 || object.getId() == 69830 || object.getId() == 69831 || object.getId() == 69832 || object.getId() == 69833 || object.getId() == 69834 || object.getId() == 69835 || object.getId() == 69836 || object.getId() == 69837 || object.getId() == 69838 || object.getId() == 69839 || object.getId() == 69840 || object.getId() == 69841) {
    LodeStones.activateLodestone(player, object);
    2. search for: else if (id == 57437)
    player.getBank().openBank();
    under that add the following:

    else if (id == 69827)
    player.activatedBandit = true;
    else if (id == 69828)
    player.activatedLunarIsle = true;
    else if (id == 69829)
    player.activatedAlKharid = true;
    else if (id == 69830)
    player.activatedArdougne = true;
    else if (id == 69831)
    player.activatedBurthorpe = true;
    else if (id == 69832)
    player.activatedCatherby = true;
    else if (id == 69833)
    player.activatedDraynor = true;
    else if (id == 69834)
    player.activatedEdgeville = true;
    else if (id == 69835)
    player.activatedFalador = true;
    else if (id == 69837)
    player.activatedPortSarim = true;
    else if (id == 69838)
    player.activatedSeers = true;
    else if (id == 69839)
    player.activatedTaverly = true;
    else if (id == 69840)
    player.activatedVarrock = true;
    else if (id == 69841)
    player.activatedYanille = true;


    Full LodeStones.java file
    Spoiler for Code:
    package com.rs.game.player.content;

    import com.rs.game.Graphics;
    import com.rs.game.World;
    import com.rs.game.WorldObject;
    import com.rs.game.WorldTile;
    import com.rs.game.player.Player;
    import com.rs.game.player.actions.HomeTeleport;

    /**
    * @author _Jordan / Apollo <[email protected]>
    * @edited and completed by legitkx <legitkx on rune-server>
    *
    */
    public class LodeStones {

    // Config - Object

    /**
    * Handles the interface of the lodestone network. Checks if the player is
    * able to teleport to the selected lodestone.
    *
    * @param player
    * @param componentId
    */
    public static void handleButtons(final Player player, int componentId) {
    player.stopAll();
    WorldTile stoneTile = null;
    switch (componentId) {
    case 47: // Lumbridge is auto unlocked.
    stoneTile = HomeTeleport.LUMBRIDGE_LODE_STONE;
    break;
    case 7:
    if (player.activatedBandit == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.BANDIT_CAMP_LODE_STONE;
    break;
    case 39:
    if (player.activatedLunarIsle == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.LUNAR_ISLE_LODE_STONE;
    break;
    case 40:
    if (player.activatedAlKharid == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.ALKARID_LODE_STONE;
    break;
    case 41:
    if (player.activatedArdougne == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.ARDOUGNE_LODE_STONE;
    break;
    case 42:
    if (player.activatedBurthorpe == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.BURTHORPE_LODE_STONE;
    break;
    case 43:
    if (player.activatedCatherby == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.CATHERBAY_LODE_STONE;
    break;
    case 44:
    if (player.activatedDraynor == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.DRAYNOR_VILLAGE_LODE_STONE;
    break;
    case 45:
    if (player.activatedEdgeville == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.EDGEVILLE_LODE_STONE;
    break;
    case 46:
    if (player.activatedFalador == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.FALADOR_LODE_STONE;
    break;
    case 48:
    if (player.activatedPortSarim == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.PORT_SARIM_LODE_STONE;
    break;
    case 49:
    if (player.activatedSeers == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.SEERS_VILLAGE_LODE_STONE;
    break;
    case 50:
    if (player.activatedTaverly == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.TAVERLY_LODE_STONE;
    break;
    case 51:
    if (player.activatedVarrock == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.VARROCK_LODE_STONE;
    break;
    case 52:
    if (player.activatedYanille == false) {
    player.getPackets().sendGameMessage(
    "You must unlock this lodestone to use it.");
    return;
    }
    stoneTile = HomeTeleport.YANILLE_LODE_STONE;
    break;
    }
    if (stoneTile != null) {
    player.getActionManager().setAction(new HomeTeleport(stoneTile));
    }
    }

    /**
    * Checks the object id then sends the necessary config. Activates the
    * lodestone for the player.
    *
    * @param player
    * @param object
    */
    public static void activateLodestone(final Player player, WorldObject object) {
    if (object.getId() == 69827) {
    sendReward(player);
    player.getPackets().sendConfigByFile(358, 15);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedBandit = true;
    } else if (object.getId() == 69828) {
    sendReward(player);
    player.getPackets().sendConfigByFile(2448, 190);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedLunarIsle = true;
    } else if (object.getId() == 69829) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10900, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedAlKharid = true;
    } else if (object.getId() == 69830) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10901, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedArdougne = true;
    } else if (object.getId() == 69831) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10902, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedBurthorpe = true;
    } else if (object.getId() == 69832) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10903, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedCatherby = true;
    } else if (object.getId() == 69833) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10904, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedDraynor = true;
    } else if (object.getId() == 69834) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10905, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedEdgeville = true;
    } else if (object.getId() == 69835) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10906, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedFalador = true;
    } else if (object.getId() == 69837) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10908, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedPortSarim = true;
    } else if (object.getId() == 69838) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10909, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedSeers = true;
    } else if (object.getId() == 69839) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10910, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedTaverly = true;
    } else if (object.getId() == 69840) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10911, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedVarrock = true;
    } else if (object.getId() == 69841) {
    sendReward(player);
    player.getPackets().sendConfigByFile(10912, 1);
    player.getPackets().sendGraphics(new Graphics(3019), object);
    player.activatedYanille = true;
    }
    }

    /**
    * Sends the player their reward for activating the lodestone.
    *
    * @param player
    */
    public static void sendReward(final Player player) {
    player.getPouch().handleMoneyPouch(true, false, false, 0, 375);
    }

    /**
    * Checks if the player has unlocked the lodestone during login.
    *
    * @param player
    */
    public static void checkActivation(final Player player) {
    // Lumbridge is auto unlocked.
    player.getPackets().sendConfigByFile(10907, 1);
    if (player.activatedBandit == true) {
    player.getPackets().sendConfigByFile(358, 15);
    }
    if (player.activatedLunarIsle == true) {
    player.getPackets().sendConfigByFile(2448, 190);
    }
    if (player.activatedAlKharid == true) {
    player.getPackets().sendConfigByFile(10900, 1);
    }
    if (player.activatedArdougne == true) {
    player.getPackets().sendConfigByFile(10901, 1);
    }
    if (player.activatedBurthorpe == true) {
    player.getPackets().sendConfigByFile(10902, 1);
    }
    if (player.activatedCatherby == true) {
    player.getPackets().sendConfigByFile(10903, 1);
    }
    if (player.activatedDraynor == true) {
    player.getPackets().sendConfigByFile(10904, 1);
    }
    if (player.activatedEdgeville == true) {
    player.getPackets().sendConfigByFile(10905, 1);
    }
    if (player.activatedFalador == true) {
    player.getPackets().sendConfigByFile(10906, 1);
    }
    if (player.activatedPortSarim == true) {
    player.getPackets().sendConfigByFile(10908, 1);
    }
    if (player.activatedSeers == true) {
    player.getPackets().sendConfigByFile(10909, 1);
    }
    if (player.activatedTaverly == true) {
    player.getPackets().sendConfigByFile(10910, 1);
    }
    if (player.activatedVarrock == true) {
    player.getPackets().sendConfigByFile(10911, 1);
    }
    if (player.activatedYanille == true) {
    player.getPackets().sendConfigByFile(10912, 1);
    }

    }

    }


    Player.java
    Spoiler for Code:
    import: import com.rs.game.player.content.LodeStones;

    1. search for public boolean isBuying. Under that, put this under it:

    public boolean activatedDraynor = false;
    public boolean activatedBandit = false;
    public boolean activatedFalador = false;
    public boolean activatedLunarIsle = false;
    public boolean activatedAlKharid = false;
    public boolean activatedArdougne = false;
    public boolean activatedBurthorpe = false;
    public boolean activatedCatherby = false;
    public boolean activatedEdgeville = false;
    public boolean activatedPortSarim = false;
    public boolean activatedSeers = false;
    public boolean activatedTaverly = false;
    public boolean activatedVarrock = false;
    public boolean activatedYanille = false;

    2. Search for: getPoison().refresh(); Under that put:

    LodeStones.checkActivation(this);

    3. Search for: private void sendUnlockedObjectConfigs Under that bracket under that code, add the following code if you dont have it:

    @SuppressWarnings("unused")
    private void refreshLodestoneNetwork() {
    //unlocks bandit camp lodestone
    getPackets().sendConfigByFile(358, 15);
    //unlocks lunar isle lodestone
    getPackets().sendConfigByFile(2448, 190);
    //unlocks alkarid lodestone
    getPackets().sendConfigByFile(10900, 1);
    //unlocks ardougne lodestone
    getPackets().sendConfigByFile(10901, 1);
    //unlocks burthorpe lodestone
    getPackets().sendConfigByFile(10902, 1);
    //unlocks catherbay lodestone
    getPackets().sendConfigByFile(10903, 1);
    //unlocks edgeville lodestone
    getPackets().sendConfigByFile(10905, 1);
    //unlocks falador lodestone
    getPackets().sendConfigByFile(10906, 1);
    //unlocks port sarim lodestone
    getPackets().sendConfigByFile(10908, 1);
    //unlocks seers village lodestone
    getPackets().sendConfigByFile(10909, 1);
    //unlocks taverley lodestone
    getPackets().sendConfigByFile(10910, 1);
    //unlocks varrock lodestone
    getPackets().sendConfigByFile(10911, 1);
    //unlocks yanille lodestone
    getPackets().sendConfigByFile(10912, 1);
    }



    Full HomeTeleport.java file(only needed if your missing this in your server)

    Spoiler for Code:
    package com.rs.game.player.actions;

    import com.rs.game.Animation;
    import com.rs.game.ForceMovement;
    import com.rs.game.Graphics;
    import com.rs.game.WorldTile;
    import com.rs.game.player.Player;
    import com.rs.game.player.content.Magic;
    import com.rs.utils.Utils;

    public class HomeTeleport extends Action {

    private final int HOME_ANIMATION = 16385, HOME_GRAPHIC = 3017;
    public static final WorldTile LUMBRIDGE_LODE_STONE = new WorldTile(3233,
    3221, 0), BURTHORPE_LODE_STONE = new WorldTile(2899, 3544, 0),
    LUNAR_ISLE_LODE_STONE = new WorldTile(2085, 3914, 0),
    BANDIT_CAMP_LODE_STONE = new WorldTile(3214, 2954, 0),
    TAVERLY_LODE_STONE = new WorldTile(2878, 3442, 0),
    ALKARID_LODE_STONE = new WorldTile(3297, 3184, 0),
    VARROCK_LODE_STONE = new WorldTile(3214, 3376, 0),
    EDGEVILLE_LODE_STONE = new WorldTile(3067, 3505, 0),
    FALADOR_LODE_STONE = new WorldTile(2967, 3403, 0),
    PORT_SARIM_LODE_STONE = new WorldTile(3011, 3215, 0),
    DRAYNOR_VILLAGE_LODE_STONE = new WorldTile(3105, 3298, 0),
    ARDOUGNE_LODE_STONE = new WorldTile(2634, 3348, 0),
    CATHERBAY_LODE_STONE = new WorldTile(2831, 3451, 0),
    YANILLE_LODE_STONE = new WorldTile(2529, 3094, 0),
    SEERS_VILLAGE_LODE_STONE = new WorldTile(2689, 3482, 0);

    private int currentTime;
    private WorldTile tile;

    public HomeTeleport(WorldTile tile) {
    this.tile = tile;
    }

    @Override
    public boolean start(final Player player) {
    if (!player.getControlerManager().processMagicTelepor t(tile))
    return false;
    return process(player);
    }

    @Override
    public int processWithDelay(Player player) {
    if (currentTime++ == 0) {
    player.setNextAnimation(new Animation(HOME_ANIMATION));
    player.setNextGraphics(new Graphics(HOME_GRAPHIC));
    } else if (currentTime == 18) {
    player.setNextWorldTile(tile.transform(0, 1, 0));
    player.getControlerManager().magicTeleported(Magic .MAGIC_TELEPORT);
    if (player.getControlerManager().getControler() == null)
    Magic.teleControlersCheck(player, tile);
    player.setNextFaceWorldTile(new WorldTile(tile.getX(), tile.getY(),
    tile.getPlane()));
    player.setDirection(6);
    } else if (currentTime == 19) {
    player.setNextGraphics(new Graphics(HOME_GRAPHIC + 1));
    player.setNextAnimation(new Animation(HOME_ANIMATION + 1));
    } else if (currentTime == 24) {
    player.setNextAnimation(new Animation(16393));
    } else if (currentTime == 25) {
    player.setNextWorldTile(tile);
    } else if (currentTime == 26)
    return -1;
    return 0;
    }

    @Override
    public boolean process(Player player) {
    if (player.getAttackedByDelay() + 10000 > Utils.currentTimeMillis()) {
    player.getPackets()
    .sendGameMessage(
    "You can't home teleport until 10 seconds after the end of combat.");
    return false;
    }
    return true;
    }

    @Override
    public void stop(Player player) {
    player.setNextAnimation(new Animation(-1));
    player.setNextGraphics(new Graphics(-1));
    }

    }


    60% credits to _Jordan for already releasing this his way
    40% credits to me for revising it my way and finishing it

    Hit that "Thanks" button if this helped
    May you explain what is different between them?
    Attached image
    Reply With Quote  
     

  3. #3  
    Strive for whats best.

    Chaz's Avatar
    Join Date
    Jul 2012
    Age
    28
    Posts
    2,499
    Thanks given
    376
    Thanks received
    614
    Rep Power
    170
    This looks really, really, bad. Good job none the less but try using this one.
    http://www.rune-server.org/runescape...nes-718-a.html
    Reply With Quote  
     

  4. Thankful user:


  5. #4  
    Registered Member
    Join Date
    Mar 2012
    Posts
    142
    Thanks given
    6
    Thanks received
    5
    Rep Power
    11
    Quote Originally Posted by GeePee View Post
    May you explain what is different between them?
    http://www.rune-server.org/runescape...ctivating.html Thats his way

    Quote Originally Posted by Chaz View Post
    This looks really, really, bad. Good job none the less but try using this one.
    http://www.rune-server.org/runescape...nes-718-a.html
    His is incomplete and isnt a tutorial. It's not even as good as this release: http://www.rune-server.org/runescape...ctivating.html
    Reply With Quote  
     

  6. #5  
    BoomScape #1
    BoomScape's Avatar
    Join Date
    May 2013
    Posts
    2,422
    Thanks given
    289
    Thanks received
    234
    Rep Power
    48
    Quote Originally Posted by legitkx View Post
    http://www.rune-server.org/runescape...ctivating.html Thats his way



    His is incomplete and isnt a tutorial. It's not even as good as this release: http://www.rune-server.org/runescape...ctivating.html
    I mean is anything on your lodestones different?
    Attached image
    Reply With Quote  
     

  7. #6  
    Registered Member
    Join Date
    Mar 2012
    Posts
    142
    Thanks given
    6
    Thanks received
    5
    Rep Power
    11
    Quote Originally Posted by GeePee View Post
    I mean is anything on your lodestones different?
    Not really its just been rewrote my way so its easier to understand, and completed, and a noob friendly tutorial
    Reply With Quote  
     

  8. #7  
    Lost Redemption Owner & Founder
    Lost Redemption's Avatar
    Join Date
    Jan 2013
    Age
    27
    Posts
    915
    Thanks given
    212
    Thanks received
    60
    Rep Power
    0
    Use [code] tags
    Please vouch for PortHosts! You get the most for your money with PortHosts!
    Reply With Quote  
     

  9. #8  
    Cindra 718 Founder
    Four Nations's Avatar
    Join Date
    Sep 2012
    Posts
    1,043
    Thanks given
    77
    Thanks received
    186
    Rep Power
    56
    Was gonna release mine that had cut scenes and handles better but won't worry now.
    Reply With Quote  
     

  10. #9  
    Strive for whats best.

    Chaz's Avatar
    Join Date
    Jul 2012
    Age
    28
    Posts
    2,499
    Thanks given
    376
    Thanks received
    614
    Rep Power
    170
    Quote Originally Posted by legitkx View Post
    His is incomplete and isnt a tutorial. It's not even as good as this release: http://www.rune-server.org/runescape...ctivating.html
    His is a lot neater, cleaner, and smaller. All you have to do is add the object handling in object handler class and it's literally perfect lodestones.
    Reply With Quote  
     

  11. #10  
    Scrub Lord
    _Will's Avatar
    Join Date
    Aug 2012
    Posts
    537
    Thanks given
    60
    Thanks received
    61
    Rep Power
    34
    Oh god this is messy.
    Reply With Quote  
     

Page 1 of 2 12 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [718] RuneScape Lodestone Activating
    By _jordan in forum Show-off
    Replies: 28
    Last Post: 09-27-2013, 08:17 AM
  2. [PI] FULL VOTE SYSTEM ! Paying
    By vasek in forum Help
    Replies: 7
    Last Post: 03-25-2011, 08:44 PM
  3. Replies: 3
    Last Post: 08-10-2010, 02:18 AM
  4. [30 day countdown]Full Premium System
    By Zahhak in forum Tutorials
    Replies: 55
    Last Post: 09-17-2009, 07:00 AM
  5. Full Woodcutting System
    By peterbjornx in forum Tutorials
    Replies: 61
    Last Post: 06-09-2009, 10:26 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •