president vankk
Web Developer & AuraOT Owner
- Joined
- Jul 10, 2009
- Messages
- 5,719
- Solutions
- 9
- Reaction score
- 339
Hello everyone, I found a script by @Ninja and I did some edits and it isn't working.
Already registred at login.lua, xml, at monsters files, and it didn't give any erros, just don't work.
Already registred at login.lua, xml, at monsters files, and it didn't give any erros, just don't work.
Code:
local config = {
["Boss 1"] = {time = 60, toPos = Position(566, 886, 11), tpPos = Position(566, 876, 10)},
["Boss 2"] = {time = 60, toPos = Position(566, 909, 12), tpPos = Position(566, 897, 11)},
["Boss 3"] = {time = 60, toPos = Position(566, 930, 12), tpPos = Position(566, 920, 12)}
}
local function deleteTeleport(position)
local teleport = Tile(position):getItemById(1387)
if teleport then
teleport:remove()
position:sendMagicEffect(CONST_ME_POFF)
end
end
function onKill(creature, target)
local monster = config[target:getName():lower()]
if not monster or target:isPlayer() then
return true
end
local item = Game.createItem(1387, 1, monster.tpPos)
if item:isTeleport() then
item:setDestination(monster.toPos)
end
creature:say("You have " .. monster.time .. " seconds to escape!", TALKTYPE_MONSTER_SAY)
addEvent(deleteTeleport, monster.time * 1000, monster.tpPos)
return true
end