Carve your path through a Diablo-inspired fantasy world with seven distinct classes, a sprawling dungeon crawl, and a treasure trove of gear to chase. Train a pet dragon, master crafting and forging, and brave the Soul Cave where Dragon Scales flow and death carries no penalty—only lessons.
Challenge rivals to high-stakes duels, assemble a guild for shared ambition, and refine your build across a deep itemization system with rare drops and powerful charms. From mining and smelting to arena victories and endgame loot, Dragon’s Kingdom rewards bold adventurers who plan, persevere, and fight with style.
Game Name: Dragon's Kingdom (DK Script)
Version: Unknown specific version (June 18, 2006 SQL dump)
Genre: Fantasy Browser-Based RPG (Diablo-inspired ARPG)
Technology Stack: PHP 4.3.10, MySQL 4.0.22, JavaScript
Database: MySQL with 34 tables (dk_* prefix)
Total Files: 557 files (4.6 MB)
Architecture: Template-based PHP with cookie authentication
License: COMMERCIAL - © 2004-2006 Adam Dear, dkscript.com
Development Status: Commercial product sold as installable script
Installation: install.php wizard + manual_db.sql (2,004 lines)
Historical Context: Commercial browser RPG script sold 2004-2006, competitor to Legend of the Green Dragon
Primary Language: English
Creator: Adam Dear (dkscript.com,
Official Site: dkscript.com (defunct), demo at www.dkscriptcom/demo/index.php
Evidence of Use: Fully configured game with 7 classes, arena, PvP duels, crafting, 100 items
Commercial Model: Sold as PHP script package (price unknown), banners for promotion
| File Type | Count | Total Size | Percentage | Purpose |
|---|---|---|---|---|
| .gif | 398 | 1.656 MB | 71.5% | UI elements, monster sprites, item icons |
| .php | 85 | 2.06 MB | 15.3% | Game logic, admin panel, templates |
| .jpg | 63 | 0.357 MB | 11.3% | Backgrounds, character portraits |
| .png | 5 | 0.06 MB | 0.9% | Transparent UI elements |
| .sql | 1 | 0.161 MB | 0.2% | Database schema (2,004 lines, 34 tables) |
| .swf | 1 | 0.278 MB | 0.2% | Flash animation (unknown purpose) |
| .htm/.html | 2 | 0.027 MB | 0.4% | Static pages |
| .ico | 1 | 0.001 MB | 0.2% | Favicon |
| (no ext) | 1 | 0.001 MB | 0.2% | Config/include file |
| TOTAL | 557 | 4.6 MB | 100% | Complete commercial game package |
Analysis: Graphics-heavy commercial product with 398 GIF files (71.5% = 1.656 MB) for UI/monsters/items. 85 PHP files include admin panel (admin/.php), templates (templates/.php), and game mechanics. 63 JPG backgrounds provide fantasy atmosphere. SQL dump dated June 18, 2006 with 2,004 lines. Flash SWF suggests multimedia elements. Copyright notices throughout codebase: "DK Script © 2004-2006 Created by Adam Dear" with dkscript.com links.
Dragons Kingdom/
├── index.php # Main hub (1,071 lines), duel system, storage slots
├── login.php, register.php # Authentication
├── lib.php # Core functions (479 lines): opendb(), doquery(), parsetemplate()
├── config.php # Database config (username/password/database/prefix/secretword)
├── cookies.php # Cookie auth (checkcookies(), setcookie with 999999999999999 expiration!)
├── install.php # Installation wizard with SQL CREATE TABLE statements
├── manual_db.sql # Database dump (2,004 lines, 34 tables, June 18, 2006)
├── tutorial.php # New player tutorial (mandatory, $userrow["tutorial"] == 0)
├── poll.php # Mandatory voting system ($userrow["poll"] != "Voted", level >= 3)
├── cave.php # Soul Cave (PvE, Dragon Scales currency, healing pool)
├── dungeon.php # Dungeon exploration (monsters, combat, loot)
├── pvp.php # PvP duels (challenge, accept/decline, duel, wagering)
├── arena.php # Dragon arena (train pet dragons, battles)
├── contact.php # Support/contact form
├── supportsite.php # Banner promotion (4 banner sizes, HTML embeds)
├── crafting.php, forging.php, smelting.php, mining.php # Crafting systems
├── homes.php # Player housing (upgrades, storage)
├── guildmarket.php, shops.php # Economy
├── forum.php, messages.php # Communication
├── poll.php # Community polls (mandatory voting level 3+)
├── admin/
│ ├── admin.php # Main admin panel
│ ├── mod.php # Moderator panel (player management)
│ ├── mail.php # Mass email system
│ ├── status.php # Server status dashboard
│ └── (other admin tools)
├── templates/
│ ├── primary.php # Main game template
│ ├── admin.php # Admin panel template
│ ├── mod.php # Moderator template
│ └── (other templates)
├── images/ # 398 GIF + 63 JPG + 5 PNG
└── (60+ other game files)
Dragon's Kingdom is a Diablo-inspired browser RPG where players:
34 Tables Identified:
| Table | Purpose | Key Features |
|---|---|---|
| dk_users | Player accounts | charname, password (MD5?), class (1-7), level, experience, gold, dscales (Dragon Scales), maxhp/maxmp, currenthp/currentmp, strength, dexterity, attackpower, defensepower, location, authlevel (0=player, 1=mod, 2=banned), tutorial (0=not done, 1=done), poll (voted status) |
| dk_arena | Pet dragons | id, name, type, species (1-N), trainer (owner), maxhp/maxmp, currenthp/currentmp, maxdam, dexterity, armor, magicarmor, level, experience, gold, immune, wins/losses, lastwin/lastloss, skillpoints |
| dk_duel | PvP challenges | player1id/player2id, duelstatus (1=waiting, 3=active), player1done/player2done (0/1 flags), goldstake, expstake |
| dk_drops | Loot items | id (1-100), name (Blessed Life, Sacred Life, Devil's Scale, etc.), mlevel (monster level), type, attribute1/attribute2 (stat bonuses: maxhp,10/strength,50), requirement (level) |
| dk_crafting | Crafting recipes | id (1-10), name (Sapphire Ring → Black Dragons Amulet), level (1-175), gem1-5 (gem counts), string (0/1) |
| dk_control | Game configuration | gamename, gamesize (600), dunsize (200), gameopen (0/1), gameurl, adminemail, updatetime, info, class1name-class7name, diff1name/diff1mod, compression, verifyemail, shownews, displaychat, forumopen, mostonline |
| dk_monsters | NPCs/enemies | Monster stats for dungeon encounters |
| dk_spells | Magic system | Spell definitions |
| dk_items | Equipment | Weapon/armor database |
| dk_inventitems | Player inventory | Items in backpack (3 slots) |
| dk_itemstorage | Storage chest | Items in home storage (15 slots) |
| dk_jewellery | Accessories | Rings/amulets equipped/stored |
| dk_forging | Smithing | Forging system data |
| dk_smelting | Metallurgy | Ore smelting data |
| dk_mining | Resource gathering | Mining system data |
| dk_endurance | Stamina system | Endurance/fatigue tracking |
| dk_souls | Soul Cave | Soul encounter data (PvE, Dragon Scales rewards) |
| dk_homes | Player housing | Home ownership, upgrades |
| dk_guilds | Guild system | Guild membership, ranks |
| dk_gforum | Guild forums | Guild-specific forums |
| dk_marketforum | Market forums | Trade discussions |
| dk_playermarket | Player trading | Player-to-player market |
| dk_chat | Chat system | id, posttime, author, touser, babble (150 char messages) |
| dk_gamemail | Internal mail | Private messaging |
| dk_news | News/announcements | Game news posts |
| dk_comments | Comments | id, topic, time, poster, post (forum comments) |
| dk_poll | Poll system | Poll questions/votes (mandatory level 3+) |
| dk_staff | Admin accounts | Staff members (authlevel management) |
| dk_support | Support tickets | Player support system |
| dk_suggestions | Suggestions | Player feedback |
| dk_strongholds | Strongholds | Guild stronghold system (possibly) |
| dk_towns | Towns/locations | Game world towns |
| dk_levels | Level progression | Experience thresholds per level |
| dk_general | General data | Miscellaneous game data |
Database Activity Evidence:
setcookie("dk_login", "1", time()+999999999999999); - expires in year 33658534 (31,658,532 years from 2006!)// CRITICAL: Cookie expiration 31 million years (index.php:24)
setcookie("dk_login", "1", time()+999999999999999);
// Expires: Year 33658534 (overflow to 2038 on 32-bit systems)
// Hardcoded default credentials (config.php:4-6)
"user" => "username",
"pass" => "password",
"name" => "database",
// Users may forget to change these
// Magic quotes dependency (lib.php:20)
if (get_magic_quotes_gpc()) {
// Deprecated PHP 5.3, removed PHP 5.4
// Deprecated mysql_* (lib.php:11-13)
$link = mysql_connect($server, $user, $pass);
mysql_select_db($name);
// Removed PHP 7.0
// Weak "secretword" (config.php:8)
"secretword" => "boooooo"
// Used for cookie hashing, easily brute-forced
// SQL injection via addslashes only (lib.php:34-35)
foreach($_POST as $a=>$b) { $_POST[$a] = addslashes($b); }
// Insufficient for numeric contexts, no prepared statements
Overall Code Quality: 5.5/10
Complete Showstoppers:
Path to Modernization:
Total Modernization Cost: $95,000-140,000
Legal Risk: Commercial product (© 2004-2006), deploying without license = copyright infringement
1. Cookie Expiration Overflow (CVSS 7.5 - High)
// index.php:24
setcookie("dk_login", "1", time()+999999999999999);
// time() = 1718740000 (June 2024)
// time()+999999999999999 = 1000000001718740000
// On 32-bit: Overflow to 2038 (Y2038 bug)
// On 64-bit: Expires year 33658534 (31 million years)
Impact: Session management broken, permanent ban cookie persists forever
2. Hardcoded Default Credentials (CVSS 9.8 - Critical)
// config.php:4-6
"user" => "username",
"pass" => "password",
"name" => "database",
// Many users will forget to change these defaults
Impact: Database compromise if defaults not changed during install
3. Weak "Secretword" (CVSS 6.5 - Medium)
// config.php:8
"secretword" => "boooooo"
// Used for cookie hashing
// 7 characters, all lowercase, dictionary word
Impact: Cookie forgery via brute force
4. SQL Injection Residual (CVSS 8.1 - High)
// lib.php:34-35
foreach($_POST as $a=>$b) { $_POST[$a] = addslashes($b); }
// Insufficient for numeric contexts
// Example: WHERE id=$_GET[id] (no quotes, addslashes bypassed)
Impact: Database exfiltration, privilege escalation
5. MD5 Password Hashing (CVSS 7.4 - High)
Impact: Mass account compromise if database leaked
6. No CSRF Protection (CVSS 6.5 - Medium)
Impact: Unauthorized admin actions (ban players, close game, mass email)
7. Banner Promotion Obligation (CVSS 2.0 - Low)
Impact: Legal breach if banners removed
mysql -h localhost -u username -ppassword databaseSELECT * FROM dk_users; - get all accountsSecurity Rating: 2/10 (Critical - Multiple High/Critical Vulnerabilities)
In 2004-2006 context: Dragon's Kingdom was a professional commercial competitor to free Legend of the Green Dragon clones. Pet dragon system, Soul Cave with Dragon Scales, and 100 pre-configured items offered production-ready package. Installation wizard and admin panel justified commercial pricing.
In 2025 context: Historical artifact of 2004 commercial browser RPG market. Cookie expiration overflow and deprecated PHP/MySQL doom deployment, but pet dragon system and dual-attribute items show innovation for era.
Final Innovation Score: 6/10
Verdict: DO NOT DEPLOY - COPYRIGHT INFRINGEMENT + TECHNICAL BANKRUPTCY
Why this cannot be deployed:
Legal Risk: Deploying without contacting Adam Dear/dkscript.com = copyright infringement lawsuit
1. Contact Creator ($0-5,000)
2. Mechanic Salvage ($0 - Academic)
Extract design concepts for new project:
3. Historical Documentation ($2,000-5,000)
Commission writeup for game development history:
4. Legal Acquisition ($10,000-50,000?)
Attempt to purchase rights from Adam Dear:
This game requires $95,000-140,000 investment AFTER obtaining license:
ROI Analysis: $140,000 + license acquisition in fantasy browser RPG = negative 95% return
Contact Adam Dear for open-source release, document as historical artifact, NEVER deploy without legal clearance.
© 2004-2006 Adam Dear (dkscript.com) - Deploying without license = copyright lawsuit. Plus: Cookie overflow (999 trillion seconds), hardcoded "username"/"password" (CVSS 9.8).
Legal Status: COPYRIGHT PROTECTED (no license). Technical Status: Cookie overflow + hardcoded credentials. Action: Contact creator OR archive only. Verdict: Cannot deploy due to copyright + technical bankruptcy.
Dragon's Kingdom is a 2004-2006 commercial browser RPG by Adam Dear (dkscript.com,
| Category | Visual Rating | Score | Assessment |
|---|---|---|---|
| Innovation (2004) | 6/10 | Pet dragon arena (pre-FarmVille), Soul Cave, dual-attribute items | |
| Security | 2/10 | Cookie overflow + hardcoded "username"/"password" (CVSS 9.8) | |
| Code Quality | 5.5/10 | Professional templates, fatal cookie bug (999 trillion sec) | |
| Feature Completeness | 4/5 | 7 classes, pet dragons, crafting, PvP, housing, 100 items | |
| Legal Status | COPYRIGHT | © 2004-2006 Adam Dear - deployment = infringement lawsuit | |
| Modern Viability | 1/10 | Cookie overflow, mysql_* removed PHP 7.0, copyright | |
| Modernization Cost | $95k-140k | PLUS legal acquisition ($10k-50k?) = total $105k-190k | |
| Historical Value | 3.5/5 | 2004 commercial script, pet dragon pre-FarmVille, Soul Cave | |
| Commercial Potential | 0/10 | Copyright protected + $140k+ investment = bankruptcy | |
| Overall Verdict |
F (CANNOT DEPLOY) |
Copyright infringement + cookie overflow = deployment illegal/impossible | |
Dragon's Kingdom represents professional 2004 commercial browser RPG by Adam Dear (dkscript.com,
However, the codebase contains catastrophic flaws: cookie expiration overflow (setcookie time+999999999999999 = year 33658534, CVSS 7.5), hardcoded default credentials "username"/"password" (CVSS 9.8), weak "boooooo" secretword (CVSS 6.5), deprecated mysql_* functions (PHP 7.0 removed 2015), magic_quotes dependency (PHP 5.4 removed 2012), SQL injection residual, MD5 passwords, no CSRF, and 398 dated GIF graphics (1.656 MB). Security rating: 2/10 - critical vulnerabilities. Modernization cost: $95,000-140,000 PLUS legal risk (© 2004-2006 Adam Dear, copyright infringement without license). Innovation rating: 6/10 for pet dragons, Soul Cave, and dual-attribute items in 2004 context. Modern viability: 1/10 - cookie overflow alone prevents deployment. Recommendation: Attempt to contact Adam Dear at
Running many of the scripts in this archive on a live server presents a serious security risk. These projects were created before modern hardening practices and may contain vulnerabilities that can compromise your system.
We strongly recommend using this code for reference and analysis only, or in isolated local environments. By downloading these files, you accept full responsibility for their use.