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.
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).
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
- Go to a location after start (XX:00) or after
/startbattlefortreasure - Inside the 50 m zone: if more than one valid player is present, nobody can claim the treasure
- When you are the only valid player, press E on the marker
- ~2 s animation → inventory check → reward (default Case0 x1)
- That location closes until the next hour; everyone sees the winner message
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.
Scroll
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.
- Reward is added only via
CharsRepository.AddNewItemon the server after all checks pass. - Interaction uses a registered
ColShapeEnums.BattleForTreasurecylinder (~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).
- On press E:
TryValidateClaim: event active, spot free, alone in zone, alive, inventory space, not blocked admin, etc. - After ~2 s animation:
TryValidateClaimCompletionruns 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.OnAntiAnimduring pickup reduces animation-cancel abuse during the wait.
- 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 (
ClaimingPlayerlock). - After a reward is taken, that location is deactivated (marker + interaction removed) until the next event. No double claim on the same spot.
- Per-spot
lock (spot.Sync)prevents race conditions when two players interact at once. - If a player disconnects while claiming →
OnPlayerDisconnectclears 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.
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.
source/dotnet/resources/NeptuneEvo/
Events/BattleForTreasure/
Config.cs
Repository.cs
Events.cs
AdminCommands.cs
Models/SpotRuntime.cs
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).
source/src_client/events/ battleForTreasure.js
src_client/events/ battleForTreasure.js
Step 2: Four edits in existing files (manual)
[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.
- File
dotnet/resources/NeptuneEvo/Functions/CustomColShape.cs- Where exactly
- Inside
enum ColShapeEnums: e.g. afterQuestBonus(around line 201).
Add one line:
BattleForTreasure,
- File
dotnet/resources/NeptuneEvo/Main.cs- Where exactly
- In
playedMinutesTrigger()(starts around line 3648): after theEvents.HeliCrashblock, beforeDayOfWeek(near AirDrop / HeliCrash).
Add:
Events.BattleForTreasure.Repository.MinuteTimer(now.Hour, now.Minute);
- File
src_client/index.js- Where exactly
- Next to other
require('./events/...'), around line 440, e.g. belowmatwar.js.
Add:
require('./events/battleForTreasure.js');
- File
dotnet/resources/NeptuneEvo/Players/Disconnect/Repository.cs- Where exactly
- In
OnPlayerDisconnect, immediately afterHeliCrash.ClearBox(around line 70), beforeWorld.War.OnPlayerDisconnect(around line 73). Do not confuse with the edit inMain.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
- Log in as a regular player or level 9 admin.
- Start the event manually as admin:
/startbattlefortreasure, or wait for automatic start at XX:00 (after the warning at XX:55). - You should see a blip on the map; at an active location, marker type 40 and interaction.
- Enter the 50 m zone and be the only valid player (alive, not admin 1-8 blocking multi-player claim).
- Press interaction on the marker (E) → effect, sound, particles → item in inventory.
- Confirm that location closed until the next hour (marker gone, blip remains).
Configuration
dotnet/resources/NeptuneEvo/Events/BattleForTreasure/Config.cs
| Parameter | Description |
|---|---|
| Spots[] | Coordinates and names of 3 locations |
| RewardItem / RewardCount | Reward (default Case0 x1) |
| ZoneRadiusMeters | PvP zone (50) |
| InteractRadiusMeters | Interaction (~2 m) |
| WarningMinute / StartMinute | 55 / 0 |
| HeadAdminLevel | Level 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
- Discord farkopanich
- Author sends wallet address and exact USDT amount
- You send USDT (TRC-20)
- You send the TXID
- Delivery: zip, video links, support, localization
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
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.