Discord Silly Scripts

Silly Loot

Silly Loot

€5.87

Add to Basket

🧺 Silly Loot – NPC Loot (RedM / VORP)

Ein leichtes NPC-Loot Script für RedM: bestimmte NPC-Modelle geben beim Fertig-Looten zufällige Items aus einem konfigurierbaren Loot-Pool. Ideal für Rare-NPCs, Events, Cultists, Bandits usw.

Preview: Video

✨ Features

  • 🎭 NPC-spezifischer Loot: pro NPC-Model definierst du eigene Loot-Tabellen
  • 🎲 Zufällige Auswahl aus Loot-Pool pro Loot-Vorgang
  • 🎒 VORP Inventory Support (Item wird direkt ins Inventar gegeben)
  • 🔔 VORP Notification (TipBottom) bei erfolgreichem Loot
  • 🛡️ Anti-Spam Cooldown (Server-seitig)
  • ⚡ Optimiert: Client nutzt Hash-Cache statt Config-Scan pro Event
  • 🧹 “Ein Ped nur einmal” (Client-seitig) + Cleanup gegen Memory-Leaks
  • 🧩 Namespaced Events (silly_loot:*) um Kollisionen zu vermeiden

✅ Anforderungen

  • RedM
  • VORP Core oder RSGCore (wird automatisch erkannt)
  • oxmysql (für Auto-Item-Setup)
  • dataview_lua

📦 Installation

  1. Resource Ordner in dein Server resources legen (z.B. Silly_Loot).

  2. In deiner server.cfg starten:

    ensure Silly_Loot

  3. Stelle sicher, dass dataview_lua installiert und startbar ist.

⚙️ Konfiguration

Die Loot-Tabelle ist in Silly_Loot/config.lua definiert.

🛡️ Cooldown

  • Config.LootCooldownMs = 1500

Setzt einen minimalen Server-Cooldown (ms), damit das Loot-Event nicht gespammt werden kann.

📏 Distanz-Check (optional)

  • Config.MaxLootDistance = 4.0

Wenn eine Ped-NetID vorhanden und serverseitig auflösbar ist, wird zusätzlich geprüft, ob der Spieler in Reichweite war.

🎁 NPC Loot Pools

Format pro NPC-Model:

["npc_model_name"] = {
  { "itemName", amount, "AnzeigeName" },
  { "anderesItem", amount, "AnzeigeName" },
}

Beispiel:

Config.NpcLoot = {
  ["cs_vampire"] = {
    { "pdiamond", 1, "Makeloser Diamant" },
  },
  ["g_m_m_unibanditos_01"] = {
    { "Goldzahn", 1, "Goldzahn" },
    { "SchmuckGeklaut", 1, "Geklauter Schmuck" },
    { "AlterPenny", 1, "Alter Penny" },
  },
}

🧠 Wie es funktioniert

  • 👂 Client hört auf EVENT_LOOT_COMPLETE.
  • ✅ Sobald der Spieler ein Ped fertig geloottet hat, wird geprüft ob dessen Model in Config.NpcLoot existiert.
  • 🎲 Danach wird serverseitig ein zufälliges Item aus dem Pool gewählt und per VORP Inventory gegeben.
  • 🔔 Der Spieler bekommt eine VORP Notification.

🚀 Was du damit machen kannst

  • 💎 Rare NPCs mit garantierten/seltenen Drops ausstatten
  • 🎉 Event-NPCs (Cultists, Bandits, Bosses) mit Lootboxen/Relikten versehen
  • ⚖️ Balancing über mehrere Items pro Pool (größerer Pool = geringere Drop-Chance pro Item)
  • 📈 RP-/PvE Progression: bestimmte Fraktionen droppen bestimmte Materialien

🧩 Events (für Devs)

Client → Server

  • silly_loot:request(modelName, netId?)

Der Client schickt das NPC-Model (Pflicht) und optional eine NetID (wenn verfügbar).

Server → Client

  • silly_loot:notify(title, text, durationMs?)

Standardmäßig wird VORP TipBottom genutzt.

⚠️ Hinweise / Grenzen

  • 🙈 Wenn ein NPC nicht in Config.NpcLoot steht, passiert nichts.
  • 🧷 NetID ist optional. Ohne NetID kann der Server das Model nicht 100% sicher gegen Client-Manipulation verifizieren (Cooldown ist trotzdem aktiv).
  • 🔒 Für maximale Sicherheit kann man zusätzliche serverseitige Validierung bauen (z.B. Entity-Checks, Rate-Limits, Logging).

🛠️ Troubleshooting

Ich bekomme kein Loot

  • Prüfe ob das NPC-Model korrekt geschrieben ist (Model-Name, nicht Display-Name).
  • Prüfe ob vorp_inventory läuft.
  • Prüfe ob dataview_lua installiert und gestartet ist.

Notification kommt nicht

  • Prüfe ob VORP Notification Events verfügbar sind.
  • Teste ob vorp:TipBottom generell bei dir funktioniert.

💬 Support / Anpassungen

Wenn du Anpassungen willst (Drop-Chancen pro Item, mehrere Items pro Loot, Logging, Blacklist/Whitelist, Discord Webhook, etc.), sag einfach was du brauchst.

Back to category