Tfs: Arania
npcHandler:addModule(EVENT_CREATURE_SAY) <item id="12345" article="a" name="Spider Queen's Idol"> <attribute key="weight" value="1200"/> <attribute key="worth" value="5000"/> <attribute key="description" value="It pulses with arachnid energy. Use at the altar to summon Arania."/> </item> Add loot to some rare creature or as quest reward. 4. Optional: Arania’s Web Trap Global Event ( data/globalevents/arania_invasion.lua ) local invasion = GlobalEvent("AraniaInvasion") function invasion.onStartup(interval) local config = fromPos = x = 1000, y = 1000, z = 7, toPos = x = 1020, y = 1020, z = 7, amount = 5, monster = "Poison Spider"
npcHandler:setMessage(MESSAGE_GREET, "Welcome, |PLAYERNAME|. Do you wish to sacrifice to summon the Spider Queen Arania?") npcHandler:setMessage(MESSAGE_SENDTRADE, "You need a Spider Queen's Idol to summon her.") arania tfs
for i = 1, config.amount do local x = math.random(config.fromPos.x, config.toPos.x) local y = math.random(config.fromPos.y, config.toPos.y) local pos = Position(x, y, config.fromPos.z) Game.createMonster(config.monster, pos) end Game.broadcastMessage("Arania's children are spreading through the sewers!", MESSAGE_STATUS_WARNING) return true end y = 1000
if msgcontains(msg, "sacrifice") then local idol = player:getItemById(12345, true) -- custom item ID if idol then summonArania(cid, 12345) else npcHandler:say("You don't have the Spider Queen's Idol.", cid) end end end toPos = x = 1020
function onCreatureSay(cid, type, msg) local player = Player(cid) if not player then return end
local function summonArania(cid, sacrificeItem) local player = Player(cid) if not player then return false end