AsMinaPira 13 Postado Outubro 14, 2012 Share Postado Outubro 14, 2012 Olá gostaria de pedir ajuda para adapitar esse script pro PDA sem lv do Slicer, esse é um script da Boost Stone: function onUse(cid, item, topos, item2, frompos) local myball = getPlayerSlotItem(cid, 8) local boost = getItemAttribute(myball.uid, "boost") or 0 local boosts = 0 if boost == 50 then return doPlayerSendCancel(cid, "Sorry, is not possible.") end if #getCreatureSummons(cid) >= 1 then if getPlayerAccess(cid) == 6 then boosts = 49 end boosts = boosts + 1 local pokemon = getItemAttribute(myball.uid, "poke") local off = pokes[pokemon].offense * boost_rate * boosts local def = pokes[pokemon].defense * boost_rate * boosts local agi = pokes[pokemon].agility * boosts local spatk = pokes[pokemon].specialattack * boost_rate * boosts local vit = pokes[pokemon].vitality * boost_rate * boosts doSetItemAttribute(myball.uid, "boost", boost + boosts) doItemSetAttribute(myball.uid, "offense", getItemAttribute(myball.uid, "offense") + off) doItemSetAttribute(myball.uid, "defense", getItemAttribute(myball.uid, "defense") + def) doItemSetAttribute(myball.uid, "speed", getItemAttribute(myball.uid, "speed") + agi) doItemSetAttribute(myball.uid, "specialattack", getItemAttribute(myball.uid, "specialattack") + spatk) doItemSetAttribute(myball.uid, "vitality", getItemAttribute(myball.uid, "vitality") + vit) doRemoveItem(item.uid) doSendMagicEffect(getThingPos(item2.uid), 28) doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.") doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..boosts + boost..".") doSendAnimatedText(getThingPos(item2.uid), "+1", 60) doPlayerSetVocation(cid,4) else return doPlayerSendCancel(cid, "Only use in yours pokemons.") end return true end O erro que aconteçe é o seguinte a stone da o boost, mas não é removida. Obrigado desde já. Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/ Compartilhar em outros sites More sharing options...
1579091 109 Postado Outubro 14, 2012 Share Postado Outubro 14, 2012 Não seria mais facil adicionar a tag doRemoveitem(cid, id do item)?? Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1363254 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Outubro 14, 2012 Share Postado Outubro 14, 2012 no serv sem lvl n precisa de nd disso ;x tente esse.. tem q usar a stone na pokeball do main slot! function onUse(cid, item, topos, item2, frompos) local boost = getItemAttribute(item2.uid, "boost") or 0 local boosts = 1 if boost == 50 then return doPlayerSendCancel(cid, "Sorry, is not possible.") end if isPokeball(item2.uid) and item2.uid == getPlayerSlotItem(cid, 8).uid then if getPlayerAccess(cid) == 6 then boosts = 50-boost end local pokemon = getItemAttribute(item2.uid, "poke") doSetItemAttribute(item2.uid, "boost", boost + boosts) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 28) doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.") doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..(boost + boosts)..".") doSendAnimatedText(getThingPos(cid), "+1", 60) else return doPlayerSendCancel(cid, "Only use in the pokeball in the main slot.") end return true end Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1363320 Compartilhar em outros sites More sharing options...
AsMinaPira 13 Postado Outubro 15, 2012 Autor Share Postado Outubro 15, 2012 @slicer Testei o seu script e agora bugo de vez, não da pra dar boost, só da pra usar quando o pokemon está do lado do char(antes o pokemon podia tar a 5 sqms de distância que boostava só não removia a stone). Erro que aparece quando tento usar a boost stone: [14/10/2012 22:27:22] [Error - Action Interface] [14/10/2012 22:27:22] data/actions/scripts/booststone.lua:onUse [14/10/2012 22:27:22] Description: [14/10/2012 22:27:22] (luaGetItemAttribute) Item not found Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1363944 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Outubro 15, 2012 Share Postado Outubro 15, 2012 (editado) mano como eu flei eh pra usar na ball q ta no slot do poke.. ;x fiz isso pra evitar dos caras usarem em outros pokes.. se quiser eu edito denovo para usar nos pokes.. vc q sabe ^^ oh esse aki \/ ta pra usar em summons do player... dai tu escolhe qual usar ^^ function onUse(cid, item, topos, item2, frompos) local ball = getPlayerSlotItem(cid, 8).uid local boost = getItemAttribute(ball, "boost") or 0 local boosts = 1 if not isSummon(item2.uid) or cid ~= getCreatureMaster(item2.uid) then return doPlayerSendCancel(cid, "Use only in your pokemons!") end if boost == 50 then return doPlayerSendCancel(cid, "Sorry, is not possible.") end if getPlayerAccess(cid) == 6 then boosts = 50-boost end local pokemon = getItemAttribute(ball, "poke") doSetItemAttribute(ball, "boost", boost + boosts) doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), 28) doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.") doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..(boost + boosts)..".") doSendAnimatedText(getThingPos(cid), "+1", 60) return true end Editado Outubro 15, 2012 por Slicer Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1364243 Compartilhar em outros sites More sharing options...
AsMinaPira 13 Postado Outubro 15, 2012 Autor Share Postado Outubro 15, 2012 (editado) Sim eu vi que a boost era pra ser usada no main slot, mas aparececia a msg da function doSendCancel "Only use in the pokeball in the main slot", e não bostava tbm(Esqueci de mencionar isso antes), e aparecia aquele erro quando tentava usar a boost com o pokemon fora da ball. o Code que você passou agora pouco funfou quase 100% o unico porem é que o pokemon tem de estar do lado do dono. Se você puder arrumar isso fica 100%, ahh e a propósito o script funfa com boost stone agrupavél? Anyway thanks por estar me ajudando. Editado Outubro 15, 2012 por AsMinaPira Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1364602 Compartilhar em outros sites More sharing options...
Slicer 1070 Postado Outubro 15, 2012 Share Postado Outubro 15, 2012 tpw.. para usar de longe, pelo q sei, tens q por a tag do actions.xml assim.. <action itemid="2391-2394" event="script" value="catch.lua" allowfaruse="1"/> o allowfaruse ="1" q faz poder usar uma action de longe... sobre funcionar com stone agrupavel.. achu melhor usar esse aki entao.. function onUse(cid, item, topos, item2, frompos) local ball = getPlayerSlotItem(cid, 8).uid local boost = getItemAttribute(ball, "boost") or 0 local boosts = 1 if not isSummon(item2.uid) or cid ~= getCreatureMaster(item2.uid) then return doPlayerSendCancel(cid, "Use only in your pokemons!") end if boost == 50 then return doPlayerSendCancel(cid, "Sorry, is not possible.") end if getPlayerAccess(cid) == 6 then boosts = 50-boost end local pokemon = getItemAttribute(ball, "poke") doSetItemAttribute(ball, "boost", boost + boosts) if item.type ~= 0 then doChangeTypeItem(item.uid, item.type - 1) else doRemoveItem(item.uid, 1) end doSendMagicEffect(getThingPos(cid), 28) doPlayerSendTextMessage(cid, 27, "Congrulations, your "..pokemon..", as beem boosted +1.") doPlayerSendTextMessage(cid, 27, "Now your "..pokemon.." have a boost +"..(boost + boosts)..".") doSendAnimatedText(getThingPos(cid), "+1", 60) return true end Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1364611 Compartilhar em outros sites More sharing options...
Stigal 585 Postado Abril 20, 2018 Share Postado Abril 20, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/196456-encerrado-boost-stone-help/#findComment-1731092 Compartilhar em outros sites More sharing options...
Posts Recomendados