Bank PIN Helper

IntermediateUtility

A simple helper for remembering bank PIN patterns. Displays a visual aid for PIN entry.

12 min read

What It Does

A simple helper for remembering bank PIN patterns. Displays a visual aid for PIN entry.

Source Code

java
1package com.example;
2
3import net.runelite.api.Client;
4import net.runelite.client.ui.overlay.Overlay;
5import net.runelite.client.ui.overlay.OverlayManager;
6import net.runelite.client.plugins.Plugin;
7import net.runelite.client.plugins.PluginDescriptor;
8import javax.inject.Inject;
9import java.awt.*;
10
11@PluginDescriptor(
12    name = "Bank PIN Helper",
13    description = "Helps with bank PIN"
14)
15public class BankPinHelperPlugin extends Plugin {
16    @Inject
17    private Client client;
18
19    @Inject
20    private OverlayManager overlayManager;
21
22    private final Overlay overlay = new Overlay() {
23        @Override
24        public Dimension render(Graphics2D graphics) {
25            // Draw PIN pad reference
26            graphics.setColor(new Color(0, 0, 0, 200));
27            graphics.fillRect(10, 10, 150, 200);
28            
29            graphics.setColor(Color.WHITE);
30            graphics.drawString("PIN Helper", 20, 30);
31            graphics.drawString("1  2  3", 30, 60);
32            graphics.drawString("4  5  6", 30, 80);
33            graphics.drawString("7  8  9", 30, 100);
34            graphics.drawString("   0  ", 30, 120);
35            
36            return new Dimension(170, 220);
37        }
38    };
39
40    @Override
41    protected void startUp() {
42        overlayManager.add(overlay);
43    }
44
45    @Override
46    protected void shutDown() {
47        overlayManager.remove(overlay);
48    }
49}

Code Annotations

Line 25

Draw background panel

Line 30

Draw PIN pad layout

API Classes Used

Key Concepts

  • Draw background panel
  • Draw PIN pad layout

Next Steps

  • Add configurable PIN pattern
  • Add visual indicators
  • Add PIN entry detection