-LUA & XML Usuwanie teleportu po wejsciu do niego.

Status
Zamknięty.

awdqe

Active User
Zarejestrowany
Dołączył
Styczeń 28, 2012
Posty
95
Liczba reakcji
0
Witam. Jak zrobi? by teleport po wej?ciu w niego zosta? usuwany?
Pr?bowa?em w movements ale co? mi nie wychodzi.

Prosz? o pomoc.
Z g?ry dzi?kuje i pozdrawiam.
 
Odp: Usuwanie teleportu po wejsciu do niego.

M?g?by? pokaza? skrypt, ale.
[lua]function removeTeleportInBossWard()[/lua]

Samo przez siebie m?wi ?e teleport zostanie usuni?ty.
Spr?buj np. skryptu Oskara z drobnymi poprawkami:

[lua]local config = {
message = "Go into the teleporter in 3 minutes, else it will disappear.",
timeToRemove = 180, -- seconds
teleportId = 1387,
MonStor = 48000,
bosses = { -- Monster Name, Teleport To Position, Teleport Position, UID
["Ushuriel"] = { ptp={ x=199, y=668, z=11 }, pp={ x=141, y=745, z=11, stackpos=1 } },
["Annihilon"] = { ptp={ x=272, y=827, z=11 }, pp={ x=213, y=729, z=11, stackpos=1 }},
["Hellgorak"] = { ptp={ x=95, y=835, z=12 }, pp={ x=218, y=771, z=11, stackpos=1 } },
["Madareth"] = { ptp={ x=71, y=736, z=12 }, pp={ x=138, y=771, z=11, stackpos=1} },
["Zugurosh"] = { ptp={ x=154, y=682, z=11 }, pp={ x=175, y=744, z=11, stackpos=1 } },
["Latrivan"] = { ptp={ x=178, y=726, z=12 }, pp={ x=173, y=775, z=11, stackpos=1 } },
["Andzej"] = { ptp={ x=1023, y=928, z=9 }, pp={ x=1197, y=820, z=8, stackpos=1 } }
}
}
function onDeath(cid, corpse, killer)
if(config.bosses[getCreatureName(target)]) then
t = config.bosses[getCreatureName(target)]
teleport = doCreateTeleport(1387, t.ptp, t.pp)
position = t.pp
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(remove, config.timeToRemove * 1000, {position = position})
end
return true
end
function remove(p)
doRemoveThing(getTileItemById(p.position, config.teleportId).uid, 1)
return true
end[/lua]
 
Odp: Usuwanie teleportu po wejsciu do niego.

aby znika? po wejsciu w niego mo?esz u?y? onStepOut
 
Status
Zamknięty.
Back
Do góry