1
[CreatureEvents] Kill Monster Abre teleport Temporal Tfs 1.1/1.2 (Compatible con V17) el Jue Mayo 21, 2015 3:05 pm
[Admin] God Maya
![[Admin] God Maya](https://2img.net/u/2712/30/40/04/avatars/1-92.jpg)
Administrador

Hoy muy temprano un usuario pido un script para la globaltibiaface v17 pues consiste en que al matar un moustro te abra un teleport pues me di a ala mano en remarkarlo y aqui lo tiene:_
instalacion:
data\creaturescripts\scripts |
copian cualquier archivo y renombran por nome.lua y pegan esto dentro
- Código:
local bosses = {
['demon'] = 20000 ------------> storange pueden cambiarlo por el que ustede no ocupen
}
function onKill(player, target)
local targetMonster = target:getMonster()
if not targetMonster then
return true
end
local targetName = targetMonster:getName():lower()
local bossStorage = bosses[targetName]
if not bossStorage then
return true
end
local function deleteTeleport(position)
local teleport = Tile(position):getItemById(1387)
if teleport then
teleport:remove()
end
end
local newValue = 2
Game.setStorageValue(bossStorage, newValue)
local item = Game.createItem(1387, 1,{x = 94, y = 130, z = 7}) ------> donde se creara
if item:isTeleport() then
item:setDestination({x = 94, y = 125, z = 7}) ------> donde te teleportara
end
if newValue == 2 then
player:say('You now have 1 minutes to exit this room through the teleporter. It will bring you to the next room.', TALKTYPE_MONSTER_SAY)
addEvent(deleteTeleport, 1 * 60 * 1000, {x = 94, y = 130, z = 7}) ------> donde lo removera
end
return true
end
luego en la misma carpeta abren el archivo:
data\creaturescripts\scripts\others\login.lua |
y registran esta linea:
para tfs 1.1 o tfs 1.2
- Código:
player:registerEvent("bossx")
para tfs 1.3
- Código:
'bossx',
luego añaden esta tag en:
data\creaturescripts\creaturescripts.xml |
- Código:
<event type="kill" name="bossx" script="nome.lua"/>
y listo
Creditos: 100% God Maya
Última edición por [Admin] God Maya el Lun Jun 22, 2020 12:03 pm, editado 1 vez

![[CreatureEvents] Kill Monster Abre teleport Temporal Tfs 1.1/1.2 (Compatible con V17) YNU5B25](https://i.imgur.com/yNU5B25.png)