Ir para conteúdo

Featured Replies

Postado

Infelizmente só encontrei 1 tópico falando sobre isso , e não estou conseguindo fazê-la funcionar.


http://www.tibiaking.com/forum/topic/40511-atualizado-quest-que-da-pok%C3%A9mon-como-recompensa/


Gostaria que alguém pudesse me explicar ou ajudar , já que não achei o tópico bem explicativo.


Ao clicar no baú ele abre , não vem nada , e pra piorar , ainda consigo arrastá-lo dentro do jogo.


Não tenho a minima idéia do que o valor do Storage seja , ou como vê-lo se já esta em uso.


Qualquer tipo de explicação e ajuda será bem vinda.


EDIT: Ao clicar no baú tem aparecido este erro
 

[07/02/2015 19:36:36] [Error - Action Interface] 
[07/02/2015 19:36:36] data/actions/scripts/teste.lua:onUse
[07/02/2015 19:36:36] Description: 
[07/02/2015 19:36:36] data/actions/scripts/teste.lua:9: attempt to call global 'addPokeToPlayer' (a nil value)
[07/02/2015 19:36:36] stack traceback:
[07/02/2015 19:36:36] data/actions/scripts/teste.lua:9: in function <data/actions/scripts/teste.lua:6>

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

Resolvido por xBen

Ir para solução
  • Respostas 5
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Ta faltando uma função no teu server, não sei se vai funcionar mas adicione isso em alguma lib pode ser na 000-const não mecho com servidor de pokemon, peguei essa função aqui no forum, mas vi que é

Postado
  • Solução

Ta faltando uma função no teu server, não sei se vai funcionar mas adicione isso em alguma lib pode ser na 000-const
não mecho com servidor de pokemon, peguei essa função aqui no forum, mas vi que é do pda 

 

function addPokeToPlayer(cid, pokemon, boost, gender, ball, unique)             --alterado v1.9 \/ peguem ele todo...
local genders = {
["male"] = 4,
["female"] = 3,
[1] = 4,
[0] = 3,
[4] = 4,
[3] = 3,
}
if not isCreature(cid) then return false end

local pokemon = doCorrectString(pokemon)
if not pokes[pokemon] then return false end

   local GENDER = (gender and genders[gender]) and genders[gender] or getRandomGenderByName(pokemon)
   local btype = (ball and pokeballs[ball]) and ball or isShinyName(pokemon) and "shinynormal" or "normal"
   local happy = 250

   if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
      item = doCreateItemEx(11826)
   else
      item = addItemInFreeBag(getPlayerSlotItem(cid, 3).uid, 11826, 1)   
   end
   if not item then return false end

   doItemSetAttribute(item, "poke", pokemon)
   doItemSetAttribute(item, "hp", 1)
   doItemSetAttribute(item, "happy", happy)
   doItemSetAttribute(item, "gender", GENDER)
   doSetItemAttribute(item, "hands", 0)
   doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
   doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
   if boost and tonumber(boost) and tonumber(boost) > 0 and tonumber(boost) <= 50 then
      doItemSetAttribute(item, "boost", boost)
   end
   if unique then
      doItemSetAttribute(item, "unique", getCreatureName(cid))
   end
                                                                             
   if (getPlayerFreeCap(cid) >= 6 and not isInArray({5, 6}, getPlayerGroupId(cid))) or not hasSpaceInContainer(getPlayerSlotItem(cid, 3).uid) then
      doPlayerSendMailByName(getCreatureName(cid), item, 1)
      sendMsgToPlayer(cid, 27, "You are already holding six pokemons, so your new pokemon was sent to your depot.")
   end
   if (isShinyName(pokemon) or (boost and tonumber(boost) and tonumber(boost) >= 10)) and pokeballs["shiny"..btype] then
      doTransformItem(item, pokeballs["shiny"..btype].on)
   else
      doTransformItem(item, pokeballs[btype].on)
   end
return true
end

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

Postado
  • Autor

Pode ser adicionado em qualquer lugar do arquivo ? ou devo substituir essa pela ja existente ?




EDIT: Funcionou , muito obrigado , REP+ .


Aproveitando a situação , o baú continua podendo ser arrastado , não sei se é pelo fato da conta ser god , é possível fazer com que ele não possa ser arrastado por ninguém ?


EDIT2: Realmente fiz o teste e só consigo arrastar o baú no char god , mas caso tenha algum jeito de tornar isso impossível , continuo aceitando ajuda ^^

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

Postado

Procure pelo forum ou em algum outro a função onMoveItem adicione na sua source e depois crie um creaturescript onMoveItem e coloque isso

 

function onMoveItem(cid, item, count, toContainer, fromContainer, fromPos, toPos)
    if item.actionid == 1000 then
        return false
    end

    return true
end

depois vai no RME e coloca a actionid 1000 no bau ai ele não vai se mecher :D

Postado
  • Autor

Procure pelo forum ou em algum outro a função onMoveItem adicione na sua source e depois crie um creaturescript onMoveItem e coloque isso

 

function onMoveItem(cid, item, count, toContainer, fromContainer, fromPos, toPos)
    if item.actionid == 1000 then
        return false
    end

    return true
end

depois vai no RME e coloca a actionid 1000 no bau ai ele não vai se mecher :D

1° Como adiciono na source ?

2° Não vai nada no XML ? Só é preciso criar o arquivo e colar isso dentro ? não deveria ir algo no creaturescripts.xml ?

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.6k

Informação Importante

Confirmação de Termo