Lua Killing in the name of Problem Crascing server

piraten

TibiaEu.Com
Joined
Dec 30, 2018
Messages
58
Best answers
0
Reaction score
22
show me line 1 killinginthenameof.lua
 

Shadow_

Active Member
Joined
Jun 2, 2018
Messages
408
Best answers
16
Reaction score
97
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

Premium User
Premium User
Joined
Jun 18, 2009
Messages
260
Best answers
1
Reaction score
2
bump
 
OP
dunnish

dunnish

Premium User
Premium User
Joined
Jun 18, 2009
Messages
260
Best answers
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