Ir para conteúdo
  • Cadastre-se

Normal Trocar +1,+2,+3 por nomes nesse script refin [10 reps]


Posts Recomendados

cara, usa spoiler pfv.. é só clicar no olhinhoo aqui no editor

eu modifiquei a linha que dava erro:
if(tool.range[1] and self.item.level < tool.range[1]) or (tool.range[2] and self.item.level >= tool.range[2]) then

 

só fiz uma checagem pra ver se tool.range[1] e [2] existia antes de comparar o valor. O erro falava q esse tool.range[1] OU tool.range[2] não existia (valor nulo ou nil).
O restante tá identico. Sobre o sistema, ele é bem complexo.. eu nao to com saco ultimamente pra ficar lendo e testando mas o problema é q vc tem q salvar q o item tem o atributo e checar pra dar o item com atributo tanto pra quem comprar quanto pro player de volta caso ele cancele. Isso é meio chatinho mas nao é nada impossivel. Deixa eu entrar de férias q faço p vc. (Me procura lá pro dia 12 de agosto

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
Em 18/06/2016 at 04:28, xWhiteWolf disse:

cara, usa spoiler pfv.. é só clicar no olhinhoo aqui no editor

eu modifiquei a linha que dava erro:
if(tool.range[1] and self.item.level < tool.range[1]) or (tool.range[2] and self.item.level >= tool.range[2]) then

 

só fiz uma checagem pra ver se tool.range[1] e [2] existia antes de comparar o valor. O erro falava q esse tool.range[1] OU tool.range[2] não existia (valor nulo ou nil).
O restante tá identico. Sobre o sistema, ele é bem complexo.. eu nao to com saco ultimamente pra ficar lendo e testando mas o problema é q vc tem q salvar q o item tem o atributo e checar pra dar o item com atributo tanto pra quem comprar quanto pro player de volta caso ele cancele. Isso é meio chatinho mas nao é nada impossivel. Deixa eu entrar de férias q faço p vc. (Me procura lá pro dia 12 de agosto

 

Nossa mano muito obrigado! Queria muito abrir um ot com esse sistema de trade off + refinamento seria as partes principais do meu ot...

Vou esperar vc ter tempo então, espero que a galera use tbm seria de mais jogar ots assim...

 

Ficaria mt igual pixelchampions e ainda ia ficar melhor.

 

Se tiver tempo antes faça por favor que eu vou tentar abrir um ot com esses dois e se alguem abrir tbm avisa q eu vou jogar

Editado por gmstrikker (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
  • 1 month later...
Em 18/06/2016 ás 04:28, xWhiteWolf disse:

cara, usa spoiler pfv.. é só clicar no olhinhoo aqui no editor

eu modifiquei a linha que dava erro:
if(tool.range[1] and self.item.level < tool.range[1]) or (tool.range[2] and self.item.level >= tool.range[2]) then

 

só fiz uma checagem pra ver se tool.range[1] e [2] existia antes de comparar o valor. O erro falava q esse tool.range[1] OU tool.range[2] não existia (valor nulo ou nil).
O restante tá identico. Sobre o sistema, ele é bem complexo.. eu nao to com saco ultimamente pra ficar lendo e testando mas o problema é q vc tem q salvar q o item tem o atributo e checar pra dar o item com atributo tanto pra quem comprar quanto pro player de volta caso ele cancele. Isso é meio chatinho mas nao é nada impossivel. Deixa eu entrar de férias q faço p vc. (Me procura lá pro dia 12 de agosto

 

Aeeee esperei muito por isso =)

 

Tá de ferias white?
Consegue me ajudar com o sistema do trade offline com refinamento?

Link para o post
Compartilhar em outros sites

só dia 28 :/ mas depois do dia 22 acho q fico mais tranquilo e faço, me lembra!!

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites

me lembra terça, juro q dessa vez é de verdade.

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

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

seguinte, vc acha q consegue editar a tabela do banco de dados q salva os itens das transactions pra ter um campo novo chamado rarity que tem valor padrão = 0?

Preciso disso pra botar em prática oq eu to pensando

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
On 9/9/2016 at 5:36 PM, xWhiteWolf said:

seguinte, vc acha q consegue editar a tabela do banco de dados q salva os itens das transactions pra ter um campo novo chamado rarity que tem valor padrão = 0?

Preciso disso pra botar em prática oq eu to pensando

 

Vc diz a tabela auction_system? Não sei mexer não, mas se vc me der um luz posso tentar!

 

  # Name Type Collation Attributes Null Default Comments Extra Action
  1 idPrimary int(11)     No None   AUTO_INCREMENT Change Change Drop Drop
 
  2 player int(11)     Yes NULL     Change Change Drop Drop
 
  3 item_id int(11)     Yes NULL     Change Change Drop Drop
 
  4 item_name varchar(255) latin1_swedish_ci   Yes NULL     Change Change Drop Drop
 
  5 count int(11)     Yes NULL     Change Change Drop Drop
 
  6 cost int(11)     Yes NULL     Change Change Drop Drop
 
  7 date int(11)     Yes NULL     Change Change Drop Drop
 
Editado por gmstrikker (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

seu banco de dados é mysql?

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

Link para o post
Compartilhar em outros sites
  • 3 weeks later...

tenho, vc tem que alterar o banco de dados onde fica salvo o item pra adicionar uma nova coluna chamada 'rarity' com valor padrão 0.
Se o item for RARE, UNIQUE, ELIT vc adiciona ele no banco de dados com rarity 1, 2 ou 3 respectivamente e na hora de cancelar a venda ou comprar ou vender vc tem que passar o item com a raridade respectiva, então vc vai fazer algo parecido com o script de adicionar raridade só q no script do shop.

Todos os meus trabalhos importantes estão na seção "Sobre mim" no meu perfil; Dá uma passada lá!

"Há três caminhos para o fracasso: não ensinar o que se sabe, não praticar o que se ensina, e não perguntar o que se ignora." - São Beda

I7Pm6ih.png

(obg ao @Beeny por fazer essa linda sign <3)

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

Vc q manja pra cacete, me ajuda a fazer isso pls

Pra vc não achar que eu to querendo me aproveitar de sua nobresa andei pesquisando pra não fazer merda, acho que fiz certo pra adicionar a tabela a

 


ALTER TABLE `auction_system` ADD `rarity` TINYINT(1) NOT NULL DEFAULT '0' AFTER `date`;

 

 

(Isso no sistema de tradeoff)


CREATE TABLE `auction_system` (
  `id` int(11) NOT NULL auto_increment,
  `player` int(11),
  `item_id` int(11),
  `item_name` varchar(255),
  `count` int(11),
  `cost` int(11),
  `date` int(11),
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

ALTER TABLE `players` ADD `auction_balance` INT( 11 ) NOT NULL DEFAULT '0';


 

Ou era pra fazer na parte do item do player, pq ai eu não consigo achar como faz...

 

Ai no market system


  --[[
        Offline player to player item trader (Auction System) by vDk
                Script version: 1.2a [ -- FIXED CLONE ITEMS BUG -- ]
]]--
local config = {
        levelRequiredToAdd = 50,
        maxOffersPerPlayer = 5,
        SendOffersOnlyInPZ = true,
        blocked_items = {2165, 2152, 2148, 2160, 2166, 2167, 2168, 2169, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209, 2210, 2211, 2212, 2213, 2214, 2215, 2343, 2433, 2640, 6132, 6300, 6301, 9932, 9933}
        }
function onSay(cid, words, param, channel)
        if(param == '') then
            local msg = "Market:\n\n/market buy, ID\n/market remove, ID\n/market add, ItemName, ItemPrice, ItemCount\n\nMore information look in us website!"
            doPlayerPopupFYI(cid, msg)
            return true
        end
 
        local t = string.explode(param, ",")
        if(t[1] == "add") then
                if((not t[2]) or (not t[3]) or (not t[4])) then
                    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
                    return true
                end          

                if(not tonumber(t[3]) or (not tonumber(t[4]))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't set valid price or items count.")
                        return true
                end
 
                if(string.len(t[3]) > 7 or (string.len(t[4]) > 3)) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This price or item count is too high.")
                        return true
                end
 
                local item = getItemIdByName(t[2], false)
                if(not item) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.")
                        return true
                end
 
                if(getPlayerLevel(cid) < config.levelRequiredToAdd) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have required (" .. config.levelRequiredToAdd .. ") level.")
                        return true
                end
 
                if(getPlayerVocation(cid) == 0) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have the profession to do that action!")
                        return true
                end

                if(isInArray(config.blocked_items, item)) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This item is blocked.")
                        return true
                end
 
                if(getPlayerItemCount(cid, item) < (tonumber(t[4]))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you don't have this item(s).")
                        return true
                end
 
                local check = db.getResult("SELECT `id` FROM `auction_system` WHERE `player` = " .. getPlayerGUID(cid) .. ";")
                if(check:getID() == -1) then
                elseif(check:getRows(true) >= config.maxOffersPerPlayer) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't add more offers (max. " .. config.maxOffersPerPlayer .. ")")
                        return true
                end
 
                if(config.SendOffersOnlyInPZ) then    
                        if(not getTilePzInfo(getPlayerPosition(cid))) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you add offert to database.")
                                return true
                        end
                end
 
                if(tonumber(t[4]) < 1 or (tonumber(t[3]) < 1)) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to type a number higher than 0.")
                        return true
                end
 
                local itemcount, costgp = math.floor(t[4]), math.floor(t[3])
                doPlayerRemoveItem(cid, item, itemcount)
                db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")")
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You successfully add " .. itemcount .." " .. t[2] .." for " .. costgp .. " gps to offerts database.")
        end
 
        if(t[1] == "buy") then
                if(not tonumber(t[2])) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                        return true
                end
 
                local buy = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")
                if(buy:getID() ~= -1) then
                        if(getPlayerMoney(cid) < buy:getDataInt("cost")) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have enoguh GP.")
                                buy:free()
                                return true
                        end
 
                        if(getPlayerName(cid) == getPlayerNameByGUID(buy:getDataInt("player"))) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you can't buy your own items.")
                                buy:free()
                                return true
                        end
 
                        if(getPlayerFreeCap(cid) < getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")))then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You try to buy a " .. buy:getDataString("item_name") .. ". It weight " .. getItemWeightById(buy:getDataInt("item_id"), buy:getDataInt("count")) .. " cap oz. and you have only " .. getPlayerFreeCap(cid) .. " oz. free capacity. Put some items to depot and try again.")
                                buy:free()
                                return true
                        end

                        if(getPlayerVocation(cid) == 0 or getPlayerVocation(cid) == 13 or getPlayerVocation(cid) == 14) then
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don't have the profession to do that action!")
                                return true
                        end
 
                        if(isItemStackable((buy:getDataString("item_id")))) then
                                doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))
                        else
                                for i = 1, buy:getDataInt("count") do
                                        doPlayerAddItem(cid, buy:getDataString("item_id"), 1)
                                end
                        end
 
                        doPlayerRemoveMoney(cid, buy:getDataInt("cost"))
                        db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You bought " .. buy:getDataInt("count") .. " ".. buy:getDataString("item_name") .. " for " .. buy:getDataInt("cost") .. " gps!")
                        db.executeQuery("UPDATE `players` SET `auction_balance` = `auction_balance` + " .. buy:getDataInt("cost") .. " WHERE `id` = " .. buy:getDataInt("player") .. ";")
                        buy:free()
                else
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                end
        end
 
        if(t[1] == "remove") then
                if((not tonumber(t[2]))) then
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                        return true
                end
 
                                if(config.SendOffersOnlyInPZ) then    
                                        if(not getTilePzInfo(getPlayerPosition(cid))) then
                                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You must be in PZ area when you remove offerts from database.")
                                                return true
                                        end
                end
 
                local delete = db.getResult("SELECT * FROM `auction_system` WHERE `id` = " .. (tonumber(t[2])) .. ";")        
                if(delete:getID() ~= -1) then
                        if(getPlayerGUID(cid) == delete:getDataInt("player")) then
                                db.executeQuery("DELETE FROM `auction_system` WHERE `id` = " .. t[2] .. ";")
                                if(isItemStackable(delete:getDataString("item_id"))) then
                                        doPlayerAddItem(cid, delete:getDataString("item_id"), delete:getDataInt("count"))
                                else
                                        for i = 1, delete:getDataInt("count") do
                                                doPlayerAddItem(cid, delete:getDataString("item_id"), 1)
                                        end
                                end
 
                                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your offert has been deleted from offerts database.")
                        else
                                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "This is not your offert!")
                        end
                delete:free()
                else
                        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Wrong ID.")
                end
        end
 
        if(t[1] == "withdraw") then
                local balance = db.getResult("SELECT `auction_balance` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. ";")
                if(balance:getDataInt("auction_balance") < 1) then
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have money on your auction balance.")
                        balance:free()
                        return true
                end
 
                doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You got " .. balance:getDataInt("auction_balance") .. " gps from auction system!")
                doPlayerAddMoney(cid, balance:getDataInt("auction_balance"))
                db.executeQuery("UPDATE `players` SET `auction_balance` = '0' WHERE `id` = " .. getPlayerGUID(cid) .. ";")
                balance:free()
        end
        return true
end

 

Ai no item add

 if(t[1] == "add") then 

Teria que colocar a parte do rarity do item

 


db.executeQuery("INSERT INTO `auction_system` (`player`, `item_name`, `item_id`, `count`, `cost`, `date`) VALUES (" .. getPlayerGUID(cid) .. ", \"" .. t[2] .. "\", " .. getItemIdByName(t[2]) .. ", " .. itemcount .. ", " .. costgp ..", " .. os.time() .. ")")

 

E no buy

if(t[1] == "buy") then

Teria que colocar a parte do rarirty tbm


doPlayerAddItem(cid, buy:getDataString("item_id"), buy:getDataInt("count"))

 

Tbm, eu acho que é só isso, mas não sei como faze

 

Editado por gmstrikker (veja o histórico de edições)
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 Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo