Skip to content

feat(economy): add murder/kill ranking system#80

Open
beasleybudda-tech wants to merge 9 commits into
codebymitch:mainfrom
beasleybudda-tech:feature/murder-system
Open

feat(economy): add murder/kill ranking system#80
beasleybudda-tech wants to merge 9 commits into
codebymitch:mainfrom
beasleybudda-tech:feature/murder-system

Conversation

@beasleybudda-tech
Copy link
Copy Markdown

What this adds

A full PvP murder/kill ranking system for the GTA RP economy.

New commands

  • /murder @user — Attempt to take out a target. Success/failure depends on your rank vs. theirs plus your killstreak. Success pays out cash + steals 10% of their wallet. Failure sends you to the hospital for 30m with a medical bill.
  • /killstats [user] — Rank, kills, deaths, K/D, current/best killstreak, XP progress bar to next rank.
  • /killboard — Top 10 killers in the server, ranked by murder XP.

Rank tiers (unlocked by murder XP)

Rank XP Base success Payout mult
Petty Thug 0 30% 1.00x
Street Hitman 100 35% 1.15x
Enforcer 300 40% 1.30x
Assassin 750 45% 1.50x
Cartel Boss 1500 50% 1.75x
The Reaper 3000 55% 2.00x
Legendary Killer 6000 60% 2.50x

Mechanics

  • 2-hour cooldown between hits (mirrors /rob)
  • Killstreak gives +2% success and +5% payout per kill (capped)
  • Failure resets streak and hospitalizes attacker for 30m
  • Victim wallet must be ≥ $250 to be a valid target
  • Protection items: bulletproof_vest (new) and existing personal_safe block hits cleanly
  • Self / bot / jailed-self protections like other economy commands

Data

No DB migration needed — EconomyDataSchema uses .passthrough(), so new fields (kills, deaths, murderXp, killStreak, bestKillStreak, lastMurder, hospitalizedUntil) attach to the existing economy record.

Files

  • src/utils/murder.js — constants, rank table, success/payout math
  • src/commands/Economy/murder.js
  • src/commands/Economy/killstats.js
  • src/commands/Economy/killboard.js

Commands auto-load from src/commands/Economy/ via commandLoader.js — no registration changes required. After deploy, re-sync slash commands so the three new ones appear in Discord.

beasleybudda-tech added 9 commits May 25, 2026 14:32
- src/config/ai.js: AI config (model, trigger word)
- src/services/aiService.js: OpenAI client (built-in fetch, no deps)
- src/services/dispatchService.js: dispatch + scene + chat handler
- src/events/messageCreate.js: wire AI handler (leveling untouched)

Requires OPENAI_API_KEY env var. No new npm packages.
8 new items:
- weed_oz, meth_g, coke_g: consumables boosting work/crime payouts
- burner_phone: reduces crime fail rate
- drug_stash: permanent +25% drug earnings upgrade
- bm_pistol, bm_smg, bm_rifle: robbery boost tiers
- /chopshop: steal NPC cars by tier, deliver for payout, jail risk
- /211: armed robbery; payout scales with weapon owned (pistol/SMG/rifle)
- /lscm: Los Santos Customs marketplace (list/garage/buy/sell personal cars)
- AI now only responds in #rp-chat (1508419491514679327) and #dispatch (1508529364994883654)
- In dispatch channel: always dispatch mode (skips intent classification, saves cost)
- In RP channel: classifies scene vs chat
- Slash commands gated to #bot-commands (1508530649957400606)
- Admin/utility/moderation commands ungated (work anywhere)
…m RP

- DISPATCH_PROMPT now uses 11-550 (deal), 11-590 (meth), 11-357 (weed), 11-550C (coke)
- Adds drug-spot location pool (Grove St, Strawberry, Sandy Shores, Davis, etc.)
- If RP chat mentions drug keywords, an anonymous-tip callout is auto-posted to dispatch channel
- /murder @user: PvP kill attempt with cooldown, success chance based on
  attacker/victim ranks + killstreak, payouts scale with rank
- /killstats [user]: shows rank, kills, deaths, K/D, streak, XP progress bar
- /killboard: top 10 killers in the server, ranked by murder XP
- 7 rank tiers (Petty Thug -> Legendary Killer) unlocked by murder XP
- Bulletproof Vest / Personal Safe inventory items block hits
- Failed hits send attacker to the hospital for 30m + medical bill
- No DB migration: piggybacks on EconomyDataSchema passthrough
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant