Ir para conteúdo
  • Cadastre-se

Posts Recomendados

ALO COM QUE EU FALO?

 

    Gente tem como me ajuda com esse Script do Comedinha? ele faz um checagem de itens que um jogador especifico porem eu quero tirar a checagem de item da Cabeça, Amuleto, Armor, Mao Esquerda, Legs, Ring e Ammo Slot, ficando somente a verificação da BACKPACK, MAO DIREITA E PÉS

 

link do Script: http://www.tibiaking.com/forum/topic/20933-talkaction-player-check-system/

 

 

TAG:

<talkaction log="yes" words="!p;/p" access="5" event="script" value="playercheck.lua"/>

Script:
Talkactions/scripts/playercheck.lua

local config = {

check = {"check", "viwer", "verificar", "ver"},

delete = {"del", "delete", "deletar"},

search = {"search", "procurar"}

}



function getItemsInContainer(cont, sep)

local text = ""

local tsep = ""

local count = ""

for i=1, sep do

tsep = tsep.."-"

end

tsep = tsep..">"

for i=0, getContainerSize(cont.uid)-1 do

local item = getContainerItem(cont.uid, i)

if isContainer(item.uid) == FALSE then

if item.type > 0 then

count = "("..item.type.."x)"

end

text = text.."\n"..tsep..getItemNameById(item.itemid).." "..count.." ("..item.itemid..")"

else

if getContainerSize(item.uid) > 0 then

text = text.."\n"..tsep..getItemNameById(item.itemid).." ("..item.itemid..")"

text = text..getItemsInContainer(item, sep+2).." ("..item.itemid..")"

else

text = text.."\n"..tsep..getItemNameById(item.itemid).." ("..item.itemid..")"

end

end

end

return text

end



function onSay(cid, words, param, channel)

local slotName = {"Cabeça", "Amuleto", "Backpack", "Armor", "Mao Direita", "Mao Esquerda", "Legs", "Pés", "Ring", "Ammo Slot"}

local t = string.explode(param, ",")

if(table.isStrIn(param, config.check)) then

if getPlayerGroupId (cid) >= 5 then

local player = getPlayerByNameWildcard(t[2])

if isPlayer(player) == TRUE then

local text = getPlayerName(player).."'s Equipment: "

for i=1, 10 do

text = text.."\n\n"

local item = getPlayerSlotItem(player, i)

if item.itemid > 0 then

if isContainer(item.uid) == TRUE then

text = text..slotName[i]..": "..getItemNameById(item.itemid).." ("..item.itemid..") "..getItemsInContainer(item, 1)

else

text = text..slotName[i]..": "..getItemNameById(item.itemid).." ("..item.itemid..")"

end

else

text = text..slotName[i]..": Empty"

end

end

doShowTextDialog(cid, 6579, text)

else

doPlayerSendCancel(cid, "This player is not online.")

end

end

elseif(table.isStrIn(param, config.delete)) then

if getPlayerGroupId(cid) >= 5 then

local player = getPlayerByNameWildcard(t[3])

if isPlayer(player) == TRUE then

count = t[4]

if(not t[4]) then

count = 1

end

if getPlayerItemCount(player, t[2]) > 0 then

if doPlayerRemoveItem(player, t[2], count) then

doPlayerSendCancel(cid, "Item Deletado.")

else

doPlayerSendCancel(cid, "Este player não esta quantidade.")

end

else

doPlayerSendCancel(cid, "Este player não tem o item.")

end

end

end

elseif(table.isStrIn(param, config.search)) then

if getPlayerGroupId (cid) >= 5 then

local player = getPlayerByNameWildcard(t[3])

local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = ".. t[2] ..");")

local msg = "Resultados da busca pelo item ".. t[2] .." em seu banco de dados:\n\n"

if result:getID() ~= -1 then

while true do

local name = result:getDataString("name")

local online = result:getDataInt("online")

msg = msg .. name .." [".. (online == 1 and "Online" or "Offline") .."]\n"

if not result:next() then

break

end

end

else

msg = msg .. "O item não foi encontrado em nenhum jogador."

end

doShowTextDialog(cid, t[2], msg)

end

end

return true

end

 

 

REP+ E OBRIGADU! :D

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

Vai aprender quando? Negativado.

 

O tópico foi movido para a área correta, preste mais atenção da próxima vez!
Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:
De: "OTServAprovação de Tópicos de Conteúdos"
Para: "OTServSuporte OTServSuporte de Scripts"

