Welcome to DeadZone Community Packages! This guide will help you get started with creating custom plugins for Old School RuneScape using the DeadZone API.
What are Community Packages?
Community Packages are user-created JavaScript plugins that run within the DeadZone/RuneLite client. They allow you to automate tasks, create custom interfaces, and interact with the game in powerful ways using the comprehensive DeadZone API.
Prerequisites
Before you begin, you'll need:
RuneLite Client with DeadZone Subscription - DeadZone needs to be launched and authenticated to work with the API.
Access to deadzone.dev - This is the web-based development environment where you'll create and test your packages
Basic JavaScript Knowledge - While not strictly required, familiarity with JavaScript will help you understand the examples and create more complex plugins
The DeadZone API provides powerful namespaces for interacting with the game:
Game Namespace
Access game information and perform actions:
Game.info.inventory.getItems() // Get all inventory items Game.interact.npc.attack(npc) // Attack an NPC Game.sendGameMessage("Hello!", "My Plugin") // Send a chat message
Client Namespace
Access client and player information:
Client.getLocalPlayer() // Get your player Client.getRealSkillLevels(Skill.ATTACK) // Get your attack level
PlayerHelper Namespace
Perform player actions:
PlayerHelper.walkTo(worldPoint) // Walk to a location PlayerHelper.activatePrayer(Prayer.PROTECT_FROM_MELEE) // Activate prayer
Utility Namespace
Helpful utility functions:
Utility.print("Debug message") // Print to console Utility.getDelay() // Get user's configured DZ API Delay Utility.pressKey("H") // Simulate key "H" Press
Testing Your Package
When you create or edit a package:
Click Save to save your code
Click Start to run the package in-game
Monitor the Console tab for any errors or debug messages
Use the Stop button to halt execution
Best Practices
Safety First
Always implement proper error handling
Test extensively before publishing
Never skip required event handlers (OnStart, OnShutdown)
User Experience
Provide clear configuration options
Add overlay displays for status information
Use descriptive names and comments in your code
Performance
Avoid expensive operations in OnGameTick()/OnClientTick() when possible
Use appropriate delays between actions
Cache frequently accessed data
Common Pitfalls
Missing OnShutdown() - Always clean up resources when stopping
Client Thread Issues - Some methods require Client.invokeLater() wrapper
Hardcoded Values - Use config items instead of hardcoded settings
No Error Handling - Always wrap risky operations in try-catch blocks