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

Lua Killing in the name of Problem Crascing server

dunnish

New Member
Joined
Jun 18, 2009
Messages
263
Solutions
1
Reaction score
2
Hello!

my Killing in the name of is makeing the hole server lagg.

the script is trying to write to the database
and when the guy reconnect its working again for a few min then its crash.
Killinginthenameof.lua (in lib)
[Lua] RANK_NONE = 0 RANK_HUNTSMAN = 1 RANK_RANGER = 2 RANK_BIGGAMEHUNTER = 3 RANK_ - Pastebin.com
 

Shadow_

Advanced OT User
Joined
Jun 2, 2018
Messages
754
Solutions
25
Reaction score
240
Location
Cairo, Egypt
This script got 2 problems first , it can't find the place to add things in database,
second creaturescripts lua script you should send the file which gives those errors to be able to solve your issue
 
OP
dunnish

dunnish

New Member
Joined
Jun 18, 2009
Messages
263
Solutions
1
Reaction score
2
killinginthenameof.lua in Creaturescripts
Lua:
function onKill(cid, target, lastHit)

    local started = getPlayerStartedTasks(cid)
    if isPlayer(target) or isSummon(target) then return true end
    if started and #started > 0 then
        for _, id in ipairs(started) do
            if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then
                if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then
                    doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0)
                end
                if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then
                    doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1)
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.")
                end
            end
        end
    end
    return true
end

i have been googling some and found,
Solved - Why this counter doesn't work? (https://otland.net/threads/why-this-counter-doesnt-work.224375/)
but its dossnt help:/ i removed or isSummon(target)
 
Top