Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

 

seu servidor não tem a função 'isPokeball'

 

tenta adc na sua lib essa função(obs n sei o id das suas pokeball)

function isPokeball(item)
if not item then return false end
if item >= 11826 and item <= 11837 then
return true
end
if item >= 11737 and item <= 11748 then
return true
end
if item >= 12596 and item <= 12610 then
return true
end
return false
end

 

mim ajudar a colocar essa função na LIB? só tem essa parte com esse atributo no items.xml 

só que dar esse erro ao ligar

[27/05/2015 10:06:47] [Warning - Items::loadFromXml] Unknown key value ispokeball
[27/05/2015 10:06:47] [Warning - Items::loadFromXml] Unknown key value ispokeball
[27/05/2015 10:06:47] [Warning - Items::loadFromXml] Unknown key value ispokeball
[27/05/2015 10:06:47] [Warning - Items::loadFromXml] Unknown key value ispokeball

 

essa parte achei no items.xml

<item id="10975" article="a" name="Bulbasaur's pokeball">
 <attribute key="ispokeball" value="1"/>
     <attribute key="weight" value="100" />
     <attribute key="slotType" value="feet" />
    </item>
 
    <item id="10976" article="a" name="Bulbasaur's pokeball being used">
 <attribute key="ispokeball" value="1"/>
     <attribute key="weight" value="100" />
     <attribute key="slotType" value="feet" />
    </item>
 
    <item id="10977" article="a" name="Bulbasaur's discharged pokeball">
 <attribute key="ispokeball" value="1"/>
     <attribute key="weight" value="100" />
     <attribute key="slotType" value="feet" />
    </item>
  • Respostas 12
  • Visualizações 599
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • -- tabela adicionado ao configuration só procura por price = ..-- function onLook(cid, thing, position, lookDistance)                                                                                  

  • agr diz que não a função 'sendMsgToPlayer'   adc na lib   function sendMsgToPlayer(cid, tpw, msg)      --alterado v1.7 \/\/\/ if not isCreature(cid) or not tpw or not msg then return true end retu

  • vai procurando as funções no google que falta e adc na sua lib   function doShowLookPlayer(cid, target, msg) doPlayerSendCancel(cid, "ShowLook/"..getPlayerStorageValue(target, 21121).."/"..msg..""

Postado
Change it.transformToFree to it.isPokeball
 
Like this:
 
else if(tmpStrValue == "isPokeball")
{
    if(readXMLInteger(itemAttributesNode, "value", intValue))
        it.isPokeball = intValue;
}
 
And declare isPokeball in items.h under Ammo_t ammoType add
 
bool isPokeball;
 
and in items.cpp under decayTime = 0; add
 
isPokeball = false;
 
credito: acubens

vodkart_logo.png

[*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*]

 

DISCORDvodkart#6090

 

Postado
Change it.transformToFree to it.isPokeball   Like this:

pelo que entendi está pedindo para trocar "it.transformToFree" por "it.isPokeball" que arquivo é esse pra trocar? 

items.h ou items.cpp? 

achei essas funções no some fuctions de outro servidor, não poderia ajudar em nada? 

 

if isContainer(container) and getContainerSize(container) > 0 then      
for slot=0, (getContainerSize(container)-1) do
local item = getContainerItem(container, slot)
if isContainer(item.uid) then
local itemsbag = getPokeballsInContainer(item.uid)
for i=0, #itemsbag do
if not isInArray(items, itemsbag[i]) then
                           table.insert(items, itemsbag[i])
                        end
end
elseif isPokeball(item.itemid) then
   for a, b in pairs (pokeballs) do
                        if item.itemid == b.on then
                           if duel and getPlayerLevel(cid) >= (pokes[getItemAttribute(item.uid, "poke")].level + getPokeballBoost(item)) then    
         table.insert(items, item.uid)                                            --alterado v1.8
                           elseif not duel then
                              table.insert(items, item.uid)
                           end
                   end
                    end
end
end
end
return items
end

 

function isPokeball(item)
return isItemPokeball(item)
end              

 

function getItemsInContainerById(container, itemid) -- Function By Kydrai
local items = {}
if isContainer(container) and getContainerSize(container) > 0 then
   for slot=0, (getContainerSize(container)-1) do
       local item = getContainerItem(container, slot)
       if isContainer(item.uid) then
          local itemsbag = getItemsInContainerById(item.uid, itemid)
          for i=0, #itemsbag do
              table.insert(items, itemsbag[i])
          end
       else
          if itemid == item.itemid then
             table.insert(items, item.uid)
          end
       end
   end
end
return items
end
 
function getPokeballsInContainer(container) -- Function By Kydrai
if not isContainer(container) then return {} end
local items = {}
if isContainer(container) and getContainerSize(container) > 0 then
for slot=0, (getContainerSize(container)-1) do
local item = getContainerItem(container, slot)
if isContainer(item.uid) then
local itemsbag = getPokeballsInContainer(item.uid)
for i=0, #itemsbag do
table.insert(items, itemsbag[i])
end
elseif isPokeball(item.itemid) then
table.insert(items, item.uid)
end
end
end
return items
end

achei essa parte no beds.cpp 

else if(it.transformToFree)
{
const ItemType& newType = Item::items[it.transformToFree];
if(newType.type == ITEM_TYPE_BED)
g_game.transformItem(this, it.transformToFree);
}
}

 

e no items.cpp

else if(tmpStrValue == "transformto")
{
if(readXMLInteger(itemAttributesNode, "value", intValue))
it.transformToFree = intValue;
}

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

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo