### Overview
NEXTCODE-Bloodmoon คือระบบกิจกรรม Blood Moon สำหรับ RedM (VORP) ที่เพิ่มบรรยากาศหลอนและความท้าทายให้กับเซิร์ฟเวอร์ของคุณ
ผู้เล่นจะเจอผีตามจุดที่ตั้งค่าไว้, มีโอกาสเจอบอส, และเมื่อผีตายจะดรอปกล่องรางวัลแบบ **ซิงก์ทั้งเซิร์ฟเวอร์** (ใครเปิดก่อน กล่องหายพร้อมกันทุกคน)
### Features
- ระบบ Blood Moon ตั้งเวลาได้ (`startHour` / `endHour`)
- โหมดสุ่มรายวัน (ไม่จำเป็นต้องเกิดทุกวัน)
- คำสั่งแอดมิน: `/bloodmoon on|off|auto|status`
- ผีปกติ + บอส (ตั้งค่าแยกได้)
- ปรับเลือด/ดาเมจ/ความเก่ง/ขนาดบอสได้
- ลบศพผีทันทีเมื่อเสียชีวิต
- กล่องรางวัลแยกปกติ/บอส
- Reward รองรับ `money`, `gold`, `item`, `weapon`
- รองรับ `% chance` แยกแต่ละรางวัล
- รองรับ webhook (Discord log)
- รองรับ weathersync (ควบคุมอากาศช่วงกิจกรรม)
- รองรับ hook function สำหรับเชื่อมระบบอื่น
### Requirements
- RedM Server
- VORP Core
- VORP Inventory
- `weathersync` (แนะนำ)
- ระบบแจ้งเตือน (ค่าเริ่มต้นใช้ `NEXTCODE-notify`, เปลี่ยนได้ใน config)
### Installation
1. วางโฟลเดอร์ `NEXTCODE-Bloodmoon` ใน `resources/[-NEXTCODE-]/`
2. เพิ่ม `ensure NEXTCODE-Bloodmoon` ใน `server.cfg`
3. ให้ dependency เริ่มก่อนสคริปต์นี้
4. ตั้งค่า `config.lua` ให้ตรงกับเซิร์ฟเวอร์
5. `restart NEXTCODE-Bloodmoon`
### FAQ
**Q: ผู้เล่นเข้าเซิร์ฟระหว่าง Blood Moon จะเห็นเหมือนคนอื่นไหม?**
A: เห็นเหมือนกัน ระบบซิงก์สถานะ Blood Moon และกล่องจากเซิร์ฟเวอร์
**Q: กล่องรางวัลทุกคนเห็นใบเดียวกันไหม?**
A: ใช่ กล่องเป็น shared server state และหายพร้อมกันทั้งเซิร์ฟเมื่อมีคนเปิดสำเร็จ
**Q: ปรับอัตราดรอปได้ไหม?**
A: ได้ ปรับแยกรายการใน `normalRewards` และ `bossRewards` พร้อม `% chance`
**Q: ใช้ notify/progressbar/emote ของเซิร์ฟตัวเองได้ไหม?**
A: ได้ มี function hook ให้เปลี่ยนใน `config.lua`
### Terms
- ใช้งานได้เฉพาะเซิร์ฟเวอร์ของผู้ซื้อ
- ห้ามนำไปขายต่อ/แจกต่อ/ปล่อยไฟล์สาธารณะ
- อนุญาตให้แก้ไขเพื่อใช้งานภายในเซิร์ฟเวอร์ของตนเอง
- ไม่รวมบริการติดตั้งเต็มระบบ นอกจากระบุไว้ในแพ็กเกจ
- หลังอัปเดตควรสำรองไฟล์ก่อนทุกครั้ง
\
---
## EN Version
### Overview
NEXTCODE-Bloodmoon is a RedM (VORP) world-event script that creates a dark, high-risk Blood Moon experience.
Players fight Ghost NPCs and Bosses, then compete for **server-synced loot boxes** (one shared box for everyone; once opened, it disappears globally).
### Features
- Time-window Blood Moon (`startHour` / `endHour`)
- Optional random daily activation
- Admin command: `/bloodmoon on|off|auto|status`
- Normal Ghost + Boss system
- Configurable health/damage/difficulty/boss scale
- Instant ghost corpse cleanup on death
- Separate normal/boss loot pools
- Reward types: `money`, `gold`, `item`, `weapon`
- Per-reward drop chance support
- Discord webhook logging
- weathersync integration for event weather control
- Custom hook functions for external integrations
### Requirements
- RedM Server
- VORP Core
- VORP Inventory
- `weathersync` (recommended)
- Notification system (default uses `NEXTCODE-notify`, configurable)
### Installation
1. Put `NEXTCODE-Bloodmoon` in `resources/[-NEXTCODE-]/`
2. Add `ensure NEXTCODE-Bloodmoon` in `server.cfg`
3. Start dependencies before this resource
4. Configure `config.lua`
5. Run `restart NEXTCODE-Bloodmoon`
### FAQ
**Q: Do players who join mid-event see the active Blood Moon state?**
A: Yes. The script syncs current Blood Moon and loot state from server-side data.
**Q: Is the loot box shared for all players?**
A: Yes. Loot boxes are server-authoritative shared entities. Once one player opens it, it is removed for everyone.
**Q: Can I tune drop rates?**
A: Yes. Configure each entry in `normalRewards` and `bossRewards` with its own chance.
**Q: Can I use my own notify/progressbar/emote system?**
A: Yes. Use the provided hooks in `config.lua`.
### Terms
- License is for the purchasing server/community only
- Resale, redistribution, or public file sharing is prohibited
- Internal edits for your own server are allowed
- Full custom setup service is not included unless explicitly stated
- Always back up files before updating