Witam, posiadam TFS 0.2.13 tibia 8.10 i poszukuje skryptu, kt?ry po zabiciu danego potwora tworzy dany teleport.
Niestety te, kt?re wgrywa?em po prostu nie dzia?aj? np.
ps. mam taki b??d
Niestety te, kt?re wgrywa?em po prostu nie dzia?aj? np.
<event type="death" name="<nazwa potwora>" script="<nazwa potwora>.lua"/>
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "<nazwa potwora>")
local creaturename = getCreatureName(cid)
--- miejsce gdzie tp zostanie utworzone
local pos1 = {x=338, y=1837, z=5, stackpos=2}
--- gdzie teleport Cie teleportuje:
local pos2 = {x=398, y=1928, z=5, stackpos=1}
local time_to_pass = 180 -- czas po jakim zniknie tp w sekundach
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "Well done! Teleport appeared in the middle of room. You got 3 minuts to get into or it will dissapear!."
if creaturename == '<nazwa potwora>' then
teleport = doCreateTeleport(tpID, pos2, pos1)
doSendMagicEffect(pos1, doEffect)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBossWard, (1000*time_to_pass))
end
end
function removeTeleportInBossWard()
--- miejsce gdzie tp zostanie utworzone
if getThingfromPos({x=338, y=1837, z=5, stackpos=1}).itemid == 5023 then
--- miejsce gdzie tp zostanie utworzone
doRemoveItem(getThingfromPos({x=338, y=1837, z=5, stackpos=1}).uid,1)
--- miejsce gdzie tp zostanie utworzone
doSendMagicEffect({x=338, y=1837, z=5, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
Zaznacz kod
<script>
<event name="<nazwa potwora>"/>
</script>
ps. mam taki b??d
[04/02/2016 14:55:07] Warning: [Monster::Monster]. Unknown event name - Troll