• Vote in May Mapping Competition to select a winner!
  • 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

piraten

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

Shadow_

Intermediate OT User
Joined
Jun 2, 2018
Messages
491
Best answers
17
Reaction score
116
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