<event type="death" name="Pythius the rottenTeleport" script="Pythius the rotten_teleport.lua"/>
<?xml version="1.0" encoding="UTF-8"?>
<monster name="Pythius the rotten" nameDescription="a Pythius the rotten" race="undead" experience="100" speed="300" manacost="0">
<health now="8350" max="8350"/>
<look type="231" corpse="6306"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="0"/>
<flags>
<flag summonable="0"/>
<flag attackable="1"/>
<flag hostile="1"/>
<flag illusionable="1"/>
<flag convinceable="0"/>
<flag pushable="0"/>
<flag canpushitems="1"/>
<flag canpushcreatures="1"/>
<flag targetdistance="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<script>
<event name="Pythius the rottenTeleport"/>
</script>
<attacks>
<attack name="melee" interval="2000" skill="95" attack="95"/>
<attack name="fire" interval="2000" chance="20" range="7" radius="4" target="1" min="-300" max="-395">
<attribute key="shootEffect" value="fire"/>
<attribute key="areaEffect" value="redspark"/>
</attack>
<attack name="death" interval="3000" chance="20" range="7" min="-0" max="-600">
<attribute key="shootEffect" value="suddendeath"/>
</attack>
<attack name="poison" interval="2000" chance="20" range="7" radius="4" target="1" min="-120" max="-390">
<attribute key="shootEffect" value="poison"/>
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="poison" interval="1000" chance="10" range="7" min="-50" max="-180">
<attribute key="shootEffect" value="poison"/>
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="fire" interval="4000" chance="25" length="8" spread="3" min="-500" max="-600">
<attribute key="areaEffect" value="firearea"/>
</attack>
<attack name="poison" interval="2000" chance="23" length="8" spread="3" min="-200" max="-685">
<attribute key="areaEffect" value="poison"/>
</attack>
<attack name="lifedrain" interval="3000" chance="25" length="8" spread="3" min="-300" max="-600">
<attribute key="areaEffect" value="greenshimmer"/>
</attack>
</attacks>
<defenses armor="35" defense="30">
</defenses>
<elements>
<element physicalPercent="10"/>
<element icePercent="10"/>
<element holyPercent="-10"/>
</elements>
<immunities>
<immunity death="1"/>
<immunity earth="1"/>
<immunity fire="1"/>
<immunity drown="1"/>
<immunity lifedrain="1"/>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<summons maxSummons="2">
<summon name="Undead Gladiator" interval="1000" chance="8"/>
</summons>
<voices interval="5000" chance="10">
<voice sentence="YOU'LL NEVER GET MY TREASURE!"/>
</voices>
</monster>
--- Created by Darkhaos
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "pytthius the rottenTeleport")
local creaturename = getCreatureName(cid)
local in_pos = {x=265, y=231, z=8, stackpos=2}
local checkIID = getThingfromPos(in_pos)
local to_pos = {x=298, y=232, z=8, stackpos=1}
local time_to_pass = 30 -- in seconds
local tpID = 1387
if creaturename == 'Pythius the rotten' then
teleport = doCreateTeleport(tpID, to_pos, in_pos)
doSendMagicEffect(in_pos, CONST_ME_TELEPORT)
doCreatureSay(cid, "You have 30 seconds to enter the teleport before it is closed.", TALKTYPE_ORANGE_1)
addEvent(removeTeleport, (1000*time_to_pass))
end
end
function removeTeleport()
if getThingfromPos({x=265, y=231, z=8, stackpos=1}).itemid == 1387 then
doRemoveItem(getThingfromPos({x=265, y=231, z=8, stackpos=1}).uid,1)
doSendMagicEffect({x=265, y=231, z=8, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
Please help change code for tfs 8.41