v1.0.0 · RedAge V3 · RAGE:MP

Battle for Treasure

PvP event for RedAge V3 three independent locations, hourly schedule, 50 m zone.

One valid player claims the reward.

Price

$69.99 USD

Payment: USDT (TRC-20). Exact amount confirmed before you send.

Author
Farko
Discord
farkopanich
Platform
RAGE:MP
Server
RedAge V3

What the system is and how it works

“Battle for Treasure” is a PvP event. The map has three fully independent locations, each with its own reward. If someone claims location 1, locations 2 and 3 stay active in the same hour. Up to three winners per hour are possible (one per location).

XX:55
Warning in chat and CoolMsg
XX:00
Markers and interaction at locations

How the system works (in-game)

Gameplay footage of the event.

What the player sees

  • Permanent blip at each location (sprite 94, yellow, short range)
  • Active location: yellow marker id 40 and interaction (~2 m)
  • 50 m PvP zone only the sole valid player in the zone can claim the reward

Claiming the reward

  1. Go to a location after start (XX:00) or after /startbattlefortreasure
  2. Inside the 50 m zone: if more than one valid player is present, nobody can claim the treasure
  3. When you are the only valid player, press E on the marker
  4. ~2 s animation → inventory check → reward (default Case0 x1)
  5. That location closes until the next hour; everyone sees the winner message
Three independent locations

Config.cs defines coordinates and names. Location 1 does not disable 2 and 3 three different winners in one hour are possible.

In-game screenshots

Full event flow in one strip: map, blips, markers, zone rules, notifications, wins, and reward. Scroll left to right.

Anti-cheat & exploit protection

All critical logic runs server-side in Repository.cs. The client script only plays sound and visual effects after the server confirms a valid claim. It cannot grant items or start a capture on its own.

Server authority
  • Reward is added only via CharsRepository.AddNewItem on the server after all checks pass.
  • Interaction uses a registered ColShapeEnums.BattleForTreasure cylinder (~2 m), not a free remote event anyone can spam.
  • Player positions for the 50 m zone are read on the server (Main.GetPlayersInRadiusOfPosition), not trusted from the client.
  • Each successful claim is written to the server log (player name, spot, hour).
Double validation (start + finish)
  • On press E: TryValidateClaim: event active, spot free, alone in zone, alive, inventory space, not blocked admin, etc.
  • After ~2 s animation: TryValidateClaimCompletion runs the same rules again before any item is given.
  • If the player dies, leaves the zone, gets company, loses inventory space, or is interrupted during the animation → capture is cancelled, no reward.
  • Main.OnAntiAnim during pickup reduces animation-cancel abuse during the wait.
Zone & PvP rules (anti-abuse)
  • Treasure can be claimed only when exactly one valid player is inside the 50 m server zone.
  • Dead players (Health <= 0) are ignored and cannot claim.
  • Admins level 1-8 are not counted in the zone and cannot take the reward. They cannot block real players or claim while on duty.
  • Only one player per location can capture at a time (ClaimingPlayer lock).
  • After a reward is taken, that location is deactivated (marker + interaction removed) until the next event. No double claim on the same spot.
State safety & disconnects
  • Per-spot lock (spot.Sync) prevents race conditions when two players interact at once.
  • If a player disconnects while claiming → OnPlayerDisconnect clears the spot so it is not stuck for others.
  • Invalid spot index, missing character/session data, demorgan, or anti-anim down → claim blocked silently or with an error message.
Note: No script is 100% immune to every cheat on RAGE:MP, but this module does not hand out rewards from the client and re-checks position and zone state immediately before payout. Level 9 admins can still test claims and start/stop the event via commands. That is intentional for server owners.

Roles

Role Commands Counted in zone Reward
Player None Yes If alone and valid
Admin 1-8 None No Cannot claim
Admin 9 5 commands Yes Can (for testing)

Admin commands (level 9)

/startbattlefortreasure        manually starts all 3 locations
/stopbattlefortreasure         disables markers and interaction
/tpbattlefortreasure [1-3]     teleport to a location
/bfttestzone [0|1|2]           zone test
/bftzoninfo [1-3]              debug info

Admins 1-8 are not counted in the zone player count. If you are the only valid player and only admins 1-8 are nearby, you can still claim the treasure.

Installation (step by step)

Requirements: RAGE:MP + RedAge V3.

All paths below are relative to your server project root (e.g. redage_v3/). Do not copy into the wrong folder the structure must match the RedAge V3 / NeptuneEvo layout.

Package structure

The zip archive contains a BattleForTreasure/ folder with this guide and a source/ subfolder with all files to copy:

BattleForTreasure/
  index.html             ← guide (this document)
  source/
    dotnet/resources/NeptuneEvo/Events/BattleForTreasure/   ← server code
      Config.cs
      Repository.cs
      Events.cs
      AdminCommands.cs
      Models/SpotRuntime.cs
    src_client/events/battleForTreasure.js                  ← client code

Step 1: Copy files from source/

Copy files manually (or via FileZilla / WinSCP on your host). Do not rename files or change paths inside the project.

Server: copy the entire folder into your project

From the package, take the full BattleForTreasure folder with all files and place it at the same path in your server project.

From package
source/dotnet/resources/NeptuneEvo/
  Events/BattleForTreasure/
    Config.cs
    Repository.cs
    Events.cs
    AdminCommands.cs
    Models/SpotRuntime.cs
Into your project
dotnet/resources/NeptuneEvo/
  Events/BattleForTreasure/
    Config.cs
    Repository.cs
    Events.cs
    AdminCommands.cs
    Models/SpotRuntime.cs

When done, this folder must exist in your project:

dotnet/resources/NeptuneEvo/Events/BattleForTreasure/

  • Config.cs
  • Repository.cs
  • Events.cs
  • AdminCommands.cs
  • Models/SpotRuntime.cs

Client: copy one file

The client script goes in the events folder next to other event scripts (e.g. matwar.js).

From package
source/src_client/events/
  battleForTreasure.js
Into your project
src_client/events/
  battleForTreasure.js

Step 2: Four edits in existing files (manual)

Important: The event registers via [ServerEvent] and [Interaction] attributes. You do not add new classes in Main.cs: only the timer call and one enum value. Without these four edits the system will not work.
Edit A: CustomColShape.cs
File
dotnet/resources/NeptuneEvo/Functions/CustomColShape.cs
Where exactly
Inside enum ColShapeEnums: e.g. after QuestBonus (around line 201).

Add one line:

BattleForTreasure,
Edit B: Main.cs (minute timer)
File
dotnet/resources/NeptuneEvo/Main.cs
Where exactly
In playedMinutesTrigger() (starts around line 3648): after the Events.HeliCrash block, before DayOfWeek (near AirDrop / HeliCrash).

Add:

Events.BattleForTreasure.Repository.MinuteTimer(now.Hour, now.Minute);
Edit C: src_client/index.js
File
src_client/index.js
Where exactly
Next to other require('./events/...'), around line 440, e.g. below matwar.js.

Add:

require('./events/battleForTreasure.js');
Edit D: Players/Disconnect/Repository.cs
File
dotnet/resources/NeptuneEvo/Players/Disconnect/Repository.cs
Where exactly
In OnPlayerDisconnect, immediately after HeliCrash.ClearBox (around line 70), before World.War.OnPlayerDisconnect (around line 73). Do not confuse with the edit in Main.cs!

Add one line:

NeptuneEvo.Events.BattleForTreasure.Repository.OnPlayerDisconnect(player);

If a player disconnects while claiming treasure, that location is freed for others.

Step 3: Build and restart

After copying and manual edits, build server and client, then restart the server.

Server (C#)

cd dotnet/resources/NeptuneEvo
dotnet build

Client (JavaScript bundle)

cd src_client
npm run build

Finally, restart the entire RAGE:MP server so new scripts load.

Step 4: Verify it works

  1. Log in as a regular player or level 9 admin.
  2. Start the event manually as admin: /startbattlefortreasure, or wait for automatic start at XX:00 (after the warning at XX:55).
  3. You should see a blip on the map; at an active location, marker type 40 and interaction.
  4. Enter the 50 m zone and be the only valid player (alive, not admin 1-8 blocking multi-player claim).
  5. Press interaction on the marker (E) → effect, sound, particles → item in inventory.
  6. Confirm that location closed until the next hour (marker gone, blip remains).

Configuration

dotnet/resources/NeptuneEvo/Events/BattleForTreasure/Config.cs

ParameterDescription
Spots[]Coordinates and names of 3 locations
RewardItem / RewardCountReward (default Case0 x1)
ZoneRadiusMetersPvP zone (50)
InteractRadiusMetersInteraction (~2 m)
WarningMinute / StartMinute55 / 0
HeadAdminLevelLevel for admin commands (9)
MarkerType, BlipSprite, BlipColor…Visual parameters

For rewards, use an ItemId your inventory system supports.

What the buyer gets

  • Full system (source/, version 1.0.0) with server-side anti-cheat / exploit protection (see Anti-cheat section)
  • Video: how the system works in-game (on this page)
  • Video: server installation (separate guide, sent after payment)
  • This guide · Discord support (24-48 h)
  • Warranty: free bug fixes if any (3-7 business days)
  • Localization: all module texts in any language at no extra charge
  • Help with Config.cs (coordinates, reward, schedule, radius)

The installation video is sent after payment and is not the same as the in-game demo above.

Refunds (USDT TRC-20)

YES You did not receive what was shown/described; critical bugs not fixed within 7 business days, if any exist.

NO Works as in the video; you dislike the concept; your own code changes; wrong RedAge version; 14+ days without contact.

Payment and license

  1. Discord farkopanich
  2. Author sends wallet address and exact USDT amount
  3. You send USDT (TRC-20)
  4. You send the TXID
  5. Delivery: zip, video links, support, localization
License

1 system / 1 project. Not allowed: resale, leaking files, multiple servers on one purchase.

Delivery: within 24 h after confirmed payment. Localization: 1-2 days by agreement.

Contact

Discord farkopanich

Thank you for purchasing the “Battle for Treasure” system.
I hope we work well together and that the event brings solid PvP content to your server. If you need help, reach out.