• 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!

killing in the name of error!

Lalo I

Accepting Dms
Joined
Jul 10, 2018
Messages
52
Reaction score
6
Location
USA
Hello I have this error,
on my .exe


killing in the name.png


I've tried removing "killking in the name of " but it doesn't work it throws error in .exe doesnt even let me open my server up

This is my .lua global

Lua:
dofile('data/lib/libs.lua')
dofile('data/lib/buypot.lua')
dofile('data/lib/Task_lib.lua')
dofile('data/lib/addon_doll.lua')

NOT_MOVEABLE_ACTION = 8000
PARTY_PROTECTION = 1 -- Set to 0 to disable.
ADVANCED_SECURE_MODE = 1 -- Set to 0 to disable.

STORAGEVALUE_PROMOTION = 30018


ropeSpots = {384, 418, 8278, 8592, 13189, 14435, 14436, 15635, 19518, 26019, 24621, 24622, 24623, 24624}

doors = {
    [1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236,
    [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542,
    [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918,
    [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111,
    [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139,
    [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283,
    [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194,
    [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254,
    [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895,
    [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046,
    [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167,
    [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272,
    [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472,
    [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10775] = 10777, [10776] = 10777, [12092] = 12094, [12093] = 12094,
    [12188] = 12190, [12189] = 12190, [19840] = 19842, [19841] = 19842, [19843] = 19844, [19980] = 19982, [19981] = 19982, [19983] = 19984, [20273] = 20275,
    [20274] = 20275, [20276] = 20277, [17235] = 17236, [18208] = 18209, [13022] = 13023, [10784] = 10786, [10785] = 10786, [12099] = 12101, [12100] = 12101,
    [12197] = 12199, [12198] = 12199, [19849] = 19851, [19850] = 19851, [19852] = 19853, [19989] = 19991, [19990] = 19991, [19992] = 19993, [20282] = 20284,
    [20283] = 20284, [20285] = 20286, [17237] = 17238, [13020] = 13021, [10780] = 10781, [12095] = 12096, [12195] = 12196, [19845] = 19846, [19985] = 19986,
    [20278] = 20279, [10789] = 10790, [12102] = 12103, [12204] = 12205, [19854] = 19855, [19994] = 19995, [20287] = 20288, [10782] = 10783, [12097] = 12098,
    [12193] = 12194, [19847] = 19848, [19987] = 19988, [20280] = 20281, [10791] = 10792, [12104] = 12105, [12202] = 12203, [19856] = 19857, [19996] = 19997,
    [20289] = 20290, [22814] = 22815, [22815] = 22816, [22817] = 22818, [22819] = 22820, [22823] = 22825, [22824] = 22825, [36329] = 36331, [36331] = 36329,
    [22826] = 22827, [22828] = 22829
}

verticalOpenDoors = {
    1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131,
    5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044,
    7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9274, 9269, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10485, 10483,
    10786, 12101, 12199, 19851, 19853, 19991, 19993, 20284, 20286, 17238, 13021, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997,
    20290, 22825, 22827, 22829, 22831
}

horizontalOpenDoors = {
    1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118,
    5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893,
    6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285,
    10470, 10472, 10476, 10474, 10777, 12094, 12190, 19842, 19844, 19982, 19984, 20275, 20277, 17236, 18209, 13023, 10781, 12096, 12196,
    19846, 19986, 20279, 10783, 12098, 12194, 19848, 19988, 20281, 22816, 22818, 22820, 22822
}

openSpecialDoors = {
    1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133,
    5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558,
    9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10781, 12096, 12196, 19846, 19986, 20279,
    10783, 12098, 12194, 19848, 19988, 20281, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997, 20290
}

questDoors = {
    1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049,
    8551, 8553, 9175,9177, 9277, 9279, 10278, 10280, 10475, 10484, 10782, 12097, 19847, 19987, 20280, 10791, 12104, 12204, 12195, 19856, 19996, 20289,
    22821, 22830
}

levelDoors = {
    1227, 1229, 1245, 1247, 1259, 1261, 3540, 3549, 5103, 5112, 5121, 5130, 5292, 5294, 6206, 6208, 6263, 6265, 6896, 6905, 7038, 7047, 8555, 8557,9179, 9181,
    9281, 9283, 10282, 10284, 10473, 10482, 10780, 10789, 10780, 12095, 12195, 19845, 19985, 20278, 10789, 12102, 12193, 12202, 19854, 19994, 20287
}

keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032}

--[ Impact Analyser ]--
updateInterval = 2 --every 2 seconds
-- Healing
healingImpact = {} -- global table to insert data
-- Damage
damageImpact = {} -- global table to insert data
 
function doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
    if not position then
        position = Creature(cid):getPosition()
    end

    local spectators, spectator = Game.getSpectators(position, false, true, radiusx, radiusx, radiusy, radiusy)
    for i = 1, #spectators do
        spectator = spectators[i]
        spectator:say(text, type, false, spectator, position)
    end
end


function getBlessingsCost(level)
    if level <= 30 then
        return 2000
    elseif level >= 120 then
        return 20000
    else
        return (level - 20) * 200
    end
end

function getPvpBlessingCost(level)
    if level <= 30 then
        return 2000
    elseif level >= 270 then
        return 50000
    else
        return (level - 20) * 200
    end
end

function isInRange(pos, fromPos, toPos)
    return pos.x >= fromPos.x and pos.y >= fromPos.y and pos.z >= fromPos.z and pos.x <= toPos.x and pos.y <= toPos.y and pos.z <= toPos.z
end

function isNumber(str)
    return tonumber(str) ~= nil
end

function Creature.getMonster(self)
return self:isMonster() and self or nil
end

function getTibianTime()
    local worldTime = getWorldTime()
    local hours = math.floor(worldTime / 60)

    local minutes = worldTime % 60
    if minutes < 10 then
        minutes = '0' .. minutes
    end
    return hours .. ':' .. minutes
end

function getDistanceBetween(firstPosition, secondPosition)
    local xDif = math.abs(firstPosition.x - secondPosition.x)
    local yDif = math.abs(firstPosition.y - secondPosition.y)
    local posDif = math.max(xDif, yDif)
    if firstPosition.z ~= secondPosition.z then
        posDif = posDif + 15
    end
    return posDif
end

table.contains = function(array, value)
    for _, targetColumn in pairs(array) do
        if targetColumn == value then
            return true
        end
    end
    return false
end

string.split = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v
    end
    return res
end

string.trim = function(str)
    return str:match'^()%s*$' and '' or str:match'^%s*(.*%S)'
end

-- Stamina
if nextUseStaminaTime == nil then
    nextUseStaminaTime = {}
end

if nextUseStaminaPrey == nil then
    nextUseStaminaPrey = {}
end

if nextUseXpStamina == nil then
    nextUseXpStamina = {}
end

if lastItemImbuing == nil then
    lastItemImbuing = {}
end

--Boss entry
if not bosssPlayers then
    bosssPlayers = {
        addPlayers = function (self, cid)
            local player = Player(cid)
            if not player then return false end
            if not self.players then
                self.players = {}
            end
            self.players[player:getId()] = 1
        end,
        removePlayer = function (self, cid)
            local player = Player(cid)
            if not player then  return false end
            if not self.players then return false end
            self.players[player:getId()] = nil
        end,
        getPlayersCount = function (self)
            if not self.players then return 0 end
            local c = 0
            for _ in pairs(self.players) do  c = c + 1 end
            return c
        end
    }
end

-- CASAMENTO MARRY

PROPOSED_STATUS = 1
MARRIED_STATUS = 2
PROPACCEPT_STATUS = 3
LOOK_MARRIAGE_DESCR = TRUE
ITEM_WEDDING_RING = 2121
ITEM_ENGRAVED_WEDDING_RING = 10502

function getPlayerSpouse(id)
    local resultQuery = db.storeQuery("SELECT `marriage_spouse` FROM `players` WHERE `id` = " .. db.escapeString(id))
    if resultQuery ~= false then
        local ret = result.getDataInt(resultQuery, "marriage_spouse")
        result.free(resultQuery)
        return ret
    end
    return -1
end

function setPlayerSpouse(id, val)
    db.query("UPDATE `players` SET `marriage_spouse` = " .. val .. " WHERE `id` = " .. id)
end

function getPlayerMarriageStatus(id)
    local resultQuery = db.storeQuery("SELECT `marriage_status` FROM `players` WHERE `id` = " .. db.escapeString(id))
    if resultQuery ~= false then
        local ret = result.getDataInt(resultQuery, "marriage_status")
        result.free(resultQuery)
        return ret
    end
    return -1
end

function setPlayerMarriageStatus(id, val)
    db.query("UPDATE `players` SET `marriage_status` = " .. val .. " WHERE `id` = " .. id)
end

function Player:getMarriageDescription(thing)
    local descr = ""
    if getPlayerMarriageStatus(thing:getGuid()) == MARRIED_STATUS then
        playerSpouse = getPlayerSpouse(thing:getGuid())
        if self == thing then
            descr = descr .. " You are "
        elseif thing:getSex() == PLAYERSEX_FEMALE then
            descr = descr .. " She is "
        else
            descr = descr .. " He is "
        end
        descr = descr .. "married to " .. getPlayerNameById(playerSpouse) .. '.'
    end
    return descr
end

-- The following 2 functions can be used for delayed shouted text

function say(param)
selfSay(text)
doCreatureSay(param.cid, param.text, 1)
end

function delayedSay(text, delay)
local delay = delay or 0
local cid = getNpcCid()
addEvent(say, delay, {cid = cid, text = text})
end


function cleanZone(frompos, topos, clean_creatures)
    for xx = frompos.x, topos.x do
        for yy = frompos.y, topos.y do
            local tile = Tile(Position(xx, yy, frompos.z))
            if tile then
                local items = tile:getItems()
if items then -- eso es todo
                for _, item in pairs(items) do     --------> tengo error aqui no me leee el pairs :o dice que la variable items es nil?
                    local IType = ItemType(item:getId())
                    if IType:isContainer() then
                        item:remove()
                    end
                end
end

                if clean_creatures then
                    local c = tile:getTopCreature()
                    if c then
                        if c:isMonster() then
                            c:remove()
                        end
                    end
                end
            end
        end
    end
end



    function teleportArea(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 2, 2, 0, 0) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end








    function teleportIssa(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 2, 2, 0, 0) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)
    
    

    end

    end

end


    function falportArea(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 2, 2, 0, 0) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end



    function telepoArea(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 0, 0, 2, 2) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end





    function telepoAreat(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 0, 0, 2, 2) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end


.lua kills

Lua:
function onKill(player, target)
    if target:isPlayer() or target:getMaster() then
        return true
    end

    local targetName, startedTasks, taskId = target:getName():lower(), player:getStartedTasks()
    for i = 1, #startedTasks do
        taskId = startedTasks[i]
        if isInArray(tasks[taskId].creatures, targetName) then
            local killAmount = player:getStorageValue(KILLSSTORAGE_BASE + taskId)
            if killAmount < tasks[taskId].killsRequired then
                -- set max kills to adm
                if (player:getAccountType() >= ACCOUNT_TYPE_GOD) then
                    player:setStorageValue(KILLSSTORAGE_BASE + taskId, tasks[taskId].killsRequired)
                    return true
                end

                player:setStorageValue(KILLSSTORAGE_BASE + taskId, killAmount + 1)
            end
        end
    end
    return true
end

Please help:''/
 
Hello I have this error,
on my .exe


View attachment 46836


I've tried removing "killking in the name of " but it doesn't work it throws error in .exe doesnt even let me open my server up

This is my .lua global

Lua:
dofile('data/lib/libs.lua')
dofile('data/lib/buypot.lua')
dofile('data/lib/Task_lib.lua')
dofile('data/lib/addon_doll.lua')

NOT_MOVEABLE_ACTION = 8000
PARTY_PROTECTION = 1 -- Set to 0 to disable.
ADVANCED_SECURE_MODE = 1 -- Set to 0 to disable.

STORAGEVALUE_PROMOTION = 30018


ropeSpots = {384, 418, 8278, 8592, 13189, 14435, 14436, 15635, 19518, 26019, 24621, 24622, 24623, 24624}

doors = {
    [1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236,
    [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542,
    [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918,
    [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111,
    [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139,
    [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283,
    [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194,
    [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254,
    [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895,
    [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046,
    [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167,
    [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272,
    [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472,
    [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10775] = 10777, [10776] = 10777, [12092] = 12094, [12093] = 12094,
    [12188] = 12190, [12189] = 12190, [19840] = 19842, [19841] = 19842, [19843] = 19844, [19980] = 19982, [19981] = 19982, [19983] = 19984, [20273] = 20275,
    [20274] = 20275, [20276] = 20277, [17235] = 17236, [18208] = 18209, [13022] = 13023, [10784] = 10786, [10785] = 10786, [12099] = 12101, [12100] = 12101,
    [12197] = 12199, [12198] = 12199, [19849] = 19851, [19850] = 19851, [19852] = 19853, [19989] = 19991, [19990] = 19991, [19992] = 19993, [20282] = 20284,
    [20283] = 20284, [20285] = 20286, [17237] = 17238, [13020] = 13021, [10780] = 10781, [12095] = 12096, [12195] = 12196, [19845] = 19846, [19985] = 19986,
    [20278] = 20279, [10789] = 10790, [12102] = 12103, [12204] = 12205, [19854] = 19855, [19994] = 19995, [20287] = 20288, [10782] = 10783, [12097] = 12098,
    [12193] = 12194, [19847] = 19848, [19987] = 19988, [20280] = 20281, [10791] = 10792, [12104] = 12105, [12202] = 12203, [19856] = 19857, [19996] = 19997,
    [20289] = 20290, [22814] = 22815, [22815] = 22816, [22817] = 22818, [22819] = 22820, [22823] = 22825, [22824] = 22825, [36329] = 36331, [36331] = 36329,
    [22826] = 22827, [22828] = 22829
}

verticalOpenDoors = {
    1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131,
    5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044,
    7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9274, 9269, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10485, 10483,
    10786, 12101, 12199, 19851, 19853, 19991, 19993, 20284, 20286, 17238, 13021, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997,
    20290, 22825, 22827, 22829, 22831
}

horizontalOpenDoors = {
    1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118,
    5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893,
    6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285,
    10470, 10472, 10476, 10474, 10777, 12094, 12190, 19842, 19844, 19982, 19984, 20275, 20277, 17236, 18209, 13023, 10781, 12096, 12196,
    19846, 19986, 20279, 10783, 12098, 12194, 19848, 19988, 20281, 22816, 22818, 22820, 22822
}

openSpecialDoors = {
    1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133,
    5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558,
    9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10781, 12096, 12196, 19846, 19986, 20279,
    10783, 12098, 12194, 19848, 19988, 20281, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997, 20290
}

questDoors = {
    1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049,
    8551, 8553, 9175,9177, 9277, 9279, 10278, 10280, 10475, 10484, 10782, 12097, 19847, 19987, 20280, 10791, 12104, 12204, 12195, 19856, 19996, 20289,
    22821, 22830
}

levelDoors = {
    1227, 1229, 1245, 1247, 1259, 1261, 3540, 3549, 5103, 5112, 5121, 5130, 5292, 5294, 6206, 6208, 6263, 6265, 6896, 6905, 7038, 7047, 8555, 8557,9179, 9181,
    9281, 9283, 10282, 10284, 10473, 10482, 10780, 10789, 10780, 12095, 12195, 19845, 19985, 20278, 10789, 12102, 12193, 12202, 19854, 19994, 20287
}

keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032}

--[ Impact Analyser ]--
updateInterval = 2 --every 2 seconds
-- Healing
healingImpact = {} -- global table to insert data
-- Damage
damageImpact = {} -- global table to insert data

function doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
    if not position then
        position = Creature(cid):getPosition()
    end

    local spectators, spectator = Game.getSpectators(position, false, true, radiusx, radiusx, radiusy, radiusy)
    for i = 1, #spectators do
        spectator = spectators[i]
        spectator:say(text, type, false, spectator, position)
    end
end


function getBlessingsCost(level)
    if level <= 30 then
        return 2000
    elseif level >= 120 then
        return 20000
    else
        return (level - 20) * 200
    end
end

function getPvpBlessingCost(level)
    if level <= 30 then
        return 2000
    elseif level >= 270 then
        return 50000
    else
        return (level - 20) * 200
    end
end

function isInRange(pos, fromPos, toPos)
    return pos.x >= fromPos.x and pos.y >= fromPos.y and pos.z >= fromPos.z and pos.x <= toPos.x and pos.y <= toPos.y and pos.z <= toPos.z
end

function isNumber(str)
    return tonumber(str) ~= nil
end

function Creature.getMonster(self)
return self:isMonster() and self or nil
end

function getTibianTime()
    local worldTime = getWorldTime()
    local hours = math.floor(worldTime / 60)

    local minutes = worldTime % 60
    if minutes < 10 then
        minutes = '0' .. minutes
    end
    return hours .. ':' .. minutes
end

function getDistanceBetween(firstPosition, secondPosition)
    local xDif = math.abs(firstPosition.x - secondPosition.x)
    local yDif = math.abs(firstPosition.y - secondPosition.y)
    local posDif = math.max(xDif, yDif)
    if firstPosition.z ~= secondPosition.z then
        posDif = posDif + 15
    end
    return posDif
end

table.contains = function(array, value)
    for _, targetColumn in pairs(array) do
        if targetColumn == value then
            return true
        end
    end
    return false
end

string.split = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v
    end
    return res
end

string.trim = function(str)
    return str:match'^()%s*$' and '' or str:match'^%s*(.*%S)'
end

-- Stamina
if nextUseStaminaTime == nil then
    nextUseStaminaTime = {}
end

if nextUseStaminaPrey == nil then
    nextUseStaminaPrey = {}
end

if nextUseXpStamina == nil then
    nextUseXpStamina = {}
end

if lastItemImbuing == nil then
    lastItemImbuing = {}
end

--Boss entry
if not bosssPlayers then
    bosssPlayers = {
        addPlayers = function (self, cid)
            local player = Player(cid)
            if not player then return false end
            if not self.players then
                self.players = {}
            end
            self.players[player:getId()] = 1
        end,
        removePlayer = function (self, cid)
            local player = Player(cid)
            if not player then  return false end
            if not self.players then return false end
            self.players[player:getId()] = nil
        end,
        getPlayersCount = function (self)
            if not self.players then return 0 end
            local c = 0
            for _ in pairs(self.players) do  c = c + 1 end
            return c
        end
    }
end

-- CASAMENTO MARRY

PROPOSED_STATUS = 1
MARRIED_STATUS = 2
PROPACCEPT_STATUS = 3
LOOK_MARRIAGE_DESCR = TRUE
ITEM_WEDDING_RING = 2121
ITEM_ENGRAVED_WEDDING_RING = 10502

function getPlayerSpouse(id)
    local resultQuery = db.storeQuery("SELECT `marriage_spouse` FROM `players` WHERE `id` = " .. db.escapeString(id))
    if resultQuery ~= false then
        local ret = result.getDataInt(resultQuery, "marriage_spouse")
        result.free(resultQuery)
        return ret
    end
    return -1
end

function setPlayerSpouse(id, val)
    db.query("UPDATE `players` SET `marriage_spouse` = " .. val .. " WHERE `id` = " .. id)
end

function getPlayerMarriageStatus(id)
    local resultQuery = db.storeQuery("SELECT `marriage_status` FROM `players` WHERE `id` = " .. db.escapeString(id))
    if resultQuery ~= false then
        local ret = result.getDataInt(resultQuery, "marriage_status")
        result.free(resultQuery)
        return ret
    end
    return -1
end

function setPlayerMarriageStatus(id, val)
    db.query("UPDATE `players` SET `marriage_status` = " .. val .. " WHERE `id` = " .. id)
end

function Player:getMarriageDescription(thing)
    local descr = ""
    if getPlayerMarriageStatus(thing:getGuid()) == MARRIED_STATUS then
        playerSpouse = getPlayerSpouse(thing:getGuid())
        if self == thing then
            descr = descr .. " You are "
        elseif thing:getSex() == PLAYERSEX_FEMALE then
            descr = descr .. " She is "
        else
            descr = descr .. " He is "
        end
        descr = descr .. "married to " .. getPlayerNameById(playerSpouse) .. '.'
    end
    return descr
end

-- The following 2 functions can be used for delayed shouted text

function say(param)
selfSay(text)
doCreatureSay(param.cid, param.text, 1)
end

function delayedSay(text, delay)
local delay = delay or 0
local cid = getNpcCid()
addEvent(say, delay, {cid = cid, text = text})
end


function cleanZone(frompos, topos, clean_creatures)
    for xx = frompos.x, topos.x do
        for yy = frompos.y, topos.y do
            local tile = Tile(Position(xx, yy, frompos.z))
            if tile then
                local items = tile:getItems()
if items then -- eso es todo
                for _, item in pairs(items) do     --------> tengo error aqui no me leee el pairs :o dice que la variable items es nil?
                    local IType = ItemType(item:getId())
                    if IType:isContainer() then
                        item:remove()
                    end
                end
end

                if clean_creatures then
                    local c = tile:getTopCreature()
                    if c then
                        if c:isMonster() then
                            c:remove()
                        end
                    end
                end
            end
        end
    end
end



    function teleportArea(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 2, 2, 0, 0) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end








    function teleportIssa(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 2, 2, 0, 0) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)
  
  

    end

    end

end


    function falportArea(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 2, 2, 0, 0) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end



    function telepoArea(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 0, 0, 2, 2) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end





    function telepoAreat(centerPosition, toPosition)

    local specs = Game.getSpectators(centerPosition, false, true, 0, 0, 2, 2) -- buscara de <... a ...>

    if #specs == 0 then

    return

    end


    for index, spec in pairs(specs) do

    if spec:getLevel() >= 100 then

    spec:teleportTo(toPosition, false)  -------->    Position(x,y,z)

    toPosition:sendMagicEffect(CONST_ME_TELEPORT)

    end

    end

end


.lua kills

Lua:
function onKill(player, target)
    if target:isPlayer() or target:getMaster() then
        return true
    end

    local targetName, startedTasks, taskId = target:getName():lower(), player:getStartedTasks()
    for i = 1, #startedTasks do
        taskId = startedTasks[i]
        if isInArray(tasks[taskId].creatures, targetName) then
            local killAmount = player:getStorageValue(KILLSSTORAGE_BASE + taskId)
            if killAmount < tasks[taskId].killsRequired then
                -- set max kills to adm
                if (player:getAccountType() >= ACCOUNT_TYPE_GOD) then
                    player:setStorageValue(KILLSSTORAGE_BASE + taskId, tasks[taskId].killsRequired)
                    return true
                end

                player:setStorageValue(KILLSSTORAGE_BASE + taskId, killAmount + 1)
            end
        end
    end
    return true
end

Please help:''/
Problem is this line here
Lua:
if isInArray(tasks[taskId].creatures, targetName) then

so right now we have an unknown table called 'tasks' along with a separate unknown value created from player:getStartedTasks() which is then looking for creatures.

So basically I assume a storage value is being used as the index.
something like this..
Lua:
tasks = {
    [45001] = {creatures = {"rat", "cave rat"}}
}
But this table is either missing the index.. or creatures isn't setup in an array.

No way to know without the table.
but yeah.. this part of the line isn't finding a table value, hence the 'nil'
Lua:
tasks[taskId].creatures
 
it's tfs 1.3
So I found it,should I change the storage of every monster?
This is my


task.lib

Lua:
rankStorage = 32150

THESNAPPER = {80000, 1}
DEMODRAS = {80001, 1}
HIDE = {80002, 1}
THEBLOODTUSK = {80003, 1}
SHARDHEAD = {80004, 1}
THUL = {80005, 1}
ESMERALDA = {80006, 1}
THEOLDWIDOW = {80007, 1}
THEMANY = {80008, 1}
LEVIATHAN = {80009, 1}
STONECRACKER = {80010, 1}
THENOXIUSSPAWN = {80011, 1}
MERIKHTHESLAUGHTERER = {80012, 1}
FAHIMTHEWISE = {80013, 1}
RANDOMPIRATEBOSS = {80014, 1}
THEHORNEDFOX = {80015, 1}
NECROPHARUS = {80016, 1}

tasks =
{
[1] = {questStarted = 65000, questStorage = 65100, killsRequired = 100, raceName = "Trolls", repeatable = false, rewards = {{enable = true, type = "exp", values = 40000}, {enable = true, type = "money", values = 40000}}},
[2] = {questStarted = 65001, questStorage = 65101, killsRequired = 150, raceName = "Goblins", repeatable = false, rewards = {{enable = true, type = "exp", values = 70000}, {enable = true, type = "money", values = 50000}}},
[3] = {questStarted = 65002, questStorage = 65102, killsRequired = 300, raceName = "Rotworms", repeatable = false, rewards = {{enable = true, type = "exp", values = 100000}, {enable = true, type = "money", values = 60000}}},
[4] = {questStarted = 65003, questStorage = 65103, killsRequired = 500, raceName = "Cyclops", repeatable = false, rewards = {{enable = true, type = "exp", values = 150000}, {enable = true, type = "money", values = 80000}}},
[5] = {questStarted = 14007, questStorage = 14107, killsRequired = 300, raceName = "Crocodiles", repeatable = true, rewards = {{enable = true, type = "exp", values = 100000}, {enable = true, type = "storage", values = THESNAPPER}, {enable = true, type = "points", values = 2}}},
[6] = {questStarted = 14008, questStorage = 14108, killsRequired = 300, raceName = "Tarantulas", repeatable = true, rewards = {{enable = true, type = "exp", values = 150000}, {enable = true, type = "storage", values = HIDE}, {enable = true, type = "points", values = 2}}},
[7] = {questStarted = 14009, questStorage = 14109, killsRequired = 150, raceName = "Carniphilas", repeatable = false, rewards = {{enable = true, type = "exp", values = 250000}, {enable = true, type = "money", values = 150000}}},
[8] = {questStarted = 14010, questStorage = 14110, killsRequired = 200, raceName = "Stone Golems", repeatable = false, rewards = {{enable = true, type = "exp", values = 200000}, {enable = true, type = "money", values = 150000}}},
[9] = {questStarted = 14011, questStorage = 14111, killsRequired = 300, raceName = "Mammoths", repeatable = true, rewards = {{enable = true, type = "exp", values = 150000}, {enable = true, type = "storage", values = THEBLOODTUSK}, {enable = true, type = "points", values = 2}}},
[10] = {questStarted = 14012, questStorage = 14112, killsRequired = 300, raceName = "Ice Golems", repeatable = true, rewards = {{enable = true, type = "exp", values = 150000}, {enable = true, type = "storage", values = SHARDHEAD}, {enable = true, type = "points", values = 2}}},
[11] = {questStarted = 14013, questStorage = 14113, killsRequired = 300, raceName = "Quaras Scout", repeatable = true, rewards = {{enable = true, type = "exp", values = 250000}, {enable = true, type = "money", values = 250000}}},
[12] = {questStarted = 14014, questStorage = 14114, killsRequired = 300, raceName = "Quaras", repeatable = true, rewards = {{enable = true, type = "exp", values = 300000}, {enable = true, type = "storage", values = THUL}, {enable = true, type = "points", values = 2}}},
[13] = {questStarted = 14015, questStorage = 14115, killsRequired = 70, raceName = "Water Elementals", repeatable = false, rewards = {{enable = true, type = "exp", values = 200000}, {enable = true, type = "money", values = 200000}}},
[14] = {questStarted = 14016, questStorage = 14116, killsRequired = 70, raceName = "Earth Elementals", repeatable = false, rewards = {{enable = true, type = "exp", values = 200000}, {enable = true, type = "money", values = 200000}}},
[15] = {questStarted = 14017, questStorage = 14117, killsRequired = 70, raceName = "Energy Elementals", repeatable = false, rewards = {{enable = true, type = "exp", values = 200000}, {enable = true, type = "money", values = 200000}}},
[16] = {questStarted = 14018, questStorage = 14118, killsRequired = 70, raceName = "Fire Elementals", repeatable = false, rewards = {{enable = true, type = "exp", values = 200000}, {enable = true, type = "money", values = 200000}}},
[17] = {questStarted = 14019, questStorage = 14119, killsRequired = 200, raceName = "Mutated Rats", repeatable = true, rewards = {{enable = true, type = "exp", values = 150000}, {enable = true, type = "storage", values = ESMERALDA}, {enable = true, type = "points", values = 2}}},
[18] = {questStarted = 14020, questStorage = 14120, killsRequired = 500, raceName = "Giant Spiders", repeatable = true, rewards = {{enable = true, type = "exp", values = 250000}, {enable = true, type = "storage", values = THEOLDWIDOW}, {enable = true, type = "points", values = 2}}},
[19] = {questStarted = 14021, questStorage = 14121, killsRequired = 500, raceName = "Hydras", repeatable = true, rewards = {{enable = true, type = "storage", values = THEMANY}, {enable = true, type = "points", values = 4}}},
[20] = {questStarted = 14001, questStorage = 14101, killsRequired = 500, raceName = "Sea Serpents", repeatable = true, rewards = {{enable = true, type = "storage", values = LEVIATHAN}, {enable = true, type = "points", values = 4}}},
[21] = {questStarted = 14022, questStorage = 14122, killsRequired = 500, raceName = "Behemoths", repeatable = true, rewards = {{enable = true, type = "storage", values = STONECRACKER}, {enable = true, type = "points", values = 4}}},
[22] = {questStarted = 14002, questStorage = 14102, killsRequired = 375, raceName = "Serpents Spawn", repeatable = true, rewards = {{enable = true, type = "storage", values = THENOXIOUSSPAWN}, {enable = true, type = "points", values = 4}}},
[23] = {questStarted = 65022, questStorage = 65122, killsRequired = 125, raceName = "Green Djinns", repeatable = true, rewards = {{enable = true, type = "exp", values = 230000}, {enable = true, type = "money", values = 5000}, {enable = true, type = "storage", values = MERIKHTHESLAUGHTERER}}},
[24] = {questStarted = 65023, questStorage = 65123, killsRequired = 125, raceName = "Blue Djinns", repeatable = true, rewards = {{enable = true, type = "exp", values = 230000}, {enable = true, type = "money", values = 5000}, {enable = true, type = "storage", values = FAHIMTHEWISE}}},
[25] = {questStarted = 65024, questStorage = 65124, killsRequired = 300, raceName = "Pirates", repeatable = false, rewards = {{enable = true, type = "exp", values = 300000}, {enable = true, type = "money", values = 400000}, {enable = true, type = "storage", values = RANDOMPIRATEBOSS}}},
[26] = {questStarted = 14004, questStorage = 14104, killsRequired = 500, raceName = "Minotaurs", repeatable = false, rewards = {{enable = true, type = "storage", values = THEHORNEDFOX}}},
[27] = {questStarted = 14003, questStorage = 14103, killsRequired = 1000, raceName = "Magicians", repeatable = false, rewards = {{enable = true, type = "storage", values = NECROPHARUS}}},
[28] = {questStarted = 65030, questStorage = 65130, killsRequired = 500, raceName = "Dragons", repeatable = true, rewards = {{enable = true, type = "storage", values = DEMODRAS}, {enable = true, type = "exp", values = 400000}}},
[29] = {questStarted = 14023, questStorage = 14123, killsRequired = 6666, raceName = "Demons", repeatable = false, rewards = {{enable = true, type = "exp", values = 1000000}, {enable = true, type = "item", values = {10305,1}}}}}

function getTasksStarted(player)
local tmp = {}
for k, v in pairs(tasks) do
if player:getStorageValue( v.questStarted) == 1 then
table.insert(tmp, k)
end
end
return tmp
end

function getTaskByName(name)
for k, v in pairs(tasks) do
if v.raceName:lower() == name:lower() then
return k
end
end
return false
end

function sendTaskWindow(player)
taskWindow = ModalWindow(1900, "Mission Management", "Select a task:")
local task_status = {}

if taskWindow:getId() == 1900 then
    taskWindow:addButton(1, "Select")
    taskWindow:addButton(2, "Cancel")
    for i = 1, #tasks do
        if player:getStorageValue( tasks[i].questStarted) == 2 then
            task_status[i] = "[completed]"
        else
            if player:getStorageValue( tasks[i].questStarted) == 1 then
                task_status[i] = "[" .. player:getStorageValue( tasks[i].questStorage) .. "/" .. tasks[i].killsRequired .. "]"
            else
                if player:getStorageValue( tasks[i].questStarted) < 1 then
                    task_status[i] = tasks[i].killsRequired
                else
                    task_status[i] = tasks[i].killsRequired .. " [unknown]"
                end
            end
        end
        
        if player:getStorageValue( tasks[i].questStarted) == 1 and player:getStorageValue( tasks[i].questStorage) >= tasks[i].killsRequired then
            taskWindow:addChoice(i, tasks[i].raceName .. " [click for reward]")
        else
            taskWindow:addChoice(i, tasks[i].raceName .. ", " .. task_status[i])
        end
    end
end
taskWindow:sendToPlayer(player)
return true
end
 
So yeah, like I said earlier.
creatures doesn't exist in your table.
You have the racename, but no creatures .

So you'd have to add it in on every line in your table.

example.. change this
Lua:
[1] = {questStarted = 65000, questStorage = 65100, killsRequired = 100, raceName = "Trolls", repeatable = false, rewards = {{enable = true, type = "exp", values = 40000}, {enable = true, type = "money", values = 40000}}},
to this
Lua:
[1] = {questStarted = 65000, questStorage = 65100, killsRequired = 100, raceName = "Trolls",  creatures = {'troll', 'swamp troll', 'frost troll', 'furious troll', 'troll champion', 'troll guard', 'troll legionnaire', 'troll marauder', 'mountain troll', 'big boss trolliver', 'salamander trainer', 'biting cold', 'percht minion', 'island troll', 'young troll'}, repeatable = false, rewards = {{enable = true, type = "exp", values = 40000}, {enable = true, type = "money", values = 40000}}},
 
Back
Top