Ir para conteúdo

Featured Replies

Postado
  • Autor
4 horas atrás, Talesigorvr disse:

Você passou o script errado.

!countkills é uma talkaction.

essa ea talkaction

 

-- Sistema de Task feito por Leoric (Omega no XTibia) --
function onSay(cid, words, param, channel)
    local monster, permission = getPlayerStorageValue(cid,taskstg.monster), getPlayerStorageValue(cid,taskstg.permission)
    local kills, killstotal = getPlayerStorageValue(cid,taskstg.kills), getPlayerStorageValue(cid,taskstg.killstotal)
    if monster == -1 or monster == 0 then
        doPlayerSendTextMessage(cid,27,'Voce nao tem nenhuma task ativa.')
    else
        local left = killstotal - kills
        if left <= 0 then
            doPlayerSendTextMessage(cid,27,'Voce ja matou monstros suficientes para terminar sua task.')
        else
            doPlayerSendTextMessage(cid,27,'Andamento da sua task de '..taskmonsters[monster][1]..'s -> ['..kills..'/'..killstotal..']')
        end
    end
    return true
end

  • Respostas 12
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Posted Images

Postado
  • Autor
7 horas atrás, Talesigorvr disse:

Tá faltando um script.

Provavelmente um creaturescripts.

Nao ta tudo certinho isso que nao entendo

Creaturescripts:

 

-- Sistema de Task feito por Leoric (Omega no XTibia) --
function onKill(cid, target)
    if not isPlayer(cid) then return true end
    if isSummon(target) then return true end
    local monster, permission = getPlayerStorageValue(cid,taskstg.monster), getPlayerStorageValue(cid,taskstg.permission)
    local kills, killstotal = getPlayerStorageValue(cid,taskstg.kills), getPlayerStorageValue(cid,taskstg.killstotal)
    if monster ~= -1 and monster ~= 0 then
        if isInArray(taskmonsters[monster],string.lower(getCreatureName(target))) then
            if kills == -1 then
                setPlayerStorageValue(cid,taskstg.kills,1)
            elseif kills + 1 == killstotal and taskMsg.bool == true then
                doPlayerSendTextMessage(cid, 21, taskMsg.msg)
                setPlayerStorageValue(cid,taskstg.kills,kills+1)
            else
                setPlayerStorageValue(cid,taskstg.kills,kills+1)
            end
        end
    end
    return true
end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo