local z = 7
for x = 664, 690 do --left X, right X
for y = 800, 825 do --left Y, right Y
local v = getTopCreature({x=x, y=y, z=z}).uid
if isMonster(v) then
return false
end
end
end
local config = {
{["name"] = "Boss", ["storage"] = 5560},
}
function onKill(cid, target, lastHit)
if(isPlayer(target) ~= TRUE) then
for i = 1, #config do
if getCreatureName(target):lower() == config[i].name:lower() then
if getPlayerStorageValue(cid, config[i].storage) < 1 then
setPlayerStorageValue(cid, config[i].storage, 2)
end
end
end
end
return true
end
local config = {
[50060] = {5560}, -- uid, storage
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = config[item.uid]
if v[1] < 1 then
return doPlayerSendCancel(cid, "Please kill monster in room fist.")
end
return true
end
local c = {
boss = { -- Boss Name, ttp = position for the new room, tp = position where you want it to appear Teleport, time = time after which disappears teleport, bro = the second boss to kill in this room
-- 1 room
["Boss1 Name"] = {ttp={x = 1111, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss2 Name"},
["Boss2 Name"] = {ttp={x = 1111, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss1 Name"},
-- 2 room
["Boss3 Name"] = {ttp={x = 2222, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss4 Name"},
["Boss4 Name"] = {ttp={x = 2222, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss3 Name"},
-- 3 room
["Boss5 Name"] = {ttp={x = 3333, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss6 Name"},
["Boss6 Name"] = {ttp={x = 3333, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss5 Name"},
-- 4 room
["Boss7 Name"] = {ttp={x = 4444, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 5, bro = "Boss8 Name"},
["Boss8 Name"] = {ttp={x = 4444, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 5, bro = "Boss7 Name"}
}
}
function onKill(cid, target, lastHit)
local k = c.boss[getCreatureName(target)]
if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then
if(k.bro) then
local bro = getCreatureByName(k.bro)
if isMonster(bro) and getDistanceBetween(getThingPosition(cid), getThingPosition(bro)) < 12 then --
return true
end
end
doCreateTeleport(1387, k.ttp, k.tp)
doCreatureSay(cid, "You now have ".. k.time .."sek to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", TALKTYPE_MONSTER_SAY)
addEvent(function()
local itek = getTileItemById(k.tp, 1387)
if itek.uid > 0 then
doRemoveItem(itek.uid, 1)
end
end, k.time*1000, k.tp)
end
return true
end
<event type="kill" name="BossKill" event="script" value="bosskill.lua"/>
function onKill(cid, target, damage, flags)
local killstorage = "25909"
local name = getCreatureName(target):lower()
if isPlayer(target) then return true end
if name == 'testboss' then
doCreatureSay(cid, 'You have defeated the ' .. name .. '. You may continue exploring now.', TALKTYPE_ORANGE_1)
if(getCreatureStorage(cid, killstorage) < 1) then
doCreatureSetStorage(cid, killstorage, 1)
end
end
return true
end
registerCreatureEvent(cid, "BossKill")
local bro = getCreatureByName(k.bro)
if isMonster(bro) and getDistanceBetween(getThingPosition(cid), getThingPosition(bro)) < 12 then --
return true
end
amiroslo
Lua Scripter + Mapper
local c = {
boss = { -- Boss Name, ttp = position for the new room, tp = position where you want it to appear Teleport, time = time after which disappears teleport
-- 1 room with crature with name "Boss1 Name"
["Boss1 Name"] = {ttp={x = 1111, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3},
-- 2 room with crature with name "Boss2 Name"
["Boss2 Name"] = {ttp={x = 2222, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3},
-- 3 room with crature with name "Boss3 Name"
["Boss3 Name"] = {ttp={x = 3333, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3},
-- 4 room with crature with name "Boss4 Name"
["Boss4 Name"] = {ttp={x = 4444, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 5},
}
}
function onKill(cid, target, lastHit)
local k = c.boss[getCreatureName(target)]
if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then
for _, pid in ipairs(getSpectators(getThingPosition(cid), 10, 10, false)) do -- room 10x10 tile ???
if not isPlayer(pid) and getCreatureName(pid) == getCreatureName(target) then
return true
end
end
doCreateTeleport(1387, k.ttp, k.tp)
doCreatureSay(cid, "You now have ".. k.time .."sek to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", TALKTYPE_MONSTER_SAY)
addEvent(function()
local itek = getTileItemById(k.tp, 1387)
if itek.uid > 0 then
doRemoveItem(itek.uid, 1)
end
end, k.time*1000, k.tp)
end
return true
end
when i kill both bosses at same time or if i only kill one, my tibia debugs and closes. lolmoore clearLua:local c = { boss = { -- Boss Name, ttp = position for the new room, tp = position where you want it to appear Teleport, time = time after which disappears teleport, bro = the second boss to kill in this room -- 1 room ["Boss1 Name"] = {ttp={x = 1111, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss2 Name"}, ["Boss2 Name"] = {ttp={x = 1111, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss1 Name"}, -- 2 room ["Boss3 Name"] = {ttp={x = 2222, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss4 Name"}, ["Boss4 Name"] = {ttp={x = 2222, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss3 Name"}, -- 3 room ["Boss5 Name"] = {ttp={x = 3333, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss6 Name"}, ["Boss6 Name"] = {ttp={x = 3333, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3, bro = "Boss5 Name"}, -- 4 room ["Boss7 Name"] = {ttp={x = 4444, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 5, bro = "Boss8 Name"}, ["Boss8 Name"] = {ttp={x = 4444, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 5, bro = "Boss7 Name"} } } function onKill(cid, target, lastHit) local k = c.boss[getCreatureName(target)] if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then if(k.bro) then local bro = getCreatureByName(k.bro) if isMonster(bro) and getDistanceBetween(getThingPosition(cid), getThingPosition(bro)) < 12 then -- return true end end doCreateTeleport(1387, k.ttp, k.tp) doCreatureSay(cid, "You now have ".. k.time .."sek to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", TALKTYPE_MONSTER_SAY) addEvent(function() local itek = getTileItemById(k.tp, 1387) if itek.uid > 0 then doRemoveItem(itek.uid, 1) end end, k.time*1000, k.tp) end return true end
------------- edit
"I want it, if u kill boss 1 and 2, a tp shows. not u kill 1 then tp shows and u kill 2 then tp shows. no, 2 boss in 1 room. both get killed then tp shows."
exactly as it is
local c = {
boss = { -- Boss Name, ttp = position for the new room, tp = position where you want it to appear Teleport, time = time after which disappears teleport
-- 1 room with crature with name "Boss1 Name"
["Evil Eye"] = {ttp={x = 1592, y = 1908, z = 6}, tp={x = 1592, y = 1914, z = 7, stackpos=1}, time = 4},
-- 2 room with crature with name "Boss2 Name"
["Boss2 Name"] = {ttp={x = 2222, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3},
-- 3 room with crature with name "Boss3 Name"
["Boss3 Name"] = {ttp={x = 3333, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 3},
-- 4 room with crature with name "Boss4 Name"
["Boss4 Name"] = {ttp={x = 4444, y = 1111, z = 11}, tp={x = 1111, y = 1111, z = 11, stackpos=1}, time = 5},
}
}
function onKill(cid, target, lastHit)
local k = c.boss[getCreatureName(target)]
if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then
for _, pid in ipairs(getSpectators(getThingPosition(cid), 5, 5, false)) do -- room 10x10 tile ???
if not isPlayer(pid) and getCreatureName(pid) == getCreatureName(target) then
return true
end
end
doCreateTeleport(1387, k.ttp, k.tp)
doCreatureSay(cid, "You now have ".. k.time .."sec to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", TALKTYPE_MONSTER_SAY)
addEvent(function()
local itek = getTileItemById(k.tp, 1387)
if itek.uid > 0 then
doRemoveItem(itek.uid, 1)
end
end, k.time*1000, k.tp)
end
return true
end
for _, pid in ipairs(getSpectators(getThingPosition(cid), 6, 6, false)) do -- room 10x10 tile ???
if isMonster(pid) and (getCreatureName(pid):lower()) == (getCreatureName(target):lower()) and pid ~= target then
doCreatureSay(cid, "bedzie return true ".. getCreatureName(pid) ..", ".. getCreatureName(target) .."", TALKTYPE_MONSTER_SAY)
return true
end
end