Ir para conteúdo

vinicius231

Artesão
  • Total de itens

    112
  • Registro em

  • Última visita

  • Dias Ganhos

    2

Posts postados por vinicius231

  1. Novo Servidor De Poketibia Base Shiny/Virus/Old MMORPG ONLINE!!


    Informações do Servidor:

     

    Citar

    Servidor De Poketibia MMORPG Baseado em Tibia Pokemon, Base Shiny e Old.
    5 Meses online.

     

    Sistemas:
     

    Level Sistema (O Pokemon Possui Level)

    Poke Bar System ( O Jogador pode escolher o seu pokemon com a Lista Pokemon)

    Shiny System ( O Pokemon pode evoluir para Shiny, Exemplo: Metagross Para Shiny Metagross)

    Addon System ( O Jogador pode colocar roupas no seu pokemon)

    Barra de Ataques ( O Client Possui uma lista de moves dos pokemons)

    Poke Info ( O Client Possui uma Poke Info com as informações dos pokemons)

    Pokedex ( O Jogador Pode usar a Pokedex em um pokemon para saber suas informações)

    Bike System ( O Jogador Pode usar uma Bike para se locomover mais rapido)

    Stone System ( O Jogador pode evoluir um pokemon com uma stone)

    Quests ( Diversas Missões e Quests para o Jogador fazer)

    Torneio System ( Batalhas Pokemons Diarias, tendo apenas 1 campeão)

     

    Rates:

    XP Media/Facil
    Catch Facil/Medio


     

    Outros:

    Administração ativa
    Eventos Semanais 
    Staff Ativa
    Site online
    Discord
    Atualizações Mensais 
    Novos Pokemons
    1°, 2° , 3° ,4° e 5° Geração completa
    Novos Continentes 
    Fly/Surf Free


     

    Beneficios Vip:
     

    Hunts Exclusivas 
    Quests Exclusivas
    Teleport para qualquer cidade
    NPC Citero, ele levara voce para hunts
    Items exclusivos
    XP exclusiva
    Continente Exclusivo
    Pokemons Exclusivos

     



    Imagens:

     

    Citar




    Screenshot_28.thumb.png.8e1ba2c62d38e23c75d719a3d0cc1f3e.pngScreenshot_29.thumb.png.f64684822d30c01826611a0a7b430f0c.pngScreenshot_30.thumb.png.855acd8ff90761182c6fb2af7fb88be3.png


    Screenshot_32.thumb.png.44bf500f6b81e547b70586b1cda7f785.pngScreenshot_33.png.73d8cebec8bbf04cff3bdab50ce32fb1.png
    Site.thumb.png.bedda6c17662eca535f3a90543b93579.pngClient.thumb.png.0a9a775490fdd6b3e59c9319c2513bbd.pngScreenshot_3.thumb.png.8cb9b8b8a3461b21ecd1c559d86f55a5.pngScreenshot_4.thumb.png.6d5724accf233c02a591a79d3dd2ff12.pngScreenshot_5.thumb.png.f84999a561edc7e69c8e9ed591c47305.pngScreenshot_6.thumb.png.bc4dbac430ec3ec59c6862e1bd1861a6.pngScreenshot_7.thumb.png.8b819e6fc8eca46b4c0d29a795ffa57d.pngScreenshot_8.thumb.png.d966a942771c0215f26c0d3e2659b17b.pngScreenshot_9.thumb.png.5343ab366a98b47c1aca42f9c53abf7d.pngScreenshot_10.thumb.png.2df48bf71f7d3970dd0b3c0e834877e3.pngScreenshot_16.thumb.png.1fa9e00f7e1564c764bcc058f969763c.pngScreenshot_17.thumb.png.fca97a5f51dbf4f98adbab24a194ee55.pngScreenshot_18.png.6c3fa570cb7db8587a73e03548726832.pngScreenshot_19.thumb.png.d2b66c2eca78470b92069d89ca799dbb.pngScreenshot_20.thumb.png.3d1dfc8df98b49286ab1d8ddc759106b.pngScreenshot_21.thumb.png.942b12ef185bdebce0704a821db62ddf.pngScreenshot_22.thumb.png.0b53fb94029fe64b143b30fbbbf2cb29.pngScreenshot_23.thumb.png.51db346304ff460aa98e348967eaa42b.pngScreenshot_24.thumb.png.12c3634d832e326beb01a26ec3fe1900.pngScreenshot_25.thumb.png.91626e9a61c80184a2a0bcf814803f87.pngScreenshot_26.thumb.png.98b0f22e13d6d67e23f177f7344f6086.pngScreenshot_27.thumb.png.2e7d695e6a6b3dd479865ccacf985cc5.png
    Screenshot_31.png



    Discord https://discordapp.com/invite/ZwPe7EK
    Site http://pokemonwind.com.br

  2. 7 horas atrás, Ewerlonn disse:

    Ja serve manda ai amigo

    Em Npc copie e cole qualquer arquivo, coloque o nome desejado e  coloque isso dentro:
     

    Citar

    <?xml version="1.0"?>
    <npc name="NOME DO NPC" script="NOME DO 2° ARQUIVO.lua" walkinterval="350000" floorchange="0" speed="0">
    <health now="15" max="15"/>
    <look type="2608" head="91" body="102" legs="83" feet="0" corpse="3058"/>
              <parameters>
                        <parameter key="message_greet" value="Olá |PLAYERNAME|.você quer ver os items que estou vendendo? " />
                        <parameter key="message_farewell" value="Adeus!" />
              </parameters>
    </npc>



    Em NPC/Scripts Copie e cole qualquer arquivo coloque o nome que quiser em seguida apague tudo que esta dentro e cole isso:
     

    Citar

    local keywordHandler = KeywordHandler:new()
    local npcHandler = NpcHandler:new(keywordHandler)
    NpcSystem.parseParameters(npcHandler)
    local talkState = {}
    function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
    function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
    function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
    function onThink() npcHandler:onThink() end
    function creatureSayCallback(cid, type, msg)
    if(not npcHandler:isFocused(cid)) then
    return false
    end
    local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
    local shopWindow = {}
    local moeda = 16079 -- Id Da Moeda que o Npc ira pedir
    local t = {
     [13088] = {price = 9},
     [13088] = {price = 9},
     [13559] = {price = 9}, -- [ID DO ITEM] ={Price = Valor do Item} 
     [13560] = {price = 9},
     [13561] = {price = 9}
     
     }
    local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    if  t[item] and not doPlayerRemoveItem(cid, moeda, t[item].price) then
     selfSay("você não tem "..t[item].price.." "..getItemNameById(moeda), cid)
    else
    doPlayerAddItem(cid, item)
    selfSay("aqui está seu item!", cid)
      end
    return true
    end
    if (msgcontains(msg, 'trade') or msgcontains(msg, 'TRADE'))then
    for var, ret in pairs(t) do
    table.insert(shopWindow, {id = var, subType = 0, buy = ret.price, sell = 0, name = getItemNameById(var)})
    end
    openShopWindow(cid, shopWindow, onBuy, onSell)
    end
    return true
    end
    npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    npcHandler:addModule(FocusModule:new())

     

  3. 5 horas atrás, Ewerlonn disse:

    Eu não achei no fórum não sei porque '- mas alguem teria um NPC que vende movéis? De preferencia todos os moveis. OtServ 8.6 TFS 0.4

    Olá, olha eu acho que tenho uma script que uso no meu server que eu vendo alguns moveis, mas ela e configuravel, ou seja, voce tera que configurar, colocando os ids e os preços

  4. Boa noite comunidade!!?


    Bom eu gostaria de tirar uma duvida?

    No meu servidor o PvP e muito desbalanceado, por exemplo:

    Um Caterpie mata um Regirock com 2 ataques...... Isso mesmo kkkk ?

    Eu gostaria de saber se tem alguma forma de balancear isso, quem poder me ajudar, agradeço ;) 




    Obs: Tipo de script coloquei uma qualquer, nao entendo de pvp por isso a pergunta!! 

  5. 2 horas atrás, XZero disse:

    Vai na pasta data/globalevents e no arquivo globalevents.xml coloca:

      Ocultar conteúdo

    <globalevent name="save" interval="1800" event="script" value="save.lua"/>

     

    Na pasta data/globalevents/scripts cria um novo arquivo chamado save.lua e coloque isso dentro:

      Ocultar conteúdo

    function onThink(interval, lastExecution, thinkInterval)
        doSaveServer()
    return true
    end

     

    Mas lembre-se o forum as vezes coloca uns caraters no texto que só pode ser vista com codificação ANSI exemplo:

    <global@@ev@ent name="save" interv??al="1800" event="scrip???t" valu@e="save.lua"/>??

     

     

    Vou testar aqui amigo!!

    Sim eu sei sobre os caracteres ;) 

  6. 9 minutos atrás, XZero disse:

    @vinicius231 

    Vota a minha resposta como positiva, se tiver ajudado, eu acho que deixa o topico como resolvido!

    Aqui: https://pastebin.com/4hwJEqVY

    1. local x = getTopCreature(toPos).uid
    2. if isPlayer(x) and getPlayerGroupId(x) > 1 then
    3.     local p = getCreatureName(cid)
    4.     local color = 210
    5.     doSendAnimatedText(toPos, p, color)
    6. end

    Ta aparecendo para todos , tem como esconder e deixar apenas para quem usa o ghost , que no caso e o group 5 e 6?

  7. 2 horas atrás, XZero disse:

    @vinicius231 Vai na linha 154 e adiciona isso: https://pastebin.com/sqRfUYWp

    1. local x = getTopCreature(toPos).uid
    2. if isPlayer(x) and getPlayerGroupId(x) > 1 then
    3.     doPlayerSendTextMessage(x, 20, "O Player "..getCreatureName(cid).." esta pescando nesse local.")
    4. end

    Mano pegou , muito obrigado, se não for abusar da generosidade,

    Tem como a mensagem ser igual ta no video? 

    Ai como ficou http://prntscr.com/o6p13g

    Ou na tela mesmo no server log , mas se não tiver não tem problema

  8. 11 horas atrás, XZero disse:

    @vinicius231 Isso é bem simples apenas me mande seu arquivo de pesca!

    Citar

    local fishing = {
    ["Magikarp"] = {skill = 1, level = -2},
    ["Poliwag"] = {skill = 1, level = 6},
    ["Goldeen"] = {skill = 1, level = 5},
    ["Krabby"] = {skill = 10, level = 2},
    ["Horsea"] = {skill = 10, level = 3},
    ["Corphish"] = {skill = 20, level = 11},
    ["Wooper"] = {skill = 20, level = 20},
    ["Mantyke"] = {skill = 20, level = 30},
    ["Chinchou"] = {skill = 20, level = 6},
    ["Tentacool"] = {skill = 20, level = 14},
    ["Seaking"] = {skill = 40, level = 13},
    ["Barboach"] = {skill = 40, level = 25},
    ["Finneon"] = {skill = 40, level = 15},
    ["Staryu"] = {skill = 40, level = 15},
    ["Psyduck"] = {skill = 40, level = 35},
    ["Sharpedo"] = {skill = 60, level = 15},
    ["Kingler"] = {skill = 60, level = 20},
    ["Lumineon"] = {skill = 60, level = 20},
    ["Crawdaunt"] = {skill = 60, level = 30},
    ["Seadra"] = {skill = 60, level = 70},
    ["Gorebyss"] = {skill = 60, level = 70},
    ["Huntail"] = {skill = 60, level = 70},
    ["Starmie"] = {skill = 80, level = 80},
    ["Mantine"] = {skill = 80, level = 80},
    ["Qwilfish"] = {skill = 80, level = 80},
    ["Remoraid"] = {skill = 80, level = 80},
    ["Poliwhirl"] = {skill = 80, level = 80},
    ["Whiscash"] = {skill = 80, level = 80},
    ["Tentacruel"] = {skill = 80, level = 80},
    ["Lanturn"] = {skill = 100, level = 100},
    ["Quagsire"] = {skill = 100, level = 100},
    ["Gyarados"] = {skill = 120, level = 120},
    ["Lapras"] = {skill = 120, level = 120},
    ["Golduck"] = {skill = 80, level = 140},
    ["Blastoise"] = {skill = 120, level = 160},
    ["Feraligatr"] = {skill = 120, level = 160},
    ["Azumarill"] = {skill = 120, level = 120},
    ["Politoed"] = {skill = 120, level = 120},
    ["Kingdra"] = {skill = 120, level = 120},
    ["Prinplup"] = {skill = 120, level = 120},
    ["Empoleon"] = {skill = 120, level = 120},
    ["Floatzel"] = {skill = 120, level = 120},
    ["Wailord"] = {skill = 120, level = 120},
    ["Horsea"] = {skill = 120, level = 170},
    }

    local storage = 15458
    local bonus = 1
    local limite = 171


    local function doFish(cid, pos, ppos, chance, interval, number)
          if not isCreature(cid) then return false end
          if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then
             return false 
          end
          if getPlayerStorageValue(cid, storage) ~= number then return false end
          
          doSendMagicEffect(pos, CONST_ME_LOSEENERGY)

          local peixe = 0
          local playerpos = getClosestFreeTile(cid, getThingPos(cid))
          local fishes = {}
          local randomfish = ""

          if getPlayerSkillLevel(cid, 6) < limite then 
             doPlayerAddSkillTry(cid, 6, bonus)
          end

          for a, b in pairs (fishing) do
              if getPlayerSkillLevel(cid, 6) >= b.skill then
                 table.insert(fishes, a)
              end
          end

          if math.random(1, 100) <= chance then
          if getPlayerSkillLevel(cid, 6) < limite then 
             doPlayerAddSkillTry(cid, 6, bonus)
          end
             randomfish = fishes[math.random(#fishes)]
             peixe = doSummonCreature(randomfish, playerpos)
             doSendMagicEffect(pos, CONST_ME_WATERSPLASH)
             if not isCreature(peixe) then
                return true
             end
             if #getCreatureSummons(cid) >= 1 then
                doChallengeCreature(getCreatureSummons(cid)[1], peixe)
               else
                doSendMagicEffect(getThingPos(cid), 173)
                doChallengeCreature(cid, peixe)
               end
             return true
          end
    return true
    end

    local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825}

    local radius = 0

    function getCreaturesInRangeTT(position, radiusx, radiusy, showMonsters, showPlayers) 
        local creaturesList,radiusx,radiusy = {},radiusx or 0,radiusy or 0 
        for x = -radiusx, radiusx do 
            for y = -radiusy, radiusy do 
          local creature = getTopCreature({x = position.x+x, y = position.y+y, z = position.z, stackpos = STACKPOS_TOP_CREATURE})
             if (creature.type == 1 and showPlayers == true) or (creature.type == 2 and showMonsters == true) then 
                if(not isPlayerGhost(creature.uid)) then
                                        table.insert(creaturesList, creature.uid) 
                         end
             end 
            end 
        end 
        return creaturesList 
    end 
     
     
    function onUse(cid, item, fromPos, itemEx, toPos)
    if getPlayerGroupId(cid) == 11 then
    return true
    end


    local checkPos = toPos
    checkPos.stackpos = 0

    if getTileThingByPos(checkPos).itemid <= 0 then
       doPlayerSendCancel(cid, '!')
       return true
    end

    if not isInArray(waters, getTileInfo(toPos).itemid) then
       return true
    end

    if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then
       doPlayerSendCancel(cid, "Voce não pode pescar em quanto surfa ou voa.")
       return true
    end

    if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then
       doPlayerSendCancel(cid, "Voce não pode pescar em quanto surfa ou voa.")
       return true
    end

    if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then
        doPlayerSendCancel(cid, "Você não pode pescar e  atacar com o seu pokémon na area de proteção.")
    return true
    end

    if(#getCreaturesInRangeTT(toPos, radius, radius, false, true) > 0) then 
    return true
    end

    if not tonumber(getPlayerStorageValue(cid, storage)) then
        local test = io.open("data/sendtobrun123.txt", "a+")
        local read = ""
        if test then
            read = test:read("*all")
            test:close()
        end
        read = read.."\n[fishing.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, storage)..""
        local reopen = io.open("data/sendtobrun123.txt", "w")
        reopen:write(read)
        reopen:close()
        setPlayerStorageValue(cid, storage, 1)
    end

    setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)
    if getPlayerStorageValue(cid, storage) >= 800 then
       setPlayerStorageValue(cid, storage, 1)
    end

    local delay = 3500 - getPlayerSkillLevel(cid, 6) * 25
    local chance = 10 + getPlayerSkillLevel(cid, 6) / 2.5

    doFish(cid, toPos, getThingPos(cid), chance, delay, getPlayerStorageValue(cid, storage))

    return true
    end

    Aqui esta o fishing da pasta actions

  9. 2 minutos atrás, ZikaLord disse:

    me passa sua 050-function.lua

    Citar

    function doPlayerGiveItem(cid, itemid, amount, subType)
        local item = 0
        if(isItemStackable(itemid)) then
            item = doCreateItemEx(itemid, amount)
            if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then
                return false
            end
        else
            for i = 1, amount do
                item = doCreateItemEx(itemid, subType)
                if(doPlayerAddItemEx(cid, item, true) ~= RETURNVALUE_NOERROR) then
                    return false
                end
            end
        end

        return true
    end

    function doPlayerGiveItemContainer(cid, containerid, itemid, amount, subType)
        for i = 1, amount do
            local container = doCreateItemEx(containerid, 1)
            for x = 1, getContainerCapById(containerid) do
                doAddContainerItem(container, itemid, subType)
            end

            if(doPlayerAddItemEx(cid, container, true) ~= RETURNVALUE_NOERROR) then
                return false
            end
        end

        return true
    end

    function doPlayerTakeItem(cid, itemid, amount)
        return getPlayerItemCount(cid, itemid) >= amount and doPlayerRemoveItem(cid, itemid, amount)
    end

    function doPlayerBuyItem(cid, itemid, count, cost, charges)
        return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItem(cid, itemid, count, charges)
    end

    function doPlayerBuyItemContainer(cid, containerid, itemid, count, cost, charges)
        return doPlayerRemoveMoney(cid, cost) and doPlayerGiveItemContainer(cid, containerid, itemid, count, charges)
    end

    function doPlayerSellItem(cid, itemid, count, cost)
        if(not doPlayerTakeItem(cid, itemid, count)) then
            return false
        end

        if(not doPlayerAddMoney(cid, cost)) then
            error('[doPlayerSellItem] Could not add money to: ' .. getPlayerName(cid) .. ' (' .. cost .. 'gp).')
        end

        return true
    end

    function doPlayerWithdrawMoney(cid, amount)
        if(not getBooleanFromString(getConfigInfo('bankSystem'))) then
            return false
        end

        local balance = getPlayerBalance(cid)
        if(amount > balance or not doPlayerAddMoney(cid, amount)) then
            return false
        end

        doPlayerSetBalance(cid, balance - amount)
        return true
    end

    function doPlayerDepositMoney(cid, amount)
        if(not getBooleanFromString(getConfigInfo('bankSystem'))) then
            return false
        end

        if(not doPlayerRemoveMoney(cid, amount)) then
            return false
        end

        doPlayerSetBalance(cid, getPlayerBalance(cid) + amount)
        return true
    end

    function isPremium(cid)
        return (isPlayer(cid) and (getPlayerPremiumDays(cid) > 0 or getBooleanFromString(getConfigInfo('freePremium'))))
    end

    function getMonthDayEnding(day)
        if(day == "01" or day == "21" or day == "31") then
            return "st"
        elseif(day == "02" or day == "22") then
            return "nd"
        elseif(day == "03" or day == "23") then
            return "rd"
        end

        return "th"
    end

    function getMonthString(m)
        return os.date("%B", os.time{year = 1970, month = m, day = 1})
    end

    function getArticle(str)
        if str:find("[AaEeIiOoUuYy]") then 
           return str:find("[AaEeIiOoUuYy]") == 1 and "an" or "a"
        else
           print("Error trying to use Look.lua in a pokeball!!")
           return "a"
        end
    end

    function isNumber(str)
        return tonumber(str) ~= nil
    end

    function doPlayerAddAddons(cid, addon)
        for i = 0, table.maxn(maleOutfits) do
            doPlayerAddOutfit(cid, maleOutfits, addon)
        end

        for i = 0, table.maxn(femaleOutfits) do
            doPlayerAddOutfit(cid, femaleOutfits, addon)
        end
    end

    function doPlayerWithdrawAllMoney(cid)
        return doPlayerWithdrawMoney(cid, getPlayerBalance(cid))
    end

    function doPlayerDepositAllMoney(cid)
        return doPlayerDepositMoney(cid, getPlayerMoney(cid))
    end

    function doPlayerTransferAllMoneyTo(cid, target)
        return doPlayerTransferMoneyTo(cid, target, getPlayerBalance(cid))
    end

    function playerExists(name)
        return getPlayerGUIDByName(name) ~= 0
    end

    function getTibiaTime()
        local minutes = getWorldTime()
        local hours = 0
        while (minutes > 60) do
            hours = hours + 1
            minutes = minutes - 60
        end

        return {hours = hours, minutes = minutes}
    end

    function doWriteLogFile(file, text)
        local f = io.open(file, "a+")
        if(not f) then
            return false
        end

        f:write("[" .. os.date("%d/%m/%Y %H:%M:%S") .. "] " .. text .. "\n")
        f:close()
        return true
    end

    function getExperienceForLevel(lv)
        lv = lv - 1
        return ((50 * lv * lv * lv) - (150 * lv * lv) + (400 * lv)) / 3
    end

    function doMutePlayer(cid, time)
        local condition = createConditionObject(CONDITION_MUTED)
        setConditionParam(condition, CONDITION_PARAM_TICKS, time * 1000)
        return doAddCondition(cid, condition)
    end

    function getPlayerGroupName(cid)
        return getGroupInfo(getPlayerGroupId(cid)).name
    end

    function getPlayerVocationName(cid)
        return getVocationInfo(getPlayerVocation(cid)).name
    end

    function getPromotedVocation(vid)
        return getVocationInfo(vid).promotedVocation
    end

    function doPlayerRemovePremiumDays(cid, days)
        return doPlayerAddPremiumDays(cid, -days)
    end

    function getPlayerMasterPos(cid)
        return getTownTemplePosition(getPlayerTown(cid))
    end

    function getHouseOwner(houseId)
        return getHouseInfo(houseId).owner
    end

    function getHouseName(houseId)
        return getHouseInfo(houseId).name
    end

    function getHouseEntry(houseId)
        return getHouseInfo(houseId).entry
    end

    function getHouseRent(houseId)
        return getHouseInfo(houseId).rent
    end

    function getHousePrice(houseId)
        return getHouseInfo(houseId).price
    end

    function getHouseTown(houseId)
        return getHouseInfo(houseId).town
    end

    function getHouseTilesCount(houseId)
        return getHouseInfo(houseId).tiles
    end

    function getItemNameById(itemid)
        return getItemDescriptionsById(itemid).name
    end

    function getItemPluralNameById(itemid)
        return getItemDescriptionsById(itemid).plural
    end

    function getItemArticleById(itemid)
        return getItemDescriptionsById(itemid).article
    end

    function getItemName(uid)
        return getItemDescriptions(uid).name
    end

    function getItemPluralName(uid)
        return getItemDescriptions(uid).plural
    end

    function getItemArticle(uid)
        return getItemDescriptions(uid).article
    end

    function getItemText(uid)
        return getItemDescriptions(uid).text
    end

    function getItemSpecialDescription(uid)
        return getItemDescriptions(uid).special
    end

    function getItemWriter(uid)
        return getItemDescriptions(uid).writer
    end

    function getItemDate(uid)
        return getItemDescriptions(uid).date
    end

    function getTilePzInfo(pos)
        return getTileInfo(pos).protection
    end

    function getTileZoneInfo(pos)
        local tmp = getTileInfo(pos)
        if(tmp.pvp) then
            return 2
        end

        if(tmp.nopvp) then
            return 1
        end

        return 0
    end

    function doShutdown()
        return doSetGameState(GAMESTATE_SHUTDOWN)
    end

    function doSummonCreature(name, pos, displayError)
        local displayError, cid = displayError or true, doCreateMonster(name, pos, displayError)
        if(not cid) then
            cid = doCreateNpc(name, pos, displayError)
        end

        return cid
    end

    function getOnlinePlayers()
        local tmp = getPlayersOnline()
        local players = {}
        for i, cid in ipairs(tmp) do
            table.insert(players, getCreatureName(cid))
        end

        return players
    end

    function getPlayerByName(name)
        local cid = getCreatureByName(name)
        return isPlayer(cid) and cid or nil
    end

    function isPlayer(cid)
        return isCreature(cid) and cid >= AUTOID_PLAYERS and cid < AUTOID_MONSTERS
    end

    function isPlayerGhost(cid)
        if(not isPlayer(cid)) then
            return false
        end

        return getCreatureCondition(cid, CONDITION_GAMEMASTER, GAMEMASTER_INVISIBLE) or getPlayerFlagValue(cid, PLAYERFLAG_CANNOTBESEEN)
    end

    function isMonster(cid)
        return isCreature(cid) and cid >= AUTOID_MONSTERS and cid < AUTOID_NPCS
    end

    function isNpc(cid)
        return isCreature(cid) and cid >= AUTOID_NPCS
    end

    function doPlayerSetExperienceRate(cid, value)
        return doPlayerSetRate(cid, SKILL__LEVEL, value)
    end

    function doPlayerSetMagicRate(cid, value)
        return doPlayerSetRate(cid, SKILL__MAGLEVEL, value)
    end

    function doPlayerAddLevel(cid, amount, round)
        local experience, level = 0, getPlayerLevel(cid)
        if(amount > 0) then
            experience = getExperienceForLevel(level + amount) - (round and getPlayerExperience(cid) or getExperienceForLevel(level))
        else
            experience = -((round and getPlayerExperience(cid) or getExperienceForLevel(level)) - getExperienceForLevel(level + amount))
        end

        return doPlayerAddExperience(cid, experience)
    end

    function doPlayerAddMagLevel(cid, amount)
        for i = 1, amount do
            doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic'))
        end
        return true
    end  

    function doPlayerAddSkill(cid, skill, amount, round)
        amount = tonumber(amount) or 1
        if amount <= 0 then amount = 1 end
                                             
        if(skill == SKILL__LEVEL) then    
            return doPlayerAddLevel(cid, amount, round)
        elseif(skill == SKILL__MAGLEVEL) then
            return doPlayerAddMagLevel(cid, amount)
        end

        for i = 1, amount do
            doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill'))
        end
        return true
    end

    function getPartyLeader(cid)
        local party = getPartyMembers(cid)
        if(type(party) ~= 'table') then
            return 0
        end

        return party[1]
    end

    function isInParty(cid)
        return type(getPartyMembers(cid)) == 'table'
    end

    function isPrivateChannel(channelId)
        return channelId >= CHANNEL_PRIVATE
    end

    function doPlayerResetIdleTime(cid)
        return doPlayerSetIdleTime(cid, 0)
    end

    function doBroadcastMessage(text, class)
        local class = class or MESSAGE_STATUS_WARNING
        if(type(class) == 'string') then
            local className = MESSAGE_TYPES[class]
            if(className == nil) then
                return false
            end

            class = className
        elseif(class < MESSAGE_FIRST or class > MESSAGE_LAST) then
            return false
        end

        local players = getPlayersOnline()
        for _, pid in ipairs(players) do
            doPlayerSendTextMessage(pid, class, text)
        end

        print("> Broadcasted message: \"" .. text .. "\".")
        return true
    end

    function doPlayerBroadcastMessage(cid, text, class, checkFlag, ghost)
        local checkFlag, ghost, class = checkFlag or true, ghost or false, class or TALKTYPE_BROADCAST
        if(checkFlag and not getPlayerFlagValue(cid, PLAYERFLAG_CANBROADCAST)) then
            return false
        end

        if(type(class) == 'string') then
            local className = TALKTYPE_TYPES[class]
            if(className == nil) then
                return false
            end

            class = className
        elseif(class < TALKTYPE_FIRST or class > TALKTYPE_LAST) then
            return false
        end

        local players = getPlayersOnline()
        for _, pid in ipairs(players) do
            doCreatureSay(cid, text, class, ghost, pid)
        end

        print("> " .. getCreatureName(cid) .. " broadcasted message: \"" .. text .. "\".")
        return true
    end

    function getBooleanFromString(input)
        local tmp = type(input)
        if(tmp == 'boolean') then
            return input
        end

        if(tmp == 'number') then
            return input > 0
        end

        local str = string.lower(tostring(input))
        return (str == "yes" or str == "true" or (tonumber(str) ~= nil and tonumber(str) > 0))
    end

    function doCopyItem(item, attributes)
        local attributes = attributes or false

        local ret = doCreateItemEx(item.itemid, item.type)
        if(attributes) then
            if(item.actionid > 0) then
                doItemSetAttribute(ret, "aid", item.actionid)
            end
        end

        if(isContainer(item.uid)) then
            for i = (getContainerSize(item.uid) - 1), 0, -1 do
                local tmp = getContainerItem(item.uid, i)
                if(tmp.itemid > 0) then
                    doAddContainerItemEx(ret, doCopyItem(tmp, true).uid)
                end
            end
        end

        return getThing(ret)
    end

    function doRemoveThing(uid)
        if(isCreature(uid)) then
            return doRemoveCreature(uid)
        end

        return doRemoveItem(uid)
    end

    function setAttackFormula(combat, type, minl, maxl, minm, maxm, min, max)
        local min, max = min or 0, max or 0
        return setCombatFormula(combat, type, -1, 0, -1, 0, minl, maxl, minm, maxm, min, max)
    end

    function setHealingFormula(combat, type, minl, maxl, minm, maxm, min, max)
        local min, max = min or 0, max or 0
        return setCombatFormula(combat, type, 1, 0, 1, 0, minl, maxl, minm, maxm, min, max)
    end

    function doChangeTypeItem(uid, subtype)
        local thing = getThing(uid)
        if(thing.itemid < 100) then
            return false
        end

        local subtype = subtype or 1
        return doTransformItem(thing.uid, thing.itemid, subtype)
    end

    function doSetItemText(uid, text, writer, date)
        local thing = getThing(uid)
        if(thing.itemid < 100) then
            return false
        end

        doItemSetAttribute(uid, "text", text)
        if(writer ~= nil) then
            doItemSetAttribute(uid, "writer", tostring(writer))
            if(date ~= nil) then
                doItemSetAttribute(uid, "date", tonumber(date))
            end
        end

        return true
    end

    function getFluidSourceType(itemid)
        local item = getItemInfo(itemid)
        return item and item.fluidSource or false
    end

    function getDepotId(uid)
        return getItemAttribute(uid, "depotid") or false
    end

    function getItemDescriptions(uid)
        local thing = getThing(uid)
        if(thing.itemid < 100) then
            return false
        end

        local item = getItemInfo(thing.itemid)
        return {
            name = getItemAttribute(uid, "name") or item.name,
            plural = getItemAttribute(uid, "pluralname") or item.plural,
            article = getItemAttribute(uid, "article") or item.article,
            special = getItemAttribute(uid, "description") or "",
            text = getItemAttribute(uid, "text") or "",
            writer = getItemAttribute(uid, "writer") or "",
            date = getItemAttribute(uid, "date") or 0
        }    
    end

    function getItemWeightById(itemid, count, precision)
        local item, count, precision = getItemInfo(itemid), count or 1, precision or false
        if(not item) then
            return false
        end

        if(count > 100) then
            -- print a warning, as its impossible to have more than 100 stackable items without "cheating" the count
            print('[Warning] getItemWeightById', 'Calculating weight for more than 100 items!')
        end

        local weight = item.weight * count
        --[[if(precision) then
            return weight
        end

        local t = string.explode(tostring(weight), ".")
        if(table.maxn(t) == 2) then
            return tonumber(t[1] .. "." .. string.sub(t[2], 1, 2))
        end]]--

        return weight
    end

    function getItemWeaponType(uid)
        local thing = getThing(uid)
        if(thing.itemid < 100) then
            return false
        end

        return getItemInfo(thing.itemid).weaponType
    end

    function getItemRWInfo(uid)
        local thing = getThing(uid)
        if(thing.itemid < 100) then
            return false
        end

        local item, flags = getItemInfo(thing.itemid), 0
        if(item.readable) then
            flags = 1
        end

        if(item.writable) then
            flags = flags + 2
        end

        return flags
    end

    function getItemLevelDoor(itemid)
        local item = getItemInfo(itemid)
        return item and item.levelDoor or false
    end

    function isItemStackable(itemid)
        local item = getItemInfo(itemid)
        return item and item.stackable or false
    end

    function isItemRune(itemid)
        local item = getItemInfo(itemid)
        return item and item.clientCharges or false
    end

    function isItemDoor(itemid)
        local item = getItemInfo(itemid)
        return item and item.type == 5 or false
    end

    function isItemContainer(itemid)
        local item = getItemInfo(itemid)
        return item and item.group == 2 or false
    end

    function isItemFluidContainer(itemid)
        local item = getItemInfo(itemid)
        return item and item.group == 12 or false
    end

    function isItemMovable(itemid)
        local item = getItemInfo(itemid)
        return item and item.movable or false
    end

    function isCorpse(uid)
        local thing = getThing(uid)
        if(thing.itemid < 100) then
            return false
        end

        local item = getItemInfo(thing.itemid)
        return item and item.corpseType ~= 0 or false
    end

    function getContainerCapById(itemid)
        local item = getItemInfo(itemid)
        if(not item or item.group ~= 2) then
            return false
        end

        return item.maxItems
    end

    function getMonsterAttackSpells(name)
        local monster = getMonsterInfo(name)
        return monster and monster.attacks or false
    end

    function getMonsterHealingSpells(name)
        local monster = getMonsterInfo(name)
        return monster and monster.defenses or false
    end

    function getMonsterLootList(name)
        local monster = getMonsterInfo(name)
        return monster and monster.loot or false
    end

    function getMonsterSummonList(name)
        local monster = getMonsterInfo(name)
        return monster and monster.summons or false
    end


    function getPlayersInArea(area)
    local players = {}

    for x = area.fromx,area.tox do
    for y = area.fromy,area.toy do
    for z = area.fromz,area.toz do

    local m = getTopCreature({x=x, y=y, z=z}).uid

    if m ~= 0 and isPlayer(m) then
    table.insert(players, m)
    end
    end
    end
    end
    return players
    end

    function getPlayerMarriage(player)
    local rows = db.getResult("SELECT `marriage` FROM `players` WHERE `id` = " .. player .. ";")
    local marry = rows:getDataInt("marriage")
    if marry ~= 0 then
    return marry
    else
    return FALSE
    end
    end

    function addMarryStatus(player,partner)
    db.executeQuery("UPDATE `players` SET `marrystatus` = " .. partner .. " WHERE `id` = " .. player .. ";")
    return TRUE
    end

    function doCancelMarryStatus(player)
    db.executeQuery("UPDATE `players` SET `marrystatus` = 0 WHERE `id` = " .. player .. ";")
    return TRUE
    end

    function getMarryStatus(player)
    local stat = db.getResult("SELECT `id` FROM `players` WHERE `marrystatus` = " .. player .. ";")
    if(stat:getID() == -1) then
    return FALSE
    else
    local info = stat:getDataInt("id")
    return info
    end
    end

    function getOwnMarryStatus(player)
    local stat = db.getResult("SELECT `marrystatus` FROM `players` WHERE `id` = " .. player .. ";")
    if(stat:getID() == -1) then
    return FALSE
    else
    local info = stat:getDataInt("marrystatus")
    return info
    end
    end

    function isOnline(player)
    local rows = db.getResult("SELECT `online` FROM `players` WHERE `id` = " .. player .. ";")
    local on = rows:getDataInt("online")
    if on ~= 0 then
    return TRUE
    else
    return FALSE
    end
    end

    function getPartner(cid)
    if isPatner(cid) then
    a = db.getResult("SELECT player_id FROM marriage_system WHERE partner = '"..getPlayerGUID(cid).."';")
    b = "player_id"
    else
    a = db.getResult("SELECT partner FROM marriage_system WHERE player_id = '"..getPlayerGUID(cid).."';")
    b = "partner"
    end
    end

     

  10. 1 minuto atrás, ZikaLord disse:

    Botão? como assim? botão onde?

    passa o erro para eu arrumar

    "Embrulhar"

    Eu queria que o tapete fosse estendido no chão direto da bag ou do proprio chão , o erro acontece quando tento estender ele direto da bag , dai ele some e causa um errinho.
    Se poder fazer isso agradeço, ou apenas corrigir esse erro ;) 

    erro

    Citar


    [19/06/2019 16:41:55] [Error - Action Interface] 
    [19/06/2019 16:41:55] datapack/actions/scripts/tapetes/tapete.lua:onUse
    [19/06/2019 16:41:55] Description: 
    [19/06/2019 16:41:55] datapack/lib/050-function.lua:199: attempt to index a boolean value
    [19/06/2019 16:41:55] stack traceback:
    [19/06/2019 16:41:55]     datapack/lib/050-function.lua:199: in function 'getHouseOwner'
    [19/06/2019 16:41:55]     datapack/actions/scripts/tapetes/tapete.lua:12: in function <datapack/actions/scripts/tapetes/tapete.lua:7>
    [19/06/2019 16:42:51] Tsuu has logged out.

    [19/06/2019 16:43:10] [Error - Action Interface] 
    [19/06/2019 16:43:10] datapack/actions/scripts/tapetes/tapete.lua:onUse
    [19/06/2019 16:43:11] Description: 
    [19/06/2019 16:43:11] (luaDoDecayItem) Item not found

    O ultimo erro acontece quando tento estender ele no chao direto da bag o 1° erro e quando tento usar ele em um piso qualquer (Pisos que não são de Houses)

  11. Ola , gostaria de ajuda nessa script de "Carpet System" , tentei modifica-la eu mesmo , mas não tive muito sucesso

    Quando o player usa o carpet diretamente da bag no piso , o tapete some e causa um erro.
    Eu gostaria que quando ele usasse diretamente da bag no piso, ela pegasse normal ou voltasse pra bag.
    Para usar o carpet e necessario colocar ele no chao e usar no piso, e pra voltar a sua forma item e so clicar em cima, gostaria que tivesse o botao "Embrulhar" se possivel


     

    Citar

    --Marshmello
    local tapete = {
    [13495] = 13496, -- TAPETE DESMONTADO
    [13496] = 13495 -- TAPETE MONTADO
    }
    ------- RESTO AQUI FDS --------
    function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(not tapete[item.itemid]) then
    return false
    end

    if getHouseOwner(getTileHouseInfo(getPlayerPosition(cid))) == getPlayerGUID(cid) then
    doTransformItem(item.uid, tapete[item.itemid])
    doDecayItem(item.uid)
    end
    end

     

  12. Poke Wind: 

    O servidor e composto por alguns sistemas, mas os principais são os seguintes

    ❤️ Poke Bar ❤️  

    ❤️ Poke Info ❤️ 
    ❤️ Level System  ❤️ 

    :) Entre outros...... :) 

    O nosso intuito e trazer um game de qualidade e tentaremos ao maximo tirar todos os bugs do servidor


    Planos futuros

    Bomberman
    Capture a Bandeira


    Ao iniciar o Player recebe 1 dia de vip e ainda terá um Bau inicial!!


    Site 
    https://pokemonwind.com.br/

    Discord https://discord.gg/EHa2ku

  13. ❤️ Ola galera do xtibia tranquilidade ?? ❤️ 

    Estou com um erro no meu website, ja tentei resolver, procurando o erro mas não achei :/ 

    o erro e o seguinte, nomes como 
    [ADM] José ao clicar em cima para ver as informações do personagem "Buscar personagem" a pagina carrega e dar esse erro


     Screenshot_1.png.da125a2c81886a9d7794f270eacb2939.png

    Erro.thumb.png.12dd12072bac73556b84d01c73423e29.png

    ;) Se alguém tiver a generosidade de me responder agradeço!!  ;) 

  • Quem Está Navegando   0 membros estão online

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