Ir para conteúdo

Featured Replies

Postado

How can add storage exaust this script?

when using a person the lever alos 5 them d the sotrage of exaust 1 day

Spoiler


function onUse(cid, item, fromPosition, itemEx)
    local player = Player(cid)
    if not player then
        return true
    end
            pos1 = {x = 33201, y = 31475, z = getCreaturePosition(cid).z}            
            pos2 = {x = 33200, y = 31475, z = getCreaturePosition(cid).z}
            pos3 = {x = 33199, y = 31475, z = getCreaturePosition(cid).z}
            pos4 = {x = 33198, y = 31475, z = getCreaturePosition(cid).z}
            pos5 = {x = 33197, y = 31475, z = getCreaturePosition(cid).z}
                if(isPlayer(getTopCreature(pos1).uid)) then
                    if(isPlayer(getTopCreature(pos2).uid)) then
                        if(isPlayer(getTopCreature(pos3).uid)) then
                            if(isPlayer(getTopCreature(pos4).uid)) then
                                if(isPlayer(getTopCreature(pos5).uid)) then
                                                         doSummonCreature("the lord of the lice", {x=33217, y=31454, z=12})
                                                         item:transform(item.itemid == 9825 and 9826 or 9825)                         
                                     doTeleportThing(getTopCreature(pos1).uid, {x = 33208, y = 31434, z = 12})
                
                                    else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed.")
                                        end
                                else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed.")
                                    end
                            else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed.")
                                end
                       else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed.")
                           end
                            else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed.")
                        end
    return true
end

 

Postado
function onUse(cid, item, fromPosition, itemEx)
local storage = 347356
local hours = 24 -- Hours with storage



    local player = Player(cid)
    if not player then
        return true
    end
            pos1 = {x = 33201, y = 31475, z = getCreaturePosition(cid).z}            
            pos2 = {x = 33200, y = 31475, z = getCreaturePosition(cid).z}
            pos3 = {x = 33199, y = 31475, z = getCreaturePosition(cid).z}
            pos4 = {x = 33198, y = 31475, z = getCreaturePosition(cid).z}
            pos5 = {x = 33197, y = 31475, z = getCreaturePosition(cid).z}
                if(isPlayer(getTopCreature(pos1).uid)) and getPlayerStorageValue(getTopCreature(pos1).uid, storage) == -1  then
                    if(isPlayer(getTopCreature(pos2).uid)) and getPlayerStorageValue(getTopCreature(pos2).uid, storage) == -1 then
                        if(isPlayer(getTopCreature(pos3).uid)) and getPlayerStorageValue(getTopCreature(pos3).uid, storage) == -1 then
                            if(isPlayer(getTopCreature(pos4).uid)) and getPlayerStorageValue(getTopCreature(pos4).uid, storage) == -1 then
                                if(isPlayer(getTopCreature(pos5).uid)) and getPlayerStorageValue(getTopCreature(pos5).uid, storage) == -1 then
                                                         doSummonCreature("the lord of the lice", {x=33217, y=31454, z=12})
                                                         item:transform(item.itemid == 9825 and 9826 or 9825)                         
                                     doTeleportThing(getTopCreature(pos1).uid, {x = 33208, y = 31434, z = 12})
                                     setPlayerStorageValue(getTopCreature(pos1).uid, storage + os.time + hours * 3600000, 1)
                
                                    else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours")
                                        end
                                else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours")
                                    end
                            else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours")
                                end
                       else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours")
                           end
                            else
                                                         doPlayerSendTextMessage(cid,21,"You need 5 players in certain floors to proceed or any player has completed the quest in the last 24 hours")
                        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.

Conteúdo Similar

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo