Sanity 436 Posted September 28, 2017 Report Share Posted September 28, 2017 Note, if you want to keep a track of clues completed simply create clue scroll points and have them called there. (String 47703) Client (RsInterface) : public static void clueScrolls(TextDrawingArea wid[]) { RSInterface tab = addInterface(47700); addSpriteLoader(47701, 959); addText(47702, "Clues Completed", wid, 1, 16750623, true, true); addText(47703, "-", wid, 2, 0xffffff, true, true); addText(47704, "Dig somewhere in the Edgeville bank", wid, 1, 16750623, true, true); addCloseButton(47705, 18535, 18536); tab.children(5); tab.child(0, 47701, 35, 60); tab.child(1, 47702, 93, 100); tab.child(2, 47703, 103, 123); tab.child(3, 47704, 252, 222); tab.child(4, 47705, 453, 77); } 959.png: Source: Create a Class called Clues: public class Clues { public static void dig(final Player player) { if(!player.getClickDelay().elapsed(2000)) return; player.getMovementQueue().reset(); player.getPacketSender().sendMessage("You start digging for clues.."); player.performAnimation(new Animation(830)); TaskManager.submit(new Task(2, player, false) { @Override public void execute() { /** * Clue scrolls */ if (inOneSpot(player.getPosition(), 1748, 5327) && player.getInventory().contains(2677)) { player.getPA().sendMessage("@gre@ You find a Casket!"); player.getInventory().delete(2677, 1); player.getInventory().add(2818, 1); } else if (inOneSpot(player.getPosition(), 3213, 3421) && player.getInventory().contains(2678)) { player.getPA().sendMessage("@gre@ You find a Casket!"); player.getInventory().delete(2678, 1); player.getInventory().add(2818, 1); } else if (inOneSpot(player.getPosition(), 3094, 3496) && player.getInventory().contains(2679)) { player.getPA().sendMessage("@gre@ You find a Casket!"); player.getInventory().delete(2679, 1); player.getInventory().add(2818, 1); } else if (inOneSpot(player.getPosition(), 3229, 3298) && player.getInventory().contains(2680)) { player.getPA().sendMessage("@gre@ You find a Casket!"); player.getInventory().delete(2680, 1); player.getInventory().add(2818, 1); } else if (inOneSpot(player.getPosition(), 2861, 3539) && player.getInventory().contains(2681)) { player.getPA().sendMessage("@gre@ You find a Casket!"); player.getInventory().delete(2681, 1); player.getInventory().add(2818, 1); } else if (inOneSpot(player.getPosition(), 3204, 3264) && player.getInventory().contains(2682)) { player.getPA().sendMessage("@gre@ You find a Casket!"); player.getInventory().delete(2682, 1); player.getInventory().add(2818, 1); System.out.println("inOneSpot"); } else player.getPacketSender().sendMessage("You find nothing of interest."); player.getMovementQueue().reset(); player.getPacketSender().sendClientRightClickRemoval(); player.getSkillManager().stopSkilling(); stop(); player.getMovementQueue().reset(); }}); player.getClickDelay().reset(); return; } static boolean hasClue(Player player) { if(player.getInventory().containsAny(2677, 2678, 2679, 2680, 2681, 2682)); return true; } private static boolean inOneSpot(Position pos, int x, int y) { return pos.getX() == x && pos.getY() == y; } } The sample I showed you (the clue) is done through ItemActionPacketListener Example of item usage: case 2677: player.getPacketSender().sendString(47704, "Dig in the Ancient Cavern Teleport Area").sendInterface(47700); break; case 2678: player.getPacketSender().sendString(47704, "Dig South of Varrock Square").sendInterface(47700); break; case 2679: player.getPacketSender().sendString(47704, "Dig Somewhere In Edgeville Bank").sendInterface(47700); break; case 2680: player.getPacketSender().sendString(47704, "Dig Somewhere In The Chicken Coop").sendInterface(47700); break; case 2681: player.getPacketSender().sendString(47704, "Dig somewhere In The Warrior Guild Teleport").sendInterface(47700); break; case 2682: player.getPacketSender().sendString(47704, "Dig somewhere in the Yak field").sendInterface(47700); break; Credits: Zivik/Tyler 2 Link to comment Share on other sites More sharing options...
Pat 608 Posted December 19, 2018 Report Share Posted December 19, 2018 Thank you for the snippet I will be sure to look into this some time! Keep them coming Link to comment Share on other sites More sharing options...
LeakedMania 0 Posted March 22, 2019 Report Share Posted March 22, 2019 Cool release, thanks for the snippet. Link to comment Share on other sites More sharing options...
superfly 0 Posted August 12, 2019 Report Share Posted August 12, 2019 hell ya brothern nice Link to comment Share on other sites More sharing options...
Baller pk10 0 Posted January 15, 2020 Report Share Posted January 15, 2020 thank you for the contribution Link to comment Share on other sites More sharing options...
josh555 3 Posted February 1, 2020 Report Share Posted February 1, 2020 Good Release, Appreciate your post sharing with the community, pretty helpful! Keep It G Link to comment Share on other sites More sharing options...
sliskes Wrarh 0 Posted October 8, 2022 Report Share Posted October 8, 2022 thank you sir Link to comment Share on other sites More sharing options...
Jamov 2 Posted October 10, 2022 Report Share Posted October 10, 2022 (edited) Nvm Edited October 10, 2022 by Jamov Link to comment Share on other sites More sharing options...
Hyie 1 Posted October 10, 2022 Report Share Posted October 10, 2022 Nice Link to comment Share on other sites More sharing options...
onetake 0 Posted October 13, 2022 Report Share Posted October 13, 2022 Cool release, thanks for the snippet. Link to comment Share on other sites More sharing options...
nsin25 0 Posted February 7, 2023 Report Share Posted February 7, 2023 Love this feature Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now