<item id="9773" name="teleport">
<attribute key="type" value="teleport"/>
<attribute key="decayTo" value="0"/>
<attribute key="duration" value="600"/> [COLOR="Blue"]-- po jakim czasie zniknie[/COLOR]
</item>
<movevent event="StepIn" itemid="9773" script="tp.lua" />
function onStepIn(cid, item, pos)
if item.itemid == 9773 then
local pos = getPlayerPosition(cid)
local tppos = {x=377, y=140, z=7}[COLOR="Blue"] -- pozycja gdzie ma teleportowac[/COLOR]
doTeleportThing(cid,tppos)
doSendMagicEffect(getPlayerPosition(cid), 10)
end
return 1
end
<monster name="Smok" file="moby/Smok.xml"/>
<monster name="Smok" nameDescription="Smok" race="blood" experience="9000" speed="268" manacost="0">
<health now="3300" max="3300"/>
<look type="271" head="0" body="0" legs="0" feet="0" corpse="9773"/>
<targetchange interval="5000" chance="8"/>
<strategy attack="100" defense="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="1"/>
<flag staticattack="90"/>
<flag runonhealth="0"/>
</flags>
<attacks>
<attack name="melee" interval="2000" min="-0" max="-550"/>
<attack name="physical" interval="3000" chance="25" range="7" min="-20" max="-120">
<attribute key="shootEffect" value="arrow"/>
</attack>
<attack name="lifedrain" interval="1000" chance="15" length="8" spread="0" min="-100" max="-500">
<attribute key="areaEffect" value="redshimmer"/>
</attack>
</attacks>
<defenses armor="30" defense="20">
<defense name="healing" interval="1000" chance="10" min="100" max="200">
<attribute key="areaEffect" value="blueshimmer"/>
</defense>
</defenses>
<elements>
<element energyPercent="25"/>
<element icePercent="20"/>
<element firePercent="20"/>
<element holyPercent="20"/>
<element earthPercent="20"/>
<element physicalPercent="15"/>
<element deathPercent="-37"/>
</elements>
<immunities>
<immunity paralyze="1"/>
<immunity invisible="1"/>
</immunities>
<voices interval="5000" chance="10">
</voices>
</monster>
--Script by Karpio
function onDeath(cid, corpse, killer)
local pozycja = {x=1000,y=1000,z=7} --Pozycja gdzie b?dzie teleportowa?o
local nazwa_potfora = 'Dragon' --Nazwa potwora kt?rego mamy zabi?
local czas = 5 --Po ilu sekundach pojawi si? TP
local tp_id = 2160 --Numer ID teleportu wpisa?em ID CC gdy? nie pami?tam ID Tp
local czas2 = 10 -- Po ilu sekundach TP zniknie
if getCreatureName(cid) == nazwa_potfora then
if os.time() == czas then
doCreateTeleport(tp_id, getCreaturePosition(cid), pozycja)
elseif os.time() == czas2 then
doRemoveItem(getThingFromPos(getCreaturePosition(cid)).uid, 1)
end
end
end
<event type="death" name="Teleport" script="teleport.lua"/>
<script>
<event name="Teleport"/>
</script>