Ir para conteúdo

Featured Replies

Postado

Peguei um sistema de task feito pelo whitwolf,

magnus callenger, e modifiquei ele todo fiz da forma que eu queria.

unico problema que no meio da task, se o player estiver com a task, ou morre com task, ou qualquer coisa que envolva a storage da task

ele não consegue mais logar, tem alguma coisa aver com editaçoes que fiz?

ou pelo loguim.lua? e creaturescripts!!

 

alguem ajudar eu posto o scripts!

  • Respostas 8
  • Visualizações 272
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • que estranho dar esse erro.   registerCreatureEvent(cid,"tasksystem") if tonumber(getPlayerStorageValue(cid, 95673)) and getPlayerStorageValue(cid, 95673) < 0 then setPlayerSto

Postado
  • Autor
18 minutos atrás, Vodkart disse:

Qual erro dá?

e coloca o script

Spoiler

[Error - CreatureScript Interface] data/creaturescripts/scripts/login.lua:onLogin Description: data/creaturescripts/scripts/login.lua:123: attempt to compare string with number stack traceback: data/creaturescripts/scripts/login.lua:123: in function <data/creaturescripts/scripts/login.lua:15>

 

 

loguim.lua

Spoiler

registerCreatureEvent(cid,"tasksystem")
    if getPlayerStorageValue(cid, 95673) < 0 then
        setPlayerStorageValue(cid, 95673, 0) 
    end
    if getPlayerStorageValue(cid, 95674) < 0 then
        setPlayerStorageValue(cid, 95674, 0) 
    end

erro e nessa linhaa

 

 

creaturescripts/tasksystem

Spoiler

local storages = {
name = 95672,
count = 95673,
maxcount = 95674,
}
local config = {
partycount = true, --- true ou false pra ativar/desativar que os kills dos membros da party contem pra voce
killdistance = 7 --- distancia que conta os kills
}

function onKill(cid, target, lastHit)
    if isMonster(target) and getPlayerStorageValue(cid, storages.maxcount) > 3 and (type(getCreatureMaster(target)) == 'nil' or getCreatureMaster(target) == target) and (not(isInParty(cid)) or config.partycount ~= true) then
        if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(cid, storages.name)) then
            setPlayerStorageValue(cid, storages.count, getPlayerStorageValue(cid, storages.count) + 1)
            if getPlayerStorageValue(cid, storages.count) == getPlayerStorageValue(cid, storages.maxcount) then
                doPlayerSendTextMessage(cid, 19, "You finished your task.")
            elseif getPlayerStorageValue(cid, storages.count) < getPlayerStorageValue(cid, storages.maxcount) then
                doPlayerSendTextMessage(cid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(cid, storages.count) .."/".. getPlayerStorageValue(cid, storages.maxcount) .."].")
            end
        end
    elseif isMonster(target) and (type(getCreatureMaster(target)) == 'nil' or getCreatureMaster(target) == target) and isInParty(cid) and config.partycount == true then
    leader = getPartyLeader(cid)    
    party = getPartyMembers(leader)
        for i = 1, #party do
        pid = party[i]
        if getDistanceBetween(getThingPos(target), getThingPos(pid)) < config.killdistance then
            if getPlayerStorageValue(pid, storages.maxcount) > 3 then
                if getCreatureName(target):lower() == string.lower(getPlayerStorageValue(pid, storages.name)) then
                    setPlayerStorageValue(pid, storages.count, getPlayerStorageValue(pid, storages.count) + 1)
                    if getPlayerStorageValue(pid, storages.count) == getPlayerStorageValue(pid, storages.maxcount) then
                        doPlayerSendTextMessage(pid, 19, "You finished your task.")
                    elseif getPlayerStorageValue(pid, storages.count) < getPlayerStorageValue(pid, storages.maxcount) then
                        doPlayerSendTextMessage(pid, 20, "Killed ".. getCreatureName(target) .."s [".. getPlayerStorageValue(pid, storages.count) .."/".. getPlayerStorageValue(pid, storages.maxcount) .."].")
                    end
                end
            end    
        end    
        end
    end
return true
end 

 

 

Postado

que estranho dar esse erro.

 

registerCreatureEvent(cid,"tasksystem")
    if tonumber(getPlayerStorageValue(cid, 95673)) and getPlayerStorageValue(cid, 95673) < 0 then
        setPlayerStorageValue(cid, 95673, 0) 
    end
    if tonumber(getPlayerStorageValue(cid, 95674)) and getPlayerStorageValue(cid, 95674) < 0 then
        setPlayerStorageValue(cid, 95674, 0) 
    end

 

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
  • Autor
3 minutos atrás, Vodkart disse:

que estranho dar esse erro.

 


registerCreatureEvent(cid,"tasksystem")
    if tonumber(getPlayerStorageValue(cid, 95673)) and getPlayerStorageValue(cid, 95673) < 0 then
        setPlayerStorageValue(cid, 95673, 0) 
    end
    if tonumber(getPlayerStorageValue(cid, 95674)) and getPlayerStorageValue(cid, 95674) < 0 then
        setPlayerStorageValue(cid, 95674, 0) 
    end

 

vo libera aqui se algum player tiver algum bug, eu te report aqui 

obrigado @Vodkart

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.6k

Informação Importante

Confirmação de Termo