Ir para conteúdo

Featured Replies

Postado

Alguem sabe me dizer o que tem de errado com esta script que apenas está dando EXP? e nada de items...

 

 

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)
if(getPlayerStorageValue(cid, 10012) < 1) then
doPlayerAddExp(cid, 20000, true, true)
setPlayerStorageValue(cid, 10012, 1)
end
if(item.uid == 3088) then
if(getPlayerStorageValue(cid, 30) == 53) then
setPlayerStorageValue(cid, 30, 54)
Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
doPlayerAddItem(cid, 9776, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari armor.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif(item.uid == 3089) then
if(getPlayerStorageValue(cid, 30) == 53) then
setPlayerStorageValue(cid, 30, 54)
Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
doPlayerAddItem(cid, 9778, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari mask.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
elseif(item.uid == 3090) then
if(getPlayerStorageValue(cid, 30) == 53) then
setPlayerStorageValue(cid, 30, 54)
Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
doPlayerAddItem(cid, 9777, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari leg piece.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
end
end
return true
end

Editado por arthur122222 (veja o histórico de edições)

Resolvido por Wakon

Ir para solução
  • Respostas 18
  • Visualizações 615
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Tente assim: function onUse(cid, item, fromPosition, itemEx, toPosition)     if(getPlayerStorageValue(cid, 10012) < 1) then         doPlayerAddExp(cid, 250000, true, true)         setPlayerStorag

  • É por que a storage tem que ser alterada para 53 amigo, essa storage irá mudar quando completar a quest. O padrão da storage é -1, então se você criou um char e a storage não foi alterada para 53, ób

Postado
  • Solução

Tente assim:

function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(getPlayerStorageValue(cid, 10012) < 1) then
        doPlayerAddExp(cid, 250000, true, true)
        setPlayerStorageValue(cid, 10012, 1)
    end
    if(item.uid == 3088) then
        if(getPlayerStorageValue(cid, 30) == 53) then
            doPlayerAddItem(cid, 9776, 1)
            setPlayerStorageValue(cid, 30, 54)
            Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari armor.")
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
        end
    elseif(item.uid == 3089) then
        if(getPlayerStorageValue(cid, 30) == 53) then
            doPlayerAddItem(cid, 9778, 1)
            setPlayerStorageValue(cid, 30, 54)
            Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari mask.")
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
        end
    elseif(item.uid == 3090) then
        if(getPlayerStorageValue(cid, 30) == 53) then
            doPlayerAddItem(cid, 9777, 1)
            setPlayerStorageValue(cid, 30, 54)
            Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari leg piece.")
        else
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
        end
    end
    return true
end

Lembrando que a storage para ganhar o item é 30 e não 10012.

Postado

Tenta ai, dei uma simplificada no script.

local tb = {
	
	[3088] = {9776, 1, "You've found a yalahari armor."},
	[3089] = {9778, 1, "You've found a yalahari mask."},
	[3090] = {9777, 1, "You've found a yalahari leg piece."}

}

function onUse(cid, item)

	local player = Player(cid)


    if player:getStorageValue(10012) == 1 then
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.")
        return true
    end

    for bau, v in pairs(tb) do
   	if item.uid == bau then
             if player:getStorageValue(30) == 53 then
            	   player:AddItem(v[1], v[2])
            	   player:setStorageValue(30, 54)
            	   player:setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle"
            	   player:sendTextMessage(MESSAGE_INFO_DESCR, v[3])
            	   break
             end
        end
    end

    player:addExperience(20000)
    player:setStorageValue(10012, 1)

    return true
end

Editado por Linus (veja o histórico de edições)

As Pessoas vivem apegadas aquilo que traduzem como correto e verdadeiro,assim elas definem a realidade.

mas oque significa o correto e o verdadeiro?

 

 

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