Sign in to follow this  
Sign in to follow this  
LitchLight

Lootable Players LUA Script and SQL

WOOPS-020.FULL.LUA

Woops! You died!!!
Lootable players for TC / AzerothCore. In LUA!

This script allows the server to spawn a custom game object with a generic loot template, and then dynamically replaces that loot with specific dropped items when a player interacts with the object via the OnLoot function. At this point the existing loot is cleared from the lua table and the specific dropped items from the player who died are awarded up to the limit of the recipient's bag space. When the server restarts the crates and data are lost.

Please note you will have to remove references to "hardCoreItem" in the code or add an item that you do NOT want removed from player eg. hearthstone?

local hardCoreItem = ???

A custom game object for the crate, and custom items for stacks of gold coin and the hardcore item LL uses are also required. The sql for all these is included in the source, below.

Credits are owed to the creator of the "Randomly Attacked" script, which we incorporate to create some random mob spawns for toons that are too greedy!
 

 

 

 

woops-020.lua

Share this post


Link to post
Share on other sites
Sign in to follow this