Jump to content
Existing user? Sign In

Sign In



Sign Up

[RUSE] Simple Clue Scrolls


Sanity

Recommended Posts

 

d022dcf7b22ea07ad3dba706e7096b60.png

 

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:

29dhifr.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

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...
  • 4 months later...
  • 5 months later...
  • 3 weeks later...
  • 2 years later...
  • 3 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Contact

[email protected]

astra.security

What is a RSPS?

A RSPS, also known as RuneScape private server, is an online game based on RuneScape, and controlled by independent individuals.

Popular RSPS Servers

Runewild Ikov RedemptionRSPS

Disclaimer

Runesuite is not affiliated with runescape, jagex in any way & exists solely for educational purposes.

×
×
  • Create New...