Ir para conteúdo

NelaMesmo

Membro
  • Registro em

  • Última visita

Histórico de Curtidas

  1. Gostei
    NelaMesmo deu reputação a Vodkart em [8.6] [Talkactions] - Find Item   
    É um comando para procurar determinado item no servidor, ele procura em:
     
    *Jogador
    *Depot
    *House Tiles
     
    basta usar o comando /find NOME DO ITEM
     
    exemplo: /find solar axe
     

     

     

     
     
    Obs: Como é feito por DB, os items só ficaram salvo quando der serve save(hora que altera os valores na data base), então se o jogador receber o item as 15:00 e só de serve save as 16:00, só irá aparecer no comando as 16:00 horas.
     
     
     
    talkactions
     
    finditem.lua
    function onSay(cid, words, param) if param == '' or tonumber(param) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "/find item name") return true end local item_id = getItemIdByName(tostring(param), false) if not item_id then doPlayerSendCancel(cid, "This item does not exist.") return true end local str, player_depotitems, players_items, tile_items = "",{},{},{} local dp = db.getResult("SELECT `player_id`, `count` FROM `player_depotitems` WHERE `itemtype` = "..item_id),{} if (dp:getID() ~= -1) then repeat player_depotitems[#player_depotitems+1] = {dp:getDataInt("player_id"), dp:getDataInt("count") } until not(dp:next()) dp:free() end local pi = db.getResult("SELECT `player_id`, `count` FROM `player_items` WHERE `itemtype` = "..item_id),{} if (pi:getID() ~= -1) then repeat players_items[#players_items+1] = {pi:getDataInt("player_id"), pi:getDataInt("count") } until not(pi:next()) pi:free() end local hi = db.getResult("SELECT `tile_id`, `count` FROM `tile_items` WHERE `itemtype` = "..item_id),{} if (hi:getID() ~= -1) then repeat local tile = db.getResult("SELECT `house_id`, `x`, `y`, `z` FROM `tiles` WHERE `id` = "..hi:getDataInt("tile_id")),{} tile_items[#tile_items+1] = {tile:getDataInt("house_id"),tile:getDataInt("x"),tile:getDataInt("y"),tile:getDataInt("z")} until not(hi:next()) hi:free() end if #player_depotitems > 0 then str = str .. "#DEPOT ITEMS#\nQuantidade - Jogador\n" for i = 1, table.maxn(player_depotitems) do str = str .. player_depotitems[i][2] .. ' ' .. getPlayerNameByGUID(player_depotitems[i][1]) ..' \n' end end if #players_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#PLAYER ITEMS#\nQuantidade - Jogador\n" or "#PLAYER ITEMS#\nQuantidade - Jogador\n") for i = 1, table.maxn(players_items) do str = str .. players_items[i][2] .. ' ' .. getPlayerNameByGUID(players_items[i][1]) ..' \n' end end if #tile_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#TILE ITEMS#\nHouse ID - Tile Position\n" or "#TILE ITEMS#\nHouse ID -Tile Position\n") for i = 1, table.maxn(tile_items) do str = str .. tile_items[i][1] .. ' - {x = ' .. tile_items[i][2] ..', y = ' .. tile_items[i][3] ..', z = ' .. tile_items[i][4] ..'} \n' end end return doShowTextDialog(cid,item_id, str) end  
    TAG
    <talkaction log="yes" words="!find;/find" access="5" event="script" value="finditem.lua"/>  
  2. Curtir
    NelaMesmo recebeu reputação de DATA Vinny em Em desenvolvimento   
    Bom pessoal, nunca postei nada aqui, mas gostaria de compartilhar com voces um projeto no qual estou trabalhando. Um mapa para aqueles que gostam de uma boa quest e alguns misterios :D.
     
     
     
     

     

     

     

     

     



  3. Curtir
    NelaMesmo recebeu reputação de luanluciano93 em Em desenvolvimento   
    Bom pessoal, nunca postei nada aqui, mas gostaria de compartilhar com voces um projeto no qual estou trabalhando. Um mapa para aqueles que gostam de uma boa quest e alguns misterios :D.
     
     
     
     

     

     

     

     

     



  4. Curtir
    NelaMesmo recebeu reputação de ian fontes em Em desenvolvimento   
    Bom pessoal, nunca postei nada aqui, mas gostaria de compartilhar com voces um projeto no qual estou trabalhando. Um mapa para aqueles que gostam de uma boa quest e alguns misterios :D.
     
     
     
     

     

     

     

     

     



  5. Curtir
    NelaMesmo deu reputação a Weslley Kiyo em Porta que abre com chave   
    Não é assim...
    Olha só, vou por algumas imgs de como configurar
     
     
    Você precisa de uma porta Locked e deixar o ActionID dela igual na img (O actionID da porta precisa ser o msm ActionID da chave para ela abrir) - como mostra a imagem:

     
    Para setar o ActionID na chave, existem 3 maneiras.
     
    1 - Você cria uma quest com a key, como na imagem:

     
    2 - Você cria um npc que pode vender a key ou fazer alguma quest no npc para ganha-la, fica ao seu critério. Usando esse código:
    if msgcontains(msg, "key") then npcHandler:say("Do you want to buy the Key to Adventure for 5 gold coins?", cid) npcHandler.topic[cid] = 4 elseif npcHandler.topic[cid] == 4 then if msgcontains(msg, "yes") then if getPlayerMoney(cid) >= 5 then npcHandler:say("Here you are.", cid) doPlayerRemoveMoney(cid, 5) -- money local key = doCreateItemEx(2088, 1) -- key (null) doSetItemActionId(key, 4600) -- actionID (key) doPlayerAddItemEx(cid, key, 1) -- key (actionId) else npcHandler:say("You don't have enough money.", cid) end elseif msgcontains(msg, "no") then npcHandler:say("As you wish.", cid) else npcHandler:say("Only nonsense on your mind, eh?", cid) end npcHandler.topic[cid] = 0  
    3 - Você pode setar a ActionID com o GOD:
     
    /attr ActionID, 4600

Informação Importante

Confirmação de Termo