Ir para conteúdo

Killua

Conde
  • Total de itens

    904
  • Registro em

  • Última visita

  • Dias Ganhos

    13

Killua venceu a última vez em Maio 9 2015

Killua had the most liked content!

Sobre Killua

Informações

  • Char no Tibia
    Jabuti Selvagem
  • Forma que conheci o xTibia
    Otservs
  • Sou
    Scripter

Últimos Visitantes

13282 visualizações

Killua's Achievements

Atualização de Status Simples

Veja todas atualizações de Killua

  1.  
    Spoiler

     

    
    local positions = {
        {lugar = "Midgard", pos = {x=123, y=123, z=7}, price = 1000}, -- Nome do lugar, posicao do lugar
        {lugar = "Sao Paulo", pos = {x=123, y=123, z=7}, price = 13000},
        {lugar = "Carlin", pos = {x=123, y=123, z=7}, price = 1000},
        {lugar = "Venore", pos = {x=123, y=123, z=7}, price = 1000}
    }
    
    
    
    local needPz = false -- Precisa de pz? [true/false]
    local cooldown = 5 -- Tempo em segundos para poder se teleportar novamente.
    local needPrem = false --  Precisa ser premiu? [true/false]
    
    function onSay(cid, words, param, channel)
    
        local str = ""
    
        for i = 1, (#positions) do
            local cidades = positions[i].lugar
            local custo = positions[i].price
            str = str .. cidades .. ' - ' .. custo .. ' gps\n '
        end
    
        if param == "" then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Para se teleportar diga !teleport LUGAR.\nLugares disponiveis:\n " .. str .. " \n Escolha seu destino e boa viagem!")
        end
            
        for _, abc in pairs(positions) do
    
            if param:lower() == abc.lugar:lower() then
                
                if needPz == true and getTilePzInfo(getCreaturePosition(cid)) == false then
                    return doPlayerSendCancel(cid, "Voce precisa estar em PZ para teleportar.")
                elseif getPlayerStorageValue(cid, 23121) > os.time() then
                    return doPlayerSendCancel(cid, "Voce deve esperar mais " .. getPlayerStorageValue(cid, 23121) - os.time() .. " segundos para se teleportar novamente.")
                elseif needPrem == true and not isPremium(cid) then
                    return doPlayerSendCancel(cid, "Somente jogadores premium podem teleportar.")
                elseif getPlayerMoney(cid) < abc.price then
                    return doPlayerSendCancel(cid, "Voce nao tem dinheiro.")      
                end
    
                doPlayerSetStorageValue(cid, 23121, os.time() + cooldown)
                doPlayerRemoveMoney(cid, abc.price)
                doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
                doTeleportThing(cid, abc.pos)
                doPlayerSendTextMessage(cid, 25, "Bem vindo a " .. abc.lugar.. "!")
                doSendMagicEffect(abc.pos, CONST_ME_TELEPORT)
            end
        end
        return true
    end

     

    opa eai mano, eu encotrei um script seu e gostaria de sua ajuda para modificar um pouco ele, em vez de cobrar por viagem teria como fazer que o player tenha um item X scroll por exemplo para poder usar o camando sem que remova o item

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...