Link para o post
Compartilhar em outros sites

Mesmo assim, irei ajudar, basta remover aqui: 

local slotName = {"Cabeça", "Amuleto", "Backpack", "Armor", "Mao Direita", "Mao Esquerda", "Legs", "Pés", "Ring", "Ammo Slot"}

Ficando assim:

local slotName = {"Backpack", "Mao Direita", "Pés"}
Editado por Deadpool (veja o histórico de edições)

Se te ajudei, deixe seu curti, clique em melhor resposta, para que eu possa ajudar sempre.

 

skype.png

Trabalhos (C++):

Cor das mensagens nos channels

Ajusta/Mudar cor das mensagens de Loot

Liberação dos novos Remakes da PokeXGames.

NPC "Guild Master" que cria, deleta, invita, kicka players da guild.

 

 B4OBUkH.png At Soon, LIKE ON FACEBOOK. Clik on Imgs

Link para o post
Compartilhar em outros sites

Se não der certo, tenta esse:

local config = {
    check = {"check", "viwer", "verificar", "ver"},
    delete = {"del", "delete", "deletar"},
    search = {"search", "procurar"}
}

function getItemsInContainer(cont, sep)
    local text, tsep, count = "", "", ""
    for i = 1, sep do
        tsep = tsep .. "-"
    end
    tsep = tsep .. ">"
    for i = 0, getContainerSize(cont.uid) - 1 do
        local item = getContainerItem(cont.uid, i)
        if not isContainer(item.uid) then
            if item.type > 0 then
                count = "(" .. item.type .. "x)"
            end
            text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " " .. count .. " (" .. item.itemid .. ")"
        else
            if getContainerSize(item.uid) > 0 then
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                text = text .. getItemsInContainer(item, sep + 2) .. " (" .. item.itemid .. ")"
            else
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
            end
        end
    end
    return text
end

function onSay(cid, words, param, channel)
    local slotName = {CONST_SLOT_BACKPACK, CONST_SLOT_RIGHT, CONST_SLOT_FEET}
    local t = string.explode(param, ",")
    if(table.isStrIn(param, config.check)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[2])
            if isPlayer(player) then
                local text = getPlayerName(player) .. "'s Equipment: "
                for i = 1, #slotName do
                    text = text .. "\n\n"
                    local item = getPlayerSlotItem(player, slotName[i])
                    if item.itemid > 0 then
                        if isContainer(item.uid) then
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ") " .. getItemsInContainer(item, 1)
                        else
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                        end
                    else
                        text = text .. slotName[i] .. ": Empty"
                    end
                end
                doShowTextDialog(cid, 6579, text)
            else
                doPlayerSendCancel(cid, "This player is not online.")
            end
        end
    elseif(table.isStrIn(param, config.delete)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            if isPlayer(player) then
                count = t[4]
                if(not t[4]) then
                    count = 1
                end
                if getPlayerItemCount(player, t[2]) > 0 then
                    if doPlayerRemoveItem(player, t[2], count) then
                        doPlayerSendCancel(cid, "Item Deletado.")
                    else
                        doPlayerSendCancel(cid, "Este player não esta quantidade.")
                    end
                else
                    doPlayerSendCancel(cid, "Este player não tem o item.")
                end
            end
        end
    elseif(table.isStrIn(param, config.search)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = " ..  t[2]  .. ");")
            local msg = "Resultados da busca pelo item " ..  t[2]  .. " em seu banco de dados:\n\n"
            if result:getID() ~= -1 then
                while true do
                    local name = result:getDataString("name")
                    local online = result:getDataInt("online")
                    msg = msg .. name  .. " [" ..  (online = 1 and "Online" or "Offline") .. "]\n"
                    if not result:next() then
                        break
                    end
                end
            else
                msg = msg .. "O item não foi encontrado em nenhum jogador."
            end
            doShowTextDialog(cid, t[2], msg)
        end
    end
    return true
end
Link para o post
Compartilhar em outros sites

 

Mesmo assim, irei ajudar, basta remover aqui: 

local slotName = {"Cabeça", "Amuleto", "Backpack", "Armor", "Mao Direita", "Mao Esquerda", "Legs", "Pés", "Ring", "Ammo Slot"}

Ficando assim:

local slotName = {"Backpack", "Mao Direita", "Pés"}

ja tentei e não funcionou... ;-;

 

Se não der certo, tenta esse:

local config = {
    check = {"check", "viwer", "verificar", "ver"},
    delete = {"del", "delete", "deletar"},
    search = {"search", "procurar"}
}

function getItemsInContainer(cont, sep)
    local text, tsep, count = "", "", ""
    for i = 1, sep do
        tsep = tsep .. "-"
    end
    tsep = tsep .. ">"
    for i = 0, getContainerSize(cont.uid) - 1 do
        local item = getContainerItem(cont.uid, i)
        if not isContainer(item.uid) then
            if item.type > 0 then
                count = "(" .. item.type .. "x)"
            end
            text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " " .. count .. " (" .. item.itemid .. ")"
        else
            if getContainerSize(item.uid) > 0 then
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                text = text .. getItemsInContainer(item, sep + 2) .. " (" .. item.itemid .. ")"
            else
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
            end
        end
    end
    return text
end

function onSay(cid, words, param, channel)
    local slotName = {CONST_SLOT_BACKPACK, CONST_SLOT_RIGHT, CONST_SLOT_FEET}
    local t = string.explode(param, ",")
    if(table.isStrIn(param, config.check)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[2])
            if isPlayer(player) then
                local text = getPlayerName(player) .. "'s Equipment: "
                for i = 1, #slotName do
                    text = text .. "\n\n"
                    local item = getPlayerSlotItem(player, slotName[i])
                    if item.itemid > 0 then
                        if isContainer(item.uid) then
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ") " .. getItemsInContainer(item, 1)
                        else
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                        end
                    else
                        text = text .. slotName[i] .. ": Empty"
                    end
                end
                doShowTextDialog(cid, 6579, text)
            else
                doPlayerSendCancel(cid, "This player is not online.")
            end
        end
    elseif(table.isStrIn(param, config.delete)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            if isPlayer(player) then
                count = t[4]
                if(not t[4]) then
                    count = 1
                end
                if getPlayerItemCount(player, t[2]) > 0 then
                    if doPlayerRemoveItem(player, t[2], count) then
                        doPlayerSendCancel(cid, "Item Deletado.")
                    else
                        doPlayerSendCancel(cid, "Este player não esta quantidade.")
                    end
                else
                    doPlayerSendCancel(cid, "Este player não tem o item.")
                end
            end
        end
    elseif(table.isStrIn(param, config.search)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = " ..  t[2]  .. ");")
            local msg = "Resultados da busca pelo item " ..  t[2]  .. " em seu banco de dados:\n\n"
            if result:getID() ~= -1 then
                while true do
                    local name = result:getDataString("name")
                    local online = result:getDataInt("online")
                    msg = msg .. name  .. " [" ..  (online = 1 and "Online" or "Offline") .. "]\n"
                    if not result:next() then
                        break
                    end
                end
            else
                msg = msg .. "O item não foi encontrado em nenhum jogador."
            end
            doShowTextDialog(cid, t[2], msg)
        end
    end
    return true
end

Cara deu erro:

[Error - LuaScriptInterface::loadFile] data/talkactions/scripts/playercheck.lua:86: ')' expected near '='
[Warning - Event::loadScript] Cannot load script (data/talkactions/scripts/playercheck.lua)
data/talkactions/scripts/playercheck.lua:86: ')' expected near '='
Editado por TsplayerT (veja o histórico de edições)

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

local config = {
    check = {"check", "viwer", "verificar", "ver"},
    delete = {"del", "delete", "deletar"},
    search = {"search", "procurar"}
}

function getItemsInContainer(cont, sep)
    local text, tsep, count = "", "", ""
    for i = 1, sep do
        tsep = tsep .. "-"
    end
    tsep = tsep .. ">"
    for i = 0, getContainerSize(cont.uid) - 1 do
        local item = getContainerItem(cont.uid, i)
        if not isContainer(item.uid) then
            if item.type > 0 then
                count = "(" .. item.type .. "x)"
            end
            text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " " .. count .. " (" .. item.itemid .. ")"
        else
            if getContainerSize(item.uid) > 0 then
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                text = text .. getItemsInContainer(item, sep + 2) .. " (" .. item.itemid .. ")"
            else
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
            end
        end
    end
    return text
end

function onSay(cid, words, param, channel)
    local slotName = {CONST_SLOT_BACKPACK, CONST_SLOT_RIGHT, CONST_SLOT_FEET}
    local t = string.explode(param, ",")
    if(table.isStrIn(param, config.check)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[2])
            if isPlayer(player) then
                local text = getPlayerName(player) .. "'s Equipment: "
                for i = 1, #slotName do
                    text = text .. "\n\n"
                    local item = getPlayerSlotItem(player, slotName[i])
                    if item.itemid > 0 then
                        if isContainer(item.uid) then
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ") " .. getItemsInContainer(item, 1)
                        else
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                        end
                    else
                        text = text .. slotName[i] .. ": Empty"
                    end
                end
                doShowTextDialog(cid, 6579, text)
            else
                doPlayerSendCancel(cid, "This player is not online.")
            end
        end
    elseif(table.isStrIn(param, config.delete)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            if isPlayer(player) then
                count = t[4]
                if(not t[4]) then
                    count = 1
                end
                if getPlayerItemCount(player, t[2]) > 0 then
                    if doPlayerRemoveItem(player, t[2], count) then
                        doPlayerSendCancel(cid, "Item Deletado.")
                    else
                        doPlayerSendCancel(cid, "Este player não esta quantidade.")
                    end
                else
                    doPlayerSendCancel(cid, "Este player não tem o item.")
                end
            end
        end
    elseif(table.isStrIn(param, config.search)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = " ..  t[2]  .. ");")
            local msg = "Resultados da busca pelo item " ..  t[2]  .. " em seu banco de dados:\n\n"
            if result:getID() ~= -1 then
                while true do
                    local name = result:getDataString("name")
                    local online = result:getDataInt("online")
                    msg = msg .. name  .. " [" ..  (online == 1 and "Online" or "Offline") .. "]\n"
                    if not result:next() then
                        break
                    end
                end
            else
                msg = msg .. "O item não foi encontrado em nenhum jogador."
            end
            doShowTextDialog(cid, t[2], msg)
        end
    end
    return true
end
Link para o post
Compartilhar em outros sites

local config = {
    check = {"check", "viwer", "verificar", "ver"},
    delete = {"del", "delete", "deletar"},
    search = {"search", "procurar"}
}

function getItemsInContainer(cont, sep)
    local text, tsep, count = "", "", ""
    for i = 1, sep do
        tsep = tsep .. "-"
    end
    tsep = tsep .. ">"
    for i = 0, getContainerSize(cont.uid) - 1 do
        local item = getContainerItem(cont.uid, i)
        if not isContainer(item.uid) then
            if item.type > 0 then
                count = "(" .. item.type .. "x)"
            end
            text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " " .. count .. " (" .. item.itemid .. ")"
        else
            if getContainerSize(item.uid) > 0 then
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                text = text .. getItemsInContainer(item, sep + 2) .. " (" .. item.itemid .. ")"
            else
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
            end
        end
    end
    return text
end

function onSay(cid, words, param, channel)
    local slotName = {CONST_SLOT_BACKPACK, CONST_SLOT_RIGHT, CONST_SLOT_FEET}
    local t = string.explode(param, ",")
    if(table.isStrIn(param, config.check)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[2])
            if isPlayer(player) then
                local text = getPlayerName(player) .. "'s Equipment: "
                for i = 1, #slotName do
                    text = text .. "\n\n"
                    local item = getPlayerSlotItem(player, slotName[i])
                    if item.itemid > 0 then
                        if isContainer(item.uid) then
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ") " .. getItemsInContainer(item, 1)
                        else
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                        end
                    else
                        text = text .. slotName[i] .. ": Empty"
                    end
                end
                doShowTextDialog(cid, 6579, text)
            else
                doPlayerSendCancel(cid, "This player is not online.")
            end
        end
    elseif(table.isStrIn(param, config.delete)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            if isPlayer(player) then
                count = t[4]
                if(not t[4]) then
                    count = 1
                end
                if getPlayerItemCount(player, t[2]) > 0 then
                    if doPlayerRemoveItem(player, t[2], count) then
                        doPlayerSendCancel(cid, "Item Deletado.")
                    else
                        doPlayerSendCancel(cid, "Este player não esta quantidade.")
                    end
                else
                    doPlayerSendCancel(cid, "Este player não tem o item.")
                end
            end
        end
    elseif(table.isStrIn(param, config.search)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = " ..  t[2]  .. ");")
            local msg = "Resultados da busca pelo item " ..  t[2]  .. " em seu banco de dados:\n\n"
            if result:getID() ~= -1 then
                while true do
                    local name = result:getDataString("name")
                    local online = result:getDataInt("online")
                    msg = msg .. name  .. " [" ..  (online == 1 and "Online" or "Offline") .. "]\n"
                    if not result:next() then
                        break
                    end
                end
            else
                msg = msg .. "O item não foi encontrado em nenhum jogador."
            end
            doShowTextDialog(cid, t[2], msg)
        end
    end
    return true
end

Funcionou direitinho, mas tem como colocar o nome de cada checagem?(tipo a verificação da backpack no lugar de 3, ser Backpack?)

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

Desse jeito ai não, tu pode usar essas tags:

CONST_SLOT_HEAD = 1
CONST_SLOT_NECKLACE = 2
CONST_SLOT_BACKPACK = 3
CONST_SLOT_ARMOR = 4
CONST_SLOT_RIGHT = 5
CONST_SLOT_LEFT = 6
CONST_SLOT_LEGS = 7
CONST_SLOT_FEET = 8
CONST_SLOT_RING = 9
CONST_SLOT_AMMO = 10
Link para o post
Compartilhar em outros sites

 

Desse jeito ai não, tu pode usar essas tags:

CONST_SLOT_HEAD = 1
CONST_SLOT_NECKLACE = 2
CONST_SLOT_BACKPACK = 3
CONST_SLOT_ARMOR = 4
CONST_SLOT_RIGHT = 5
CONST_SLOT_LEFT = 6
CONST_SLOT_LEGS = 7
CONST_SLOT_FEET = 8
CONST_SLOT_RING = 9
CONST_SLOT_AMMO = 10

eu não sei usa-las pode fazer uma??

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites
  • 2 months later...

@up

tava quase resolvido... *-*

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites
CONST_SLOT_HEAD = 1    --Cabeça
CONST_SLOT_NECKLACE = 2  --Pescoço
CONST_SLOT_BACKPACK = 3  --Mochila
CONST_SLOT_ARMOR = 4  --Tronco/armadura
CONST_SLOT_RIGHT = 5 --Braço direito
CONST_SLOT_LEFT = 6  --Braço Esquerdo
CONST_SLOT_LEGS = 7 --Pernas
CONST_SLOT_FEET = 8  --Pés
CONST_SLOT_RING = 9  --Anel
CONST_SLOT_AMMO = 10 --Munições/     exemplo: flecha

Ando devagar, porque já tive pressa. E levo esse sorriso, porque já chorei demais...

________________________________________________________________________________

Minhas Sprites:

Mega Metagross

Mega Abomasnow

Pack de Shinys

[Posso atualizá-lo com novos shinys a qualquer momento]

Tutoriais:

[Completo] Criando e adicionando um novo Pokémon

[Actions] Criando quest no RME

Editores Lua/Xml/Sync Entre outros:

Editores Win/Mac/Linux

Link para o post
Compartilhar em outros sites
CONST_SLOT_HEAD = 1    --Cabeça
CONST_SLOT_NECKLACE = 2  --Pescoço
CONST_SLOT_BACKPACK = 3  --Mochila
CONST_SLOT_ARMOR = 4  --Tronco/armadura
CONST_SLOT_RIGHT = 5 --Braço direito
CONST_SLOT_LEFT = 6  --Braço Esquerdo
CONST_SLOT_LEGS = 7 --Pernas
CONST_SLOT_FEET = 8  --Pés
CONST_SLOT_RING = 9  --Anel
CONST_SLOT_AMMO = 10 --Munições/     exemplo: flecha

Ok, mas onde eu coloco isso?

tem como você colocar isso nesse script:

local config = {
    check = {"check", "viwer", "verificar", "ver"},
    delete = {"del", "delete", "deletar"},
    search = {"search", "procurar"}
}

function getItemsInContainer(cont, sep)
    local text, tsep, count = "", "", ""
    for i = 1, sep do
        tsep = tsep .. "-"
    end
    tsep = tsep .. ">"
    for i = 0, getContainerSize(cont.uid) - 1 do
        local item = getContainerItem(cont.uid, i)
        if not isContainer(item.uid) then
            if item.type > 0 then
                count = "(" .. item.type .. "x)"
            end
            text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " " .. count .. " (" .. item.itemid .. ")"
        else
            if getContainerSize(item.uid) > 0 then
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                text = text .. getItemsInContainer(item, sep + 2) .. " (" .. item.itemid .. ")"
            else
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
            end
        end
    end
    return text
end

function onSay(cid, words, param, channel)
    local slotName = {CONST_SLOT_BACKPACK, CONST_SLOT_RIGHT, CONST_SLOT_FEET}
    local t = string.explode(param, ",")
    if(table.isStrIn(param, config.check)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[2])
            if isPlayer(player) then
                local text = getPlayerName(player) .. "'s Equipment: "
                for i = 1, #slotName do
                    text = text .. "\n\n"
                    local item = getPlayerSlotItem(player, slotName[i])
                    if item.itemid > 0 then
                        if isContainer(item.uid) then
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ") " .. getItemsInContainer(item, 1)
                        else
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                        end
                    else
                        text = text .. slotName[i] .. ": Empty"
                    end
                end
                doShowTextDialog(cid, 6579, text)
            else
                doPlayerSendCancel(cid, "This player is not online.")
            end
        end
    elseif(table.isStrIn(param, config.delete)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            if isPlayer(player) then
                count = t[4]
                if(not t[4]) then
                    count = 1
                end
                if getPlayerItemCount(player, t[2]) > 0 then
                    if doPlayerRemoveItem(player, t[2], count) then
                        doPlayerSendCancel(cid, "Item Deletado.")
                    else
                        doPlayerSendCancel(cid, "Este player não esta quantidade.")
                    end
                else
                    doPlayerSendCancel(cid, "Este player não tem o item.")
                end
            end
        end
    elseif(table.isStrIn(param, config.search)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = " ..  t[2]  .. ");")
            local msg = "Resultados da busca pelo item " ..  t[2]  .. " em seu banco de dados:\n\n"
            if result:getID() ~= -1 then
                while true do
                    local name = result:getDataString("name")
                    local online = result:getDataInt("online")
                    msg = msg .. name  .. " [" ..  (online == 1 and "Online" or "Offline") .. "]\n"
                    if not result:next() then
                        break
                    end
                end
            else
                msg = msg .. "O item não foi encontrado em nenhum jogador."
            end
            doShowTextDialog(cid, t[2], msg)
        end
    end
    return true
end

Ok, mas onde eu coloco isso?

tem como você colocar isso nesse script:

local config = {
    check = {"check", "viwer", "verificar", "ver"},
    delete = {"del", "delete", "deletar"},
    search = {"search", "procurar"}
}

function getItemsInContainer(cont, sep)
    local text, tsep, count = "", "", ""
    for i = 1, sep do
        tsep = tsep .. "-"
    end
    tsep = tsep .. ">"
    for i = 0, getContainerSize(cont.uid) - 1 do
        local item = getContainerItem(cont.uid, i)
        if not isContainer(item.uid) then
            if item.type > 0 then
                count = "(" .. item.type .. "x)"
            end
            text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " " .. count .. " (" .. item.itemid .. ")"
        else
            if getContainerSize(item.uid) > 0 then
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                text = text .. getItemsInContainer(item, sep + 2) .. " (" .. item.itemid .. ")"
            else
                text = text .. "\n" .. tsep .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
            end
        end
    end
    return text
end

function onSay(cid, words, param, channel)
    local slotName = {CONST_SLOT_BACKPACK, CONST_SLOT_RIGHT, CONST_SLOT_FEET}
    local t = string.explode(param, ",")
    if(table.isStrIn(param, config.check)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[2])
            if isPlayer(player) then
                local text = getPlayerName(player) .. "'s Equipment: "
                for i = 1, #slotName do
                    text = text .. "\n\n"
                    local item = getPlayerSlotItem(player, slotName[i])
                    if item.itemid > 0 then
                        if isContainer(item.uid) then
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ") " .. getItemsInContainer(item, 1)
                        else
                            text = text .. slotName[i] .. ": " .. getItemNameById(item.itemid) .. " (" .. item.itemid .. ")"
                        end
                    else
                        text = text .. slotName[i] .. ": Empty"
                    end
                end
                doShowTextDialog(cid, 6579, text)
            else
                doPlayerSendCancel(cid, "This player is not online.")
            end
        end
    elseif(table.isStrIn(param, config.delete)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            if isPlayer(player) then
                count = t[4]
                if(not t[4]) then
                    count = 1
                end
                if getPlayerItemCount(player, t[2]) > 0 then
                    if doPlayerRemoveItem(player, t[2], count) then
                        doPlayerSendCancel(cid, "Item Deletado.")
                    else
                        doPlayerSendCancel(cid, "Este player não esta quantidade.")
                    end
                else
                    doPlayerSendCancel(cid, "Este player não tem o item.")
                end
            end
        end
    elseif(table.isStrIn(param, config.search)) then
        if getPlayerGroupId(cid) >= 5 then
            local player = getPlayerByNameWildcard(t[3])
            local result = db.getResult("SELECT name, online FROM players WHERE id IN (SELECT player_id FROM player_items WHERE itemtype = " ..  t[2]  .. ");")
            local msg = "Resultados da busca pelo item " ..  t[2]  .. " em seu banco de dados:\n\n"
            if result:getID() ~= -1 then
                while true do
                    local name = result:getDataString("name")
                    local online = result:getDataInt("online")
                    msg = msg .. name  .. " [" ..  (online == 1 and "Online" or "Offline") .. "]\n"
                    if not result:next() then
                        break
                    end
                end
            else
                msg = msg .. "O item não foi encontrado em nenhum jogador."
            end
            doShowTextDialog(cid, t[2], msg)
        end
    end
    return true
end

Ajuda nisso aqui alguem!! plz

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

Meus Contatos!

 

Minhas Funções:

 

               Skype: TsplayerT

         Facebook: TakaFukushii

          YouTube: ADoseDupla

           Twitter: @_Splayer_

 

 

 

 

 

 

 

                             Mapper:▓▓▓▓▓▓▓▓▓▓ 97%

     Programmer:▓▓▓▓▓▒▒▒▒▒ 45%

             Scripter:▓▓▓▓▓▓▓▓▓▒ 83%

              Spriter:▓▓▓▓▓▓▒▒▒▒ 57%

    Gamemaster:▓▓▓▓▓▓▓▓▓▓ 99%

        Ot Creator:▓▓▓▓▓▓▓▒▒▒71%

Ot Client Maker:▓▓▓▓▓▓▓▒▒▒74%

 

Link para o post
Compartilhar em outros sites

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

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por LasseXeterno
      Então, estou tentando adicionar uma nova "race" no meu Ot de base Cyan, tentei seguir 3 tutoriais aqui do tibiaking, um sobre race, porém nos códigos do meu servidor não tem o constant.h e nem o monster.cpp. E o outro tutorial, eu fiz tudo que ele pediu e quando entrei no game para testar, funcionava os golpes e as imunidades, porém não aparecia o número do dano e nem a cor.  Usei esse tutorial como base: 
      Pois ele é derivado. E o outro tutorial que usei foi: 
      Porém nesse, não consegui achar a const.h, e quando fui nos arquivos do creaturescript e adicionei uma cor nova a "COLOR_FAIRY", quando abro o jogo, os pokemons que seriam teoricamente "fada", o que eu usei de teste foi a Clefable. A Clefable tomava IK e dava IK no seu atk do tipo fada. 
      Além de que, o meu erro principal é esse: Warning - Monsters::loadMonster] Unknown race type fairy. (data/monster/pokes/geracao 1/Clefable.xml)
       Pois como eu já disse, não consigo achar onde adicionar uma nova race.

    • Por yuriowns
      Salve rapazes, tranquilo? Preciso de ajuda pra colocar para os npc's que vendem pots verificarem quantos itens possuem no tile em que o player está e se tiver com +80 itens no sqm, o npc avisa e não vende nada até o player ir em um sqm com menos de 80 itens no chão.
       
    • Por A.Mokk
      .Qual servidor ou website você utiliza como base? 
      TFS 0.4
      Qual o motivo deste tópico? 
      Bom pessoal, a algumas semanas atras eu joguei um servidor que havia sistema de imbuimento sendo 8.60, no servidor se utilizava a spellwand para encantar as armas, os comandos eram dado no canal Imbuiment... Gostaria de saber se alguém teria como disponibilizar algum sistema de imbuimento, já procurei pra caramba aqui no fórum mas tudo que encontro é pra versões acima da que eu uso.
       
    • Por Mateus Robeerto
      Não sei se aqui é a área ou algum local para solicitar a alteração do email antigo... Não lembro mais a senha dele, nem a resposta secreta para acessar. Peço a algum administrador ou moderador para, por favor, alterar o email para o novo.
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo