• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Not working this script of Inquisition.

Eduardo170

Well-Known Member
Joined
Jan 7, 2014
Messages
422
Solutions
3
Reaction score
67
Location
Caracas, Venezuela
Hello comunnity, this script no working in console The OTX Server Version: (2.X.S - 3) - Codename: (LORD ZEDD)
If any scripter I want to help is urgent, please appreciate him .


Code:
local config = {
    timeToRemove = 180,
    message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear",
    tpId = 1387,
    bosses = {
        ["Ushuriel"] = {pos = {x = 959, y = 1436, z = 10}, aid = 1001},
        ["Zugurosh"] = {pos = {x = 959, y = 1416, z = 10}, aid = 1002},
        ["Madareth"] = {pos = {x = 989, y = 1418, z = 10}, aid = 1003},
        ["Annihilon"] = {pos = {x = 1021, y = 1610, z = 10}, aid = 1005},
        ["Hellgorak"] = {pos = {x = 1022, y = 1444, z = 10}, aid = 1006},
    },

    brothers ={
        ["Golgordan"] = {pos = {x = 988, y = 1445, z = 10, stackpos = 1}, aid = 1004, brother = "Latrivan"},
        ["Latrivan"] = {pos = {x = 988, y = 1445, z = 10, stackpos = 1}, aid = 1004, brother = "Golgordan"},
        brothersArea = {
            fromPos = {x = 980, y = 1439, z = 10},
            toPos = {x = 996, y = 1451, z = 10},
        },
    },
}

local function removal(position)
    doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
    return true
end

function onKill(cid, target, lastHit)
    if isMonster(target) then
        if config.bosses[getCreatureName(target)] then
            local boss = config.bosses[getCreatureName(target)]
            local teleport = doCreateItem(config.teleportId, 1, boss.pos)
            doItemSetAttribute(teleport, "aid", boss.aid)
            doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
            addEvent(removal, config.timeToRemove * 1000, boss.pos)
        end

        if config.brothers[getCreatureName(target)] then
            local bros = config.brothers[getCreatureName(target)]
            if isMonster(getCreatureByName(bros.brother)) then
                if isInRange(getThingPos(getCreatureByName(bros.brother)), config.brothers.brothersArea.fromPos, config.brothers.brothersArea.toPos) then
                    return true
                end
            else
                local teleport = doCreateItem(config.teleportId, 1, bros.pos)
                doItemSetAttribute(teleport, "aid", bros.aid)
                doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
                addEvent(removal, config.timeToRemove * 1000, bros.pos)
            end
        end
    end
    return true
end

creaturescript.xml
Code:
<event type="kill" name="inquisitionPortals" event="script" value="inquisition/inquisitionPortals.lua"/>
login.lua
Code:
registerCreatureEvent(cid, "inquisitionPortals")
 
Last edited:
Back
Top