• 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 [TFS 1.2] Task Party.

Zodia

Member
Joined
Feb 21, 2020
Messages
220
Reaction score
20
My task system seems to be set so that only the last player who attacked the monster, counts. I'm trying to get you to tell Party members to attack the monster.

Creaturescript:
Lua:
function onKill(player, target)
    local monster = config[target:getName():lower()]
    if not monster or target:getMaster() then
        return true
    local party = player:getParty()

    if party...
    for ...  party:getMembers()
    end

    local storageValue = player:getStorageValue(monster.storage)
    if storageValue >= monster.start then
        if storageValue >= monster.count then
            player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have already killed " .. monster.count .. " " .. monster.plural .. ". Report back to Tusker in Thais.")
        else
            player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have killed [" .. storageValue .. "/" .. monster.count .. "] " .. monster.plural .. ".")
        end
            player:setStorageValue(monster.storage, storageValue + 1)
    end
    return true
end


I tried a few things using these tips:


Code:
local party = player:getParty()

if party...
    for ...  party:getMembers()



Could anyone help me with this? How would my Creaturescript code look, so that the desired result was achieved?
Of course. That count only if the Party is active, and that count only for the Party players that attack the monster.

Thanks! <3
 
Back
Top