^new^ | Arania Tfs

local function summonArania(cid, sacrificeItem) local player = Player(cid) if not player then return false end

function onCreatureSay(cid, type, msg) local player = Player(cid) if not player then return end

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

local pos = player:getPosition() local monster = Game.createMonster("Arania", pos, true, false) if monster then pos:sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_INFO_DESCR, "Arania appears from the shadows!") player:removeItem(sacrificeItem, 1) else player:sendTextMessage(MESSAGE_STATUS_SMALL, "The altar is too crowded to summon Arania.") end return true end Monster Definition ( data/monster/arania

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

<!-- Summon spider minions --> <attack name="summon" interval="20000" chance="30"> <summon name="Poison Spider" max="3"/> <summon name="Giant Spider" max="2"/> </attack> </attacks> <defenses armor="45" defense="48"> <defense name="healing" interval="8000" chance="18" min="300" max="550"> <attribute key="area" value="1"/> </defense> <defense name="speed" interval="10000" chance="15" speedchange="300" duration="10000"/> </defenses> <elements> <element firePercent="-10"/> <element earthPercent="100"/> <element icePercent="-5"/> <element energyPercent="-5"/> <element physicalPercent="5"/> <element holyPercent="0"/> <element deathPercent="15"/> </elements> <immunities> <immunity poison="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <loot> <item id="2148" countmax="100" chance="100000"/> <!-- gold --> <item id="2160" chance="20000"/> <!-- crystal coin --> <item id="6300" chance="10000"/> <!-- spider fang --> <item id="5910" chance="15000"/> <!-- spider silk --> <item id="6529" chance="8000"/> <!-- poison arrow --> <item id="7430" chance="5000"/> <!-- spider amulet --> <item id="6558" chance="3000"/> <!-- mysterious fetish --> <item id="2173" chance="1000"/> <!-- spider sceptre (custom) --> </loot> </monster> local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end Monster Definition ( data/monster/arania.xml ) &lt

Below is a : a custom boss monster "Arania" with unique mechanics, plus a summoning system. 1. Monster Definition ( data/monster/arania.xml ) <?xml version="1.0" encoding="UTF-8"?> <monster name="Arania" nameDescription="Arania" race="venom" experience="8500" speed="230" manacost="0"> <health now="18500" max="18500"/> <look type="57" head="114" body="114" legs="114" feet="114" corpse="5984"/> <targetchange interval="5000" chance="8"/> <strategy attack="100" defensive="0"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="2"/> <flag staticattack="70"/> <flag runonhealth="0"/> </flags> <attacks> <!-- Physical attack --> <attack name="melee" interval="2000" skill="95" attack="120" poison="40"/> <!-- Poison wave --> <attack name="poisonwave" interval="4000" chance="20" range="7" min="-250" max="-420" poison="65" target="0"/> <!-- Heavy poison ball --> <attack name="poisonfield" interval="3000" chance="15" range="7" radius="3" target="1" min="-180" max="-350" poison="80"> <attribute key="area" value="3x3"/> </attack> <!-- Web throw (paralyze) --> <attack name="paralyze" interval="5000" chance="25" range="7" duration="8000" target="1"> <attribute key="speedchange" value="-600"/> </attack>