What's new

Skrypty & Kody TP - po zabiciu potwora TFS 0.2.13

Status
Not open for further replies.

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
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.

<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
 

Bubecki

Banned
Joined
Jul 5, 2011
Messages
323
Reaction score
11
Odp: TP - po zabiciu potwora TFS 0.2.13

Przecie? on chcia? do 8.1 a tam nie ma creaturescripts

---------- Tre?? dodana o 17:11 ----------

Przecie? on chcia? do 8.1 a tam nie ma creaturescripts
 

Pucek1993

Active User
Joined
Feb 4, 2016
Messages
71
Reaction score
1
Odp: TP - po zabiciu potwora TFS 0.2.13

Mam "creaturescripts" gdyby? czyta? m?j temat, zauwa?y?by? ?e poda?em tutaj skrypt, kt?ry jest tylko i wy??cznie do creaturescripts...

@@ #noob
Nie dzia?a mi ten skrypt, kt?ry poda?e?. ;c
 
Status
Not open for further replies.
Top